|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AggregateGraphic
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. |
Method Detail |
---|
void setChildren(Graphic[] children)
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
.
children
- the new children of the AggregateGraphic
.Graphic[] getChildren()
AggregateGraphic
. If no
children are assigned, the method returns an empty array.
Graphic
s of the AggregateGraphic
.Graphic addChild(Graphic child)
AggregateGraphic
.
child
- Graphic
child to add to the aggregate.
Graphic
.Graphic[] addChildren(Graphic[] children)
AggregateGraphic
.
children
- Graphic
children to add to the aggregate.
Graphic
s.Graphic removeChild(Graphic child)
AggregateGraphic
.
child
- the Graphic
child to remove from the aggregate.
Graphic
, or null
if it is not found.Graphic[] removeChildren(Graphic[] children)
AggregateGraphic
.
children
- the Graphic
children to remove from the aggregate.
Graphic
s, or null
if none are found.void removeChildren()
AggregateGraphic
.
Graphic replaceChild(Graphic oldChild, Graphic newChild)
oldChild
with the newChild
.
oldChild
- the child to be replaced.newChild
- the child to be added in its place.
newChild
that replaced the oldChild
.int getChildCount()
AggregateGraphic
.
void addAggregationListener(AggregationListener listener)
AggregationListener
to this
AggregateGraphic
's list of listeners. The listeners will
be notified if this AggregateGraphic
adds or removes any elements.
listener
- the AggregationListener
to be added.void removeAggregationListener(AggregationListener listener)
AggregationListener
from this
AggregateGraphic
's list of listeners.
listener
- the AggregationListener
to be removed.void aggregationChanged(AggregationChangeEvent event)
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
.
event
- the AggregationChangedEvent
to give to the listeners.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |