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

Nested Classes
Modifier and Type
Interface
Description
`static enum`
`IVisualState.Type`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`ACTION_TARGET_ALLOWED`
Constant indicating, that an action is allowed for this target.
`static final int`
`ACTION_TARGET_FEEDBACK_OFF`
Constant indicating, that there is currently no action target feedback.
`static final int`
`ACTION_TARGET_FORBIDDEN`
Constant indicating, that an action is forbidden for this target
`static final int`
`HOVER_OFF`
`static final int`
`HOVER_ON`
`static final int`
`SELECTION_FEEDBACK_OFF`
Constant indicating, that there is currently no selection feedback.
`static final int`
`SELECTION_PRIMARY`
Constant indicating, that the visual element is the primary selection.
`static final int`
`SELECTION_SECONDARY`
Constant indicating, that the visual element is the secondary selection.

## Method Summary

Modifier and Type
Method
Description
`void`
`addChangeListener(IVisualStateChangeListener listener)`
Adds a change listener.
`int`
`getActionTargetFeedback()`
Returns the action target feedback.
`int`
`getHoverFeedback()`
Gets the hover feedback.
`int`
`getSelectionFeedback()`
Returns the selection feedback.
`void`
`removeChangeListener(IVisualStateChangeListener listener)`
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_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 Details

### 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 invalid input: '&' 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 invalid input: '&' 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.