opengl
Class CodeRenderer

java.lang.Object
  extended by opengl.CodeRenderer

public class CodeRenderer
extends java.lang.Object


Field Summary
static float FADE_ALPHA
           
static float FILE_SPACING
           
 
Constructor Summary
CodeRenderer()
           
 
Method Summary
static void draw(javax.media.opengl.GL gl, boolean drawRects)
          Creates display lists if new objects are drawn and calls the lists otherwise.
static void init(javax.media.opengl.GL gl)
          Initializes the rectangle and text renderer.
static void setPackage(PackageInfo pInfo)
          Draws the files of the current package to the canvas.
static void setSelectedItem(CodeItem item, int selIdx)
          Sets the CodeItem which is selected.
static void setSelectEffect(boolean select)
          Creates a new instance of the select effect.
static void setSingleFile(FileInfo file)
          Draws a single file to the canvas without discarding a previously loaded project.
static void showFile()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_SPACING

public static final float FILE_SPACING
See Also:
Constant Field Values

FADE_ALPHA

public static final float FADE_ALPHA
See Also:
Constant Field Values
Constructor Detail

CodeRenderer

public CodeRenderer()
Method Detail

setPackage

public static void setPackage(PackageInfo pInfo)
Draws the files of the current package to the canvas.

Parameters:
pInfo - an instance of PackageInfo containing the CodeItems of each file.

setSingleFile

public static void setSingleFile(FileInfo file)
Draws a single file to the canvas without discarding a previously loaded project.

Parameters:
file - an instance of FileInfo containing the CodeItems of the current file.

init

public static void init(javax.media.opengl.GL gl)
Initializes the rectangle and text renderer.

Parameters:
gl -

draw

public static void draw(javax.media.opengl.GL gl,
                        boolean drawRects)
Creates display lists if new objects are drawn and calls the lists otherwise.

Parameters:
gl -
drawRects - the rectangles are drawn if drawRects is set to true.

setSelectEffect

public static void setSelectEffect(boolean select)
Creates a new instance of the select effect.

Parameters:
select - a fade out effect is created if selected is true and a fade in effect otherwise.

setSelectedItem

public static void setSelectedItem(CodeItem item,
                                   int selIdx)
Sets the CodeItem which is selected.

Parameters:
item - an instance of CodeItem which shall be highlighted.
selIdx - the index of the current file

showFile

public static void showFile()