ilog.views
Class IlvSelection

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.IlvSelection
All Implemented Interfaces:
IlvPersistentObject, Transferable, Serializable
Direct Known Subclasses:
IlvHandlesSelection

public abstract class IlvSelection
extends IlvGraphic

An abstract class that describes the selection on another object. When a graphic object is selected in the manager, a selection object sub class of this abstract class is associated with the graphic object. This selection object is drawn on the top of the selected object to show its selected state. You do not create selection objects by a new. The selection object is created when the object is selected by the manager. The graphic object creates is own selection object by calling the makeSelection method.

Version:
1.0 12/30/96
See Also:
IlvManager.setSelected(ilog.views.IlvGraphic, boolean, boolean), IlvGraphic.makeSelection(), Serialized Form

Constructor Summary
IlvSelection(IlvGraphic obj)
          Creates a new selection object.
 
Method Summary
 void applyTransform(IlvTransformer t)
          Empty implementation of IlvGraphic.applyTransform.
 IlvGraphic copy()
          Empty implementation of IlvGraphic.copy.
 String getDefaultInteractor()
          Returns the default interactor class name.
 IlvGraphic getObject()
          Returns the corresponding selected object.
 boolean isOptimizedDrawingEnabled()
          This method allows or disables an optimization for drawing a selection object and its selected object.
 boolean isVisible()
          Returns true if the object is visible.
 void onEnter(IlvObjectInteractorContext context)
          Called when the selection is entered.
 void onExit(IlvObjectInteractorContext context)
          Called when the selection is exited.
static void SetDefaultInteractor(String interactor)
          This method allows to change the default interactor of this class.
 
Methods inherited from class ilog.views.IlvGraphic
addActionListener, addNamedPropertyListener, boundingBox, boundingBox, contains, draw, 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, zoomable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvSelection

public IlvSelection(IlvGraphic obj)
Creates a new selection object.

Parameters:
obj - the selected object
Method Detail

copy

public IlvGraphic copy()
Empty implementation of IlvGraphic.copy.

Specified by:
copy in class IlvGraphic
Returns:
null
See Also:
IlvGraphic

getObject

public final IlvGraphic getObject()
Returns the corresponding selected object.


applyTransform

public void applyTransform(IlvTransformer t)
Empty implementation of IlvGraphic.applyTransform.

Specified by:
applyTransform in class IlvGraphic
Parameters:
t - The transformation to be applied.
See Also:
IlvGraphic

isOptimizedDrawingEnabled

public boolean isOptimizedDrawingEnabled()
This method allows or disables an optimization for drawing a selection object and its selected object. This method can return true if the selection object covers completely the selected objects. In other words if the bounding box of this selection object is the same or bigger than the bounding box of the corresponding selected object. Note that the default value is false.

Since:
JViews 5.0

isVisible

public boolean isVisible()
Returns true if the object is visible.

Overrides:
isVisible in class IlvGraphic
Returns:
true if this graphic object is visible.
See Also:
IlvGraphic.setVisible(boolean), IlvGraphic.setSelectable(boolean), IlvGraphic.setMovable(boolean), IlvGraphic.setEditable(boolean)

onEnter

public void onEnter(IlvObjectInteractorContext context)
Called when the selection is entered. The selection is entered if the select interactor moves the mouse over the selection so that mouse events are dispatched to the object interactor of this selection.

Subclasses can override this method to perform specific tasks when the selection is entered. The default implementation calls IlvObjectInteractor.onEnter(ilog.views.IlvGraphic, ilog.views.IlvObjectInteractorContext) on the associated object interactor.

Parameters:
context - The context for the object interactor.
Since:
JViews 8.0

onExit

public void onExit(IlvObjectInteractorContext context)
Called when the selection is exited. The selection is exited if the select interactor moves the mouse to a blanc area of the view, or to another selection so that mouse events are no longer dispatched to the object interactor of this selection.

Subclasses can override this method to perform specific tasks when the selection is entered. The default implementation calls IlvObjectInteractor.onExit(ilog.views.IlvGraphic, ilog.views.IlvObjectInteractorContext) on the associated object interactor.

Parameters:
context - The context for the object interactor.
Since:
JViews 8.0

getDefaultInteractor

public String getDefaultInteractor()
Returns the default interactor class name. If SetDefaultInteractor has not been called it will return IlvReshapeSelection.

Overrides:
getDefaultInteractor in class IlvGraphic
See Also:
IlvReshapeSelection, SetDefaultInteractor(java.lang.String)

SetDefaultInteractor

public static void SetDefaultInteractor(String interactor)
This method allows to change the default interactor of this class. It is useful to change the interactor used for editing objects. Setting it to null will recover the initial interactor.

Parameters:
interactor - the new interactor
See Also:
getDefaultInteractor()


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