VR
- The visual root node of the UI toolkit this
AbstractVisualPart
is used in, e.g. javafx.scene.Node in
case of JavaFX.V
- The visual node used by this AbstractVisualPart
.public abstract class AbstractVisualPart<VR,V extends VR> extends java.lang.Object implements IVisualPart<VR,V>
AbstractVisualPart
is an abstract implementation of the
IVisualPart
interface.Type | Property and Description |
---|---|
javafx.beans.property.ReadOnlyBooleanProperty |
active |
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> |
adapters |
ReadOnlySetMultimapProperty<IVisualPart<VR,? extends VR>,java.lang.String> |
anchoragesUnmodifiable
Returns a read-only set-multimap property containing this part's
anchorages and their corresponding roles.
|
ReadOnlyMultisetProperty<IVisualPart<VR,? extends VR>> |
anchoredsUnmodifiable
Returns an unmodifiable read-only multiset property representing the
anchoreds of this
IVisualPart . |
javafx.beans.property.ReadOnlyListProperty<IVisualPart<VR,? extends VR>> |
children
Returns a read-only property containing the children of this
IVisualPart . |
javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<VR,? extends VR>> |
parent
Returns a read-only property that refers to the parent of this
IVisualPart . |
javafx.beans.property.BooleanProperty |
refreshVisual
A boolean property indicating whether this
IVisualPart should
refresh its visuals or not. |
IAdaptable.Bound<A extends IAdaptable>
ANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTY, REFRESH_VISUAL_PROPERTY
ADAPTERS_PROPERTY
ACTIVE_PROPERTY
Constructor and Description |
---|
AbstractVisualPart()
Creates a new
AbstractVisualPart instance, setting the
AdaptableScope for each of its IAdaptable -compliant types
(super classes implementing IAdaptable and super-interfaces
extending IAdaptable ) to the newly created instance (see
AdaptableScopes#scopeTo(IAdaptable)). |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates this
IVisualPart (if it is not already active) by
setting (and propagating) the new active state first and delegating to
doActivate() afterwards. |
protected void |
activateChildren()
Activates the children of this
AbstractVisualPart . |
javafx.beans.property.ReadOnlyBooleanProperty |
activeProperty() |
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> |
adaptersProperty() |
void |
addChild(IVisualPart<VR,? extends VR> child)
Adds the given child to the list of this part's children.
|
void |
addChild(IVisualPart<VR,? extends VR> child,
int index)
Adds the given child to the list of this part's children at the specified
index.
|
void |
addChildren(java.util.List<? extends IVisualPart<VR,? extends VR>> children)
Adds the given children to the list of this part's children.
|
void |
addChildren(java.util.List<? extends IVisualPart<VR,? extends VR>> children,
int index)
Adds the given children to the list of this part's children at the
specified index.
|
protected void |
addChildVisual(IVisualPart<VR,? extends VR> child,
int index)
Performs the addition of the child's visual to this
IVisualPart 's visual. |
ReadOnlySetMultimapProperty<IVisualPart<VR,? extends VR>,java.lang.String> |
anchoragesUnmodifiableProperty()
Returns a read-only set-multimap property containing this part's
anchorages and their corresponding roles.
|
ReadOnlyMultisetProperty<IVisualPart<VR,? extends VR>> |
anchoredsUnmodifiableProperty()
Returns an unmodifiable read-only multiset property representing the
anchoreds of this
IVisualPart . |
void |
attachAnchored(IVisualPart<VR,? extends VR> anchored)
Used by an anchored
IVisualPart to establish an
anchorage-anchored relationship with this anchorage IVisualPart . |
void |
attachToAnchorage(IVisualPart<VR,? extends VR> anchorage)
Attaches the given
IVisualPart to the given anchorage under the
"default" role. |
void |
attachToAnchorage(IVisualPart<VR,? extends VR> anchorage,
java.lang.String role)
Attaches the given
IVisualPart to the given anchorage under the
given role. |
protected void |
attachToAnchorageVisual(IVisualPart<VR,? extends VR> anchorage,
java.lang.String role)
Attaches this part's visual to the visual of the given anchorage.
|
javafx.beans.property.ReadOnlyListProperty<IVisualPart<VR,? extends VR>> |
childrenProperty()
Returns a read-only property containing the children of this
IVisualPart . |
protected abstract V |
createVisual()
Creates this part's visual.
|
void |
deactivate()
Deactivates this
IVisualPart (if it is active) by delegating to
doDeactivate() first and setting (and propagating) the new
active state afterwards. |
protected void |
deactivateChildren()
Deactivates the children of this
AbstractVisualPart . |
void |
detachAnchored(IVisualPart<VR,? extends VR> anchored)
Used by an anchored
IVisualPart to unestablish an
anchorage-anchored relationship with this anchorage IVisualPart . |
void |
detachFromAnchorage(IVisualPart<VR,? extends VR> anchorage)
Detaches this
IVisualPart from the given anchorage
IVisualPart under the 'default' role. |
void |
detachFromAnchorage(IVisualPart<VR,? extends VR> anchorage,
java.lang.String role)
Detaches this
IVisualPart from the given anchorage
IVisualPart under the given role. |
protected void |
detachFromAnchorageVisual(IVisualPart<VR,? extends VR> anchorage,
java.lang.String role)
Detaches this part's visual from the visual of the given anchorage.
|
protected IViewer<VR> |
determineViewer(IVisualPart<VR,? extends VR> parent,
com.google.common.collect.Multiset<IVisualPart<VR,? extends VR>> anchoreds)
Determines the viewer reference via the given parent or any of the given
anchoreds.
|
void |
dispose() |
protected void |
doActivate()
Post
activate() hook. |
protected void |
doDeactivate()
Pre
deactivate() hook. |
protected abstract void |
doRefreshVisual(V visual)
Refreshes this part's visualization based on this part's content.
|
<T> T |
getAdapter(AdapterKey<T> key) |
<T> T |
getAdapter(java.lang.Class<T> classKey) |
<T> T |
getAdapter(com.google.common.reflect.TypeToken<T> key) |
javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> |
getAdapters()
Gets the value of the property adapters.
|
<T> java.util.Map<AdapterKey<? extends T>,T> |
getAdapters(java.lang.Class<? super T> classKey) |
<T> java.util.Map<AdapterKey<? extends T>,T> |
getAdapters(com.google.common.reflect.TypeToken<? super T> key) |
ObservableSetMultimap<IVisualPart<VR,? extends VR>,java.lang.String> |
getAnchoragesUnmodifiable()
Gets the value of the property anchoragesUnmodifiable.
|
ObservableMultiset<IVisualPart<VR,? extends VR>> |
getAnchoredsUnmodifiable()
Gets the value of the property anchoredsUnmodifiable.
|
java.util.Map<AdapterKey<? extends IBehavior<VR>>,IBehavior<VR>> |
getBehaviors()
Returns a
Map of this part's behaviors and their corresponding
AdapterKey s. |
javafx.collections.ObservableList<IVisualPart<VR,? extends VR>> |
getChildrenUnmodifiable()
Returns an unmodifiable
ObservableList of this part's children. |
IVisualPart<VR,? extends VR> |
getParent()
Gets the value of the property parent.
|
java.util.Map<AdapterKey<? extends IPolicy<VR>>,IPolicy<VR>> |
getPolicies()
Returns a
Map of this part's policies and their corresponding
AdapterKey s. |
IRootPart<VR,? extends VR> |
getRoot()
Returns the
IRootPart . |
protected IViewer<VR> |
getViewer()
Returns the
IViewer that contains this part. |
V |
getVisual()
Returns this part's visual.
|
boolean |
isActive() |
boolean |
isRefreshVisual()
Gets the value of the property refreshVisual.
|
javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<VR,? extends VR>> |
parentProperty()
Returns a read-only property that refers to the parent of this
IVisualPart . |
void |
refreshVisual()
Refreshes this
IVisualPart 's visuals. |
javafx.beans.property.BooleanProperty |
refreshVisualProperty()
A boolean property indicating whether this
IVisualPart should
refresh its visuals or not. |
protected void |
register(IViewer<VR> viewer)
Called when a link to the
IViewer is obtained. |
protected void |
registerAtVisualPartMap(IViewer<VR> viewer,
V visual)
Registers this part for the given visual in the visual-part-map of the
given
IViewer . |
void |
removeChild(IVisualPart<VR,? extends VR> child)
Removes the given
IVisualPart from the list of this part's
children. |
void |
removeChildren(java.util.List<? extends IVisualPart<VR,? extends VR>> children)
Removes the given
IVisualPart s from the list of this part's
children. |
protected void |
removeChildVisual(IVisualPart<VR,? extends VR> child,
int index)
Removes the child's visual from this
IVisualPart 's visual. |
void |
reorderChild(IVisualPart<VR,? extends VR> child,
int index)
Swaps the given
IVisualPart with the part at the given index
position within this part's list of children. |
<T> void |
setAdapter(T adapter) |
<T> void |
setAdapter(T adapter,
java.lang.String role) |
<T> void |
setAdapter(com.google.common.reflect.TypeToken<T> adapterType,
T adapter) |
<T> void |
setAdapter(com.google.common.reflect.TypeToken<T> adapterType,
T adapter,
java.lang.String role) |
void |
setParent(IVisualPart<VR,? extends VR> newParent)
Sets the parent
IVisualPart . |
void |
setRefreshVisual(boolean isRefreshVisual)
Sets the value of the property refreshVisual.
|
protected void |
unregister(IViewer<VR> viewer)
Called when the link to the
IViewer is lost. |
protected void |
unregisterFromVisualPartMap(IViewer<VR> viewer,
V visual)
Removes the given visual from the visual-part-map of the given viewer.
|
<T> void |
unsetAdapter(T adapter) |
public javafx.beans.property.ReadOnlyBooleanProperty activeProperty
activeProperty
in interface IActivatable
isActive()
public javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> adaptersProperty
adaptersProperty
in interface IAdaptable
getAdapters()
public ReadOnlySetMultimapProperty<IVisualPart<VR,? extends VR>,java.lang.String> anchoragesUnmodifiableProperty
anchoragesUnmodifiableProperty
in interface IVisualPart<VR,V extends VR>
IVisualPart.ANCHORAGES_PROPERTY
.getAnchoragesUnmodifiable()
public ReadOnlyMultisetProperty<IVisualPart<VR,? extends VR>> anchoredsUnmodifiableProperty
anchoredsUnmodifiableProperty
in interface IVisualPart<VR,V extends VR>
IVisualPart.ANCHOREDS_PROPERTY
.getAnchoredsUnmodifiable()
public javafx.beans.property.ReadOnlyListProperty<IVisualPart<VR,? extends VR>> childrenProperty
childrenProperty
in interface IVisualPart<VR,V extends VR>
IVisualPart.CHILDREN_PROPERTY
.IVisualPart.getChildrenUnmodifiable()
,
IVisualPart.addChild(IVisualPart)
,
IVisualPart.addChild(IVisualPart, int)
,
IVisualPart.addChildren(List)
,
IVisualPart.addChildren(List, int)
,
IVisualPart.removeChild(IVisualPart)
,
IVisualPart.removeChildren(List)
,
IVisualPart.reorderChild(IVisualPart, int)
public javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<VR,? extends VR>> parentProperty
parentProperty
in interface IVisualPart<VR,V extends VR>
IVisualPart.PARENT_PROPERTY
.getParent()
,
setParent(IVisualPart)
public javafx.beans.property.BooleanProperty refreshVisualProperty
refreshVisualProperty
in interface IVisualPart<VR,V extends VR>
IVisualPart.REFRESH_VISUAL_PROPERTY
.isRefreshVisual()
,
setRefreshVisual(boolean)
public AbstractVisualPart()
AbstractVisualPart
instance, setting the
AdaptableScope
for each of its IAdaptable
-compliant types
(super classes implementing IAdaptable
and super-interfaces
extending IAdaptable
) to the newly created instance (see
AdaptableScopes#scopeTo(IAdaptable)).public final void activate()
IVisualPart
(if it is not already active) by
setting (and propagating) the new active state first and delegating to
doActivate()
afterwards. During the call to
doActivate()
, isActive()
will thus already return
true
. If the IVisualPart
is already active, this
operation will be a no-op.activate
in interface IActivatable
deactivate()
,
isActive()
protected void activateChildren()
AbstractVisualPart
.public javafx.beans.property.ReadOnlyBooleanProperty activeProperty()
activeProperty
in interface IActivatable
isActive()
public javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> adaptersProperty()
adaptersProperty
in interface IAdaptable
getAdapters()
public void addChild(IVisualPart<VR,? extends VR> child)
IVisualPart
addChild
in interface IVisualPart<VR,V extends VR>
child
- The IVisualPart
which is added to the list of this
part's children.public void addChild(IVisualPart<VR,? extends VR> child, int index)
IVisualPart
addChild
in interface IVisualPart<VR,V extends VR>
child
- The IVisualPart
which is added to the list of this
part's children.index
- The index at which the given IVisualPart
is inserted
into this part's children list.public void addChildren(java.util.List<? extends IVisualPart<VR,? extends VR>> children)
IVisualPart
addChildren
in interface IVisualPart<VR,V extends VR>
children
- The IVisualPart
s which are added to the list of this
part's children.public void addChildren(java.util.List<? extends IVisualPart<VR,? extends VR>> children, int index)
IVisualPart
addChildren
in interface IVisualPart<VR,V extends VR>
children
- The IVisualPart
s which are added to the list of this
part's children.index
- The index at which the given IVisualPart
s are inserted
into this part's children list.protected void addChildVisual(IVisualPart<VR,? extends VR> child, int index)
IVisualPart
's visual.child
- The IVisualPart
being addedindex
- The child's positionaddChild(IVisualPart, int)
public ReadOnlySetMultimapProperty<IVisualPart<VR,? extends VR>,java.lang.String> anchoragesUnmodifiableProperty()
IVisualPart
anchoragesUnmodifiableProperty
in interface IVisualPart<VR,V extends VR>
IVisualPart.ANCHORAGES_PROPERTY
.getAnchoragesUnmodifiable()
public ReadOnlyMultisetProperty<IVisualPart<VR,? extends VR>> anchoredsUnmodifiableProperty()
IVisualPart
IVisualPart
.anchoredsUnmodifiableProperty
in interface IVisualPart<VR,V extends VR>
IVisualPart.ANCHOREDS_PROPERTY
.getAnchoredsUnmodifiable()
public void attachAnchored(IVisualPart<VR,? extends VR> anchored)
IVisualPart
IVisualPart
to establish an
anchorage-anchored relationship with this anchorage IVisualPart
.
Clients should never call this operation directly but instead add the
anchorage to its anchored via the IVisualPart.attachToAnchorage(IVisualPart)
and IVisualPart.attachToAnchorage(IVisualPart, String)
operations, which
will indirectly lead to a call here.
attachAnchored
in interface IVisualPart<VR,V extends VR>
anchored
- An IVisualPart
to attach to this anchorage
IVisualPart
as anchored.public void attachToAnchorage(IVisualPart<VR,? extends VR> anchorage)
IVisualPart
IVisualPart
to the given anchorage under the
"default" role.attachToAnchorage
in interface IVisualPart<VR,V extends VR>
anchorage
- The anchorage IVisualPart
to attach this part to.public void attachToAnchorage(IVisualPart<VR,? extends VR> anchorage, java.lang.String role)
IVisualPart
IVisualPart
to the given anchorage under the
given role.attachToAnchorage
in interface IVisualPart<VR,V extends VR>
anchorage
- The anchorage IVisualPart
to attach this part to.role
- The role under which this IVisualPart
is attached to
the given anchorage. null
.protected void attachToAnchorageVisual(IVisualPart<VR,? extends VR> anchorage, java.lang.String role)
anchorage
- The anchorage IVisualPart
.role
- The anchorage role.public javafx.beans.property.ReadOnlyListProperty<IVisualPart<VR,? extends VR>> childrenProperty()
IVisualPart
IVisualPart
.childrenProperty
in interface IVisualPart<VR,V extends VR>
IVisualPart.CHILDREN_PROPERTY
.IVisualPart.getChildrenUnmodifiable()
,
IVisualPart.addChild(IVisualPart)
,
IVisualPart.addChild(IVisualPart, int)
,
IVisualPart.addChildren(List)
,
IVisualPart.addChildren(List, int)
,
IVisualPart.removeChild(IVisualPart)
,
IVisualPart.removeChildren(List)
,
IVisualPart.reorderChild(IVisualPart, int)
protected abstract V createVisual()
public final void deactivate()
IVisualPart
(if it is active) by delegating to
doDeactivate()
first and setting (and propagating) the new
active state afterwards. During the call to doDeactivate()
,
isActive()
will thus still return true
. If the
IVisualPart
is not active, this operation will be a no-op.deactivate
in interface IActivatable
activate()
,
isActive()
protected void deactivateChildren()
AbstractVisualPart
.public void detachAnchored(IVisualPart<VR,? extends VR> anchored)
IVisualPart
IVisualPart
to unestablish an
anchorage-anchored relationship with this anchorage IVisualPart
.
Clients should never call this operation directly but instead remove the
anchorage from its anchored via the
IVisualPart.detachFromAnchorage(IVisualPart)
or
IVisualPart.detachFromAnchorage(IVisualPart, String)
operations, which will
indirectly lead to a call here.
detachAnchored
in interface IVisualPart<VR,V extends VR>
anchored
- An IVisualPart
(currently attached as anchored to this
anchorage IVisualPart
) to detach from this anchorage
IVisualPart
as anchored.public void detachFromAnchorage(IVisualPart<VR,? extends VR> anchorage)
IVisualPart
IVisualPart
from the given anchorage
IVisualPart
under the 'default' role.detachFromAnchorage
in interface IVisualPart<VR,V extends VR>
anchorage
- The anchorage IVisualPart
to detach this part from.public void detachFromAnchorage(IVisualPart<VR,? extends VR> anchorage, java.lang.String role)
IVisualPart
IVisualPart
from the given anchorage
IVisualPart
under the given role.detachFromAnchorage
in interface IVisualPart<VR,V extends VR>
anchorage
- The anchorage IVisualPart
to detach this part from.role
- The role under which the IVisualPart
can be found in
this part's anchorages.protected void detachFromAnchorageVisual(IVisualPart<VR,? extends VR> anchorage, java.lang.String role)
anchorage
- The anchorage IVisualPart
.role
- The anchorage role.protected IViewer<VR> determineViewer(IVisualPart<VR,? extends VR> parent, com.google.common.collect.Multiset<IVisualPart<VR,? extends VR>> anchoreds)
parent
- The parent to obtain the viewer from.anchoreds
- The anchoreds to alternatively obtain the viewer from.public void dispose()
dispose
in interface IDisposable
protected void doActivate()
activate()
hook. Does nothing by defaultprotected void doDeactivate()
deactivate()
hook. Does nothing by defaultprotected abstract void doRefreshVisual(V visual)
visual
- This part's visual.public <T> T getAdapter(AdapterKey<T> key)
getAdapter
in interface IAdaptable
public <T> T getAdapter(java.lang.Class<T> classKey)
getAdapter
in interface IAdaptable
public <T> T getAdapter(com.google.common.reflect.TypeToken<T> key)
getAdapter
in interface IAdaptable
public javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> getAdapters()
getAdapters
in interface IAdaptable
public <T> java.util.Map<AdapterKey<? extends T>,T> getAdapters(java.lang.Class<? super T> classKey)
getAdapters
in interface IAdaptable
public <T> java.util.Map<AdapterKey<? extends T>,T> getAdapters(com.google.common.reflect.TypeToken<? super T> key)
getAdapters
in interface IAdaptable
public ObservableSetMultimap<IVisualPart<VR,? extends VR>,java.lang.String> getAnchoragesUnmodifiable()
getAnchoragesUnmodifiable
in interface IVisualPart<VR,V extends VR>
ObservableSetMultimap
of this part's anchorages and
their corresponding roles.public ObservableMultiset<IVisualPart<VR,? extends VR>> getAnchoredsUnmodifiable()
getAnchoredsUnmodifiable
in interface IVisualPart<VR,V extends VR>
ObservableMultiset
of this part's
anchoreds.public java.util.Map<AdapterKey<? extends IBehavior<VR>>,IBehavior<VR>> getBehaviors()
IVisualPart
Map
of this part's behaviors and their corresponding
AdapterKey
s.getBehaviors
in interface IVisualPart<VR,V extends VR>
Map
of this part's behaviors and their corresponding
AdapterKey
s.public javafx.collections.ObservableList<IVisualPart<VR,? extends VR>> getChildrenUnmodifiable()
IVisualPart
ObservableList
of this part's children.getChildrenUnmodifiable
in interface IVisualPart<VR,V extends VR>
ObservableList
of this part's children.public IVisualPart<VR,? extends VR> getParent()
getParent
in interface IVisualPart<VR,V extends VR>
public java.util.Map<AdapterKey<? extends IPolicy<VR>>,IPolicy<VR>> getPolicies()
IVisualPart
Map
of this part's policies and their corresponding
AdapterKey
s.getPolicies
in interface IVisualPart<VR,V extends VR>
Map
of this part's policies and their corresponding
AdapterKey
s.public IRootPart<VR,? extends VR> getRoot()
IVisualPart
IRootPart
. This method should only be called
internally or by helpers such as edit policies. The root can be used to
get the viewer.protected IViewer<VR> getViewer()
IViewer
that contains this part.IViewer
that contains this part.public V getVisual()
IVisualPart
getVisual
in interface IVisualPart<VR,V extends VR>
public boolean isActive()
isActive
in interface IActivatable
true
if this IVisualPart
is active.public boolean isRefreshVisual()
isRefreshVisual
in interface IVisualPart<VR,V extends VR>
true
if this part is allowed to refresh its
visualization based on its content, otherwise false
.public javafx.beans.property.ReadOnlyObjectProperty<IVisualPart<VR,? extends VR>> parentProperty()
IVisualPart
IVisualPart
.parentProperty
in interface IVisualPart<VR,V extends VR>
IVisualPart.PARENT_PROPERTY
.getParent()
,
setParent(IVisualPart)
public final void refreshVisual()
IVisualPart
's visuals. Delegates to
doRefreshVisual(Object)
in case isRefreshVisual()
is
not set to false
.refreshVisual
in interface IVisualPart<VR,V extends VR>
public javafx.beans.property.BooleanProperty refreshVisualProperty()
IVisualPart
IVisualPart
should
refresh its visuals or not.refreshVisualProperty
in interface IVisualPart<VR,V extends VR>
IVisualPart.REFRESH_VISUAL_PROPERTY
.isRefreshVisual()
,
setRefreshVisual(boolean)
protected void register(IViewer<VR> viewer)
IViewer
is obtained. Registers this
IVisualPart
for its "main" visual (i.e. the one returned by
getVisual()
) at the IViewer.getVisualPartMap()
of the
given IViewer
. To simplify matters, this IVisualPart
only
has to register itself for its "main" visual, i.e. if the "main" visual
contains a number of children visuals, it does not need to register
itself for those children visuals. Therefore, if the visualization
changes dynamically, the registration at the visual-part-map does not
need to be updated. Consequently, when looking up an IVisualPart
for a given visual in the visual-part-map, it is required to walk up the
visual hierarchy until a registered visual is found.viewer
- The IViewer
to register at.protected void registerAtVisualPartMap(IViewer<VR> viewer, V visual)
IViewer
.viewer
- The IViewer
of which the visual-part-map is extended.visual
- The visual for which this part is registered in the viewer's
visual-part-map.public void removeChild(IVisualPart<VR,? extends VR> child)
IVisualPart
IVisualPart
from the list of this part's
children.removeChild
in interface IVisualPart<VR,V extends VR>
child
- The IVisualPart
which is removed from the list of this
part's children.public void removeChildren(java.util.List<? extends IVisualPart<VR,? extends VR>> children)
IVisualPart
IVisualPart
s from the list of this part's
children.removeChildren
in interface IVisualPart<VR,V extends VR>
children
- The IVisualPart
s which are removed from the list of
this part's children.protected void removeChildVisual(IVisualPart<VR,? extends VR> child, int index)
IVisualPart
's visual.child
- The child IVisualPart
.index
- The index of the child whose visual is to be removed.public void reorderChild(IVisualPart<VR,? extends VR> child, int index)
IVisualPart
IVisualPart
with the part at the given index
position within this part's list of children.reorderChild
in interface IVisualPart<VR,V extends VR>
child
- The IVisualPart
which is reordered.index
- The index to which the part is reordered.public <T> void setAdapter(T adapter)
setAdapter
in interface IAdaptable
public <T> void setAdapter(T adapter, java.lang.String role)
setAdapter
in interface IAdaptable
public <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType, T adapter)
setAdapter
in interface IAdaptable
@InjectAdapters public <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType, T adapter, java.lang.String role)
setAdapter
in interface IAdaptable
public void setParent(IVisualPart<VR,? extends VR> newParent)
IVisualPart
.setParent
in interface IVisualPart<VR,V extends VR>
newParent
- The new parent IVisualPart
or null
.public void setRefreshVisual(boolean isRefreshVisual)
setRefreshVisual
in interface IVisualPart<VR,V extends VR>
isRefreshVisual
- Whether IVisualPart.refreshVisual()
should perform updates of the
visual (true
) or behave like a no-op operation (
false
).protected void unregister(IViewer<VR> viewer)
IViewer
is lost. Unregisters this
IVisualPart
for its "main" visual (i.e. the one returned by
getVisual()
) from the IViewer.getVisualPartMap()
of the
given IViewer
. To simplify matters, this IVisualPart
only
has to unregister itself for its "main" visual, i.e. if the "main" visual
contains a number of children visuals, it does not need to unregister
itself for those children visuals. Therefore, if the visualization
changes dynamically, the registration at the visual-part-map does not
need to be updated. Consequently, when looking up an IVisualPart
for a given visual in the visual-part-map, it is required to walk up the
visual hierarchy until a registered visual is found.viewer
- The IViewer
to unregister from.protected void unregisterFromVisualPartMap(IViewer<VR> viewer, V visual)
viewer
- The IViewer
of which the visual-part-map is changed.visual
- The visual which is removed from the visual-part-map.public <T> void unsetAdapter(T adapter)
unsetAdapter
in interface IAdaptable
Copyright (c) 2014 itemis AG and others. All rights reserved.