ilog.views.graphic
Class IlvSplineSelection

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.graphic.IlvSplineSelection
All Implemented Interfaces:
IlvPersistentObject, Transferable, Serializable

public class IlvSplineSelection
extends IlvPolyPointsSelection

Selection object on an IlvSpline.

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
IlvSplineSelection(IlvSpline obj)
          Creates a new spline 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.
 IlvSpline getSpline()
          Returns the selected object.
static boolean IsHandlesOnSplineMode()
          Returns whether the handles of the spline are on the spline.
static boolean IsShowTangentsMode()
          Returns whether the spline tangents are shown additionally to the selection handles.
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 are on the spline.
static void SetShowTangentsMode(boolean enable)
          Sets whether the tangents are shown additionally to the selection handles.
 
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

IlvSplineSelection

public IlvSplineSelection(IlvSpline obj)
Creates a new spline 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.
Since:
JViews 8.0

getHandle

public IlvPoint getHandle(int i,
                          IlvTransformer t)
Returns the location of a handle. It calls the getPointAt method of the selected IlvSpline 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.
Since:
JViews 8.1
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
Since:
JViews 8.1
See Also:
beforeLoopAllHandles(ilog.views.IlvTransformer)

getSpline

public IlvSpline getSpline()
Returns the selected object.

Since:
JViews 8.1

getDefaultInteractor

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

Overrides:
getDefaultInteractor in class IlvPolyPointsSelection
Since:
JViews 8.1
See Also:
IlvSplineEdition

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.
Since:
JViews 8.1
See Also:
getDefaultInteractor()

IsHandlesOnSplineMode

public static boolean IsHandlesOnSplineMode()
Returns whether the handles of the spline are on the spline. If the handles are outside the spline, 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 are always outside the spline.

Since:
JViews 8.1

SetHandlesOnSplineMode

public static void SetHandlesOnSplineMode(boolean enable)
Sets whether the handles of the spline are on the spline. If the handles are outside the spline, 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 are always outside the spline. For all other values of the smoothness, the handles are by default on the spline.

Since:
JViews 8.1

IsShowTangentsMode

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

Since:
JViews 8.1

SetShowTangentsMode

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

Since:
JViews 8.1


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