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

All Known Subinterfaces:
  AggregateGraphic, GraphicArc, GraphicIcon, GraphicLabel, GraphicLineString, GraphicPolygon, GraphicScaledImage

    public interface Graphic

`Graphic` defines the root abstraction of a graphic object taxonomy, specifying the methods common to a lightweight set of graphic objects.

Field Summary
`static boolean` `DEFAULT_AUTO_EDIT` Default auto edit value.
`static float[]` `DEFAULT_BLINK_PATTERN` Default blink pattern value.
`static boolean` `DEFAULT_BLINKING` Default blinking value.
`static boolean` `DEFAULT_DRAG_SELECTABLE` Default drag selectable value.
`static int` `DEFAULT_MAX_SCALE` Default max scale value.
`static int` `DEFAULT_MIN_SCALE` Default min scale value.
`static boolean` `DEFAULT_PICKABLE` Default pickable value.
`static boolean` `DEFAULT_SELECTED` Default selected value.
`static boolean` `DEFAULT_VISIBLE` Default visible value.
`static double` `DEFAULT_Z_ORDER` Default z order value.

Method Summary
`void` `addGraphicListener(GraphicListener listener)` Adds the given `GraphicListener` to this `Graphic`'s list of listeners.
`Graphic` `cloneGraphic()` Creates a new `Graphic` of the same type as this object.
`void` `dispose()` Method that can be called when an object is no longer needed.
`void` `fireGraphicEvent(GraphicEvent ge)` Calls the graphic event method of all `GraphicListener`s in this `Graphic`'s list of listeners.
`boolean` `getAutoEdit()` Returns the auto edit value.
`boolean` `getBlinking()` Returns the blinking value.
`float[]` `getBlinkPattern()` Returns the blink pattern value.
`Object` `getClientProperty(Object key)` Returns the value of the property with the specified key.
`boolean` `getDragSelectable()` Returns the drag selectable value.
`GraphicStyle` `getGraphicStyle()` Returns the `GraphicStyle` for this `Graphic`.
`double` `getMaxScale()` Returns the max scale value.
`double` `getMinScale()` Returns the min scale value.
`String` `getName()` Returns the name assigned to this `Graphic`.
`Graphic` `getParent()` Returns the parent of this `Graphic`.
`boolean` `getPickable()` Returns the pickable value.
`boolean` `getSelected()` Returns the selected value.
`Symbology` `getSymbology()` Returns a symbology object that will be used to override some, if not all, of the graphical properties of Graphics using this style.
`boolean` `getVisible()` Returns the visible value.
`double` `getZOrderHint()` Returns the z order hint value.
`boolean` `isPassingEventsToParent()` Returns a boolean indicating whether mouse events on this `Graphic` will be passed to the parent `Graphic` in addition to being passed to any listeners on this object.
`boolean` `isShowingAnchorHandles()` Returns the boolean flag that indicates whether this object is showing anchor handles.
`boolean` `isShowingEditHandles()` Returns the boolean flag that specifies whether this object is showing its edit handles.
`void` `putClientProperty(Object key, Object value)` Adds an arbitrary key/value "client property" to this `Graphic`.
`void` `refresh()` Flags this `Graphic` object as needing to be redrawn, due to changes to the internal data of the object which affect the rendering of the object.
`void` `removeGraphicListener(GraphicListener listener)` Removes the given `GraphicListener` from this `Graphic`'s list of listeners.
`void` `setAutoEdit(boolean autoEdit)` Sets the auto edit value.
`void` `setBlinking(boolean blinking)` Sets the blinking value.
`void` `setBlinkPattern(float[] blinkPattern)` Sets the blink pattern value.
`void` `setDragSelectable(boolean dragSelectable)` Sets the drag selectable value.
`void` `setGraphicStyle(GraphicStyle style)` Sets the `GraphicStyle` for this `Graphic`.
`void` `setMaxScale(double maxScale)` Sets the max scale value.
`void` `setMinScale(double minScale)` Sets the min scale value.
`void` `setName(String name)` Sets the name of this `Graphic` to the given value.
`void` `setParent(Graphic parent)` Sets the parent of this `Graphic`.
`void` `setPassingEventsToParent(boolean passToParent)` Sets a boolean indicating whether mouse events on this `Graphic` should be passed to the parent `Graphic` in addition to being passed to any listeners on this object.
`void` `setPickable(boolean pickable)` Sets the pickable value.
`void` `setSelected(boolean selected)` Sets the selected value.
`void` `setShowingAnchorHandles(boolean showingHandles)` Sets a boolean flag indicating whether this object is to show anchor handles.
`void` `setShowingEditHandles(boolean showingHandles)` Sets a boolean flag specifying whether this object is to show its edit handles.
`void` `setSymbology(Symbology symbology)` Sets the symbology object that will be used to override some, if not all, of the graphical properties of Graphics using this style.
`void` `setVisible(boolean visible)` Sets the visible value.
`void` `setZOrderHint(double zOrderHint)` Sets the z order hint value.

Field Detail

