public abstract class IlvHandlesSelection extends IlvSelection
Modifier and Type | Field and Description |
---|---|
static int |
CIRCLE_SHAPE
The circle shape for handles.
|
static Color |
defaultHandleBackgroundColor
The default background color used when drawing
a handle of shape
SQUARE_SHAPE . |
static Color |
defaultHandleColor
The default color used when creating an
IlvHandlesSelection object. |
static int |
defaultHandleShape
The default shape used when drawing an
IlvHandlesSelection object. |
static double |
defaultHandleSize
The default size of handles when creating an
IlvHandlesSelection object. |
static int |
FILLED_CIRCLE_SHAPE
The filled circle shape for handles.
|
static int |
FILLED_SQUARE_SHAPE
The filled square shape for handles.
|
static int |
SQUARE_SHAPE
The square shape for handles.
|
Constructor and Description |
---|
IlvHandlesSelection(IlvGraphic obj)
Creates a new selection object.
|
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Test if the specified point is inside a handle.
|
void |
draw(Graphics dst,
IlvTransformer t)
Draws the object.
|
void |
drawWithoutHandles(Graphics dst,
IlvTransformer t)
Draws the decorations without the handles.
|
Color |
getActiveHandlesColor()
Returns the foreground color of the handles when the mouse is
over the handles.
|
int |
getHandle(IlvPoint p,
IlvTransformer t)
Searches for a handle located at point p, when the object
is drawn with the transformer t.
|
abstract IlvPoint |
getHandle(int i,
IlvTransformer t)
Returns the location of a handle.
|
abstract int |
getHandleCardinal()
Returns the number of handles for this object.
|
Color |
getHandlesColor()
Returns the foreground color of the handles when the mouse is
not over the handles.
|
int |
getHandlesShape()
Returns the shape of the handles.
|
double |
getHandlesSize()
Returns the size of the handles.
|
boolean |
isActive()
Returns
true if the selection is active. |
void |
onEnter(IlvObjectInteractorContext context)
Called when the selection is entered.
|
void |
onExit(IlvObjectInteractorContext context)
Called when the selection is exited.
|
void |
setActiveHandlesColor(Color c)
Sets the foreground color of the handles when the mouse is
over the handles.
|
void |
setHandlesColor(Color c)
Sets the foreground color of the handles when the mouse is
not over the handles.
|
void |
setHandlesShape(int shape)
Changes the shape of the handles.
|
void |
setHandlesSize(double size)
Changes the size of the handles.
|
boolean |
zoomable()
Returns
false , this object is not
zoomable. |
applyTransform, copy, getDefaultInteractor, getObject, isOptimizedDrawingEnabled, isVisible, SetDefaultInteractor
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 static final int FILLED_SQUARE_SHAPE
public static final int SQUARE_SHAPE
public static final int FILLED_CIRCLE_SHAPE
public static final int CIRCLE_SHAPE
public static int defaultHandleShape
IlvHandlesSelection
object.
The value can be IlvHandlesSelection.FILLED_SQUARE_SHAPE
or IlvHandlesSelection.SQUARE_SHAPE
. The default
value is FILLED_SQUARE_SHAPE
.public static Color defaultHandleColor
IlvHandlesSelection
object.public static Color defaultHandleBackgroundColor
SQUARE_SHAPE
.public static double defaultHandleSize
IlvHandlesSelection
object. The
value is 3.public IlvHandlesSelection(IlvGraphic obj)
obj
- the selected object.public Color getHandlesColor()
setHandlesColor(java.awt.Color)
public void setHandlesColor(Color c)
getHandlesColor()
public Color getActiveHandlesColor()
setHandlesColor(java.awt.Color)
public void setActiveHandlesColor(Color c)
getHandlesColor()
public boolean isActive()
true
if the selection is active.
Usually this means that events are passed to the object interactor
of the selection.
Visually, it means that the handles color and the active handles
color are swapped.public final double getHandlesSize()
setHandlesSize(double)
public final void setHandlesSize(double size)
size
- the new size.getHandlesSize()
public final int getHandlesShape()
IlvHandlesSelection.FILLED_SQUARE_SHAPE
or
IlvHandlesSelection.SQUARE_SHAPE
setHandlesShape(int)
public final void setHandlesShape(int shape)
shape
- The value can be
IlvHandlesSelection.FILLED_SQUARE_SHAPE
or
IlvHandlesSelection.SQUARE_SHAPE
getHandlesShape()
public abstract IlvPoint getHandle(int i, IlvTransformer t)
i
- the index of the handle.t
- the transformer through which the object is drawn.public abstract int getHandleCardinal()
public int getHandle(IlvPoint p, IlvTransformer t)
public boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains
in class IlvGraphic
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 void draw(Graphics dst, IlvTransformer t)
draw
in class IlvGraphic
dst
- The destination Graphics
instance.t
- The transformation used to draw the object.IlvGraphic.callDraw(Graphics,IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvGraphic.zoomable()
,
IlvGraphic
public void drawWithoutHandles(Graphics dst, IlvTransformer t)
public boolean zoomable()
false
, this object is not
zoomable.zoomable
in class IlvGraphic
IlvGraphic
,
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvManager
public IlvRect boundingBox(IlvTransformer t)
boundingBox
in class IlvGraphic
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
protected void beforeLoopAllHandles(IlvTransformer t)
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)
.t
- The transformer to draw this object.afterLoopAllHandles()
protected void afterLoopAllHandles()
getHandle(int, ilog.views.IlvTransformer)
. Subclasses can override this method
to do cleanup caches that were needed by getHandle(int, ilog.views.IlvTransformer)
.beforeLoopAllHandles(ilog.views.IlvTransformer)
public void onEnter(IlvObjectInteractorContext context)
Subclasses can override this method to perform specific tasks when the selection is entered. The default implementation does nothing.
onEnter
in class IlvSelection
context
- The context for the object interactor.public void onExit(IlvObjectInteractorContext context)
Subclasses can override this method to perform specific tasks when the selection is entered. The default implementation does nothing.
onExit
in class IlvSelection
context
- The context for the object interactor.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.