|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents the standard operations available for manipulating collections of JGoObjects. The assumption is that objects nearer the head of the list are drawn before and thus appear below objects that come later in the list.
There are methods for adding objects at various positions, for removing them, and for moving them to the head or to the tail of the list.
You can iterate through the collection using the methods of JGoObjectSimpleCollection. In addition this interface supports the backwards traversal of the collection, starting from the tail.
Method Summary | |
JGoListPosition |
addObjectAtHead(JGoObject obj)
Add an object to the beginning of a collection of objects. |
JGoListPosition |
addObjectAtTail(JGoObject obj)
Add an object to the end of a collection of objects. |
void |
bringObjectToFront(JGoObject obj)
Moves an object in front of other objects in the collection (moved to the end of the list of objects). |
JGoListPosition |
findObject(JGoObject obj)
Return the position of a specific object in the collection. |
JGoListPosition |
getLastObjectPos()
Return the position of the last object in the collection. |
JGoListPosition |
getPrevObjectPos(JGoListPosition pos)
Return the position of the previous object in the collection. |
JGoListPosition |
insertObjectAfter(JGoListPosition pos,
JGoObject obj)
Insert an object after the specified position within a collection of objects. |
JGoListPosition |
insertObjectBefore(JGoListPosition pos,
JGoObject obj)
Insert an object before the specified position within a collection of objects. |
JGoObject |
pickObject(org.eclipse.swt.graphics.Point pointToCheck,
boolean selectableOnly)
Find the first object containing specified point (x,y position) from the collection. |
void |
removeObject(JGoObject obj)
Remove the specified object from the collection |
JGoObject |
removeObjectAtPos(JGoListPosition pos)
Remove an object at specified position from the collection. |
void |
sendObjectToBack(JGoObject obj)
Moves an object in back of other objects in the collection (moved to the head of the list of objects). |
Methods inherited from interface com.nwoods.jgo.JGoObjectSimpleCollection |
getFirstObjectPos, getNextObjectPos, getNextObjectPosAtTop, getNumObjects, getObjectAtPos, isEmpty |
Method Detail |
public JGoListPosition addObjectAtHead(JGoObject obj)
obj
- the JGoObject to add to the beginning of the collection.
public JGoListPosition addObjectAtTail(JGoObject obj)
obj
- the JGoObject to add to the end of the collection.
public JGoListPosition insertObjectBefore(JGoListPosition pos, JGoObject obj)
pos
- the position before which to insert the given object.obj
- the JGoObject to add to the the collection.
public JGoListPosition insertObjectAfter(JGoListPosition pos, JGoObject obj)
pos
- the position after which to insert the given object.obj
- the JGoObject to add to the the collection.
public void bringObjectToFront(JGoObject obj)
obj
- the object to move to the front.public void sendObjectToBack(JGoObject obj)
obj
- the object to move to the back.public void removeObject(JGoObject obj)
obj
- the object to remove.public JGoObject removeObjectAtPos(JGoListPosition pos)
pos
- the position of the object to remove.
public JGoObject pickObject(org.eclipse.swt.graphics.Point pointToCheck, boolean selectableOnly)
pointToCheck
- the point the object must contain.selectableOnly
- set to true to insure that only selectable objects
are returned.
public JGoListPosition getLastObjectPos()
public JGoListPosition getPrevObjectPos(JGoListPosition pos)
pos
- the position of the object that follows the object position
to be returned.
public JGoListPosition findObject(JGoObject obj)
obj
- the object whose position in the collection is to be returned.
to be returned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |