## org.opengis.go.display.primitive
Interface GraphicIcon

All Superinterfaces:
  Graphic

    public interface GraphicIcon

extends Graphic

The GraphicIcon defines a common abstraction for implementations that render icons on a drawing surface.

The rotation of the icon 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
`Icon` `getIcon()` Returns the icon represented by this GraphicIcon.
`Point2D` `getOffset()` Returns the location in the icon (as an offset from the upper left) that will be drawn over the icon's position.
`PointSymbolizer` `getPointSymbolizer()` Returns the `GraphicStyle` for this `GraphicIcon`, which is required to be a `PointSymbolizer`.
`DirectPosition` `getPosition()` Returns the DirectPosition corresponding to the position of the icon.
`double` `getRotation(Unit unit)` Gets the angle by which to rotate the icon.
`boolean` `isAllowingRotation()` Indicates whether this primitive is displaying anchor handles that allow the user to change the rotation of this icon.
`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 this icon.
`void` `setIcon(Icon icon)` Sets the icon represented by this GraphicIcon.
`void` `setOffset(Point2D offset)` Sets the location in the icon (as an offset from the upper left) that will be drawn over the icon's position.
`void` `setPosition(DirectPosition coord)` Sets the DirectPosition corresponding to the position of the icon.
`void` `setRotation(double angle, Unit unit)` Sets the angle by which to rotate the icon.

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

### setIcon

    void setIcon(Icon icon)

  Sets the icon represented by this GraphicIcon.

  Parameters:
    `icon` - the icon to be rendered.

### getIcon

    Icon getIcon()

  Returns the icon represented by this GraphicIcon.

  Returns:
    the icon to be rendered.

### setPosition

    void setPosition(DirectPosition coord)

  Sets the DirectPosition corresponding to the position of the icon.

  Parameters:
    `coord` - the wrapper for the positon.

### getPosition

    DirectPosition getPosition()

  Returns the DirectPosition corresponding to the position of the icon.

  Returns:
    the wrapper for the position of the center point.

### setRotation

    void setRotation(double angle,
                     Unit unit)

  Sets the angle by which to rotate the icon. Use rotation to rotate rotatable icons. For example, use the entity's course to rotate an icon whose shape indicates the direction of the entity (e.g., top-down view of a aircraft) Note: the actual drawing angle may differ from the rotation angle once the GraphicIcon has been projected onto the drawing surface.

  Parameters:
    `angle` - the new rotation.
    `unit` - the Unit for the angle value.

### getRotation

    double getRotation(Unit unit)

  Gets the angle by which to rotate the icon.

  Parameters:
    `unit` - the Unit for the angle value.
  Returns:
    the rotation angle measured clockwise from the horizontal.

### setOffset

    void setOffset(Point2D offset)

  Sets the location in the icon (as an offset from the upper left) that will be drawn over the icon's position. This will also be the point about which rotation will occur. If the offset coordinate is null, then the icon will be centered over its position.

### getOffset

    Point2D getOffset()

  Returns the location in the icon (as an offset from the upper left) that will be drawn over the icon's position. This is the center of rotation as well. If the offset coordinate is null, then the icon will be centered over its position.

### getPointSymbolizer

    PointSymbolizer getPointSymbolizer()

  Returns the `GraphicStyle` for this `GraphicIcon`, which is required to be a `PointSymbolizer`.

  Returns:
    the GraphicIcon's `GraphicStyle`.

### isAllowingRotation

    boolean isAllowingRotation()

  Indicates whether this primitive is displaying anchor handles that allow the user to change the rotation of this icon.

### 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 this icon.

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