Package org.eclipse.graphiti.platform.ga
Interface IVisualState
-
- All Known Implementing Classes:
VisualState
public interface IVisualStateThe Interface IVisualState allows to access and modify the transient visual state of an element. The transient visual state includes all feedback relevant attributes, which are not persisted, like selection-feedback or action-target-feedback.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIVisualState.Type
-
Field Summary
Fields Modifier and Type Field Description static intACTION_TARGET_ALLOWEDConstant indicating, that an action is allowed for this target.static intACTION_TARGET_FEEDBACK_OFFConstant indicating, that there is currently no action target feedback.static intACTION_TARGET_FORBIDDENConstant indicating, that an action is forbidden for this targetstatic intHOVER_OFFstatic intHOVER_ONstatic intSELECTION_FEEDBACK_OFFConstant indicating, that there is currently no selection feedback.static intSELECTION_PRIMARYConstant indicating, that the visual element is the primary selection.static intSELECTION_SECONDARYConstant indicating, that the visual element is the secondary selection.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddChangeListener(IVisualStateChangeListener listener)Adds a change listener.intgetActionTargetFeedback()Returns the action target feedback.intgetHoverFeedback()Gets the hover feedback.intgetSelectionFeedback()Returns the selection feedback.voidremoveChangeListener(IVisualStateChangeListener listener)Removes 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.
-
-
-
Field Detail
-
ACTION_TARGET_FEEDBACK_OFF
static final int ACTION_TARGET_FEEDBACK_OFF
Constant indicating, that there is currently no action target feedback.- See Also:
- Constant Field Values
-
ACTION_TARGET_ALLOWED
static final int ACTION_TARGET_ALLOWED
Constant indicating, that an action is allowed for this target.- See Also:
- Constant Field Values
-
ACTION_TARGET_FORBIDDEN
static final int ACTION_TARGET_FORBIDDEN
Constant indicating, that an action is forbidden for this target- See Also:
- Constant Field Values
-
SELECTION_FEEDBACK_OFF
static final int SELECTION_FEEDBACK_OFF
Constant indicating, that there is currently no selection feedback.- See Also:
- Constant Field Values
-
SELECTION_PRIMARY
static final int SELECTION_PRIMARY
Constant indicating, that the visual element is the primary selection.- See Also:
- Constant Field Values
-
SELECTION_SECONDARY
static final int SELECTION_SECONDARY
Constant indicating, that the visual element is the secondary selection.- See Also:
- Constant Field Values
-
HOVER_ON
static final int HOVER_ON
- See Also:
- Constant Field Values
-
HOVER_OFF
static final int HOVER_OFF
- See Also:
- Constant Field Values
-
-
Method Detail
-
addChangeListener
void addChangeListener(IVisualStateChangeListener listener)
Adds a change listener.- Parameters:
listener- The change listener to add.
-
removeChangeListener
void removeChangeListener(IVisualStateChangeListener listener)
Removes a change listener.- Parameters:
listener- The change listener to remove.
-
getActionTargetFeedback
int getActionTargetFeedback()
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.- Returns:
- The action target feedback.
-
setActionTargetFeedback
void setActionTargetFeedback(int feedback)
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.- Parameters:
feedback- The action target feedback to set.
-
getSelectionFeedback
int getSelectionFeedback()
Returns the selection feedback. It indicates if the visual element is selected.- Returns:
- The selection feedback.
-
setSelectionFeedback
void setSelectionFeedback(int feedback)
Sets the selection feedback. It indicates if the visual element is selected.- Parameters:
feedback- The selection feedback to set.
-
setHoverFeedback
void setHoverFeedback(int feedback)
Sets the hover feedback. It indicates if the visual element is hovered.- Parameters:
feedback- The selection feedback to set.
-
getHoverFeedback
int getHoverFeedback()
Gets the hover feedback.- Returns:
- the int hover feedback.
-
-