VR - The visual root node of the UI toolkit used, e.g.
javafx.scene.Node in case of JavaFX.public abstract class AbstractBehavior<VR> extends java.lang.Object implements IBehavior<VR>
| Modifier and Type | Field and Description |
|---|---|
protected java.beans.PropertyChangeSupport |
pcs
A
PropertyChangeSupport that is used as a delegate to notify
listeners about changes to this object. |
ACTIVE_PROPERTY| Constructor and Description |
|---|
AbstractBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
protected void |
addFeedback(java.util.List<? extends IVisualPart<VR,? extends VR>> targets)
Switches to the relevant adaptable scopes (
switchAdaptableScopes()) and uses the injected
IFeedbackPartFactory to create feedback parts for the given list
of target parts. |
protected void |
addFeedback(java.util.List<? extends IVisualPart<VR,? extends VR>> targets,
java.util.Map<java.lang.Object,java.lang.Object> contextMap)
Switches to the relevant adaptable scopes (
switchAdaptableScopes()) and uses the injected
IFeedbackPartFactory to create feedback parts for the given list
of target parts and the given context map. |
protected void |
addHandles(java.util.List<? extends IVisualPart<VR,? extends VR>> targets)
Switches to the relevant adaptable scopes (
switchAdaptableScopes()) and uses the injected
IHandlePartFactory to create handle parts for the given list of
target parts. |
protected void |
addHandles(java.util.List<? extends IVisualPart<VR,? extends VR>> targets,
java.util.Map<java.lang.Object,java.lang.Object> contextMap)
Switches to the relevant adaptable scopes (
switchAdaptableScopes()) and uses the injected
IHandlePartFactory to create handle parts for the given list of
target parts and the given context map. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
deactivate() |
IVisualPart<VR,? extends VR> |
getAdaptable() |
protected java.util.List<IFeedbackPart<VR,? extends VR>> |
getFeedbackParts()
Returns a list containing the feedback parts most recently created by
this behavior.
|
protected java.util.List<IHandlePart<VR,? extends VR>> |
getHandleParts()
Returns a list containing the handle parts most recently created by this
behavior.
|
IVisualPart<VR,? extends VR> |
getHost()
Returns the host
IVisualPart of this IBehavior, i.e. the
part where this behavior is registered as an adapter. |
boolean |
isActive() |
protected void |
removeFeedback(java.util.List<? extends IVisualPart<VR,? extends VR>> targets)
Removes the feedback parts previously created for the given target parts.
|
protected void |
removeHandles(java.util.List<? extends IVisualPart<VR,? extends VR>> targets)
Removes the handle parts previously created for the given target parts.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
setAdaptable(IVisualPart<VR,? extends VR> adaptable) |
protected void |
switchAdaptableScopes()
Adjusts the relevant adaptable scopes to refer to the host of this
behavior, it's viewer, and it's domain, respectively.
|
protected java.beans.PropertyChangeSupport pcs
PropertyChangeSupport that is used as a delegate to notify
listeners about changes to this object. May be used by subclasses to
trigger the notification of listeners.public void activate()
activate in interface IActivatableprotected void addFeedback(java.util.List<? extends IVisualPart<VR,? extends VR>> targets)
switchAdaptableScopes()) and uses the injected
IFeedbackPartFactory to create feedback parts for the given list
of target parts. The resulting feedback parts are anchored to the target
parts and added as children to the host's root part.targets - The IVisualParts for which feedback parts should be
generated.addFeedback(List, Map)protected void addFeedback(java.util.List<? extends IVisualPart<VR,? extends VR>> targets, java.util.Map<java.lang.Object,java.lang.Object> contextMap)
switchAdaptableScopes()) and uses the injected
IFeedbackPartFactory to create feedback parts for the given list
of target parts and the given context map. The resulting feedback parts
are anchored to the target parts and added as children to the
host's root part.targets - The IVisualParts for which feedback parts should be
generated.contextMap - A map containing context information for the creation of the
feedback parts.protected void addHandles(java.util.List<? extends IVisualPart<VR,? extends VR>> targets)
switchAdaptableScopes()) and uses the injected
IHandlePartFactory to create handle parts for the given list of
target parts. The resulting handle parts are anchored to the target parts
and added as children to the host's root part.targets - The IVisualParts for which handle parts should be
generated.addHandles(List, Map)protected void addHandles(java.util.List<? extends IVisualPart<VR,? extends VR>> targets, java.util.Map<java.lang.Object,java.lang.Object> contextMap)
switchAdaptableScopes()) and uses the injected
IHandlePartFactory to create handle parts for the given list of
target parts and the given context map. The resulting handle parts are
anchored to the target parts and added as children to the
host's root part.targets - The IVisualParts for which handle parts should be
generated.contextMap - A map containing context information for the creation of the
handle parts.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener in interface IPropertyChangeNotifierpublic void deactivate()
deactivate in interface IActivatablepublic IVisualPart<VR,? extends VR> getAdaptable()
getAdaptable in interface IAdaptable.Bound<IVisualPart<VR,? extends VR>>protected java.util.List<IFeedbackPart<VR,? extends VR>> getFeedbackParts()
protected java.util.List<IHandlePart<VR,? extends VR>> getHandleParts()
public IVisualPart<VR,? extends VR> getHost()
IBehaviorIVisualPart of this IBehavior, i.e. the
part where this behavior is registered as an adapter.getHost in interface IBehavior<VR>IVisualPart of this IBehavior.public boolean isActive()
isActive in interface IActivatableprotected void removeFeedback(java.util.List<? extends IVisualPart<VR,? extends VR>> targets)
targets - The list of target parts for which previously created feedback
is to be removed.protected void removeHandles(java.util.List<? extends IVisualPart<VR,? extends VR>> targets)
targets - The list of target parts for which previously created handles
are to be removed.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener in interface IPropertyChangeNotifierpublic void setAdaptable(IVisualPart<VR,? extends VR> adaptable)
setAdaptable in interface IAdaptable.Bound<IVisualPart<VR,? extends VR>>protected void switchAdaptableScopes()
Copyright (c) 2014 itemis AG and others. All rights reserved.