public class IlvMapGraphicText extends IlvMapLabel implements IlvMapGraphic
IlvMapGraphicText is an extention of the IlvMapLabel
graphic object that reads the properties it will have from an
IlvMapStyle instance.| Constructor and Description |
|---|
IlvMapGraphicText(IlvInputStream stream)
Reads an
IlvMapGraphicText from an
IlvInputStream. |
IlvMapGraphicText(IlvMapGraphicText source)
Creates a copy of an existing
IlvMapGraphicText object. |
IlvMapGraphicText(IlvPoint anchor,
String labels)
Creates an instance of the label specifying the point that is the anchor
of the label and the multiline (newline separated) text to be displayed.
|
IlvMapGraphicText(IlvRect anchor,
String labels)
Creates an instance of the label specifying a rectangle as the anchor of
the label.
|
| Modifier and Type | Method and Description |
|---|---|
IlvGraphic |
copy()
Returns a copy of this
IlvMapGraphicText instance. |
IlvGraphic |
copy(IlvCoordinateTransformation transform)
Copies the element and applies the specified transformation to its coordinates.
|
void |
draw(Graphics g,
IlvTransformer t)
Draws this object.
|
int |
getAlignment()
Returns the alignment of the label from the style.
|
int |
getAttachment()
Returns the attachment of the label from the style.
|
Paint |
getBackgroundPaint()
Returns the
Paint object used to fill the frame
of the label. |
int |
getBaseTextDirection()
Returns the base direction of the text.
|
Paint |
getFillPaint()
Returns the
Paint object used to fill
the characters in the text. |
Font |
getFont()
Returns the font used to draw the label.
|
Paint |
getFramePaint()
Returns the
Paint object used to draw the frame
of the label. |
double |
getInnerMargin()
Returns the margin.
|
double |
getInterline()
Returns the interline value.
|
int |
getMaximumHeight()
Returns the maximum height of the label.
|
int |
getMinimumHeight()
Returns the minimum height of the label.
|
int |
getMinimunHeight()
Deprecated.
Since JViews 8.8, use getMinimumHeight
|
Paint |
getStrokePaint()
Returns the
Paint object used to draw the outline
of the characters in the text. |
IlvMapStyle |
getStyle()
Retrieves the
IlvMapStyle. |
boolean |
isAntialiasing()
Returns
true if the anti-aliasing mode
of the label is on. |
boolean |
isFitToRect()
Indicates whether the label will be scaled to fit the rectangular anchor or not
|
IlvMapGeometry |
makeGeometry()
Returns an
IlvMapText geometry. |
void |
setAlignment(int alignment)
Sets the alignment of the label.
|
void |
setAntialiasing(boolean antialiasing)
Changes the anti-aliasing mode of the label.
|
void |
setAttachment(int attachment)
Sets the label attachment.
|
void |
setBackgroundPaint(Paint c)
Sets the
Paint object used to fill the frame
of the label. |
void |
setBaseTextDirection(int textDir)
Changes the base direction of the text.
|
void |
setFillPaint(Paint c)
Sets the
Paint object used to fill
the characters in the text. |
void |
setFitToRect(boolean fit)
Determines whether the label should be scaled to fit the rectangular anchor or not
|
void |
setFont(Font font)
Sets the font used to draw the label.
|
void |
setFramePaint(Paint c)
Sets the
Paint object used to draw the frame
of the label. |
void |
setInnerMargin(double margin)
Sets the spacing between the frame of the label
and the text.
|
void |
setInterline(double interline)
Sets the spacing between two lines.
|
void |
setMaximumHeight(int max)
Sets the maximum height of the label.
|
void |
setMinimumHeight(int min)
Sets the minimum height of the text.
|
void |
setStrokePaint(Paint c)
Sets the
Paint object used to draw the outline
of the characters in the text. |
void |
setStyle(IlvMapStyle stl)
Implements the
IlvMapGraphic interface. |
void |
write(IlvOutputStream stream)
Writes this
IlvMapGraphicText object to an
IlvOutputStream. |
applyTransform, baseTextDirectionChanged, boundingBox, getAnchor, getLabel, getLabelBBox, getMaximumLineHeight, getOffset, getRectAnchor, getTransformer, invalidate, isBaseTextDirectionSensitive, isUsingFractionalMetrics, isVisible, setAnchor, setLabel, setMaximumLineHeight, setOffset, setOffset, setRectAnchor, setTransformer, setUsingFractionalMetrics, supportMultiline, usesBidiMarkers, zoomablecalcResolvedBaseTextDirection, getComponentOrientation, getResolvedBaseTextDirection, getULocale, invalidateBidiCache, setBaseTextDirection, setBaseTextDirectionDuringConstructionaddActionListener, addNamedPropertyListener, allViewsRemoved, blinkingStateOn, boundingBox, callDraw, componentOrientationChanged, contains, getAndAssociateObjectInteractor, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getToolTipBaseTextDirection, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getZOrderIndex, hasProperty, inside, intersects, invalidateBBoxCache, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isPersistent, isSelectable, isVisible, localeChanged, makeSelection, move, move, moveResize, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, 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, viewAddedOrRemovedpublic IlvMapGraphicText(IlvPoint anchor, String labels)
anchor - The anchor point.labels - The text to be displayed.public IlvMapGraphicText(IlvRect anchor, String labels)
anchor - The rectangular anchor.labels - The text to be displayed.public IlvMapGraphicText(IlvMapGraphicText source)
IlvMapGraphicText object.source - The IlvMapGraphicText object to be
copied.public IlvMapGraphicText(IlvInputStream stream) throws IlvReadFileException
IlvMapGraphicText from an
IlvInputStream.stream - The stream to read from.IlvReadFileException - if there is a problem reading from
stream.public void write(IlvOutputStream stream) throws IOException
IlvMapGraphicText object to an
IlvOutputStream.write in interface IlvPersistentObjectwrite in class IlvMapLabelstream - The stream to write to.IOException - if there is a problem writing to stream.public IlvGraphic copy()
IlvMapGraphicText instance.copy in class IlvMapLabelIlvMapGraphicText instance.IlvGraphicpublic IlvGraphic copy(IlvCoordinateTransformation transform) throws IlvCoordinateTransformationException
copy in interface IlvMapGraphictransform - Transformation to apply.IlvCoordinateTransformationExceptionIlvMapGraphic.copy(ilog.views.maps.srs.coordtrans.IlvCoordinateTransformation)public IlvMapStyle getStyle()
IlvMapStyle.getStyle in interface IlvMapGraphicIlvMapStyle.IlvMapGraphic.getStyle()public void setStyle(IlvMapStyle stl)
IlvMapGraphic interface.setStyle in interface IlvMapGraphicstl - The IlvMapStyle object to set.
This parameter must be an IlvMapTextStyle instance.public int getAlignment()
getAlignment in class IlvMapLabelpublic int getAttachment()
getAttachment in class IlvMapLabelpublic Paint getBackgroundPaint()
Paint object used to fill the frame
of the label.getBackgroundPaint in class IlvMapLabelpublic Paint getFillPaint()
Paint object used to fill
the characters in the text.getFillPaint in class IlvMapLabelpublic Font getFont()
getFont in interface IlvFontInterfacegetFont in class IlvMapLabelpublic Paint getFramePaint()
Paint object used to draw the frame
of the label.getFramePaint in class IlvMapLabelpublic double getInnerMargin()
getInnerMargin in class IlvMapLabelpublic double getInterline()
getInterline in class IlvMapLabelpublic int getMaximumHeight()
getMaximumHeight in class IlvMapLabel@Deprecated public int getMinimunHeight()
getMinimunHeight in class IlvMapLabelpublic int getMinimumHeight()
getMinimumHeight in class IlvMapLabelpublic Paint getStrokePaint()
Paint object used to draw the outline
of the characters in the text.getStrokePaint in class IlvMapLabelpublic boolean isAntialiasing()
true if the anti-aliasing mode
of the label is on.isAntialiasing in class IlvMapLabeltrue
is returned.public void setAlignment(int alignment)
setAlignment in class IlvMapLabelalignment - The alignment.public void setAntialiasing(boolean antialiasing)
setAntialiasing in class IlvMapLabelantialiasing - The new anti-aliasing value.public void setAttachment(int attachment)
setAttachment in class IlvMapLabelattachment - The attachment.public void setBackgroundPaint(Paint c)
Paint object used to fill the frame
of the label.setBackgroundPaint in class IlvMapLabelc - The Paint used to fill the frame
of the label.public void setFillPaint(Paint c)
Paint object used to fill
the characters in the text.setFillPaint in class IlvMapLabelc - The fill paint.public void setFont(Font font)
setFont in interface IlvFontInterfacesetFont in class IlvMapLabelfont - The font.public void setFramePaint(Paint c)
Paint object used to draw the frame
of the label.setFramePaint in class IlvMapLabelc - The frame paint object.public void setInnerMargin(double margin)
setInnerMargin in class IlvMapLabelmargin - The new margin.public void setInterline(double interline)
setInterline in class IlvMapLabelinterline - The interline spacing.public void setMaximumHeight(int max)
setMaximumHeight in class IlvMapLabelmax - The maximum height of the label.public void setMinimumHeight(int min)
setMinimumHeight in class IlvMapLabelmin - The minimum height of the label.public void setStrokePaint(Paint c)
Paint object used to draw the outline
of the characters in the text.setStrokePaint in class IlvMapLabelc - The stroke paint.public void setFitToRect(boolean fit)
setFitToRect in class IlvMapLabelfit - The fit to rect value.IlvMapLabel.setFitToRect(boolean)public boolean isFitToRect()
isFitToRect in class IlvMapLabeltrue if this label will fit to rect anchor and false otherwise.IlvMapLabel.isFitToRect()public void setBaseTextDirection(int textDir)
IlvBidiUtil.INHERITED_DIRECTION:
the base text direction is inherited from the
graphic bag that contains this object.
If this object is not contained in a graphic bag,
the base text direction is calculated from the
component orientation.
IlvBidiUtil.COMPONENT_DIRECTION:
the base text direction is calculated from the
component orientation.
IlvBidiUtil.LEFT_TO_RIGHT:
the base text direction is left-to-right.
IlvBidiUtil.RIGHT_TO_LEFT:
the base text direction is right-to-left.
IlvBidiUtil.CONTEXTUAL_DIRECTION:
the base test direction is determined from the text
that is displayed according to the standard Bidi
algorithm, if the text contains at least one character
with a strong left-to-right or right-to-left direction.
If the text doesn't contain any character with a strong
direction, the real text direction is determined from
the current component orientation of the object.
setBaseTextDirection in interface IlvBaseTextDirectionInterfacesetBaseTextDirection in class IlvBidiGraphictextDir - The base text directionIlvBidiGraphic.setBaseTextDirection(int)public int getBaseTextDirection()
IlvBidiUtil.INHERITED_DIRECTION:
the base text direction is inherited from the
graphic bag that contains this object.
If this object is not contained in a graphic bag,
the base text direction is calculated from the
component orientation.
IlvBidiUtil.COMPONENT_DIRECTION:
the base text direction is calculated from the
component orientation.
IlvBidiUtil.LEFT_TO_RIGHT:
the base text direction is left-to-right.
IlvBidiUtil.RIGHT_TO_LEFT:
the base text direction is right-to-left.
IlvBidiUtil.CONTEXTUAL_DIRECTION:
the base test direction is determined from the text
that is displayed according to the standard Bidi
algorithm, if the text contains at least one character
with a strong left-to-right or right-to-left direction.
If the text doesn't contain any character with a strong
direction, the real text direction is determined from
the current component orientation of the object.
getBaseTextDirection in interface IlvBaseTextDirectionInterfacegetBaseTextDirection in class IlvBidiGraphicIlvBidiGraphic.getBaseTextDirection()public void draw(Graphics g, IlvTransformer t)
draw in class IlvMapLabelg - The destination Graphics.t - The transformation used to draw the object.IlvMapLabel.draw(java.awt.Graphics, ilog.views.IlvTransformer)public IlvMapGeometry makeGeometry()
IlvMapText geometry.makeGeometry in interface IlvMapGraphicIlvMapText geometry.IlvMapGraphic.makeGeometry()© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.