Package org.eclipse.gef.mvc.fx.behaviors

## Class SelectionBehavior

- java.lang.Object
- - org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior
  - - org.eclipse.gef.mvc.fx.behaviors.SelectionBehavior

All Implemented Interfaces:
  `IActivatable`, `IAdaptable.Bound<IVisualPart<? extends javafx.scene.Node>>`, `IBehavior`

    public class SelectionBehavior
    extends AbstractBehavior

The default selection behavior is responsible for creating and removing selection feedback and handles.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound

`IAdaptable.Bound.Impl<T extends IAdaptable>`

### Field Summary

Fields
`static java.lang.String` `SELECTION_FEEDBACK_PART_FACTORY` The adapter role for the `IFeedbackPartFactory` that is used to generate hover feedback parts.
`static java.lang.String` `SELECTION_HANDLE_PART_FACTORY` The adapter role for the `IHandlePartFactory` that is used to generate hover handle parts.

### Fields inherited from interface org.eclipse.gef.common.activate.IActivatable

`ACTIVE_PROPERTY`

### Constructor Summary

Constructors
`SelectionBehavior()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `addFeedbackAndHandles​(java.util.List<? extends IContentPart<? extends javafx.scene.Node>> selected)`
`protected void` `doActivate()` Post `AbstractBehavior.activate()` hook that may be overwritten to e.g. register listeners.
`protected void` `doDeactivate()` Pre `AbstractBehavior.deactivate()` hook that may be overwritten to e.g. unregister listeners.
`protected IFeedbackPartFactory` `getFeedbackPartFactory​(IViewer viewer)` Returns the `IFeedbackPartFactory` that should be used for feedback creation.
`protected IHandlePartFactory` `getHandlePartFactory​(IViewer viewer)` Returns the `IHandlePartFactory` that should be used for handle creation.
`protected SelectionModel` `getSelectionModel()` Returns the `SelectionModel` in the context of the `host`.
`protected void` `removeFeedbackAndHandles​(java.util.List<? extends IContentPart<? extends javafx.scene.Node>> selected)`

### Methods inherited from class org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior

`activate, activeProperty, adaptableProperty, addAnchoreds, addAnchoreds, addFeedback, addFeedback, addHandles, addHandles, clearFeedback, clearHandles, deactivate, getAdaptable, getFeedback, getFeedback, getFeedbackPartFactory, getFeedbackPerTargetSet, getHandlePartFactory, getHandles, getHandles, getHandlesPerTargetSet, getHost, hasFeedback, hasFeedback, hasHandles, hasHandles, isActive, removeAnchoreds, removeFeedback, removeFeedback, removeFeedback, removeHandles, removeHandles, removeHandles, setAdaptable, updateHandles, updateHandles`

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

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

### Field Detail

#### SELECTION_FEEDBACK_PART_FACTORY

    public static final java.lang.String SELECTION_FEEDBACK_PART_FACTORY

The adapter role for the `IFeedbackPartFactory` that is used to generate hover feedback parts.

See Also:
  Constant Field Values

#### SELECTION_HANDLE_PART_FACTORY

    public static final java.lang.String SELECTION_HANDLE_PART_FACTORY

The adapter role for the `IHandlePartFactory` that is used to generate hover handle parts.

See Also:
  Constant Field Values

### Constructor Detail

#### SelectionBehavior

    public SelectionBehavior()

### Method Detail

#### addFeedbackAndHandles

    protected void addFeedbackAndHandles​(java.util.List<? extends IContentPart<? extends javafx.scene.Node>> selected)

Parameters:
  `selected` - List of `IContentPart`s for which to add feedback and handles.

#### doActivate

    protected void doActivate()

Description copied from class: `AbstractBehavior`
Post `AbstractBehavior.activate()` hook that may be overwritten to e.g. register listeners.

Overrides:
  `doActivate` in class `AbstractBehavior`

#### doDeactivate

    protected void doDeactivate()

Description copied from class: `AbstractBehavior`
Pre `AbstractBehavior.deactivate()` hook that may be overwritten to e.g. unregister listeners.

Overrides:
  `doDeactivate` in class `AbstractBehavior`

#### getFeedbackPartFactory

    protected IFeedbackPartFactory getFeedbackPartFactory​(IViewer viewer)

Description copied from class: `AbstractBehavior`
Returns the `IFeedbackPartFactory` that should be used for feedback creation.

Overrides:
  `getFeedbackPartFactory` in class `AbstractBehavior`
Parameters:
  `viewer` - The `IViewer` for which to determine the `IFeedbackPartFactory` for this `IBehavior`.
Returns:
  The `IFeedbackPartFactory` that should be used for feedback creation.

#### getHandlePartFactory

    protected IHandlePartFactory getHandlePartFactory​(IViewer viewer)

Description copied from class: `AbstractBehavior`
Returns the `IHandlePartFactory` that should be used for handle creation.

Overrides:
  `getHandlePartFactory` in class `AbstractBehavior`
Parameters:
  `viewer` - The `IViewer` for which to determine the `IHandlePartFactory` for this `IBehavior`.
Returns:
  The `IHandlePartFactory` that should be used for feedback creation.

#### getSelectionModel

    protected SelectionModel getSelectionModel()

Returns the `SelectionModel` in the context of the `host`.

Returns:
  The `SelectionModel` in the context of the `host`.

#### removeFeedbackAndHandles

    protected void removeFeedbackAndHandles​(java.util.List<? extends IContentPart<? extends javafx.scene.Node>> selected)

Parameters:
  `selected` - List of `IContentPart`s for which to remove feedback and handles.