|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
net.sf.jaxodraw.object.JaxoObjectList
public class JaxoObjectList
Implementation of JaxoList. This should ensure that only JaxoObjects are added as elements by throwing a ClassCastException if something else is attempted.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
JaxoObjectList()
Just calls super(). |
|
JaxoObjectList(java.util.Collection c)
Add all elements of c to this List. |
|
JaxoObjectList(int initialCapacity)
Just calls super(initialCapacity). |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.util.ArrayList |
|---|
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, size, subList, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, size, subList, toArray, toArray |
| Constructor Detail |
|---|
public 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.| Method Detail |
|---|
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()
copyOf in interface JaxoListpublic boolean isCopy(JaxoList list)
isCopy in interface JaxoListlist - The JaxoList to compare against.
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)
setColor in interface JaxoListc - The color to set.
public void move(int index,
int newIndex)
move in interface JaxoListindex - The index of the object to move.newIndex - The new index of the object.public boolean toEnd(JaxoObject object)
toEnd in interface JaxoListobject - The JaxoObject to move.
public boolean toFront(JaxoObject object)
toFront in interface JaxoListobject - The JaxoObject to move.
public boolean removeMarkedObjects()
removeMarkedObjects in interface JaxoListpublic java.awt.Rectangle getBounds()
getBounds in interface JaxoListpublic 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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||