org.opengis.go.display.primitive
Interface GraphicLabel
-
- All Superinterfaces:
- Graphic
public interface GraphicLabel extends Graphic
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 org.opengis.go.display.primitive.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
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description DirectPositiongetPosition()Returns the DirectPosition corresponding to the position of the label.doublegetRotation(Unit unit)Returns the orientation by which to rotate the text before rendering.java.lang.StringgetText()Returns the text that will be displayed.TextSymbolizergetTextSymbolizer()Returns theGraphicStylefor thisGraphicLabel, which is required to be aTextSymbolizer.XAnchorgetXAnchor()Returns the x-axis portion of the place on the text string that corresponds to the rendering position (see the [gs]etPosition method).YAnchorgetYAnchor()Returns the y-axis portion of the place on the text string that corresponds to the rendering position (see the [gs]etPosition method).booleanisAllowingRotation()Indicates whether this primitive is displaying anchor handles that allow the user to change the rotation of the text.voidsetAllowingRotation(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.voidsetPosition(DirectPosition coord)Sets the position of the upper left corner of the label.voidsetRotation(double rotation, Unit unit)Sets the angle by which to rotate the text before rendering.voidsetText(java.lang.String text)Sets the text that the label will render.voidsetXAnchor(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).voidsetYAnchor(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).-
Methods inherited from interface org.opengis.go.display.primitive.Graphic
addGraphicListener, cloneGraphic, dispose, fireGraphicEvent, getAutoEdit, getBlinking, getBlinkPattern, getClientProperty, getDragSelectable, getGraphicStyle, getMaxScale, getMinScale, getName, getParent, getPickable, getSelected, getSymbology, getVisible, getZOrderHint, isPassingEventsToParent, isShowingAnchorHandles, isShowingEditHandles, putClientProperty, refresh, removeGraphicListener, setAutoEdit, setBlinking, setBlinkPattern, setDragSelectable, setGraphicStyle, setMaxScale, setMinScale, setName, setParent, setPassingEventsToParent, setPickable, setSelected, setShowingAnchorHandles, setShowingEditHandles, setSymbology, setVisible, setZOrderHint
-
-
-
-
Method Detail
-
setText
void setText(java.lang.String text)
Sets the text that the label will render.- Parameters:
text- the text to display.
-
getText
java.lang.String getText()
Returns the text that will be displayed.- Returns:
- the text to be rendered.
-
setPosition
void setPosition(DirectPosition coord)
Sets the position of the upper left corner of the label.- Parameters:
coord- the wrapper for the position of the label.
-
getPosition
DirectPosition getPosition()
Returns the DirectPosition corresponding to the position of the label.- Returns:
- the wrapper for the position.
-
setXAnchor
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).- Parameters:
xAnchor- the x-axis location on the string (i.e., left, center, right).
-
getXAnchor
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).- Returns:
- the x-axis portion of the text anchor point.
-
setYAnchor
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).- Parameters:
yAnchor- the y-axis location on the string (i.e., top, middle, baseline, bottom).
-
getYAnchor
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).- Returns:
- the y-axis portion of the text anchor point.
-
setRotation
void setRotation(double rotation, Unit unit)Sets the angle by which to rotate the text before rendering. The text is rotated about its anchor (see the set[XY]Anchor methods).- Parameters:
rotation- the new rotation.unit- the Unit for the angle value.
-
getRotation
double getRotation(Unit unit)
Returns the orientation by which to rotate the text before rendering.- Parameters:
unit- the Unit for the angle value.- Returns:
- the rotation orientation.
-
getTextSymbolizer
TextSymbolizer getTextSymbolizer()
Returns theGraphicStylefor thisGraphicLabel, which is required to be aTextSymbolizer.- Returns:
- the GraphicLabel's
GraphicStyle.
-
isAllowingRotation
boolean isAllowingRotation()
Indicates whether this primitive is displaying anchor handles that allow the user to change the rotation of the text.
-
setAllowingRotation
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.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG