|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jfig.objects.FigObjectList
layer-sorted doubly-linked list.
FigObjectList provides a simple doubly-linked and layer-sorted list data structure to store FIG objects.
Nested Class Summary | |
(package private) class |
FigObjectList.ListEnumerator
|
(package private) class |
FigObjectList.ReverseListEnumerator
|
Field Summary | |
(package private) ListNode |
enumerationNode
|
(package private) java.lang.String |
name
|
(package private) ListNode |
otmp
|
(package private) ListNode |
root
|
Constructor Summary | |
FigObjectList()
constructor for an empty object list |
|
FigObjectList(java.lang.String name)
constructor for an named empty object list |
Method Summary | |
void |
append(FigObject obj)
append an object to the list. |
FigObjectList |
copy()
create a copy of this list. |
boolean |
delete(FigObject obj)
delete the list item that points to the FigObject obj. |
boolean |
delete(ListNode node)
delete 'node' from the list. |
boolean |
deleteAll()
|
boolean |
deleteAllSLOW()
delete all items from this list. |
java.util.Enumeration |
elements_old()
return an Enumeration of all elements in this list. |
java.util.Enumeration |
elements()
|
boolean |
empty()
is this list empty? |
ListNode |
get_first()
return the first node of this list |
ListNode |
get_last()
return the last node of this list |
ListNode |
get_next(ListNode node)
return the next node on this list and null for the last node |
ListNode |
get_prev(ListNode node)
return the previous node on this list and null for the first node |
ListNode |
get_root()
return the root node of this list |
boolean |
hasMoreElements()
|
void |
insert(FigObject obj)
insert an object into the list --- as the first object on the object's layer. |
java.lang.Object |
nextElement()
|
void |
prepend(FigObject obj)
prepend this object to the start of the list (independent of the object's layer). |
void |
print()
Print the list objects. |
java.util.Enumeration |
reverseElements()
|
ListNode |
search(java.awt.Point wp)
search an object on this list that is nearest to Point wp and return the reference to the list node. |
ListNode |
search(java.awt.Point wp,
int max_distance)
|
ListNode |
search(java.awt.Point wp,
ListNode node)
search an object on this list that is nearest to Point wp (world coordinates) and return the reference to this object. |
ListNode |
search(java.awt.Point wp,
ListNode node,
int max_distance)
starting from node, search for an object on this list with maximum distance "max_distance" from Point wp. |
void |
sort()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
ListNode root
ListNode otmp
java.lang.String name
ListNode enumerationNode
Constructor Detail |
public FigObjectList()
public FigObjectList(java.lang.String name)
name
- The name for this list.Method Detail |
public final ListNode get_root()
public final ListNode get_first()
public final ListNode get_last()
public final ListNode get_next(ListNode node)
public final ListNode get_prev(ListNode node)
public final void append(FigObject obj)
obj
- The object to append.public final void prepend(FigObject obj)
public final void insert(FigObject obj)
obj
- The object to insert.public final boolean delete(ListNode node)
public final boolean delete(FigObject obj)
public final boolean deleteAllSLOW()
public final boolean deleteAll()
public final FigObjectList copy()
public final ListNode search(java.awt.Point wp)
public final ListNode search(java.awt.Point wp, ListNode node)
public ListNode search(java.awt.Point wp, ListNode node, int max_distance)
public ListNode search(java.awt.Point wp, int max_distance)
public void print()
public boolean empty()
public java.util.Enumeration elements_old()
public boolean hasMoreElements()
hasMoreElements
in interface java.util.Enumeration
public java.lang.Object nextElement()
nextElement
in interface java.util.Enumeration
public java.util.Enumeration elements()
public java.util.Enumeration reverseElements()
public void sort()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |