org.eclipse.graphiti.ui.internal.editor

## Class GFMarqueeSelectionTool

- java.lang.Object
- - org.eclipse.gef.util.FlagSupport
  - - org.eclipse.gef.tools.AbstractTool
    - - org.eclipse.graphiti.ui.internal.editor.GFMarqueeSelectionTool

All Implemented Interfaces:
  org.eclipse.gef.RequestConstants, org.eclipse.gef.Tool

Direct Known Subclasses:
  GFMarqueeDragTracker

    public class GFMarqueeSelectionTool
    extends org.eclipse.gef.tools.AbstractTool

This is a copy of class org.eclipse.gef.tools.MarqueeSelectionTool. In this GEF class there are too many methods declared as private. Hence overriding of this class does not make sense. Only the implementation of calculateNewSelection() has been changed. In this case the insets of the GF figures will be considered.

A Tool which selects multiple objects inside a rectangular area of a Graphical Viewer. If the SHIFT key is pressed at the beginning of the drag, the enclosed items will be appended to the current selection. If the MOD1 key is pressed at the beginning of the drag, the enclosed items will have their selection state inverted.

By default, only editparts whose figure's are on the primary layer will be considered within the enclosed rectangle.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.eclipse.gef.tools.AbstractTool

`org.eclipse.gef.tools.AbstractTool.Input`

### Field Summary

Fields
`static int` `BEHAVIOR_CONNECTIONS_TOUCHED` This behaviour selects connections that intersect the marquee rectangle.
`static int` `BEHAVIOR_NODES_AND_CONNECTIONS` This behaviour selects nodes completely encompassed by the marquee rectangle, and all connections between those nodes.
`static int` `BEHAVIOR_NODES_CONTAINED` This behaviour selects nodes completely encompassed by the marquee rectangle.
`static Object` `PROPERTY_MARQUEE_BEHAVIOR` The property to be used in `AbstractTool.setProperties(java.util.Map)` for `setMarqueeBehavior(int)`.

### Fields inherited from class org.eclipse.gef.tools.AbstractTool

`PROPERTY_UNLOAD_WHEN_FINISHED`

### Fields inherited from interface org.eclipse.gef.RequestConstants

`REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER`

### Constructor Summary

Constructors
Constructor and Description
`GFMarqueeSelectionTool()` Creates a new MarqueeSelectionTool of default type `BEHAVIOR_NODES_CONTAINED`.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `deactivate()` Erases feedback if necessary and puts the tool into the terminal state.
`void` `setMarqueeBehavior(int type)` Sets the type of parts that this tool will select.
`void` `setViewer(org.eclipse.gef.EditPartViewer viewer)` Sets the viewer.

### Methods inherited from class org.eclipse.gef.tools.AbstractTool

`activate, commitDrag, focusGained, focusLost, keyDown, keyTraversed, keyUp, mouseDoubleClick, mouseDown, mouseDrag, mouseHover, mouseMove, mouseUp, mouseWheelScrolled, nativeDragFinished, nativeDragStarted, setDefaultCursor, setDisabledCursor, setEditDomain, setProperties, setUnloadWhenFinished, viewerEntered, viewerExited`

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

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

### Field Detail

#### PROPERTY_MARQUEE_BEHAVIOR

    public static final Object PROPERTY_MARQUEE_BEHAVIOR

The property to be used in `AbstractTool.setProperties(java.util.Map)` for `setMarqueeBehavior(int)`.

#### BEHAVIOR_NODES_CONTAINED

    public static final int BEHAVIOR_NODES_CONTAINED

This behaviour selects nodes completely encompassed by the marquee rectangle. This is the default behaviour for this tool.

#### BEHAVIOR_CONNECTIONS_TOUCHED

    public static final int BEHAVIOR_CONNECTIONS_TOUCHED

This behaviour selects connections that intersect the marquee rectangle.

#### BEHAVIOR_NODES_AND_CONNECTIONS

    public static final int BEHAVIOR_NODES_AND_CONNECTIONS

This behaviour selects nodes completely encompassed by the marquee rectangle, and all connections between those nodes.

### Constructor Detail

#### GFMarqueeSelectionTool

    public GFMarqueeSelectionTool()

Creates a new MarqueeSelectionTool of default type `BEHAVIOR_NODES_CONTAINED`.

### Method Detail

#### deactivate

    public void deactivate()

Erases feedback if necessary and puts the tool into the terminal state.

Specified by:
  `deactivate` in interface `org.eclipse.gef.Tool`
Overrides:
  `deactivate` in class `org.eclipse.gef.tools.AbstractTool`

#### setMarqueeBehavior

    public void setMarqueeBehavior(int type)

Sets the type of parts that this tool will select. This method should only be invoked once: when the tool is being initialized.

Parameters:
  `type` - `BEHAVIOR_CONNECTIONS_TOUCHED` or `BEHAVIOR_NODES_CONTAINED` or `BEHAVIOR_NODES_AND_CONNECTIONS`
Since:
  3.1

#### setViewer

    public void setViewer(org.eclipse.gef.EditPartViewer viewer)

Sets the viewer.

Specified by:
  `setViewer` in interface `org.eclipse.gef.Tool`
Overrides:
  `setViewer` in class `org.eclipse.gef.tools.AbstractTool`
Parameters:
  `viewer` - the viewer
See Also:
  `Tool.setViewer(org.eclipse.gef.EditPartViewer)`