Package org.eclipse.graphiti.platform.ga
Interface IVisualState
- All Known Implementing Classes:
VisualState
public interface IVisualState
The 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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Constant indicating, that an action is allowed for this target.static final int
Constant indicating, that there is currently no action target feedback.static final int
Constant indicating, that an action is forbidden for this targetstatic final int
static final int
static final int
Constant indicating, that there is currently no selection feedback.static final int
Constant indicating, that the visual element is the primary selection.static final int
Constant indicating, that the visual element is the secondary selection. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(IVisualStateChangeListener listener) Adds a change listener.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.
-
Field Details
-
ACTION_TARGET_FEEDBACK_OFF
static final int ACTION_TARGET_FEEDBACK_OFFConstant indicating, that there is currently no action target feedback.- See Also:
-
ACTION_TARGET_ALLOWED
static final int ACTION_TARGET_ALLOWEDConstant indicating, that an action is allowed for this target.- See Also:
-
ACTION_TARGET_FORBIDDEN
static final int ACTION_TARGET_FORBIDDENConstant indicating, that an action is forbidden for this target- See Also:
-
SELECTION_FEEDBACK_OFF
static final int SELECTION_FEEDBACK_OFFConstant indicating, that there is currently no selection feedback.- See Also:
-
SELECTION_PRIMARY
static final int SELECTION_PRIMARYConstant indicating, that the visual element is the primary selection.- See Also:
-
SELECTION_SECONDARY
static final int SELECTION_SECONDARYConstant indicating, that the visual element is the secondary selection.- See Also:
-
HOVER_ON
static final int HOVER_ON- See Also:
-
HOVER_OFF
static final int HOVER_OFF- See Also:
-
-
Method Details
-
addChangeListener
Adds a change listener.- Parameters:
listener
- The change listener to add.
-
removeChangeListener
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.
-