ilog.views.graphic
Class IlvSplineLinkSelection

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.IlvSelection
          extended by ilog.views.IlvHandlesSelection
              extended by ilog.views.IlvPolyPointsSelection
                  extended by ilog.views.IlvLinkImageSelection
                      extended by ilog.views.graphic.IlvSplineLinkSelection
All Implemented Interfaces:
IlvPersistentObject, Transferable, Serializable

public class IlvSplineLinkSelection
extends IlvLinkImageSelection

Selection object on an IlvSplineLinkImage.

Since:
JViews 8.1
Version:
1.0 12/30/96
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
IlvSplineLinkSelection(IlvSplineLinkImage obj)
          Creates a new spline link selection object.
 
Method Summary
protected  void afterLoopAllHandles()
          This is called by this class after iterating over all handles and calling getHandle(int, ilog.views.IlvTransformer).
protected  void beforeLoopAllHandles(IlvTransformer t)
          This is called by this class before iterating over all handles and calling getHandle(int, ilog.views.IlvTransformer).
 IlvRect boundingBox(IlvTransformer t)
          Returns the bounding box of the object.
 void draw(Graphics dst, IlvTransformer t)
          Draws the object.
 void drawWithoutHandles(Graphics dst, IlvTransformer t)
          Draws the object without the handles.
 String getDefaultInteractor()
          Returns the class name of the interactor used to edit polypoints.
 IlvPoint getHandle(int i, IlvTransformer t)
          Returns the location of a handle.
 IlvSplineLinkImage getSplineLink()
          Returns the selected object.
static boolean IsHandlesOnSplineMode()
          Returns whether the handles of the spline link are on the spline.
static boolean IsShowTangentsMode()
          Returns whether the spline tangents are shown additionally to the selection handles for spline links.
static void SetDefaultInteractor(String interactor)
          This method allows you to change the default interactor for instances of this class.
static void SetHandlesOnSplineMode(boolean enable)
          Sets whether the handles of the spline link are on the spline.
static void SetShowTangentsMode(boolean enable)
          Sets whether the tangents are shown additionally to the selection handles for spline links.
 
Methods inherited from class ilog.views.IlvPolyPointsSelection
contains, getHandleCardinal, getPolyPoints, isClosedMode, isOptimizedDrawingEnabled, setClosedMode
 
Methods inherited from class ilog.views.IlvHandlesSelection
getActiveHandlesColor, getHandle, getHandlesColor, getHandlesShape, getHandlesSize, isActive, onEnter, onExit, setActiveHandlesColor, setHandlesColor, setHandlesShape, setHandlesSize, zoomable
 
Methods inherited from class ilog.views.IlvSelection
applyTransform, copy, getObject, isVisible
 
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

IlvSplineLinkSelection

public IlvSplineLinkSelection(IlvSplineLinkImage obj)
Creates a new spline link selection object.

Parameters:
obj - the selected object
Method Detail

boundingBox

public IlvRect boundingBox(IlvTransformer t)
Returns the bounding box of the object.

Overrides:
boundingBox in class IlvPolyPointsSelection
Parameters:
t - The transformer used to draw the object. If the transformer is null, the bounding box for the identity transformer is returned.
See Also:
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer), IlvGraphic.zoomable(), IlvGraphic

draw

public void draw(Graphics dst,
                 IlvTransformer t)
Draws the object.

Overrides:
draw in class IlvHandlesSelection
Parameters:
dst - The destination Graphics.
t - The transformation used to draw the object.
See Also:
IlvGraphic.boundingBox(ilog.views.IlvTransformer), IlvGraphic.zoomable(), IlvGraphic

drawWithoutHandles

public void drawWithoutHandles(Graphics dst,
                               IlvTransformer t)
Draws the object without the handles.

Overrides:
drawWithoutHandles in class IlvHandlesSelection
Parameters:
dst - The destination Graphics.
t - The transformation used to draw the object.

getHandle

public IlvPoint getHandle(int i,
                          IlvTransformer t)
Returns the location of a handle. It calls the getPointAt method of the selected IlvSplineLinkImage object.

Overrides:
getHandle in class IlvPolyPointsSelection
Parameters:
i - the index of the handle.
t - the transformer through which the object is drawn.

beforeLoopAllHandles

protected void beforeLoopAllHandles(IlvTransformer t)
This is called by this class before iterating over all handles and calling getHandle(int, ilog.views.IlvTransformer). Subclasses can override this method to do preparations so that getHandle(int, ilog.views.IlvTransformer) is fast, e.g. fill certain caches that are needed by getHandle(int, ilog.views.IlvTransformer).

Overrides:
beforeLoopAllHandles in class IlvHandlesSelection
Parameters:
t - The transformer to draw this object.
See Also:
afterLoopAllHandles()

afterLoopAllHandles

protected void afterLoopAllHandles()
This is called by this class after iterating over all handles and calling getHandle(int, ilog.views.IlvTransformer). Subclasses can override this method to do cleanup caches that were needed by getHandle(int, ilog.views.IlvTransformer).

Overrides:
afterLoopAllHandles in class IlvHandlesSelection
See Also:
beforeLoopAllHandles(ilog.views.IlvTransformer)

getSplineLink

public IlvSplineLinkImage getSplineLink()
Returns the selected object.


getDefaultInteractor

public String getDefaultInteractor()
Returns the class name of the interactor used to edit polypoints. The interactor is an IlvSplineLinkEdition.

Overrides:
getDefaultInteractor in class IlvLinkImageSelection
See Also:
IlvSplineLinkEdition

SetDefaultInteractor

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

Parameters:
interactor - The new interactor.
See Also:
getDefaultInteractor()

IsHandlesOnSplineMode

public static boolean IsHandlesOnSplineMode()
Returns whether the handles of the spline link are on the spline. If the handles are outside the spline link, the intersections of the spline tangents are used as position of the handles. If the smoothness of the spline is IlvGraphicUtil.COMPATIBLE_SMOOTHNESS or IlvGraphicUtil.AUTO_SMOOTHNESS, the handles of the spline link are always outside the spline.


SetHandlesOnSplineMode

public static void SetHandlesOnSplineMode(boolean enable)
Sets whether the handles of the spline link are on the spline. If the handles are outside the spline link, the intersections of the spline tangents are used as position of the handles. If the smoothness of the spline is IlvGraphicUtil.COMPATIBLE_SMOOTHNESS or IlvGraphicUtil.AUTO_SMOOTHNESS, the handles of the spline link are always outside the spline. For all other values of the smoothness, the handles are by default on the spline link.


IsShowTangentsMode

public static boolean IsShowTangentsMode()
Returns whether the spline tangents are shown additionally to the selection handles for spline links.


SetShowTangentsMode

public static void SetShowTangentsMode(boolean enable)
Sets whether the tangents are shown additionally to the selection handles for spline links. If the handles are positioned at the intersections of the spline tangents outside the splines links, it is very useful to also show the tangents. Showing the tangents is by default disabled.



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