public class IlvMapTextRenderingStyle extends IlvMapRenderingStyle
IlvDefaultTextRenderer
.
The parameters stored in this class include paint style, alignment, font
and scale.Constructor and Description |
---|
IlvMapTextRenderingStyle()
Constructs an
IlvMapRenderingStyle with default
values. |
IlvMapTextRenderingStyle(IlvInputStream stream)
Constructs an
IlvMapRenderingStyle for an
IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
int |
getAlignment()
Retrieves the alignment of the label.
|
double |
getAngle()
Retrieves the angle of rotation of the label.
|
int |
getAttachment()
Retrieves the attachment of the label.
|
Paint |
getBackgroundPaint()
Retrieves the background paint.
|
int |
getBaseTextDirection()
Retrievs the base text direction of the label.
|
Paint |
getFillPaint()
Retrieves the fill paint.
|
Font |
getFont()
Retrieves the font used to display the label.
|
Paint |
getFramePaint()
Retrieves the frame stroke paint.
|
int |
getInnerMargin()
Retrieves the inner margin of the label.
|
double |
getInterline()
Retrieves interline of the label.
|
int |
getMaximumHeight()
Retrieves the maximum height of the label.
|
int |
getMinimumHeight()
Retrieves the minimum height of the label.
|
double |
getScale()
Retrieves the scale at which text is displayed with the nominal
height of its font.
|
double |
getScaleFactor(IlvCoordinateSystem cs)
Returns the scale factor of a transformer that would show a map
at the specified scale.
|
Paint |
getStrokePaint()
Retrieves the stroke paint.
|
boolean |
isAntialiasing()
Retrieves the antialiasing mode.
|
void |
setAlignment(int alignment)
Sets the alignment of the label.
|
void |
setAngle(double angle)
Sets the angle corresponding to the rotation of the label.
|
void |
setAntialiasing(boolean antialiasing)
Sets the antialiasing mode.
|
void |
setAttachment(int attachment)
Sets the attachment of the label.
|
void |
setBackgroundPaint(Paint c)
Sets the background paint.
|
void |
setBaseTextDirection(int textDirection)
Sets the base text direction of the label.
|
void |
setFillPaint(Paint c)
Sets the fill paint.
|
void |
setFont(Font font)
Sets the font used to display the label.
|
void |
setFramePaint(Paint paint)
Sets the frame stroke paint.
|
void |
setInnerMargin(int margin)
Sets the inner margin of the label in pixels.
|
void |
setInterline(double interline)
Sets the interline of the label.
|
void |
setMaximumHeight(int height)
Sets the maximum height of the label in pixels.
|
void |
setMinimumHeight(int height)
Sets the minimum height of the label.
|
void |
setScale(double scale)
Sets the scale at which the label is displayed at font size.
|
void |
setStrokePaint(Paint c)
Sets the stroke paint of the label.
|
void |
write(IlvOutputStream stream)
Writes a
IlvMapTextRenderingStyle into
an IlvOutputStream . |
public IlvMapTextRenderingStyle()
IlvMapRenderingStyle
with default
values.
Default values are: public IlvMapTextRenderingStyle(IlvInputStream stream) throws IlvReadFileException
IlvMapRenderingStyle
for an
IlvInputStream
.stream
- The IlvInputStream
.IlvReadFileException
public void write(IlvOutputStream stream) throws IOException
IlvMapTextRenderingStyle
into
an IlvOutputStream
.stream
- The IlvOutputStream
.IOException
- thrown when an exception occurs during
the write operation for this object.public void setBackgroundPaint(Paint c)
c
- The background Paint
.public Paint getBackgroundPaint()
public void setFillPaint(Paint c)
c
- The fill Paint
.public Paint getFillPaint()
public void setStrokePaint(Paint c)
c
- The stroke Paint
.public Paint getStrokePaint()
public void setFramePaint(Paint paint)
paint
- The frame Paint
.public Paint getFramePaint()
public void setAlignment(int alignment)
alignment
- The alignment of the label.public int getAlignment()
public void setFont(Font font)
public Font getFont()
public void setInterline(double interline)
public double getInterline()
public void setAttachment(int attachment)
public int getAttachment()
setAttachment(int)
public void setMaximumHeight(int height)
IlvMapLabel
.public int getMaximumHeight()
public void setMinimumHeight(int height)
IlvMapLabel
.public int getMinimumHeight()
public void setScale(double scale)
scale
- Scale at which text is displayed with the nominal
height of its font.public double getScale()
public double getScaleFactor(IlvCoordinateSystem cs)
cs
- The coordinate system.public void setAntialiasing(boolean antialiasing)
public boolean isAntialiasing()
public int getInnerMargin()
public void setInnerMargin(int margin)
IlvMapLabel
.margin
- The margin.public void setAngle(double angle)
angle
- The angle of rotation in degrees.public double getAngle()
public void setBaseTextDirection(int textDirection)
IlvBidiUtil.INHERITED_DIRECTION
:
the base text direction is inherited from the parent.
This is the default.
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.
textDirection
- The base text direction.public int getBaseTextDirection()
IlvBidiUtil.INHERITED_DIRECTION
:
the base text direction is inherited from the parent.
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.
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.