ilog.views.interactor
Class IlvSelectInteractor

java.lang.Object
  extended by ilog.views.IlvManagerViewInteractor
      extended by ilog.views.interactor.IlvSelectInteractor
All Implemented Interfaces:
ManagerSelectionListener, Serializable, EventListener

public class IlvSelectInteractor
extends IlvManagerViewInteractor
implements ManagerSelectionListener

Interactor that lets you select, move, and edit an object in a manager.

See Also:
Serialized Form

Constructor Summary
IlvSelectInteractor()
          Constructs and initializes a new instance of a select interactor.
 
Method Summary
protected  void attach(IlvManagerView v)
          Called when the interactor is attached to the manager.
 void deSelectAll()
          Deselects all objects in the attached IlvManager.
 void deSelectObject(IlvGraphic obj)
          Deselects an object.
protected  void detach()
          Called when the interactor is removed from the manager.
protected  boolean dispatchToSelection(AWTEvent event)
          Dispatches the event to a selection object.
protected  void drawGhostMove(Graphics g, IlvGraphic obj, IlvRect rect)
          Draws a ghost of the object when an object is moved.
 float[] getLineStyle()
          Returns the dash style of the rectangle used when making a multiple selection.
 Cursor getMoveSelectionCursor()
          Returns the cursor used for moving a selection.
protected  IlvManagerViewInteractor getMoveSelectionInteractor()
          Called when the interactor needs to move the selected objects.
 IlvManager getMoveSelectionManager()
          Returns the manager that contains the selected objects to be moved.
 int getMoveThreshold()
          Returns the threshold after which a graphic object starts to move.
 Cursor getMultipleSelectionCursor()
          Returns the cursor used for multiple selection.
protected  IlvManagerViewInteractor getMultipleSelectionInteractor()
          Called when the interactor must select multiple objects.
 int getMultipleSelectionModifier()
          Returns the multiple selection modifier.
 int getMultipleSelectionModifierEx()
          Returns the extended multiple selection modifier.
 IlvGraphicEnumeration getSelectedMovingObjects(IlvManager manager)
          Returns the selected moving objects of the input manager.
 int getSelectionModifier()
          Returns the selection modifier.
 int getSelectionModifierEx()
          Returns the extended selection modifier.
protected  void handleExpose(Graphics g)
          Called by the view when the view is drawn.
 boolean isDragAllowed()
          Returns true if the interactor lets the user select objects by dragging a rectangle, false otherwise.
 boolean isEditionAllowed()
          Returns true if the interactor lets the user edit objects by dispatching the events to the interactor attached to the selection object.
 boolean isHyperEdgesFollowEndNodes()
          Returns true if the segments of unselected hyperedges will move when all end nodes of the hyperedge are selected and moved.
 boolean isLinksFollowEndNodes()
          Returns true if the bends of unselected links will move when both end nodes are selected and move.
 boolean isMoveAllowed()
          Returns true if the interactor lets the user move objects, false otherwise.
 boolean isMultipleSelectionMode()
          Returns true if the interactor allows the user to select multiple objects simultaneously.
protected  boolean isMultipleSelectionModifierDown(MouseEvent event)
          Tests if the multiple selection modifier is currently down.
 boolean isObjectInteractorEnabled()
          Returns whether or not the IlvObjectInteractor will be called on an IlvGraphic before completing the usual event dispatching of the IlvSelectInteractor.
 boolean isOpaqueDragSelection()
          Returns an indication of whether the interactor is in Opaque Multiple Selection mode or not.
 boolean isOpaqueMove()
          Returns an indication of whether the interactor is in Opaque Move mode or not.
 boolean isOpaquePolyPointsEdition()
          Returns an indication of whether the interactor is in Opaque PolyPoints Edition mode or not.
 boolean isOpaqueResize()
          Returns an indication of whether the interactor is in Opaque Resize mode or not.
protected  boolean isSelectionModifierDown(MouseEvent event)
          Tests if the selection modifier is currently down.
protected  boolean isSelectionMovable(IlvManager manager)
          Called by the interactor to test if at least one of the selected objects of the specified manager is movable.
 boolean isShowingMovingObject()
          Returns true if the interactor shows the object when the object is being moved.
protected  boolean mouseDown(MouseEvent event)
          Called when a Button Down (without Multiple selection modifier) event occurs.
protected  void mouseDownMultipleSelection(MouseEvent event)
          Called when a mouse button is down and the multiple selection modifier is also down.
protected  void processFocusEvent(FocusEvent event)
          Processes the focus events.
protected  void processKeyEvent(KeyEvent event)
          Processes the keyboard events.
protected  void processMouseEvent(MouseEvent event)
          Processes the mouse events.
protected  void processMouseMotionEvent(MouseEvent event)
          Processes the mouse motion events.
 void selectionChanged(ManagerSelectionChangedEvent event)
          Called when an object is selected or deselected in the manager or in a submanager.
 void selectObject(IlvGraphic obj)
          Selects an object.
 void setDragAllowed(boolean v)
          Lets you enable or disable the mode that allows you to select objects by dragging a rectangle over them.
 void setEditionAllowed(boolean v)
          Lets you enable or disable the mode that allows you to edit objects with the interactor.
 void setHyperEdgesFollowEndNodes(boolean v)
          Sets whether the segments of unselected hyperedges will move when all end nodes of the hyperedge are selected and moved.
 void setLineStyle(float[] lineStyle)
          Changes the dash style of the rectangle used when making a multiple selection.
 void setLinksFollowEndNodes(boolean v)
          Sets whether the bends of unselected links will move when both end nodes are selected and move.
 void setMoveAllowed(boolean v)
          Lets you enable or disable the mode that allows you to move objects with this interactor.
 void setMoveSelectionCursor(Cursor cursor)
          Changes the cursor used for moving a selection.
 void setMoveThreshold(int threshold)
          Changes the threshold after which a graphic object starts to move.
 void setMultipleSelectionCursor(Cursor cursor)
          Changes the cursor used for multiple selection.
 void setMultipleSelectionMode(boolean v)
          Lets you enable or disable the mode that allows you to select several objects simultaneously.
 void setMultipleSelectionModifier(int modifier)
          Sets the multiple selection modifier.
 void setObjectInteractorEnabled(boolean value)
          Sets whether or not the IlvObjectInteractor will be called on an IlvGraphic before completing the usual event dispatching of the IlvSelectInteractor.
 void setOpaqueDragSelection(boolean set)
          Sets the interactor in Opaque Multiple Selection mode.
 void setOpaqueMove(boolean set)
          Sets the interactor in Opaque Move mode.
 void setOpaquePolyPointsEdition(boolean set)
          Sets the interactor in Opaque PolyPoints Edition mode.
 void setOpaqueResize(boolean set)
          Sets the interactor in Opaque Resize mode.
 void setSelectionModifier(int modifier)
          Sets the selection modifier.
 void setShowingMovingObject(boolean v)
          Modifies the ghost drawn when the object is moved.
 void setXORGhost(boolean xorGhost)
          Sets the ghost drawing mode.
 
Methods inherited from class ilog.views.IlvManagerViewInteractor
addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, allowEnsureVisible, allowEnsureVisible, disableEvents, drawGhost, drawGhost, enableEvents, ensureVisible, ensureVisible, getManager, getManagerView, getTransformer, isXORGhost, processEvent, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvSelectInteractor

public IlvSelectInteractor()
Constructs and initializes a new instance of a select interactor.

Method Detail

setOpaqueDragSelection

public void setOpaqueDragSelection(boolean set)
Sets the interactor in Opaque Multiple Selection mode. The interactor has two modes to select graphic objects by dragging a rectangle around them: The Opaque Multiple Selection mode and the Ghost Multiple Selection mode.

In Opaque Multiple Selection mode, while the user drags the selection rectangle, the previous rectangle is erased by invalidating the corresponding regions of the view using IlvManagerView.invalidateRect(ilog.views.IlvRect) and requesting a redraw using IlvManagerView.reDrawViews(). This mode may be slower because it requires partial redraws of the manager, but it is safer because it behaves well if animated gif images are used (inside IlvIcon graphic objects).

