public class CompositeGraphicsNode extends AbstractGraphicsNode implements java.util.List
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.geom.Rectangle2D |
backgroundEnableRgn
This flag indicates if this node has BackgroundEnable = 'new'.
|
protected GraphicsNode[] |
children
The children of this composite graphics node.
|
protected int |
count
The number of children of this composite graphics node.
|
protected int |
modCount
The number of times the children list has been structurally modified.
|
static java.awt.geom.Rectangle2D |
NULL_RECT |
static java.awt.geom.Rectangle2D |
VIEWPORT |
changeCompletedEvent, changeStartedEvent, clip, composite, enableBackgroundGraphicsNodeRable, filter, graphicsNodeRable, hints, inverseTransform, isVisible, listeners, mask, parent, pointerEventType, root, transform, weakRefALL, FILL, IDENTITY, NONE, PAINTED, STROKE, VISIBLE, VISIBLE_FILL, VISIBLE_PAINTED, VISIBLE_STROKE| Constructor and Description |
|---|
CompositeGraphicsNode()
Constructs a new empty CompositeGraphicsNode.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
java.lang.Object o)
Inserts the specified graphics node at the specified position in this
children list.
|
boolean |
add(java.lang.Object o)
Adds the specified graphics node to this composite graphics node.
|
boolean |
addAll(java.util.Collection c)
Not supported -
Throws UnsupportedOperationException exception.
|
boolean |
addAll(int index,
java.util.Collection c)
Not supported -
Throws UnsupportedOperationException exception.
|
void |
clear()
Not supported -
Throws UnsupportedOperationException exception.
|
boolean |
contains(java.lang.Object node)
Returns true if this composite graphics node contains the
specified graphics node, false otherwise.
|
boolean |
contains(java.awt.geom.Point2D p)
Returns true if the specified Point2D is inside the boundary of this
node, false otherwise.
|
boolean |
containsAll(java.util.Collection c)
Returns true if this composite graphics node contains all the graphics
node in the specified collection, false otherwise.
|
void |
ensureCapacity(int minCapacity)
Increases the capacity of the children list, if necessary, to ensure that
it can hold at least the number of graphics nodes specified by the
minimum capacity argument.
|
java.lang.Object |
get(int index)
Returns the graphics node at the specified position in the children list.
|
java.awt.geom.Rectangle2D |
getBackgroundEnable()
Returns the region defining the background enable property.
|
java.util.List |
getChildren()
Returns the list of children.
|
java.awt.geom.Rectangle2D |
getGeometryBounds()
Returns the bounds of the area covered by this node, without
taking any of its rendering attributes into account.
|
java.awt.Shape |
getOutline()
Returns the outline of this node.
|
java.awt.geom.Rectangle2D |
getPrimitiveBounds()
Returns the bounds of the area covered by this node's primitive paint.
|
java.awt.geom.Rectangle2D |
getSensitiveBounds()
Returns the bounds of the sensitive area covered by this node,
This includes the stroked area but does not include the effects
of clipping, masking or filtering.
|
static java.awt.geom.Rectangle2D |
getTransformedBBox(java.awt.geom.Rectangle2D r2d,
java.awt.geom.AffineTransform t)
Transforms a Rectangle 2D by an affine transform.
|
java.awt.geom.Rectangle2D |
getTransformedGeometryBounds(java.awt.geom.AffineTransform txf)
Returns the bounds of the area covered by this node, without taking any
of its rendering attribute into accoun.
|
java.awt.geom.Rectangle2D |
getTransformedPrimitiveBounds(java.awt.geom.AffineTransform txf)
Returns the bounds of this node's primitivePaint after applying
the input transform (if any), concatenated with this node's
transform (if any).
|
java.awt.geom.Rectangle2D |
getTransformedSensitiveBounds(java.awt.geom.AffineTransform txf)
Returns the bounds of the sensitive area covered by this node,
This includes the stroked area but does not include the effects
of clipping, masking or filtering.
|
int |
indexOf(java.lang.Object node)
Returns the index in the children list of the specified graphics node or
-1 if the children list does not contain this graphics node.
|
protected void |
invalidateGeometryCache()
Invalidates the cached geometric bounds.
|
boolean |
isEmpty()
Returns true if this composite graphics node does not contain
graphics node, false otherwise.
|
java.util.Iterator |
iterator()
Returns an iterator over the children of this graphics node.
|
int |
lastIndexOf(java.lang.Object node)
Returns the index in this children list of the last occurence of the
specified graphics node, or -1 if the list does not contain this graphics
node.
|
java.util.ListIterator |
listIterator()
Returns an iterator over the children of this graphics node.
|
java.util.ListIterator |
listIterator(int index)
Returns an iterator over the children of this graphics node, starting at
the specified position in the children list.
|
GraphicsNode |
nodeHitAt(java.awt.geom.Point2D p)
Returns the GraphicsNode containing point p if this node or one of its
children is sensitive to mouse events at p.
|
void |
primitivePaint(java.awt.Graphics2D g2d)
Paints this node without applying Filter, Mask, Composite, and clip.
|
java.lang.Object |
remove(int index)
Removes the graphics node at the specified position in the children list.
|
boolean |
remove(java.lang.Object o)
Removes the first instance of the specified graphics node from the children list.
|
boolean |
removeAll(java.util.Collection c)
Not supported -
Throws UnsupportedOperationException exception.
|
boolean |
retainAll(java.util.Collection c)
Not supported -
Throws UnsupportedOperationException exception.
|
java.lang.Object |
set(int index,
java.lang.Object o)
Replaces the graphics node at the specified position in the children list
with the specified graphics node.
|
void |
setBackgroundEnable(java.awt.geom.Rectangle2D bgRgn)
Sets the enable background property to the specified rectangle.
|
protected void |
setRoot(RootGraphicsNode newRoot)
Sets the root node of this grahics node and modify all its children.
|
void |
setVisible(boolean isVisible)
Sets if this node is visible or not depending on the specified value.
|
int |
size()
Returns the number of children of this composite graphics node.
|
java.util.List |
subList(int fromIndex,
int toIndex)
Not supported -
Throws UnsupportedOperationException exception.
|
java.lang.Object[] |
toArray()
Returns an array containing all of the graphics node in the children list
of this composite graphics node in the correct order.
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
Returns an array containing all of the graphics node in the
children list of this composite graphics node in the correct
order.
|
fireGraphicsNodeChangeCompleted, fireGraphicsNodeChangeStarted, fireGraphicsNodeChangeStarted, fireGraphicsNodeChangeStarted, getBounds, getClip, getComposite, getEnableBackgroundGraphicsNodeRable, getFilter, getGlobalTransform, getGraphicsNodeRable, getInverseTransform, getMask, getParent, getPointerEventType, getRenderingHints, getRoot, getTransform, getTransformedBounds, getWeakReference, intersects, isAntialiasedClip, isOffscreenBufferNeeded, isVisible, normalizeRectangle, paint, setClip, setComposite, setFilter, setMask, setParent, setPointerEventType, setRenderingHint, setRenderingHints, setRenderingHints, setTransformpublic static final java.awt.geom.Rectangle2D VIEWPORT
public static final java.awt.geom.Rectangle2D NULL_RECT
protected GraphicsNode[] children
protected volatile int count
protected volatile int modCount
protected java.awt.geom.Rectangle2D backgroundEnableRgn
public CompositeGraphicsNode()
public java.util.List getChildren()
public void setBackgroundEnable(java.awt.geom.Rectangle2D bgRgn)
bgRgn - the region that defines the background enable propertypublic java.awt.geom.Rectangle2D getBackgroundEnable()
public void setVisible(boolean isVisible)
setVisible in interface GraphicsNodesetVisible in class AbstractGraphicsNodeisVisible - If true this node is visiblepublic void primitivePaint(java.awt.Graphics2D g2d)
primitivePaint in interface GraphicsNodeg2d - the Graphics2D to useprotected void invalidateGeometryCache()
invalidateGeometryCache in class AbstractGraphicsNodepublic java.awt.geom.Rectangle2D getPrimitiveBounds()
getPrimitiveBounds in interface GraphicsNodepublic static java.awt.geom.Rectangle2D getTransformedBBox(java.awt.geom.Rectangle2D r2d,
java.awt.geom.AffineTransform t)
public java.awt.geom.Rectangle2D getTransformedPrimitiveBounds(java.awt.geom.AffineTransform txf)
getTransformedPrimitiveBounds in interface GraphicsNodegetTransformedPrimitiveBounds in class AbstractGraphicsNodetxf - the affine transform with which this node's transform should
be concatenated. Should not be null.public java.awt.geom.Rectangle2D getGeometryBounds()
getGeometryBounds in interface GraphicsNodepublic java.awt.geom.Rectangle2D getTransformedGeometryBounds(java.awt.geom.AffineTransform txf)
getTransformedGeometryBounds in interface GraphicsNodegetTransformedGeometryBounds in class AbstractGraphicsNodetxf - the affine transform with which this node's transform should
be concatenated. Should not be null.public java.awt.geom.Rectangle2D getSensitiveBounds()
getSensitiveBounds in interface GraphicsNodepublic java.awt.geom.Rectangle2D getTransformedSensitiveBounds(java.awt.geom.AffineTransform txf)
getTransformedSensitiveBounds in interface GraphicsNodegetTransformedSensitiveBounds in class AbstractGraphicsNodetxf - the affine transform with which this node's
transform should be concatenated. Should not be null.public boolean contains(java.awt.geom.Point2D p)
contains in interface GraphicsNodecontains in class AbstractGraphicsNodep - the specified Point2D in the user spacepublic GraphicsNode nodeHitAt(java.awt.geom.Point2D p)
nodeHitAt in interface GraphicsNodenodeHitAt in class AbstractGraphicsNodep - the specified Point2D in the user spacepublic java.awt.Shape getOutline()
getOutline in interface GraphicsNodeprotected void setRoot(RootGraphicsNode newRoot)
setRoot in class AbstractGraphicsNodenewRoot - the new root node of this nodepublic int size()
size in interface java.util.Collectionsize in interface java.util.Listpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.Listpublic boolean contains(java.lang.Object node)
contains in interface java.util.Collectioncontains in interface java.util.Listnode - the node to checkpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.CollectiontoArray in interface java.util.Lista - the array to fit if possiblepublic java.lang.Object get(int index)
get in interface java.util.Listindex - the index of the graphics node to returnjava.lang.IndexOutOfBoundsException - if the index is out of rangepublic java.lang.Object set(int index,
java.lang.Object o)
set in interface java.util.Listindex - the index of the graphics node to replaceo - the graphics node to be stored at the specified positionjava.lang.IndexOutOfBoundsException - if the index is out of rangejava.lang.IllegalArgumentException - if the node is not an
instance of GraphicsNodepublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Listo - the graphics node to addjava.lang.IllegalArgumentException - if the node is not an
instance of GraphicsNodepublic void add(int index,
java.lang.Object o)
add in interface java.util.Listindex - the position at which the specified graphics node is to
be inserted.o - the graphics node to be inserted.java.lang.IndexOutOfBoundsException - if the index is out of rangejava.lang.IllegalArgumentException - if the node is not an
instance of GraphicsNodepublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.Listpublic boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.Listpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Listo - the node the removejava.lang.IllegalArgumentException - if the node is not an
instance of GraphicsNodejava.lang.IndexOutOfBoundsException - when o is not in children listpublic java.lang.Object remove(int index)
remove in interface java.util.Listindex - the position of the graphics node to removejava.lang.IndexOutOfBoundsException - if index out of range public boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Listpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.Listpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Listpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Listc - the collection to be checked for containmentpublic int indexOf(java.lang.Object node)
indexOf in interface java.util.Listnode - the graphics node to search forpublic int lastIndexOf(java.lang.Object node)
lastIndexOf in interface java.util.Listnode - the graphics node to search forpublic java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.Listindex - the index of the first graphics node to return
from the children listpublic java.util.List subList(int fromIndex,
int toIndex)
subList in interface java.util.Listpublic void ensureCapacity(int minCapacity)
minCapacity - the desired minimum capacity.Copyright ? 2009 Apache Software Foundation. All Rights Reserved.