### DEFAULT_AUTO_EDIT

    static final boolean DEFAULT_AUTO_EDIT

  Default auto edit value.

  See Also:
    Constant Field Values

### DEFAULT_DRAG_SELECTABLE

    static final boolean DEFAULT_DRAG_SELECTABLE

  Default drag selectable value.

  See Also:
    Constant Field Values

### DEFAULT_PICKABLE

    static final boolean DEFAULT_PICKABLE

  Default pickable value.

  See Also:
    Constant Field Values

### DEFAULT_SELECTED

    static final boolean DEFAULT_SELECTED

  Default selected value.

  See Also:
    Constant Field Values

### DEFAULT_BLINKING

    static final boolean DEFAULT_BLINKING

  Default blinking value.

  See Also:
    Constant Field Values

### DEFAULT_BLINK_PATTERN

    static final float[] DEFAULT_BLINK_PATTERN

  Default blink pattern value.

### DEFAULT_MAX_SCALE

    static final int DEFAULT_MAX_SCALE

  Default max scale value.

  See Also:
    Constant Field Values

### DEFAULT_MIN_SCALE

    static final int DEFAULT_MIN_SCALE

  Default min scale value.

  See Also:
    Constant Field Values

### DEFAULT_VISIBLE

    static final boolean DEFAULT_VISIBLE

  Default visible value.

  See Also:
    Constant Field Values

### DEFAULT_Z_ORDER

    static final double DEFAULT_Z_ORDER

  Default z order value.

  See Also:
    Constant Field Values

Method Detail

### dispose

    void dispose()

  Method that can be called when an object is no longer needed. Implementations may use this method to release resources, if needed. Implementations may also implement this method to return an object to an object pool. It is an error to reference a `Graphic` in any way after its dispose method has been called.

### refresh

    void refresh()

  Flags this `Graphic` object as needing to be redrawn, due to changes to the internal data of the object which affect the rendering of the object.

  The actual flag set/unset mechanism is implementation-specific. The implementation also choses the manner and timing in which both the flag is checked and the `Graphic` object is redrawn.

  An application would call this method when any geometric information for this `Graphic` object has changed; for example, when the underlying `Geometry` instance is changed or data in that instance has changed.

### setName

    void setName(String name)

  Sets the name of this `Graphic` to the given value.

  Parameters:
    `name` - the new name to assign to this `Graphic`.

### getName

    String getName()

  Returns the name assigned to this `Graphic`.

  Returns:
    the name assigned to this `Graphic`.

### setParent

    void setParent(Graphic parent)

  Sets the parent of this `Graphic`.

  Parameters:
    `parent` - the parent of this `Graphic`.

### getParent

    Graphic getParent()

  Returns the parent of this `Graphic`. Currently, only `AggregateGraphic`s have `Graphic` children.

  Returns:
    the parent of this `Graphic`.

### setGraphicStyle

    void setGraphicStyle(GraphicStyle style)

  Sets the `GraphicStyle` for this `Graphic`. `Graphic`s may share style property objects with other `Graphic`s.

### getGraphicStyle

    GraphicStyle getGraphicStyle()

  Returns the `GraphicStyle` for this `Graphic`. Implementations should return a reference to their internal `GraphicStyle` object, so that users may modify this `Graphic`'s style properties directly through the style object.

  Returns:
    the `GraphicStyle`.

### getClientProperty

    Object getClientProperty(Object key)

  Returns the value of the property with the specified key. Only properties added with `putClientProperty` will return a non-null value.

  Returns:
    the value of this property or null
  See Also:
    `putClientProperty(java.lang.Object, java.lang.Object)`

### putClientProperty

    void putClientProperty(Object key,
                           Object value)

  Adds an arbitrary key/value "client property" to this `Graphic`. The `get`/`putClientProperty` methods provide access to a small per-instance hashtable. Callers can use `get`/`putClientProperty` to annotate `Graphic`s that were created by another module.

  If value is null this method will remove the property. Changes to client properties are reported with property change events. The name of the property (for the sake of property change events) is `key.toString()`. The `clientProperty` dictionary is not intended to support large scale extensions to `Graphic` nor should be it considered an alternative to subclassing when designing a new component.

  Parameters:
    `key` - the Object containing the key string.
    `value` - the Object that is the client data.
  See Also:
    `getClientProperty(java.lang.Object)`

### setPassingEventsToParent

    void setPassingEventsToParent(boolean passToParent)

  Sets a boolean indicating whether mouse events on this `Graphic` should be passed to the parent `Graphic` in addition to being passed to any listeners on this object. The default is false, indicating that events will not be passed to the parent. If the boolean is true, then the event will be passed to the parent after having been passed to the listeners on this object.

  Parameters:
    `passToParent` - `true` if events should be passed to the parent graphic, `false` if they should not.

### isPassingEventsToParent

    boolean isPassingEventsToParent()

  Returns a boolean indicating whether mouse events on this `Graphic` will be passed to the parent `Graphic` in addition to being passed to any listeners on this object. The default is `false`, indicating that events will not be passed to the parent. If the boolean is `true`, then the event will be passed to the parent after having been passed to the listeners on this object.

  Returns:
    `true` if this graphic pass the events to the parent graphic.