In Ghost Multiple Selection mode, the previous selection rectangle is erased by drawing it again (in XOR mode).

The default mode is the Ghost Multiple Selection mode.

Since:
JViews 5.0
See Also:
isOpaqueDragSelection(), isMultipleSelectionMode(), getMultipleSelectionInteractor()

isOpaqueDragSelection

public boolean isOpaqueDragSelection()
Returns an indication of whether the interactor is in Opaque Multiple Selection mode or not.

Since:
JViews 5.0
See Also:
setOpaqueDragSelection(boolean)

setMultipleSelectionMode

public void setMultipleSelectionMode(boolean v)
Lets you enable or disable the mode that allows you to select several objects simultaneously.


isMultipleSelectionMode

public boolean isMultipleSelectionMode()
Returns true if the interactor allows the user to select multiple objects simultaneously.


setMoveAllowed

public void setMoveAllowed(boolean v)
Lets you enable or disable the mode that allows you to move objects with this interactor.


isMoveAllowed

public boolean isMoveAllowed()
Returns true if the interactor lets the user move objects, false otherwise.


setLinksFollowEndNodes

public void setLinksFollowEndNodes(boolean v)
Sets whether the bends of unselected links will move when both end nodes are selected and move.

By default, the bends of a link only move when the link is selected. If a group of nodes is selected and move, the straight links always follow the nodes, even if they are not selected, but the bends of unselected nonstraight links stay at the old position. However, it may be more comfortable if all links automatically follow the nodes, even if they are not straight and not explicitly selected. In this case, you should enable this option.

Since:
JViews 5.5

isLinksFollowEndNodes

public boolean isLinksFollowEndNodes()
Returns true if the bends of unselected links will move when both end nodes are selected and move.

Since:
JViews 5.5

setHyperEdgesFollowEndNodes

public void setHyperEdgesFollowEndNodes(boolean v)
Sets whether the segments of unselected hyperedges will move when all end nodes of the hyperedge are selected and moved.

By default, the segments of a hyperedge only move when the hyperedge is selected. If a group of nodes is selected and moved, the hyperedges consisting of only one segment always follow the nodes, even if they are not selected, but the multiple segments of the other unselected hyperedges stay at the old position. However, it may be more comfortable if all hyperedges automatically follow the nodes. In this case, you should enable this option.

Since:
JViews 8.0

isHyperEdgesFollowEndNodes

public boolean isHyperEdgesFollowEndNodes()
Returns true if the segments of unselected hyperedges will move when all end nodes of the hyperedge are selected and moved.

Since:
JViews 8.0

setOpaqueMove

public void setOpaqueMove(boolean set)
Sets the interactor in Opaque Move mode. The interactor has two modes to move a graphic object: The Opaque Move mode and the Ghost Move mode. In Opaque Move mode, the position of the object that the user moves is changed for each drag event. In Ghost Move mode, the position of the object is changed only when the user releases the mouse button. The default mode is the Ghost Move mode.

See Also:
isOpaqueMove()

isOpaqueMove

public boolean isOpaqueMove()
Returns an indication of whether the interactor is in Opaque Move mode or not.

See Also:
setOpaqueMove(boolean)

setOpaqueResize

public void setOpaqueResize(boolean set)
Sets the interactor in Opaque Resize mode. The interactor has two modes to resize a graphic object: The Opaque Resize mode and the Ghost Resize mode. In Opaque Resize mode, the size of the object that the user resizes is changed for each drag event. In Ghost Resize mode, the size of the object is changed only when the user releases the mouse button. The default mode is the Ghost Resize mode.

Since:
JViews 5.0
See Also:
isOpaqueResize()

isOpaqueResize

public boolean isOpaqueResize()
Returns an indication of whether the interactor is in Opaque Resize mode or not.

Since:
JViews 5.0
See Also:
setOpaqueResize(boolean)

setOpaquePolyPointsEdition

public void setOpaquePolyPointsEdition(boolean set)
Sets the interactor in Opaque PolyPoints Edition mode. The interactor has two modes to edit polypoints objects: The Opaque PolyPoints Edition mode and the Ghost PolyPoints Edition mode. In Opaque PolyPoints Edition mode, the polypoints object that the user edits is changed for each drag event. In Ghost PolyPoints Edition mode, the polypoints object is changed only when the user releases the mouse button. The default mode is the Ghost PolyPoints Edition mode.

Since:
JViews 5.0
See Also:
isOpaquePolyPointsEdition()

isOpaquePolyPointsEdition

public boolean isOpaquePolyPointsEdition()
Returns an indication of whether the interactor is in Opaque PolyPoints Edition mode or not.

Since:
JViews 5.0
See Also:
setOpaquePolyPointsEdition(boolean)

setShowingMovingObject

public void setShowingMovingObject(boolean v)
Modifies the ghost drawn when the object is moved. If the value is false, a rectangle showing the bounding box of the object is drawn while moving the object; otherwise a ghost showing the object is drawn. Note that this method has no meaning when the interactor is in the Opaque Move mode.


isShowingMovingObject

public boolean isShowingMovingObject()
Returns true if the interactor shows the object when the object is being moved. Returns false if a rectangle showing the bounding box of the object is shown when the object is being moved.


setDragAllowed

public void setDragAllowed(boolean v)
Lets you enable or disable the mode that allows you to select objects by dragging a rectangle over them.


isDragAllowed

public boolean isDragAllowed()
Returns true if the interactor lets the user select objects by dragging a rectangle, false otherwise.


setEditionAllowed

public void setEditionAllowed(boolean v)
Lets you enable or disable the mode that allows you to edit objects with the interactor.


isEditionAllowed

public boolean isEditionAllowed()
Returns true if the interactor lets the user edit objects by dispatching the events to the interactor attached to the selection object.


getMoveThreshold

public int getMoveThreshold()
Returns the threshold after which a graphic object starts to move. A graphic object will start to move only if the user moves it at a distance greater than this threshold. Note that the threshold is in pixels and that the default value is 0.

See Also:
setMoveThreshold(int)

setMoveThreshold

public void setMoveThreshold(int threshold)
Changes the threshold after which a graphic object starts to move. A graphic object will start to move only if the user moves it at a distance greater than this threshold. Note that the threshold is in pixels and that the default value is 0.

See Also:
getMoveThreshold()

getLineStyle

public float[] getLineStyle()
Returns the dash style of the rectangle used when making a multiple selection. This method returns the array representing the lengths of the dash segments. Alternate entries in the array represent the user space lengths of the opaque and transparent segments of the dashes.

See Also:
setLineStyle(float[])

setLineStyle

public void setLineStyle(float[] lineStyle)
Changes the dash style of the rectangle used when making a multiple selection. Changes the array representing the lengths of the dash segments. Alternate entries in the array represent the user space lengths of the opaque and transparent segments of the dashes.

See Also:
getLineStyle()

getMultipleSelectionCursor

public Cursor getMultipleSelectionCursor()
Returns the cursor used for multiple selection.


setMultipleSelectionCursor

public void setMultipleSelectionCursor(Cursor cursor)
Changes the cursor used for multiple selection.

Parameters:
cursor - The new cursor.
See Also:
IlvDragRectangleInteractor.setCursor(java.awt.Cursor)

getMoveSelectionCursor

public Cursor getMoveSelectionCursor()
Returns the cursor used for moving a selection.


setMoveSelectionCursor

public void setMoveSelectionCursor(Cursor cursor)
Changes the cursor used for moving a selection.

Parameters:
cursor - The new cursor.
See Also:
IlvMoveRectangleInteractor.setCursor(java.awt.Cursor)

isObjectInteractorEnabled

public final boolean isObjectInteractorEnabled()
Returns whether or not the IlvObjectInteractor will be called on an IlvGraphic before completing the usual event dispatching of the IlvSelectInteractor. The default value is false.

Since:
JViews 6.0

setObjectInteractorEnabled

