public class IlvAnchoredLabel extends IlvDoubleGraphicHandleBag
IlvGraphic
containing a label
and an IlvGraphic
. A line can be drawn
to join the label and the center of the reference
IlvGraphic
.MAX_FLAG
Constructor and Description |
---|
IlvAnchoredLabel(IlvAnchoredLabel source)
Constructs an
IlvAnchoredLabel by copying an existing one. |
IlvAnchoredLabel(IlvGraphic reference,
IlvMapLabel label)
Constructs an
IlvAnchoredLabel by specifying a reference IlvGraphic
and an IlvMapLabel . |
IlvAnchoredLabel(IlvInputStream stream)
Reads an
IlvAnchoredLabel from an IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Overrides the default method to only return
true when the
point is in the label, the reference, or the line. |
IlvGraphic |
copy()
Returns a copy of the
IlvAnchoredLabel . |
void |
draw(Graphics g,
IlvTransformer t)
Draws the
IlvAnchoredLabel at transformer t . |
protected void |
drawLine(Graphics g,
IlvTransformer t)
Draws the line between the reference point
and the
IlvMapLabel . |
static IlvAnchoredLabel |
GetAnchoredLabel(IlvMapLabel label)
Retrieves the
IlvAnchoredLabel from an IlvMapLabel . |
IlvMapLabel |
getLabel()
Retrieves the
IlvMapLabel . |
Color |
getLineColor()
Retrieves the color used to draw the line.
|
IlvGraphic |
getReference()
Retrieves the reference
IlvGraphic . |
IlvPoint |
getReferencePoint()
Retrieves the reference point.
|
boolean |
isLineVisible()
Tells if the
IlvAnchoredLabel is displaying
the line. |
IlvSelection |
makeSelection()
Creates a selection object for this graphic object.
|
void |
moveLabel(IlvPoint p)
Moves the
IlvMapLabel contained in this
IlvAnchoredLabel . |
protected String |
object1Name()
Returns the name of the first object in the IVL file.
|
protected String |
object2Name()
Returns the name of the second object in the IVL file.
|
void |
setLabelOffset(double dx,
double dy)
Sets the label offset of this
IlvAnchoredLabel
if the label exists. |
void |
setLineColor(Color color)
Sets the color used to draw the line.
|
void |
setLineVisible(boolean visible)
Tells the
IlvAnchoredLabel if it should display
the line. |
void |
setReference(IlvGraphic g)
Sets the reference
IlvGraphic . |
void |
setReferencePoint(IlvPoint reference)
Sets the reference point.
|
void |
write(IlvOutputStream stream)
Writes this
IlvAnchoredLabel into an IlvOutputStream . |
boolean |
zoomable()
Returns always
false . |
addGraphicBagHierarchyListener, addManagerViewsHierarchyListener, addObject, applyToObject, applyTransform, boundingBox, enableGraphicBagHierarchyEventForwarding, enableManagerViewsHierarchyEventForwarding, fireGraphicBagHierarchyEvent, fireManagerViewsHierarchyEvent, getIntersectionWithOutline, getObject, getObject1, getObject2, getObjects, getOriginalPopupMenu, getPopupMenu, getToolTipText, inside, intersects, isFlagSet, isPersistent, move, move, moveObject, needsGraphicBagHierarchyEvent, needsManagerViewsHierarchyEvent, reDrawObj, reDrawRegion, removeGraphicBagHierarchyListener, removeManagerViewsHierarchyListener, removeObject, reshapeObject, setDelegateMoveResize, setFlag, setGraphicBag, setObject1, setObject2, setObjectName, translate
calcResolvedBaseTextDirection, getBaseTextDirection, getComponentOrientation, getResolvedBaseTextDirection, getULocale, invalidateBidiCache, setBaseTextDirection, setBaseTextDirection, setBaseTextDirectionDuringConstruction
addActionListener, addNamedPropertyListener, allViewsRemoved, baseTextDirectionChanged, blinkingStateOn, boundingBox, callDraw, componentOrientationChanged, getAndAssociateObjectInteractor, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenuName, getProperty, getToolTipBaseTextDirection, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getZOrderIndex, hasProperty, invalidateBBoxCache, isBaseTextDirectionSensitive, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isSelectable, isVisible, localeChanged, moveResize, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setForeground, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setToolTipText, setVisible, setZOrderIndex, toString, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemoved
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGraphicBag
public IlvAnchoredLabel(IlvGraphic reference, IlvMapLabel label)
IlvAnchoredLabel
by specifying a reference IlvGraphic
and an IlvMapLabel
. The reference is not allowed to be null
.public IlvAnchoredLabel(IlvInputStream stream) throws IlvReadFileException
IlvAnchoredLabel
from an IlvInputStream
.IlvReadFileException
public IlvAnchoredLabel(IlvAnchoredLabel source)
IlvAnchoredLabel
by copying an existing one.public void write(IlvOutputStream stream) throws IOException
IlvAnchoredLabel
into an IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvDoubleGraphicHandleBag
stream
- the output stream.IOException
- thrown when an exception occurs during
the write operation for this object.protected String object1Name()
object1Name
in class IlvDoubleGraphicHandleBag
protected String object2Name()
object2Name
in class IlvDoubleGraphicHandleBag
public static IlvAnchoredLabel GetAnchoredLabel(IlvMapLabel label)
IlvAnchoredLabel
from an IlvMapLabel
.public IlvPoint getReferencePoint()
public void setReferencePoint(IlvPoint reference)
public IlvGraphic getReference()
IlvGraphic
.public void setReference(IlvGraphic g)
IlvGraphic
.public IlvMapLabel getLabel()
IlvMapLabel
.public void draw(Graphics g, IlvTransformer t)
IlvAnchoredLabel
at transformer t
.draw
in class IlvDoubleGraphicHandleBag
g
- the destination Graphics.t
- the transformation used to draw the object.IlvGraphic.callDraw(Graphics,IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvGraphic.zoomable()
,
IlvGraphic
public boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
true
when the
point is in the label, the reference, or the line.contains
in class IlvDoubleGraphicHandleBag
p
- The point.tp
- The transformed point.t
- The transformer.true
is returned.IlvGraphic.contains(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)
public boolean zoomable()
false
. This object is not zoomable
because it contains a fixed size point.zoomable
in class IlvDoubleGraphicHandleBag
IlvGraphic
,
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvManager
public IlvGraphic copy()
IlvAnchoredLabel
.copy
in class IlvDoubleGraphicHandleBag
IlvGraphic
public void moveLabel(IlvPoint p)
IlvMapLabel
contained in this
IlvAnchoredLabel
. Since this operation can change
the bounding box of the object, this method
calls the graphic bag applyToObject
method
on the IlvMapLabel
.public void setLabelOffset(double dx, double dy)
IlvAnchoredLabel
if the label exists.protected void drawLine(Graphics g, IlvTransformer t)
IlvMapLabel
. If the point is inside the label,
no line is drawn.public IlvSelection makeSelection()
IlvUnresizeableDrawSelection
.makeSelection
in class IlvGraphic
IlvDrawSelection
public void setLineColor(Color color)
IlvBlinkingColor
.public Color getLineColor()
public void setLineVisible(boolean visible)
IlvAnchoredLabel
if it should display
the line.public boolean isLineVisible()
IlvAnchoredLabel
is displaying
the line.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.