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 AggregateGraphic

All Superinterfaces:
  Graphic

    public interface AggregateGraphic

extends Graphic

A common abstraction for implementations of aggregated `Graphic`s. The abstraction makes no assumptions as to how the `Graphic`s are stored within the aggregate. For example, the `Graphic`s may be stored in an array such that the `Graphic` in the zeroeth element of the array is considered the front-most object and the `Graphic` in the largest element of the array is considered the bottom-most object. Or, the `Graphic`s may be stored in a Skiplist sorted by a unique `Graphic` identifier to make adding and removing `Graphic`s very efficient.

Additionally, the abstraction makes no assumptions as to thread safety. If the implementations of `Graphic` are to be used in a multi-threaded environment, the implementation will have to address thread safety by synchronizing methods or by invoking all methods from a single thread.

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
`void` | `addAggregationListener(AggregationListener listener)` Adds the given `AggregationListener` to this `AggregateGraphic`'s list of listeners.
`Graphic` | `addChild(Graphic child)` Adds the given child to this `AggregateGraphic`.
`Graphic[]` | `addChildren(Graphic[] children)` Adds the given children to this `AggregateGraphic`.
`void` | `aggregationChanged(AggregationChangeEvent event)` Calls the `aggregationChanged()` method of all `AggregationListener`s in this `AggregateGraphic`'s list of listeners.
`int` | `getChildCount()` Returns the number of children currently assigned to this `AggregateGraphic`.
`Graphic[]` | `getChildren()` Returns the children of this `AggregateGraphic`.
`void` | `removeAggregationListener(AggregationListener listener)` Removes the given `AggregationListener` from this `AggregateGraphic`'s list of listeners.
`Graphic` | `removeChild(Graphic child)` Removes the given child from this `AggregateGraphic`.
`void` | `removeChildren()` Removes all of the children from this `AggregateGraphic`.
`Graphic[]` | `removeChildren(Graphic[] children)` Removes the given children from this `AggregateGraphic`.
`Graphic` | `replaceChild(Graphic oldChild, Graphic newChild)` Replaces the `oldChild` with the `newChild`.
`void` | `setChildren(Graphic[] children)` Sets the children of this `AggregateGraphic` to the given set of `Graphic`s.

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

### setChildren

    void setChildren(Graphic[] children)

  Sets the children of this `AggregateGraphic` to the given set of `Graphic`s. If there are already children assigned, then those children will be removed and their parent will be set to `null`.

  Parameters:
    `children` - the new children of the `AggregateGraphic`.

### getChildren

    Graphic[] getChildren()

  Returns the children of this `AggregateGraphic`. If no children are assigned, the method returns an empty array.

  Returns:
    the child `Graphic`s of the `AggregateGraphic`.

### addChild

    Graphic addChild(Graphic child)

  Adds the given child to this `AggregateGraphic`.

  Parameters:
    `child` - `Graphic` child to add to the aggregate.
  Returns:
    the added `Graphic`.

### addChildren

    Graphic[] addChildren(Graphic[] children)

  Adds the given children to this `AggregateGraphic`.

  Parameters:
    `children` - `Graphic` children to add to the aggregate.
  Returns:
    the added `Graphic`s.

### removeChild

    Graphic removeChild(Graphic child)

  Removes the given child from this `AggregateGraphic`.

  Parameters:
    `child` - the `Graphic` child to remove from the aggregate.
  Returns:
    the removed `Graphic`, or `null` if it is not found.

### removeChildren

    Graphic[] removeChildren(Graphic[] children)

  Removes the given children from this `AggregateGraphic`.

  Parameters:
    `children` - the `Graphic` children to remove from the aggregate.
  Returns:
    the removed `Graphic`s, or `null` if none are found.

### removeChildren

    void removeChildren()

  Removes all of the children from this `AggregateGraphic`.

### replaceChild

    Graphic replaceChild(Graphic oldChild,
                         Graphic newChild)

  Replaces the `oldChild` with the `newChild`.

  Parameters:
    `oldChild` - the child to be replaced.
    `newChild` - the child to be added in its place.
  Returns:
    the `newChild` that replaced the `oldChild`.

### getChildCount

    int getChildCount()

  Returns the number of children currently assigned to this `AggregateGraphic`.

  Returns:
    the number of children currently assigned.

### addAggregationListener

    void addAggregationListener(AggregationListener listener)

  Adds the given `AggregationListener` to this `AggregateGraphic`'s list of listeners. The listeners will be notified if this `AggregateGraphic` adds or removes any elements.

  Parameters:
    `listener` - the `AggregationListener` to be added.

### removeAggregationListener

    void removeAggregationListener(AggregationListener listener)

  Removes the given `AggregationListener` from this `AggregateGraphic`'s list of listeners.

  Parameters:
    `listener` - the `AggregationListener` to be removed.

### aggregationChanged

    void aggregationChanged(AggregationChangeEvent event)

  Calls the `aggregationChanged()` method of all `AggregationListener`s in this `AggregateGraphic`'s list of listeners. This method is called when any elements are added, removed, or reorderd in this `AggregateGraphic`.

  Parameters:
    `event` - the `AggregationChangedEvent` to give to the listeners.
  TODO:
    Usually, this kind of method is a protected one in the implementation class, not a public method in the interface...

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.