|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvGraphic
ilog.views.maps.graphic.IlvAnchoredLabel
public class IlvAnchoredLabel
A subclass of IlvGraphic containing a label
and an IlvGraphic. A line can be drawn
to join the label and the center of the reference
IlvGraphic.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
void |
applyTransform(IlvTransformer t)
Applies the transformation t to the IlvAnchoredLabel. |
IlvRect |
boundingBox(IlvTransformer t)
Computes the bounding box of the IlvAnchoredLabel
at transformer t. |
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. |
void |
setLabelOffset(float dx,
float 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
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.
IlvReadFileExceptionpublic IlvAnchoredLabel(IlvAnchoredLabel source)
IlvAnchoredLabel by copying an existing one.
| Method Detail |
|---|
public void write(IlvOutputStream stream)
throws IOException
IlvAnchoredLabel into an IlvOutputStream.
write in interface IlvPersistentObjectwrite in class IlvGraphicstream - The output stream to write this graphic object to.
IOException - thrown when an exception occurs during
the write operation for this object.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 IlvRect boundingBox(IlvTransformer t)
IlvAnchoredLabel
at transformer 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(),
IlvGraphic
public void draw(Graphics g,
IlvTransformer t)
IlvAnchoredLabel at transformer t.
draw in class IlvGraphicg - The destination Graphics.t - The transformation used to draw the object.IlvGraphic.boundingBox(ilog.views.IlvTransformer),
IlvGraphic.zoomable(),
IlvGraphicpublic void applyTransform(IlvTransformer t)
t to the IlvAnchoredLabel.
applyTransform in class IlvGraphict - The transformation to be applied.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 IlvGraphicp - 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 IlvGraphicIlvGraphic,
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer),
IlvGraphic.boundingBox(IlvTransformer),
IlvManagerpublic IlvGraphic copy()
IlvAnchoredLabel.
copy in class IlvGraphicIlvGraphic instance.IlvGraphicpublic 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(float dx,
float 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 IlvGraphicIlvDrawSelectionpublic void setLineColor(Color color)
public Color getLineColor()
public void setLineVisible(boolean visible)
IlvAnchoredLabel if it should display
the line.
public boolean isLineVisible()
IlvAnchoredLabel is displaying
the line.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||