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

## com.bbn.openmap.omGraphics.labeled
Interface LabeledOMGraphic

All Known Implementing Classes:
  LabeledOMPoly, LabeledOMSpline

public interface LabeledOMGraphic

The LabeledOMGraphic is a simple extension to the OMGraphic where a text string can be set for the graphic on the map. It provides basic functionality. If you need more control, try the Location object or use a OMText object for your label.

Method Summary
`java.awt.Point` | `getCenter()` Get the calculated center where the label string is drawn.
`java.awt.Font` | `getFont()` Get the Font for the label.
`int` | `getIndex()` Get the index of the OMGraphic where the String will be rendered.
`int` | `getJustify()` Get the justification setting for the label.
`java.awt.Point` | `getOffset()` Get the x, y pixel offsets set for the rendering of the point.
`double` | `getRotationAngle()` Get the current rotation of the text.
`java.lang.String` | `getText()` Get the String for the label.
`boolean` | `isLocateAtCenter()` Get whether the LabeledOMGraphic is placing the label String in the center of the OMGraphic.
`void` | `setFont(java.awt.Font f)` Set the Font for the label.
`void` | `setIndex(int index)` Set the index of the OMGraphic coordinates where the drawing point of the label should be attached.
`void` | `setJustify(int just)` Set the justification setting for the label.
`void` | `setLocateAtCenter(boolean set)` Tell the LabeledOMGraphic to calculate the location of the String that would put it in the middle of the OMGraphic.
`void` | `setOffset(java.awt.Point p)` Set the x, y pixel offsets where the String should be rendered, from the location determined from the index point, or from the calculated center point.
`void` | `setRotationAngle(double angle)` Set the angle by which the text is to rotated.
`void` | `setText(java.lang.String label)` Set the String for the label.

Method Detail

### setText

    public void setText(java.lang.String label)

  Set the String for the label.

### getText

    public java.lang.String getText()

  Get the String for the label.

### setFont

    public void setFont(java.awt.Font f)

  Set the Font for the label.

### getFont

    public java.awt.Font getFont()

  Get the Font for the label.

### setJustify

    public void setJustify(int just)

  Set the justification setting for the label.

  See Also:
    `OMText.JUSTIFY_LEFT`, `OMText.JUSTIFY_CENTER`, `OMText.JUSTIFY_RIGHT`

### getJustify

    public int getJustify()

  Get the justification setting for the label.

  See Also:
    `OMText.JUSTIFY_LEFT`, `OMText.JUSTIFY_CENTER`, `OMText.JUSTIFY_RIGHT`

### setLocateAtCenter

    public void setLocateAtCenter(boolean set)

  Tell the LabeledOMGraphic to calculate the location of the String that would put it in the middle of the OMGraphic.

### isLocateAtCenter

    public boolean isLocateAtCenter()

  Get whether the LabeledOMGraphic is placing the label String in the center of the OMGraphic.

### getCenter

    public java.awt.Point getCenter()

  Get the calculated center where the label string is drawn.

### setIndex

    public void setIndex(int index)

  Set the index of the OMGraphic coordinates where the drawing point of the label should be attached. The meaning of the point differs between OMGraphic types.

### getIndex

    public int getIndex()

  Get the index of the OMGraphic where the String will be rendered. The meaning of the index differs from OMGraphic type to OMGraphic type.

### setOffset

    public void setOffset(java.awt.Point p)

  Set the x, y pixel offsets where the String should be rendered, from the location determined from the index point, or from the calculated center point. Point.x is the horizontal offset, Point.y is the vertical offset.

### getOffset

    public java.awt.Point getOffset()

  Get the x, y pixel offsets set for the rendering of the point.

### setRotationAngle

    public void setRotationAngle(double angle)

  Set the angle by which the text is to rotated.

  Parameters:
    `angle` - the number of radians the text is to be rotated. Measured clockwise from horizontal. Positive numbers move the positive x axis toward the positive y axis.

### getRotationAngle

    public double getRotationAngle()

  Get the current rotation of the text.

  Returns:
    the text rotation.

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 (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details