|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList java.util.ArrayList wyvern.lib.properties.PointList
This property knows how to read & write itself as a list of points.
Field Summary |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
PointList()
Constructs a new, empty PointList. |
|
PointList(int size)
Constructs a new PointList with the specified size. |
|
PointList(java.util.List locs)
Constructs a new PointList with the specified points. |
Method Summary | |
void |
add(Point p)
Adds a point to the list. |
java.lang.Object |
createClone()
Produces a clone of the property for the caller. |
boolean |
equals(java.lang.Object o)
Returns true if the passed PointList matches this one well enough for them to pass as "equal". |
java.util.List |
getList()
Gets the list of locations. |
void |
readData(org.w3c.dom.Node bean)
Initializes the object from the passed lines-list. |
void |
remove(Point p)
Removes the specified point from the list. |
void |
setList(java.util.List locs)
Sets the location list. |
boolean |
shouldWrite()
Returns true if we should write the object at all. |
java.lang.String |
toString()
Returns a String representation of the list. |
PointList |
translate(int xtrans,
int ytrans)
Returns a new list whose points are the original lists's, after translating each point by (x,y). |
PointList |
translateToOrigin()
Returns a new list whose points are the original list's, translated so that the first point in the list is at (0,0). |
java.util.List |
writeData()
Writes the object's externalized representation to the specified output stream. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
Constructor Detail |
public PointList(int size)
public PointList()
public PointList(java.util.List locs)
locs
- the new list of points to useMethod Detail |
public java.util.List getList()
public void setList(java.util.List locs)
locs
- the new list of points to usepublic void add(Point p)
public void remove(Point p)
public void readData(org.w3c.dom.Node bean) throws java.lang.Exception
readData
in interface SelfExternalizable
bean
- the node representing the SelfExternalizable bean
object, which should have at least one child data node.
java.lang.Exception
public java.util.List writeData() throws java.lang.Exception
writeData
in interface SelfExternalizable
java.lang.Exception
public boolean shouldWrite()
shouldWrite
in interface SelfExternalizable
public java.lang.Object createClone()
createClone
in interface MutableProperty
public java.lang.String toString()
public boolean equals(java.lang.Object o)
equals
in interface java.util.List
o
- another PointList objectpublic PointList translate(int xtrans, int ytrans)
xtrans
- x translationytrans
- y translationpublic PointList translateToOrigin()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |