public class JaxoObjectList extends java.util.ArrayList implements JaxoList
| Constructor and Description |
|---|
JaxoObjectList()
Just calls super().
|
JaxoObjectList(java.util.Collection c)
Add all elements of c to this List.
|
JaxoObjectList(int initialCapacity)
Just calls super(initialCapacity).
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
java.lang.Object element)
Add a JaxoObject to this list.
|
boolean |
add(java.lang.Object o)
Add a JaxoObject to this list.
|
boolean |
addAll(java.util.Collection c)
Add a Collection of JaxoObjects to this list.
|
boolean |
addAll(int index,
java.util.Collection c)
Add a Collection of JaxoObjects to this list.
|
JaxoList |
copyOf()
Returns a copy of this JaxoList, i.e., a new JaxoList with
copies of equal JaxoObjects at equal positions.
|
java.awt.Rectangle |
getBounds()
Returns the smallest bounding box that contains all the JaxoObjects
of this JaxoList.
|
java.awt.Rectangle |
getBoundsExcept(java.util.Collection excludes)
Returns the smallest bounding box that contains all the JaxoObjects
of this JaxoList except the ones contained in 'except'.
|
java.awt.Rectangle |
intersection(java.awt.Rectangle inside)
Intersection of the bounding box of this JaxoList with the given Rectangle.
|
boolean |
isCopy(JaxoList list)
Determines if this JaxoList is a copy of the specified one.
|
void |
move(int index,
int newIndex)
Move the object at 'index' to 'newIndex', leaving all
other elements in order.
|
void |
moveAllObjects(int deltaX,
int deltaY)
Displaces all JaxoObjects by the same amount.
|
void |
paint(JaxoGraphics2D g)
Call paint(g) on all elements of JaxoObjects.
|
void |
paintClipped(JaxoGraphics2D g)
Call paint on all elements of JaxoObjects if they intersect
the current clipping area of the given graphics context.
|
void |
paintClippedExcept(java.util.Collection excludes,
JaxoGraphics2D g)
Call paint on all elements of JaxoObjects that are not contained in
'excludes' and that intersect the current clipping area of the given
graphics context.
|
void |
paintExcept(java.util.Collection excludes,
JaxoGraphics2D g)
Call paint on all elements of JaxoObjects that
are not contained in 'excludes'.
|
boolean |
removeMarkedObjects()
Removes all marked JaxoObjects from this list.
|
java.lang.Object |
set(int index,
java.lang.Object element)
Replace the object at the given position with the specified object.
|
void |
setColor(java.awt.Color c)
Sets the color of all JaxoObjects in this list.
|
boolean |
toEnd(JaxoObject object)
Moves the specified JaxoObject to the last position in this list.
|
boolean |
toFront(JaxoObject object)
Moves the specified JaxoObject to the first position in this list.
|
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, size, subList, toArray, toArray, trimToSizepublic JaxoObjectList()
public JaxoObjectList(java.util.Collection c)
c - the collection whose elements are to be placed into this list.public JaxoObjectList(int initialCapacity)
initialCapacity - the initial capacity of the list.public boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Listadd in class java.util.ArrayListo - the object to add.ArrayList.add(java.lang.Object)public void add(int index,
java.lang.Object element)
add in interface java.util.Listadd in class java.util.ArrayListindex - index at which the object is to be inserted.element - the object to add.ArrayList.add(int,java.lang.Object)public boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.ListaddAll in class java.util.ArrayListc - the collection to add.ArrayList.addAll(java.util.Collection)public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.ListaddAll in class java.util.ArrayListindex - index at which the object is to be inserted.c - the collection to add.ArrayList.addAll(int,java.util.Collection)public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.Listset in class java.util.ArrayListindex - index of the object to be replaced.element - the object to be stored at the given position.ArrayList.set(int,java.lang.Object)public void paint(JaxoGraphics2D g)
paint in interface JaxoListg - The graphics context to paint to.JaxoObject.paint(JaxoGraphics2D)public void paintClipped(JaxoGraphics2D g)
paintClipped in interface JaxoListg - The graphics context to paint to.JaxoObject.paint(JaxoGraphics2D),
Graphics.hitClip(int,int,int,int)public void paintExcept(java.util.Collection excludes,
JaxoGraphics2D g)
paintExcept in interface JaxoListexcludes - The JaxoObjects to exlude.g - The graphics context to paint to.JaxoObject.paint(JaxoGraphics2D)public void paintClippedExcept(java.util.Collection excludes,
JaxoGraphics2D g)
paintClippedExcept in interface JaxoListexcludes - The JaxoObjects to exlude.g - The graphics context to paint to.JaxoObject.paint(JaxoGraphics2D),
Graphics.hitClip(int,int,int,int)public JaxoList copyOf()
public boolean isCopy(JaxoList list)
public void moveAllObjects(int deltaX,
int deltaY)
moveAllObjects in interface JaxoListdeltaX - The displacement in x directiondeltaY - The displacement in y directionpublic void setColor(java.awt.Color c)
public void move(int index,
int newIndex)
public boolean toEnd(JaxoObject object)
public boolean toFront(JaxoObject object)
public boolean removeMarkedObjects()
removeMarkedObjects in interface JaxoListpublic java.awt.Rectangle getBounds()
public java.awt.Rectangle getBoundsExcept(java.util.Collection excludes)
getBoundsExcept in interface JaxoListexcludes - objects to exclude, may be null.public java.awt.Rectangle intersection(java.awt.Rectangle inside)
intersection in interface JaxoListinside - The Rectangle to intersect with.JaxoList.getBounds()Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.