### setShowingEditHandles

    void setShowingEditHandles(boolean showingHandles)

  Sets a boolean flag specifying whether this object is to show its edit handles. Edit handles are the small boxes that appear on the end of a line segment or on the four corners of a box that a users selects to edit this object.

  Parameters:
    `showingHandles` - `true` if this object show its edit handles.

### isShowingEditHandles

    boolean isShowingEditHandles()

  Returns the boolean flag that specifies whether this object is showing its edit handles.

  Returns:
    `true` means it is showing its handles.

### setShowingAnchorHandles

    void setShowingAnchorHandles(boolean showingHandles)

  Sets a boolean flag indicating whether this object is to show anchor handles. Anchor handles allow the object to be moved in the display.

### isShowingAnchorHandles

    boolean isShowingAnchorHandles()

  Returns the boolean flag that indicates whether this object is showing anchor handles. Anchor handles allow the object to be moved in the display.

### cloneGraphic

    Graphic cloneGraphic()

  Creates a new `Graphic` of the same type as this object. The resulting object should be identical in all respects to the original.

  TODO:
    Consider overriding `Object.clone()` instead.

### addGraphicListener

    void addGraphicListener(GraphicListener listener)

  Adds the given `GraphicListener` to this `Graphic`'s list of listeners. `GraphicListener`s are notified of key, mouse, and change events that affect this `Graphic`.

  Parameters:
    `listener` - the `GraphicListener` to add.

### removeGraphicListener

    void removeGraphicListener(GraphicListener listener)

  Removes the given `GraphicListener` from this `Graphic`'s list of listeners.

  Parameters:
    `listener` - the `GraphicListener` to remove.

### fireGraphicEvent

    void fireGraphicEvent(GraphicEvent ge)

  Calls the graphic event method of all `GraphicListener`s in this `Graphic`'s list of listeners. The listeners need to determine which subclassed event is called and what event-specific action was taken.

  Parameters:
    `ge` - the `GraphicEvent` to give to the listeners.
  See Also:
    `GraphicListener`, `GraphicEvent`, `GraphicChangeEvent`, `GraphicMouseEvent`

### getAutoEdit

    boolean getAutoEdit()

  Returns the auto edit value.

  Returns:
    the auto edit value.

### setAutoEdit

    void setAutoEdit(boolean autoEdit)

  Sets the auto edit value.

  Parameters:
    `autoEdit` - the auto edit value.

### getDragSelectable

    boolean getDragSelectable()

  Returns the drag selectable value.

  Returns:
    the drag selectable value.

### setDragSelectable

    void setDragSelectable(boolean dragSelectable)

  Sets the drag selectable value.

  Parameters:
    `dragSelectable` - the drag selectable value.

### getPickable

    boolean getPickable()

  Returns the pickable value.

  Returns:
    the pickable value.

### setPickable

    void setPickable(boolean pickable)

  Sets the pickable value.

  Parameters:
    `pickable` - the pickable value.

### getSelected

    boolean getSelected()

  Returns the selected value.

  Returns:
    the selected value.

### setSelected

    void setSelected(boolean selected)

  Sets the selected value.

  Parameters:
    `selected` - the selected value.

### getBlinking

    boolean getBlinking()

  Returns the blinking value.

  Returns:
    the blinking value.

### setBlinking

    void setBlinking(boolean blinking)

  Sets the blinking value.

  Parameters:
    `blinking` - the blinking value.

### getBlinkPattern

    float[] getBlinkPattern()

  Returns the blink pattern value.

  Returns:
    the blink pattern value.

### setBlinkPattern

    void setBlinkPattern(float[] blinkPattern)

  Sets the blink pattern value.

  Parameters:
    `blinkPattern` - the blink pattern value.

### getSymbology

    Symbology getSymbology()

  Returns a symbology object that will be used to override some, if not all, of the graphical properties of Graphics using this style. This will be null by default.

### setSymbology

    void setSymbology(Symbology symbology)

  Sets the symbology object that will be used to override some, if not all, of the graphical properties of Graphics using this style.

### getMaxScale

    double getMaxScale()

  Returns the max scale value.

  Returns:
    the max scale value.

### setMaxScale

    void setMaxScale(double maxScale)

  Sets the max scale value.

  Parameters:
    `maxScale` - the max scale value.

### getMinScale

    double getMinScale()

  Returns the min scale value.

  Returns:
    the min scale value.

### setMinScale

    void setMinScale(double minScale)

  Sets the min scale value.

  Parameters:
    `minScale` - the min scale value.

### getZOrderHint

    double getZOrderHint()

  Returns the z order hint value.

  Returns:
    the z order hint value.

### setZOrderHint

    void setZOrderHint(double zOrderHint)

  Sets the z order hint value.

  Parameters:
    `zOrderHint` - the z order hint value.

### getVisible

    boolean getVisible()

  Returns the visible value.

  Returns:
    the visible value.

### setVisible

    void setVisible(boolean visible)

  Sets the visible value.

  Parameters:
    `visible` - the visible value.

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