public class IlvPolyPointsSelection extends IlvHandlesSelection
IlvPolyPointsInterface
.
It is a sub class of the class IlvHandlesSelection
where the handles correspond to the points defining the shape
of the object.CIRCLE_SHAPE, defaultHandleBackgroundColor, defaultHandleColor, defaultHandleShape, defaultHandleSize, FILLED_CIRCLE_SHAPE, FILLED_SQUARE_SHAPE, SQUARE_SHAPE
Constructor and Description |
---|
IlvPolyPointsSelection(IlvPolyPointsInterface obj)
Creates a new selection object.
|
Modifier and Type | Method and Description |
---|---|
IlvRect |
boundingBox(IlvTransformer t)
Returns the bounding box of the object.
|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Test if the specified point is inside a handle or
inside the selected object.
|
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.
|
int |
getHandleCardinal()
Returns the number of handles for this object.
|
IlvPolyPointsInterface |
getPolyPoints()
Returns the selected object.
|
boolean |
isClosedMode()
Returns
true if this object is in closed mode. |
boolean |
isOptimizedDrawingEnabled()
The optimization is allowed if
getPolyPoints().pointsInBBox()
returns true . |
void |
setClosedMode(boolean set)
Sets the selection in closed mode.
|
static void |
SetDefaultInteractor(String interactor)
This method allows you to change the default interactor for instances of this class.
|
afterLoopAllHandles, beforeLoopAllHandles, draw, drawWithoutHandles, getActiveHandlesColor, getHandle, getHandlesColor, getHandlesShape, getHandlesSize, isActive, onEnter, onExit, setActiveHandlesColor, setHandlesColor, setHandlesShape, setHandlesSize, zoomable
applyTransform, copy, getObject, isVisible
addActionListener, addNamedPropertyListener, allViewsRemoved, baseTextDirectionChanged, blinkingStateOn, boundingBox, callDraw, componentOrientationChanged, getAndAssociateObjectInteractor, getBaseTextDirection, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getComponentOrientation, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getResolvedBaseTextDirection, getToolTipBaseTextDirection, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getULocale, getZOrderIndex, hasProperty, inside, intersects, invalidateBBoxCache, invalidateBidiCache, isBaseTextDirectionSensitive, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isPersistent, isSelectable, localeChanged, makeSelection, move, move, moveResize, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, setBaseTextDirection, setBaseTextDirectionDuringConstruction, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setForeground, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setToolTipText, setVisible, setZOrderIndex, toString, translate, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemoved, write
public IlvPolyPointsSelection(IlvPolyPointsInterface obj)
obj
- the selected object.public IlvPolyPointsInterface getPolyPoints()
public IlvPoint getHandle(int i, IlvTransformer t)
getPointAt
method of the selected
IlvPolyPointsInterface
object.getHandle
in class IlvHandlesSelection
i
- the index of the handle.t
- the transformer through which the object is drawn.public int getHandleCardinal()
IlvPolyPointsInterface
object.getHandleCardinal
in class IlvHandlesSelection
public void setClosedMode(boolean set)
isClosedMode()
public boolean isClosedMode()
true
if this object is in closed mode.
In closed mode, this object will
draw a closed polyline when editing.
Otherwise it draws a polyline.setClosedMode(boolean)
public boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains
in class IlvHandlesSelection
p
- The point to be tested.tp
- The point p
transformed by the transformer
t
.t
- The transformation used to draw the object.true
if the point lies inside this graphic object.IlvGraphic
public IlvRect boundingBox(IlvTransformer t)
boundingBox
in class IlvHandlesSelection
t
- The transformer used to draw the object. If the
transformer is null
, the bounding box for the
identity transformer is returned.IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer)
,
IlvGraphic.zoomable()
,
IlvGraphic
public boolean isOptimizedDrawingEnabled()
getPolyPoints().pointsInBBox()
returns true
.isOptimizedDrawingEnabled
in class IlvSelection
public String getDefaultInteractor()
IlvPolyPointsEdition
.getDefaultInteractor
in class IlvSelection
IlvPolyPointsEdition
public static void SetDefaultInteractor(String interactor)
null
will recover the initial interactor.
This method allows to change the default interactor this class and all
subclasses that do not override getDefaultInteractor()
without subclassing this class.interactor
- The new interactor.getDefaultInteractor()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.