Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 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).

Methods inherited from interface 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(String text)

  Sets the text that the label will render.

  Parameters:
    `text` - the text to display.

### getText

    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 the `GraphicStyle` for this `GraphicLabel`, which is required to be a `TextSymbolizer`.

  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.