ilog.tgo.interactor
Class IltSelectInteractor

java.lang.Object
  extended by ilog.views.IlvManagerViewInteractor
      extended by ilog.views.interactor.IlvSelectInteractor
          extended by ilog.tgo.interactor.IltSelectInteractor
All Implemented Interfaces:
ManagerSelectionListener, Serializable, EventListener
Direct Known Subclasses:
IltEditGroupInteractor

public class IltSelectInteractor
extends IlvSelectInteractor

This class defines a view interactor which allows the user to select or move one or more objects.

This class differs from ilog.views.interactor.IlvSelectInteractor:

See Also:
IlvSelectInteractor, Serialized Form

Constructor Summary
IltSelectInteractor()
          Creates the interactor.
 
Method Summary
 void drawGhostMove(Graphics g, IlvGraphic obj, IlvRect rect)
          Draws a ghost of the object when an object is moved.
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.
protected  IlvManagerViewInteractor getMultipleSelectionInteractor()
          Called when the interactor must select multiple objects.
 IlvGraphicEnumeration getSelectedMovingObjects(IlvManager manager)
          Returns the selected moving objects of the input manager.
 boolean isEditingAllowed()
          Returns true if the interactor lets the user edit objects by dispatching the events to the interactor attached to the selection object.
 boolean isInvokeObjectInteractor()
          Indicates whether this interactor should give the priority to the object interactor or not.
 void processEvent(AWTEvent event)
          Processes the events.
protected  void processFocusEvent(FocusEvent event)
          Processes the focus events.
protected  void processKeyEvent(KeyEvent event)
          Processes the keyboard events.
protected  void processMouseEvent(MouseEvent event)
          This implementation try to invoke the object interactor if one exists.
protected  void processMouseMotionEvent(MouseEvent event)
          Processes the mouse motion events.
 void setEditingAllowed(boolean allow)
          Lets you enable or disable the mode that allows you to edit objects with the interactor.
 void setInvokeObjectInteractor(boolean invokeObjectInteractor)
          Sets whether this interactor should give the priority to the object interactor or not.
 
Methods inherited from class ilog.views.interactor.IlvSelectInteractor
attach, deSelectAll, deSelectObject, detach, dispatchToSelection, getLineStyle, getMoveSelectionCursor, getMoveThreshold, getMultipleSelectionCursor, getMultipleSelectionModifier, getMultipleSelectionModifierEx, getSelectionModifier, getSelectionModifierEx, handleExpose, isDragAllowed, isEditionAllowed, isHyperEdgesFollowEndNodes, isLinksFollowEndNodes, isMoveAllowed, isMultipleSelectionMode, isMultipleSelectionModifierDown, isObjectInteractorEnabled, isOpaqueDragSelection, isOpaqueMove, isOpaquePolyPointsEdition, isOpaqueResize, isSelectionModifierDown, isSelectionMovable, isShowingMovingObject, mouseDown, mouseDownMultipleSelection, selectionChanged, selectObject, setDragAllowed, setEditionAllowed, setHyperEdgesFollowEndNodes, setLineStyle, setLinksFollowEndNodes, setMoveAllowed, setMoveSelectionCursor, setMoveThreshold, setMultipleSelectionCursor, setMultipleSelectionMode, setMultipleSelectionModifier, setObjectInteractorEnabled, setOpaqueDragSelection, setOpaqueMove, setOpaquePolyPointsEdition, setOpaqueResize, setSelectionModifier, setShowingMovingObject, setXORGhost
 
Methods inherited from class ilog.views.IlvManagerViewInteractor
addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, allowEnsureVisible, allowEnsureVisible, disableEvents, drawGhost, drawGhost, enableEvents, ensureVisible, ensureVisible, getManager, getManagerView, getTransformer, isXORGhost, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IltSelectInteractor

public IltSelectInteractor()
Creates the interactor.

Method Detail

isInvokeObjectInteractor

public boolean isInvokeObjectInteractor()
Indicates whether this interactor should give the priority to the object interactor or not.


setInvokeObjectInteractor

public void setInvokeObjectInteractor(boolean invokeObjectInteractor)
Sets whether this interactor should give the priority to the object interactor or not.

Note: When wrapped inside an IlpViewsViewInteractor, this setting has no effect. Use IlpDefaultViewInteractor.setUsingObjectInteractor(boolean) instead.


drawGhostMove

public void drawGhostMove(Graphics g,
                          IlvGraphic obj,
                          IlvRect rect)
Description copied from class: IlvSelectInteractor
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 .

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

processEvent

public void processEvent(AWTEvent event)
Description copied from class: IlvManagerViewInteractor
Processes the events. This method calls the following methods depending on the event type: processMouseMotionEvent, processMouseEvent, processKeyEvent, processFocusEvent. Note that the methods will be called only if a listener has been added for the type of event or if the handling of the event has been enabled with enableEvents.

Overrides:
processEvent in class IlvManagerViewInteractor
Parameters:
event - The event.
See Also:
IlvManagerViewInteractor.processMouseMotionEvent(java.awt.event.MouseEvent), IlvManagerViewInteractor.processMouseEvent(java.awt.event.MouseEvent), IlvManagerViewInteractor.processKeyEvent(java.awt.event.KeyEvent), IlvManagerViewInteractor.processFocusEvent(java.awt.event.FocusEvent)

getMoveSelectionInteractor

protected IlvManagerViewInteractor getMoveSelectionInteractor()
Description copied from class: IlvSelectInteractor
Called when the interactor needs to move the selected objects. It returns an instance of IlvSelectInteractorMoveSelection.

Overrides:
getMoveSelectionInteractor in class IlvSelectInteractor
See Also:
IlvSelectInteractorMoveSelection

getMultipleSelectionInteractor

protected IlvManagerViewInteractor getMultipleSelectionInteractor()
Description copied from class: IlvSelectInteractor
Called when the interactor must select multiple objects. It returns an instance of IlvSelectInteractorMultipleSelection.

Overrides:
getMultipleSelectionInteractor in class IlvSelectInteractor
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.

Overrides:
getSelectedMovingObjects in class IlvSelectInteractor
Since:
JTGO 4.0

processMouseEvent

protected void processMouseEvent(MouseEvent event)
This implementation try to invoke the object interactor if one exists. If the invoked interactor processes the event then the IltSelectInteractor does nothing. If the event is not processed by any object interactor or if isInvokeObjectInteractor() returns false then the IltSelectInteractor has its normal behavior.

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

processMouseMotionEvent

protected void processMouseMotionEvent(MouseEvent event)
Description copied from class: IlvSelectInteractor
Processes the mouse motion events.

Overrides:
processMouseMotionEvent in class IlvSelectInteractor
Parameters:
event - The event.
See Also:
processMouseEvent(java.awt.event.MouseEvent)

processKeyEvent

protected void processKeyEvent(KeyEvent event)
Description copied from class: IlvSelectInteractor
Processes the keyboard events.

Overrides:
processKeyEvent in class IlvSelectInteractor
Parameters:
event - The event.
See Also:
processMouseEvent(java.awt.event.MouseEvent)

getMoveSelectionManager

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

Overrides:
getMoveSelectionManager in class IlvSelectInteractor
See Also:
IlvSelectInteractor.getMoveSelectionManager()

processFocusEvent

protected void processFocusEvent(FocusEvent event)
Description copied from class: IlvSelectInteractor
Processes the focus events.

Overrides:
processFocusEvent in class IlvSelectInteractor
Parameters:
event - The event.
See Also:
processMouseEvent(java.awt.event.MouseEvent)

isEditingAllowed

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


setEditingAllowed

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



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