Package org.eclipse.graphiti.platform.ga
Class VisualState
java.lang.Object
org.eclipse.graphiti.platform.ga.VisualState
- All Implemented Interfaces:
IVisualState
The Class VisualState, a simple implementation of
IVisualState
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.graphiti.platform.ga.IVisualState
IVisualState.Type
-
Field Summary
Fields inherited from interface org.eclipse.graphiti.platform.ga.IVisualState
ACTION_TARGET_ALLOWED, ACTION_TARGET_FEEDBACK_OFF, ACTION_TARGET_FORBIDDEN, HOVER_OFF, HOVER_ON, SELECTION_FEEDBACK_OFF, SELECTION_PRIMARY, SELECTION_SECONDARY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(IVisualStateChangeListener listener) Adds a change listener.protected void
Propagates the visual state change to registered listeners.int
Returns the action target feedback.int
Gets the hover feedback.int
Returns the selection feedback.void
Removes a change listener.void
setActionTargetFeedback
(int feedback) Sets the action target feedback.void
setHoverFeedback
(int feedback) Sets the hover feedback.void
setSelectionFeedback
(int feedback) Sets the selection feedback.
-
Constructor Details
-
VisualState
public VisualState()
-
-
Method Details
-
addChangeListener
Description copied from interface:IVisualState
Adds a change listener.- Specified by:
addChangeListener
in interfaceIVisualState
- Parameters:
listener
- The change listener to add.
-
removeChangeListener
Description copied from interface:IVisualState
Removes a change listener.- Specified by:
removeChangeListener
in interfaceIVisualState
- Parameters:
listener
- The change listener to remove.
-
fireVisualStateChanged
Propagates the visual state change to registered listeners.- Parameters:
e
- theVisualStateChangedEvent
event
-
getActionTargetFeedback
public int getActionTargetFeedback()Description copied from interface:IVisualState
Returns the action target feedback. It indicates, if a certain action (e.g. drag & drop) can be performed with this visual element as a target.- Specified by:
getActionTargetFeedback
in interfaceIVisualState
- Returns:
- The action target feedback.
-
setActionTargetFeedback
public void setActionTargetFeedback(int feedback) Description copied from interface:IVisualState
Sets the action target feedback. It indicates, if a certain action (e.g. drag & drop) can be performed with this visual element as a target.- Specified by:
setActionTargetFeedback
in interfaceIVisualState
- Parameters:
feedback
- The action target feedback to set.
-
getSelectionFeedback
public int getSelectionFeedback()Description copied from interface:IVisualState
Returns the selection feedback. It indicates if the visual element is selected.- Specified by:
getSelectionFeedback
in interfaceIVisualState
- Returns:
- The selection feedback.
-
setSelectionFeedback
public void setSelectionFeedback(int feedback) Description copied from interface:IVisualState
Sets the selection feedback. It indicates if the visual element is selected.- Specified by:
setSelectionFeedback
in interfaceIVisualState
- Parameters:
feedback
- The selection feedback to set.
-
setHoverFeedback
public void setHoverFeedback(int feedback) Description copied from interface:IVisualState
Sets the hover feedback. It indicates if the visual element is hovered.- Specified by:
setHoverFeedback
in interfaceIVisualState
- Parameters:
feedback
- The selection feedback to set.
-
getHoverFeedback
public int getHoverFeedback()Description copied from interface:IVisualState
Gets the hover feedback.- Specified by:
getHoverFeedback
in interfaceIVisualState
- Returns:
- the int hover feedback.
-