Package org.eclipse.graphiti.platform.ga

## Class VisualState

- java.lang.Object
- - org.eclipse.graphiti.platform.ga.VisualState

All Implemented Interfaces:
  `IVisualState`

    public class VisualState
    extends java.lang.Object
    implements 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
`VisualState()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addChangeListener​(IVisualStateChangeListener listener)` Adds a change listener.
`protected void` `fireVisualStateChanged​(VisualStateChangedEvent e)` Propagates the visual state change to registered listeners.
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### VisualState

    public VisualState()

### Method Detail

#### addChangeListener

    public void addChangeListener​(IVisualStateChangeListener listener)

Description copied from interface: `IVisualState`
Adds a change listener.

Specified by:
  `addChangeListener` in interface `IVisualState`
Parameters:
  `listener` - The change listener to add.

#### removeChangeListener

    public void removeChangeListener​(IVisualStateChangeListener listener)

Description copied from interface: `IVisualState`
Removes a change listener.

Specified by:
  `removeChangeListener` in interface `IVisualState`
Parameters:
  `listener` - The change listener to remove.

#### fireVisualStateChanged

    protected void fireVisualStateChanged​(VisualStateChangedEvent e)

Propagates the visual state change to registered listeners.

Parameters:
  `e` - the `VisualStateChangedEvent` 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 interface `IVisualState`
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 interface `IVisualState`
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 interface `IVisualState`
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 interface `IVisualState`
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 interface `IVisualState`
Parameters:
  `feedback` - The selection feedback to set.

#### getHoverFeedback

    public int getHoverFeedback()

Description copied from interface: `IVisualState`
Gets the hover feedback.

Specified by:
  `getHoverFeedback` in interface `IVisualState`
Returns:
  the int hover feedback.