|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GraphicLabel
Defines a common abstraction for implementations that render text on a drawing surface. The rotation of the label with respect to an external Coordinate Reference System is measured positively as a clockwise angle, starting from a reference line within the Coordinate Reference System and ending at the x-axis of the local Cartesian plane.
Field Summary |
---|
Fields inherited from interface Graphic |
---|
DEFAULT_AUTO_EDIT, DEFAULT_BLINK_PATTERN, DEFAULT_BLINKING, DEFAULT_DRAG_SELECTABLE, DEFAULT_MAX_SCALE, DEFAULT_MIN_SCALE, DEFAULT_PICKABLE, DEFAULT_SELECTED, DEFAULT_VISIBLE, DEFAULT_Z_ORDER |
Method Summary | |
---|---|
DirectPosition |
getPosition()
Returns the DirectPosition corresponding to the position of the label. |
double |
getRotation(Unit unit)
Returns the orientation by which to rotate the text before rendering. |
String |
getText()
Returns the text that will be displayed. |
TextSymbolizer |
getTextSymbolizer()
Returns the GraphicStyle for this GraphicLabel ,
which is required to be a TextSymbolizer . |
XAnchor |
getXAnchor()
Returns the x-axis portion of the place on the text string that corresponds to the rendering position (see the [gs]etPosition method). |
YAnchor |
getYAnchor()
Returns the y-axis portion of the place on the text string that corresponds to the rendering position (see the [gs]etPosition method). |
boolean |
isAllowingRotation()
Indicates whether this primitive is displaying anchor handles that allow the user to change the rotation of the text. |
void |
setAllowingRotation(boolean newValue)
Sets the boolean that indicates whether this primitive is displaying anchor handles that allow the user to change the rotation of the text. |
void |
setPosition(DirectPosition coord)
Sets the position of the upper left corner of the label. |
void |
setRotation(double rotation,
Unit unit)
Sets the angle by which to rotate the text before rendering. |
void |
setText(String text)
Sets the text that the label will render. |
void |
setXAnchor(XAnchor xAnchor)
Specifies the x-axis portion of the place on the text string that corresponds to the rendering position (see the [gs]etPosition method). |
void |
setYAnchor(YAnchor yAnchor)
Specifies the y-axis portion of the place on the text string that corresponds to the rendering position (see the [gs]etPosition method). |
Method Detail |
---|
void setText(String text)
text
- the text to display.String getText()
void setPosition(DirectPosition coord)
coord
- the wrapper for the position of the label.DirectPosition getPosition()
void setXAnchor(XAnchor xAnchor)
xAnchor
- the x-axis location on the string
(i.e., left, center, right).XAnchor getXAnchor()
void setYAnchor(YAnchor yAnchor)
yAnchor
- the y-axis location on the string
(i.e., top, middle, baseline, bottom).YAnchor getYAnchor()
void setRotation(double rotation, Unit unit)
rotation
- the new rotation.unit
- the Unit for the angle value.double getRotation(Unit unit)
unit
- the Unit for the angle value.
TextSymbolizer getTextSymbolizer()
GraphicStyle
for this GraphicLabel
,
which is required to be a TextSymbolizer
.
GraphicStyle
.boolean isAllowingRotation()
void setAllowingRotation(boolean newValue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |