org.opengis.go.display.primitive
Interface AggregateGraphic
-
- All Superinterfaces:
- Graphic
public interface AggregateGraphic extends Graphic
A common abstraction for implementations of aggregatedGraphics. The abstraction makes no assumptions as to how theGraphics are stored within the aggregate. For example, theGraphics may be stored in an array such that theGraphicin the zeroeth element of the array is considered the front-most object and theGraphicin the largest element of the array is considered the bottom-most object. Or, theGraphics may be stored in a Skiplist sorted by a uniqueGraphicidentifier to make adding and removingGraphics very efficient.Additionally, the abstraction makes no assumptions as to thread safety. If the implementations of
Graphicare 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 org.opengis.go.display.primitive.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
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidaddAggregationListener(AggregationListener listener)Adds the givenAggregationListenerto thisAggregateGraphic's list of listeners.GraphicaddChild(Graphic child)Adds the given child to thisAggregateGraphic.Graphic[]addChildren(Graphic[] children)Adds the given children to thisAggregateGraphic.voidaggregationChanged(AggregationChangeEvent event)Calls theaggregationChanged()method of allAggregationListeners in thisAggregateGraphic's list of listeners.intgetChildCount()Returns the number of children currently assigned to thisAggregateGraphic.Graphic[]getChildren()Returns the children of thisAggregateGraphic.voidremoveAggregationListener(AggregationListener listener)Removes the givenAggregationListenerfrom thisAggregateGraphic's list of listeners.GraphicremoveChild(Graphic child)Removes the given child from thisAggregateGraphic.voidremoveChildren()Removes all of the children from thisAggregateGraphic.Graphic[]removeChildren(Graphic[] children)Removes the given children from thisAggregateGraphic.GraphicreplaceChild(Graphic oldChild, Graphic newChild)Replaces theoldChildwith thenewChild.voidsetChildren(Graphic[] children)Sets the children of thisAggregateGraphicto the given set ofGraphics.-
Methods inherited from interface org.opengis.go.display.primitive.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 thisAggregateGraphicto the given set ofGraphics. If there are already children assigned, then those children will be removed and their parent will be set tonull.- Parameters:
children- the new children of theAggregateGraphic.
-
getChildren
Graphic[] getChildren()
Returns the children of thisAggregateGraphic. If no children are assigned, the method returns an empty array.- Returns:
- the child
Graphics of theAggregateGraphic.
-
addChild
Graphic addChild(Graphic child)
Adds the given child to thisAggregateGraphic.- Parameters:
child-Graphicchild to add to the aggregate.- Returns:
- the added
Graphic.
-
addChildren
Graphic[] addChildren(Graphic[] children)
Adds the given children to thisAggregateGraphic.- Parameters:
children-Graphicchildren to add to the aggregate.- Returns:
- the added
Graphics.
-
removeChild
Graphic removeChild(Graphic child)
Removes the given child from thisAggregateGraphic.- Parameters:
child- theGraphicchild to remove from the aggregate.- Returns:
- the removed
Graphic, ornullif it is not found.
-
removeChildren
Graphic[] removeChildren(Graphic[] children)
Removes the given children from thisAggregateGraphic.- Parameters:
children- theGraphicchildren to remove from the aggregate.- Returns:
- the removed
Graphics, ornullif none are found.
-
removeChildren
void removeChildren()
Removes all of the children from thisAggregateGraphic.
-
replaceChild
Graphic replaceChild(Graphic oldChild, Graphic newChild)
Replaces theoldChildwith thenewChild.- Parameters:
oldChild- the child to be replaced.newChild- the child to be added in its place.- Returns:
- the
newChildthat replaced theoldChild.
-
getChildCount
int getChildCount()
Returns the number of children currently assigned to thisAggregateGraphic.- Returns:
- the number of children currently assigned.
-
addAggregationListener
void addAggregationListener(AggregationListener listener)
Adds the givenAggregationListenerto thisAggregateGraphic's list of listeners. The listeners will be notified if thisAggregateGraphicadds or removes any elements.- Parameters:
listener- theAggregationListenerto be added.
-
removeAggregationListener
void removeAggregationListener(AggregationListener listener)
Removes the givenAggregationListenerfrom thisAggregateGraphic's list of listeners.- Parameters:
listener- theAggregationListenerto be removed.
-
aggregationChanged
void aggregationChanged(AggregationChangeEvent event)
Calls theaggregationChanged()method of allAggregationListeners in thisAggregateGraphic's list of listeners. This method is called when any elements are added, removed, or reorderd in thisAggregateGraphic.- Parameters:
event- theAggregationChangedEventto give to the listeners.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG