|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvGraphic
ilog.views.IlvSelection
ilog.views.IlvHandlesSelection
public abstract class IlvHandlesSelection
A selection object that displays several handles. The handles are drawn as small markers (squares or circles).
| Field Summary | |
|---|---|
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 float |
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 Summary | |
|---|---|
IlvHandlesSelection(IlvGraphic obj)
Creates a new 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. |
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. |
float |
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(float size)
Changes the size of the handles. |
boolean |
zoomable()
Returns false, this object is not
zoomable. |
| Methods inherited from class ilog.views.IlvSelection |
|---|
applyTransform, copy, getDefaultInteractor, getObject, isOptimizedDrawingEnabled, isVisible, SetDefaultInteractor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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 float defaultHandleSize
IlvHandlesSelection object. The
value is 3.
| Constructor Detail |
|---|
public IlvHandlesSelection(IlvGraphic obj)
obj - the selected object.| Method Detail |
|---|
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 float getHandlesSize()
setHandlesSize(float)public final void setHandlesSize(float size)
size - the new size.getHandlesSize()public final int getHandlesShape()
IlvHandlesSelection.FILLED_SQUARE_SHAPE or
IlvHandlesSelection.SQUARE_SHAPEsetHandlesShape(int)public final void setHandlesShape(int shape)
shape - The value can be
IlvHandlesSelection.FILLED_SQUARE_SHAPE or
IlvHandlesSelection.SQUARE_SHAPEgetHandlesShape()
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 IlvGraphicp - 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 IlvGraphicdst - The destination Graphics.t - The transformation used to draw the object.IlvGraphic.boundingBox(ilog.views.IlvTransformer),
IlvGraphic.zoomable(),
IlvGraphic
public void drawWithoutHandles(Graphics dst,
IlvTransformer t)
public boolean zoomable()
false, this object is not
zoomable.
zoomable in class IlvGraphicIlvGraphic,
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer),
IlvGraphic.boundingBox(IlvTransformer),
IlvManagerpublic IlvRect boundingBox(IlvTransformer t)
boundingBox in class IlvGraphict - 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(),
IlvGraphicprotected 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 IlvSelectioncontext - 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 IlvSelectioncontext - The context for the object interactor.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||