public final void setObjectInteractorEnabled(boolean value)
Sets whether or not the IlvObjectInteractor will be called on an IlvGraphic before completing the usual event dispatching of the IlvSelectInteractor.

Since:
JViews 6.0
See Also:
isObjectInteractorEnabled()

attach

protected void attach(IlvManagerView v)
Called when the interactor is attached to the manager.

Overrides:
attach in class IlvManagerViewInteractor
Parameters:
v - The manager view.
See Also:
IlvManagerViewInteractor.detach()

detach

protected void detach()
Called when the interactor is removed from the manager.

Overrides:
detach in class IlvManagerViewInteractor
See Also:
IlvManagerViewInteractor.attach(ilog.views.IlvManagerView)

selectionChanged

public void selectionChanged(ManagerSelectionChangedEvent event)
Called when an object is selected or deselected in the manager or in a submanager.

Specified by:
selectionChanged in interface ManagerSelectionListener
Parameters:
event - The selection changed event.
See Also:
IlvManager.addManagerSelectionListener(ilog.views.event.ManagerSelectionListener), IlvManager.removeManagerSelectionListener(ilog.views.event.ManagerSelectionListener), IlvManager.addManagerTreeSelectionListener(ilog.views.event.ManagerSelectionListener), IlvManager.removeManagerTreeSelectionListener(ilog.views.event.ManagerSelectionListener), IlvManager.selectionChanged(ilog.views.IlvGraphic)

deSelectAll

public void deSelectAll()
Deselects all objects in the attached IlvManager. This method should generally not be called directly except when subclassing an IlvSelectInteractorMultipleSelection.

See Also:
IlvSelectInteractorMultipleSelection

deSelectObject

public void deSelectObject(IlvGraphic obj)
Deselects an object. This method should generally not be called directly except when subclassing an IlvSelectInteractorMultipleSelection.

Parameters:
obj - The graphic object that will be deselected.
See Also:
IlvSelectInteractorMultipleSelection

selectObject

public void selectObject(IlvGraphic obj)
Selects an object. This method should generally not be called directly except when subclassing an IlvSelectInteractorMultipleSelection.

Parameters:
obj - The graphic object that will be selected.
See Also:
IlvSelectInteractorMultipleSelection

getMoveSelectionInteractor

protected IlvManagerViewInteractor getMoveSelectionInteractor()
Called when the interactor needs to move the selected objects. It returns an instance of IlvSelectInteractorMoveSelection.

See Also:
IlvSelectInteractorMoveSelection

getMultipleSelectionInteractor

protected IlvManagerViewInteractor getMultipleSelectionInteractor()
Called when the interactor must select multiple objects. It returns an instance of IlvSelectInteractorMultipleSelection.

See Also:
IlvSelectInteractorMultipleSelection

getSelectedMovingObjects

public IlvGraphicEnumeration getSelectedMovingObjects(IlvManager manager)
Returns the selected moving objects of the input manager. Subclasses can override this method to filter objects that should not be moved.

Since:
JViews 5.5

isSelectionMovable

protected boolean isSelectionMovable(IlvManager manager)
Called by the interactor to test if at least one of the selected objects of the specified manager is movable.

Parameters:
manager - The manager to test.
Since:
JViews 5.0
See Also:
IlvManager.isMovable(IlvGraphic)

drawGhostMove

protected void drawGhostMove(Graphics g,
                             IlvGraphic obj,
                             IlvRect rect)
Draws a ghost of the object when an object is moved. This method is called to draw a ghost of the object that is currently being moved. It will only be called if isShowingMovingObject and isOpaqueMove return true .

Parameters:
g - The Graphics to perform the drawings.
obj - The moved object.
rect - The new location of the object.
See Also:
isShowingMovingObject(), isOpaqueMove()

setXORGhost

public void setXORGhost(boolean xorGhost)
Sets the ghost drawing mode. If xorGhost is true, the ghost should be drawn in XOR Ghost mode, otherwise in Paint mode. The default value is true.

Note that the interactors that are used to move or to select multiple objects (IlvSelectInteractorMoveSelection and IlvSelectInteractorMultipleSelection) override the method IlvManagerViewInteractor.isXORGhost() in order to ensure that the XOR mode is used when the interactor is in Ghost mode.

Overrides:
setXORGhost in class IlvManagerViewInteractor
Parameters:
xorGhost - true to set XOR mode, false to set Paint mode.
Since:
JViews 5.0
See Also:
handleExpose(java.awt.Graphics), IlvManagerViewInteractor.drawGhost(java.awt.Graphics), setOpaqueMove(boolean), setOpaqueDragSelection(boolean), IlvSelectInteractorMoveSelection, IlvSelectInteractorMultipleSelection

handleExpose

protected void handleExpose(Graphics g)
Called by the view when the view is drawn. It actually calls the method IlvManagerViewInteractor.drawGhost(java.awt.Graphics). If the interactor is in XOR Ghost mode, the default XOR color of the view is set on the Graphics before calling drawGhost(Graphics).

Overrides:
handleExpose in class IlvManagerViewInteractor
Parameters:
g - The graphics.
See Also:
IlvManagerViewInteractor.drawGhost(java.awt.Graphics), IlvManagerViewInteractor.isXORGhost(), IlvManagerView.getDefaultXORColor()

mouseDown

protected boolean mouseDown(MouseEvent event)
Called when a Button Down (without Multiple selection modifier) event occurs.


getMoveSelectionManager

public IlvManager getMoveSelectionManager()
Returns the manager that contains the selected objects to be moved. This method is called by the interactor returned by getMoveSelectionInteractor(). This manager may be different from the manager returned by IlvManagerViewInteractor.getManager() if the interactor is working on a submanager.

Since:
JViews 5.0

setMultipleSelectionModifier

public void setMultipleSelectionModifier(int modifier)
Sets the multiple selection modifier. The default modifier is InputEvent.SHIFT_MASK. This method can be used to set normal modifiers and extended modifiers (see java.awt.event.InputEvent.getModifiersEx() since JDK 1.4).

Note: In the mask, InputEvent.ALT_DOWN_MASK should be used instead of InputEvent.ALT_MASK, and InputEvent.META_DOWN_MASK should be used instead of InputEvent.META_MASK, because the values of ALT_MASK/BUTTON2_MASK and META_MASK/BUTTON3_MASK overlap.

Since JViews 7.0, the modifier bitmask is checked exactly. Before JViews 7.0, specifying for instance SHIFT became active when pressed alone or in combination with any other modifier key. Since JViews 7.0, it becomes active only when pressed alone. This allows you to use at the same time a greater range of modifier combinations for different purposes.

Since:
JViews 5.0
See Also:
getMultipleSelectionModifier(), getMultipleSelectionModifierEx(), isMultipleSelectionModifierDown(java.awt.event.MouseEvent)

getMultipleSelectionModifier

public int getMultipleSelectionModifier()
Returns the multiple selection modifier. The default modifier is InputEvent.SHIFT_MASK.

Since:
JViews 5.0
See Also:
setMultipleSelectionModifier(int), isMultipleSelectionModifierDown(java.awt.event.MouseEvent)

getMultipleSelectionModifierEx

public int getMultipleSelectionModifierEx()
Returns the extended multiple selection modifier. The default modifier is InputEvent.SHIFT_DOWN_MASK. See java.awt.event.InputEvent.getModifiersEx() since JDK 1.4 for information about extended modifiers. This mask is computed from setMultipleSelectionModifier(int).

Since:
JViews 7.5
See Also:
setMultipleSelectionModifier(int), isMultipleSelectionModifierDown(java.awt.event.MouseEvent)

isMultipleSelectionModifierDown

protected boolean isMultipleSelectionModifierDown(MouseEvent event)
Tests if the multiple selection modifier is currently down. The method compares the current modifiers of the event with the modifier returned by the method getMultipleSelectionModifierEx(). This is used by the interactor to determine if we are doing a multiple selection or not. The default modifier is InputEvent.SHIFT_DOWN_MASK.

See Also:
setMultipleSelectionModifier(int)

setSelectionModifier

public void setSelectionModifier(int modifier)
Sets the selection modifier. This is used by the interactor to determine if a mouse pressed corresponds to the start of the drag of a selection rectangle. If this modifier is not down, such a mouse pressed over a graphic object produces the move of the object instead. The default modifier is InputEvent.CTRL_MASK. This method can be used to set normal modifiers and extended modifiers (see java.awt.event.InputEvent.getModifiersEx() since JDK 1.4).

Note: In the mask, InputEvent.ALT_DOWN_MASK should be used instead of InputEvent.ALT_MASK, and InputEvent.META_DOWN_MASK should be used instead of InputEvent.META_MASK, because the values of ALT_MASK/BUTTON2_MASK and META_MASK/BUTTON3_MASK overlap.

Since JViews 7.0, the modifier bitmask is checked exactly. Before JViews 7.0, specifying for instance CTRL became active when pressed alone or in combination with any other modifier key. Since JViews 7.0, it becomes active only when pressed alone. This allows for a greater range of modifier combinations to be used at the same time for different purposes.

Since:
JViews 5.0
See Also:
getSelectionModifier(), getSelectionModifierEx(), isSelectionModifierDown(java.awt.event.MouseEvent)

getSelectionModifier

public int getSelectionModifier()
Returns the selection modifier. The default modifier is InputEvent.CTRL_MASK.

Since:
JViews 5.0
See Also:
setSelectionModifier(int), isSelectionModifierDown(java.awt.event.MouseEvent)

getSelectionModifierEx

public int getSelectionModifierEx()
Returns the extended selection modifier. The default modifier is InputEvent.CTRL_DOWN_MASK. See java.awt.event.InputEvent.getModifiersEx() since JDK 1.4 for information about extended modifiers. This mask is computed from setSelectionModifier(int).

Since:
JViews 7.5
See Also:
setSelectionModifier(int), isSelectionModifierDown(java.awt.event.MouseEvent)

isSelectionModifierDown

protected boolean isSelectionModifierDown(MouseEvent event)
Tests if the selection modifier is currently down. The method compares the current modifiers of the event with the modifier returned by the method getSelectionModifierEx(). This is used by the interactor to determine if a mouse pressed corresponds to the start of the drag of a selection rectangle. If this modifier is not down, such a mouse pressed over a graphic object produces the move of the object instead. The default modifier is InputEvent.CTRL_DOWN_MASK.

Since:
JViews 5.0
See Also:
setSelectionModifier(int)

mouseDownMultipleSelection

protected void mouseDownMultipleSelection(MouseEvent event)
Called when a mouse button is down and the multiple selection modifier is also down. If an object is under the mouse, it will be added to the selection.


dispatchToSelection

protected boolean dispatchToSelection(AWTEvent event)
Dispatches the event to a selection object.


processMouseEvent

protected void processMouseEvent(MouseEvent event)
Processes the mouse events.

Overrides:
processMouseEvent in class IlvManagerViewInteractor
Parameters:
event - The event.
See Also:
IlvManagerViewInteractor.addMouseListener(java.awt.event.MouseListener)

processMouseMotionEvent

protected void processMouseMotionEvent(MouseEvent event)
Processes the mouse motion events.

Overrides:
processMouseMotionEvent in class IlvManagerViewInteractor
Parameters:
event - The event.
See Also:
IlvManagerViewInteractor.addMouseMotionListener(java.awt.event.MouseMotionListener)

processKeyEvent

protected void processKeyEvent(KeyEvent event)
Processes the keyboard events.

Overrides:
processKeyEvent in class IlvManagerViewInteractor
Parameters:
event - The event.
See Also:
IlvManagerViewInteractor.addKeyListener(java.awt.event.KeyListener)

processFocusEvent

protected void processFocusEvent(FocusEvent event)
Processes the focus events.

Overrides:
processFocusEvent in class IlvManagerViewInteractor
Parameters:
event - The event.
See Also:
IlvManagerViewInteractor.addFocusListener(java.awt.event.FocusListener)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.