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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeListener(IVisualStateChangeListener listener) Adds a change listener.protected voidPropagates the visual state change to registered listeners.intReturns the action target feedback.intGets the hover feedback.intReturns the selection feedback.voidRemoves a change listener.voidsetActionTargetFeedback(int feedback) Sets the action target feedback.voidsetHoverFeedback(int feedback) Sets the hover feedback.voidsetSelectionFeedback(int feedback) Sets the selection feedback.
-
Constructor Details
-
VisualState
public VisualState()
-
-
Method Details
-
addChangeListener
Description copied from interface:IVisualStateAdds a change listener.- Specified by:
addChangeListenerin interfaceIVisualState- Parameters:
listener- The change listener to add.
-
removeChangeListener
Description copied from interface:IVisualStateRemoves a change listener.- Specified by:
removeChangeListenerin interfaceIVisualState- Parameters:
listener- The change listener to remove.
-
fireVisualStateChanged
Propagates the visual state change to registered listeners.- Parameters:
e- theVisualStateChangedEventevent
-
getActionTargetFeedback
public int getActionTargetFeedback()Description copied from interface:IVisualStateReturns 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:
getActionTargetFeedbackin interfaceIVisualState- Returns:
- The action target feedback.
-
setActionTargetFeedback
public void setActionTargetFeedback(int feedback) Description copied from interface:IVisualStateSets 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:
setActionTargetFeedbackin interfaceIVisualState- Parameters:
feedback- The action target feedback to set.
-
getSelectionFeedback
public int getSelectionFeedback()Description copied from interface:IVisualStateReturns the selection feedback. It indicates if the visual element is selected.- Specified by:
getSelectionFeedbackin interfaceIVisualState- Returns:
- The selection feedback.
-
setSelectionFeedback
public void setSelectionFeedback(int feedback) Description copied from interface:IVisualStateSets the selection feedback. It indicates if the visual element is selected.- Specified by:
setSelectionFeedbackin interfaceIVisualState- Parameters:
feedback- The selection feedback to set.
-
setHoverFeedback
public void setHoverFeedback(int feedback) Description copied from interface:IVisualStateSets the hover feedback. It indicates if the visual element is hovered.- Specified by:
setHoverFeedbackin interfaceIVisualState- Parameters:
feedback- The selection feedback to set.
-
getHoverFeedback
public int getHoverFeedback()Description copied from interface:IVisualStateGets the hover feedback.- Specified by:
getHoverFeedbackin interfaceIVisualState- Returns:
- the int hover feedback.
-