ilog.views.gantt.graphic.interactor
Class IlvActivityGraphicSelection

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.IlvSelection
          extended by ilog.views.IlvHandlesSelection
              extended by ilog.views.gantt.graphic.interactor.IlvActivityGraphicSelection
All Implemented Interfaces:
IlvPersistentObject, Transferable, Serializable

public class IlvActivityGraphicSelection
extends IlvHandlesSelection

An IlvActivityGraphicSelection object is the default selection object for IlvActivityGraphic. This class draws two handles, respectively to the right and to the left of the bounding rectangle of the activity graphic to show that it is selected. You can edit the start and end time of the activity by moving these handles.

The edition interactor that allows you to move the handles is the class IlvActivityGraphicReshapeInteractor.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ilog.views.IlvHandlesSelection
CIRCLE_SHAPE, defaultHandleBackgroundColor, defaultHandleColor, defaultHandleShape, defaultHandleSize, FILLED_CIRCLE_SHAPE, FILLED_SQUARE_SHAPE, SQUARE_SHAPE
 
Constructor Summary
IlvActivityGraphicSelection(IlvActivityGraphic obj)
          Creates a new selection object for the specified activity graphic.
 
Method Summary
protected  int direction(IlvPoint tp, IlvTransformer t)
          Returns the direction corresponding to a specified point.
 String getDefaultInteractor()
          Gets the name of the edition interactor for this class.
 IlvPoint getHandle(int i, IlvTransformer t)
          Returns the position of the handle at the specified index.
 int getHandleCardinal()
          Returns the number of handles (the number here is 2).
 
Methods inherited from class ilog.views.IlvHandlesSelection
afterLoopAllHandles, beforeLoopAllHandles, boundingBox, contains, draw, drawWithoutHandles, getActiveHandlesColor, getHandle, getHandlesColor, getHandlesShape, getHandlesSize, isActive, onEnter, onExit, setActiveHandlesColor, setHandlesColor, setHandlesShape, setHandlesSize, zoomable
 
Methods inherited from class ilog.views.IlvSelection
applyTransform, copy, getObject, isOptimizedDrawingEnabled, isVisible, SetDefaultInteractor
 
Methods inherited from class ilog.views.IlvGraphic
addActionListener, addNamedPropertyListener, boundingBox, getAndAssociateObjectInteractor, getCenter, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, hasProperty, inside, intersects, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isPersistent, isSelectable, makeSelection, move, move, moveResize, notifyObjectInteractorToManager, processActionEvent, reDraw, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, setEditable, setFillOn, setForeground, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipText, setVisible, toString, translate, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvActivityGraphicSelection

public IlvActivityGraphicSelection(IlvActivityGraphic obj)
Creates a new selection object for the specified activity graphic.

Parameters:
obj - the selected activity graphic.
Method Detail

getDefaultInteractor

public String getDefaultInteractor()
Gets the name of the edition interactor for this class. It returns the IlvActivityGraphicReshapeInteractor class name.

Overrides:
getDefaultInteractor in class IlvSelection
Returns:
The String representing the interactor class name.
See Also:
IlvReshapeSelection, IlvSelection.SetDefaultInteractor(java.lang.String)

direction

protected int direction(IlvPoint tp,
                        IlvTransformer t)
Returns the direction corresponding to a specified point. If the point is on a handle, then the method returns the direction of the handle, otherwise it returns IlvDirection.BadPosition.

Parameters:
tp - the point.
t - the transformer used to draw the object.
Returns:
The handle direction.
See Also:
IlvDirection

getHandleCardinal

public int getHandleCardinal()
Returns the number of handles (the number here is 2).

Specified by:
getHandleCardinal in class IlvHandlesSelection
Returns:
The number of handles.

getHandle

public IlvPoint getHandle(int i,
                          IlvTransformer t)
Returns the position of the handle at the specified index.

Specified by:
getHandle in class IlvHandlesSelection
Parameters:
i - the handle index.
t - the transformer used to draw the object.
Returns:
The IlvPoint, position of the handle.


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