|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.samcrow.DrawQueue
public class DrawQueue
Manages SGObjects to draw.
Background objects are drawn in the background every time.
Persistent objects are drawn after the background every time.
Transient objects are drawn after the persistent objects only once. Calling redraw
subsequently will erase them.
Field Summary | |
---|---|
private java.util.Collection<org.lekan.graphics.SGObject> |
backgroundObjects
|
private java.util.Collection<org.lekan.graphics.SGObject> |
persistentObjects
|
private org.lekan.graphics.GraphicsProgram |
program
|
private java.util.Collection<org.lekan.graphics.SGObject> |
transientObjects
|
Constructor Summary | |
---|---|
DrawQueue(org.lekan.graphics.GraphicsProgram inProgram)
Constructor |
|
DrawQueue(org.lekan.graphics.GraphicsProgram inProgram,
java.util.Collection<org.lekan.graphics.SGObject> inBackgroundObjects)
Constructor, specifying a collection of SGObjects to draw in the background every time |
Method Summary | |
---|---|
void |
addBackground(java.util.Collection<org.lekan.graphics.SGObject> objects)
Add a Collection of objects to the background list |
void |
addBackground(org.lekan.graphics.SGObject object)
Add an object to the background list |
void |
addPersistent(java.util.Collection<org.lekan.graphics.SGObject> objects)
Add a Collection of objects to the persistent list |
void |
addPersistent(org.lekan.graphics.SGObject object)
Add an object to the persistent list |
void |
addTransient(java.util.Collection<org.lekan.graphics.SGObject> objects)
Add a Collection of objects to the transient list |
void |
addTransient(org.lekan.graphics.SGObject object)
Add a feature that will be drawn when redraw is called, but that will be erased
when redraw is called subsequent times. |
void |
clearPersistent()
Remove all SGObejcts from the array of persistent objects to draw |
void |
redraw(java.lang.String mode,
DisplayOptions.DisplayState state)
Clear the frame and draw all features added since the last call to redraw |
private boolean |
shouldDraw(org.lekan.graphics.SGObject.Origin origin,
DisplayOptions.DisplayState state)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Collection<org.lekan.graphics.SGObject> transientObjects
private java.util.Collection<org.lekan.graphics.SGObject> persistentObjects
private java.util.Collection<org.lekan.graphics.SGObject> backgroundObjects
private org.lekan.graphics.GraphicsProgram program
Constructor Detail |
---|
public DrawQueue(org.lekan.graphics.GraphicsProgram inProgram)
inProgram
- the GraphicsProgram that contains the SGFrame to draw topublic DrawQueue(org.lekan.graphics.GraphicsProgram inProgram, java.util.Collection<org.lekan.graphics.SGObject> inBackgroundObjects)
inProgram
- the GraphicsProgram that contains the SGFrame to draw toinBackgroundObjects
- a Collection of background SGObjectsMethod Detail |
---|
public void addBackground(org.lekan.graphics.SGObject object)
object
- the SGObject to addpublic void addBackground(java.util.Collection<org.lekan.graphics.SGObject> objects)
objects
- the Collection of SGObjects to addpublic void addPersistent(org.lekan.graphics.SGObject object)
object
- the SGObject to addpublic void addPersistent(java.util.Collection<org.lekan.graphics.SGObject> objects)
objects
- the Collection of SGObjects to addpublic void addTransient(org.lekan.graphics.SGObject object)
redraw
is called, but that will be erased
when redraw
is called subsequent times.
object
- The SGObject that will be drawnpublic void addTransient(java.util.Collection<org.lekan.graphics.SGObject> objects)
objects
- the Collection of SGObjects to addpublic void clearPersistent()
public void redraw(java.lang.String mode, DisplayOptions.DisplayState state)
redraw
mode
- the mode to indicatestate
- the current DisplayStateprivate boolean shouldDraw(org.lekan.graphics.SGObject.Origin origin, DisplayOptions.DisplayState state)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |