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, zoomable
calcResolvedBaseTextDirection, getComponentOrientation, getResolvedBaseTextDirection, getULocale, invalidateBidiCache, setBaseTextDirection, setBaseTextDirectionDuringConstruction
addActionListener, 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, viewAddedOrRemoved
public 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 IlvPersistentObject
write
in class IlvMapLabel
stream
- The stream to write to.IOException
- if there is a problem writing to stream
.public IlvGraphic copy()
IlvMapGraphicText
instance.copy
in class IlvMapLabel
IlvMapGraphicText
instance.IlvGraphic
public IlvGraphic copy(IlvCoordinateTransformation transform) throws IlvCoordinateTransformationException
copy
in interface IlvMapGraphic
transform
- Transformation to apply.IlvCoordinateTransformationException
IlvMapGraphic.copy(ilog.views.maps.srs.coordtrans.IlvCoordinateTransformation)
public IlvMapStyle getStyle()
IlvMapStyle
.getStyle
in interface IlvMapGraphic
IlvMapStyle
.IlvMapGraphic.getStyle()
public void setStyle(IlvMapStyle stl)
IlvMapGraphic
interface.setStyle
in interface IlvMapGraphic
stl
- The IlvMapStyle
object to set.
This parameter must be an IlvMapTextStyle
instance.public int getAlignment()
getAlignment
in class IlvMapLabel
public int getAttachment()
getAttachment
in class IlvMapLabel
public Paint getBackgroundPaint()
Paint
object used to fill the frame
of the label.getBackgroundPaint
in class IlvMapLabel
public Paint getFillPaint()
Paint
object used to fill
the characters in the text.getFillPaint
in class IlvMapLabel
public Font getFont()
getFont
in interface IlvFontInterface
getFont
in class IlvMapLabel
public Paint getFramePaint()
Paint
object used to draw the frame
of the label.getFramePaint
in class IlvMapLabel
public double getInnerMargin()
getInnerMargin
in class IlvMapLabel
public double getInterline()
getInterline
in class IlvMapLabel
public int getMaximumHeight()
getMaximumHeight
in class IlvMapLabel
@Deprecated public int getMinimunHeight()
getMinimunHeight
in class IlvMapLabel
public int getMinimumHeight()
getMinimumHeight
in class IlvMapLabel
public Paint getStrokePaint()
Paint
object used to draw the outline
of the characters in the text.getStrokePaint
in class IlvMapLabel
public boolean isAntialiasing()
true
if the anti-aliasing mode
of the label is on.isAntialiasing
in class IlvMapLabel
true
is returned.public void setAlignment(int alignment)
setAlignment
in class IlvMapLabel
alignment
- The alignment.public void setAntialiasing(boolean antialiasing)
setAntialiasing
in class IlvMapLabel
antialiasing
- The new anti-aliasing value.public void setAttachment(int attachment)
setAttachment
in class IlvMapLabel
attachment
- The attachment.public void setBackgroundPaint(Paint c)
Paint
object used to fill the frame
of the label.setBackgroundPaint
in class IlvMapLabel
c
- 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 IlvMapLabel
c
- The fill paint.public void setFont(Font font)
setFont
in interface IlvFontInterface
setFont
in class IlvMapLabel
font
- The font.public void setFramePaint(Paint c)
Paint
object used to draw the frame
of the label.setFramePaint
in class IlvMapLabel
c
- The frame paint object.public void setInnerMargin(double margin)
setInnerMargin
in class IlvMapLabel
margin
- The new margin.public void setInterline(double interline)
setInterline
in class IlvMapLabel
interline
- The interline spacing.public void setMaximumHeight(int max)
setMaximumHeight
in class IlvMapLabel
max
- The maximum height of the label.public void setMinimumHeight(int min)
setMinimumHeight
in class IlvMapLabel
min
- 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 IlvMapLabel
c
- The stroke paint.public void setFitToRect(boolean fit)
setFitToRect
in class IlvMapLabel
fit
- The fit to rect value.IlvMapLabel.setFitToRect(boolean)
public boolean isFitToRect()
isFitToRect
in class IlvMapLabel
true
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 IlvBaseTextDirectionInterface
setBaseTextDirection
in class IlvBidiGraphic
textDir
- 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 IlvBaseTextDirectionInterface
getBaseTextDirection
in class IlvBidiGraphic
IlvBidiGraphic.getBaseTextDirection()
public void draw(Graphics g, IlvTransformer t)
draw
in class IlvMapLabel
g
- 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 IlvMapGraphic
IlvMapText
geometry.IlvMapGraphic.makeGeometry()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.