|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanl.aida.viz3d.StackRenderer
public class StackRenderer
Renders a 3D stack of stack items. Items can be rotated on and off the display.
Field Summary | |
---|---|
private boolean |
addKeyListener
|
private boolean |
atBottom
|
private boolean |
atTop
|
private java.awt.Color |
background
|
private javax.media.opengl.GLCanvas |
canvas
|
private static java.lang.String |
DEBUG_KEY
|
private javax.media.opengl.glu.GLU |
glu
|
private boolean |
initialized
|
private java.util.List<StackItem> |
items
|
private MouseRotate |
rotator
|
private int |
stackIndex
|
private com.sun.opengl.util.j2d.TextRenderer |
textRenderer
|
private MouseTranslate |
translator
|
private MouseWheelZoom |
wheelZoomer
|
private static float |
X_INTERVAL
|
private static float |
Z_INTERVAL
|
private MouseZoom |
zoomer
|
Constructor Summary | |
---|---|
StackRenderer(javax.media.opengl.GLCanvas canvas,
java.awt.Color background)
Creates a StackRenderer that will render to the specified canvas. |
|
StackRenderer(javax.media.opengl.GLCanvas canvas,
java.awt.Color background,
boolean addKeyListener)
Creates a StackRenderer that will render to the specified canvas. |
Method Summary | |
---|---|
void |
addStackItem(StackItem item)
Adds a StackItem to this StackRenderer. |
void |
display(javax.media.opengl.GLAutoDrawable drawable)
|
void |
displayChanged(javax.media.opengl.GLAutoDrawable drawable,
boolean modeChanged,
boolean deviceChanged)
|
void |
dispose()
Disposes of any resources this StackRenderer or its items may be holding. |
(package private) javax.media.opengl.GLCanvas |
getCanvas()
Gets the canvas associated with this drawable. |
java.lang.String |
getInfo()
Gets a formatted descriptive string about this StackRenderer. |
private void |
glInit(javax.media.opengl.GL gl)
|
void |
init(javax.media.opengl.GLAutoDrawable drawable)
|
void |
jumpTo(int index,
boolean updateDisplay)
Jumps the top of the stack to the specified index. |
void |
jumpTo(StackItem item,
boolean updateDisplay)
Jumps the top of the stack to the StackItem |
private void |
listenerInit(javax.media.opengl.GLAutoDrawable drawable)
|
void |
moveOff()
Moves the current stack item incrementaly off the stack. |
void |
moveOn()
Moves the current stack item incrementaly on to the stack. |
void |
next()
Pops the current stack item completely off the stack and make the current stack item the next one. |
void |
prev()
If the current stack item is current moving onto / off the stack, then this pushes it completely onto the stack. |
void |
reset()
Resets this StackRenderer such that all the items are on the stack and visual position of the stack returns to its default. |
private void |
resetItems()
|
void |
reshape(javax.media.opengl.GLAutoDrawable drawable,
int x,
int y,
int width,
int height)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String DEBUG_KEY
private static float Z_INTERVAL
private static float X_INTERVAL
private javax.media.opengl.glu.GLU glu
private java.awt.Color background
private javax.media.opengl.GLCanvas canvas
private MouseRotate rotator
private MouseTranslate translator
private MouseWheelZoom wheelZoomer
private MouseZoom zoomer
private boolean addKeyListener
private boolean initialized
private com.sun.opengl.util.j2d.TextRenderer textRenderer
private java.util.List<StackItem> items
private int stackIndex
private boolean atTop
private boolean atBottom
Constructor Detail |
---|
public StackRenderer(javax.media.opengl.GLCanvas canvas, java.awt.Color background)
canvas
- the canvas to render topublic StackRenderer(javax.media.opengl.GLCanvas canvas, java.awt.Color background, boolean addKeyListener)
canvas
- the canvas to render toMethod Detail |
---|
javax.media.opengl.GLCanvas getCanvas()
public void addStackItem(StackItem item)
item
- the item to addprivate void glInit(javax.media.opengl.GL gl)
private void listenerInit(javax.media.opengl.GLAutoDrawable drawable)
public void init(javax.media.opengl.GLAutoDrawable drawable)
init
in interface javax.media.opengl.GLEventListener
public void reshape(javax.media.opengl.GLAutoDrawable drawable, int x, int y, int width, int height)
reshape
in interface javax.media.opengl.GLEventListener
public void displayChanged(javax.media.opengl.GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged)
displayChanged
in interface javax.media.opengl.GLEventListener
public void display(javax.media.opengl.GLAutoDrawable drawable)
display
in interface javax.media.opengl.GLEventListener
private void resetItems()
public void reset()
public void next()
public void prev()
public void moveOff()
public void moveOn()
public void jumpTo(StackItem item, boolean updateDisplay)
item
- the item to jump toupdateDisplay
- whether or not to update the display as the stack
pops / pushes to the specified indexpublic void dispose()
public void jumpTo(int index, boolean updateDisplay)
index
- the index to jump to.updateDisplay
- whether or not to update the display as the stack
pops / pushes to the specified indexpublic java.lang.String getInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |