E - the element type of this list.java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, JaxoList<E>public class JaxoObjectList<E extends JaxoObject> extends java.util.ArrayList<E> implements JaxoList<E>
| Constructor | Description |
|---|---|
JaxoObjectList() |
Just calls super().
|
JaxoObjectList(int initialCapacity) |
Just calls super(initialCapacity).
|
JaxoObjectList(java.util.Collection<? extends E> c) |
Add all elements of c to this List.
|
| Modifier and Type | Method | Description |
|---|---|---|
JaxoList<E> |
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<? extends E> 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<E> 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<? extends E> 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<? extends E> 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.
|
void |
setColor(java.awt.Color c) |
Sets the color of all JaxoObjects in this list.
|
boolean |
toEnd(E object) |
Moves the specified JaxoObject to the last position in this list.
|
boolean |
toFront(E object) |
Moves the specified JaxoObject to the first position in this list.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeadd, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArraypublic JaxoObjectList()
public JaxoObjectList(java.util.Collection<? extends E> 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 void paint(JaxoGraphics2D g)
paint in interface JaxoList<E extends JaxoObject>g - The graphics context to paint to.JaxoObject.paint(JaxoGraphics2D)public void paintClipped(JaxoGraphics2D g)
paintClipped in interface JaxoList<E extends JaxoObject>g - The graphics context to paint to.JaxoObject.paint(JaxoGraphics2D),
Graphics.hitClip(int,int,int,int)public void paintExcept(java.util.Collection<? extends E> excludes, JaxoGraphics2D g)
paintExcept in interface JaxoList<E extends JaxoObject>excludes - The JaxoObjects to exlude.g - The graphics context to paint to.JaxoObject.paint(JaxoGraphics2D)public void paintClippedExcept(java.util.Collection<? extends E> excludes, JaxoGraphics2D g)
paintClippedExcept in interface JaxoList<E extends JaxoObject>excludes - The JaxoObjects to exlude.g - The graphics context to paint to.JaxoObject.paint(JaxoGraphics2D),
Graphics.hitClip(int,int,int,int)public JaxoList<E> copyOf()
copyOf in interface JaxoList<E extends JaxoObject>public boolean isCopy(JaxoList<E> list)
isCopy in interface JaxoList<E extends JaxoObject>list - The JaxoList to compare against.public void moveAllObjects(int deltaX,
int deltaY)
moveAllObjects in interface JaxoList<E extends JaxoObject>deltaX - The displacement in x directiondeltaY - The displacement in y directionpublic void setColor(java.awt.Color c)
setColor in interface JaxoList<E extends JaxoObject>c - The color to set.public void move(int index,
int newIndex)
move in interface JaxoList<E extends JaxoObject>index - The index of the object to move.newIndex - The new index of the object.public boolean toEnd(E object)
toEnd in interface JaxoList<E extends JaxoObject>object - The JaxoObject to move.public boolean toFront(E object)
toFront in interface JaxoList<E extends JaxoObject>object - The JaxoObject to move.public boolean removeMarkedObjects()
removeMarkedObjects in interface JaxoList<E extends JaxoObject>public java.awt.Rectangle getBounds()
getBounds in interface JaxoList<E extends JaxoObject>public java.awt.Rectangle getBoundsExcept(java.util.Collection<? extends E> excludes)
getBoundsExcept in interface JaxoList<E extends JaxoObject>excludes - objects to exclude, may be null.public java.awt.Rectangle intersection(java.awt.Rectangle inside)
intersection in interface JaxoList<E extends JaxoObject>inside - 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.