|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.gui.EZ2DGL
public abstract class EZ2DGL
A wrapper for GLCanvas that provides a simpler, 2D-only API. Takes care of fonts, textures, events, etc.
| Field Summary | |
|---|---|
float |
bgBluef
|
float |
bgGreenf
|
float |
bgRedf
|
net.java.games.jogl.GLCanvas |
canvas
|
double |
centerX
|
double |
centerY
|
GLFont |
currentFont
|
int |
currentFontID
|
GLTexture |
currentTexture
|
int |
currentTextureID
|
com.partnersoft.gui.EZ2DGL.DisplayListCache |
displayListCache
|
OneToOneMapping |
displayListMapping
|
float |
fgAlphaf
|
float |
fgBluef
|
float |
fgGreenf
|
float |
fgRedf
|
java.util.HashMap |
fontMap
|
java.util.ArrayList |
fonts
|
net.java.games.jogl.GL |
gl
|
net.java.games.jogl.GLU |
glu
|
boolean |
highQuality
|
com.partnersoft.gui.EZ2DGL.InnerEar |
innerEar
|
int |
maxTextureID
|
double |
rotation
|
double |
scale
|
protected java.nio.ByteBuffer |
selectionBufferBytes
|
java.util.HashMap |
textureKeys
|
java.util.HashMap |
textureMap
|
java.util.HashMap |
textures
|
| Fields inherited from interface com.partnersoft.io.formats.rover.RoverConstants |
|---|
ALIGN_BOTTOM_CENTER, ALIGN_BOTTOM_FIT, ALIGN_BOTTOM_LEFT, ALIGN_BOTTOM_RIGHT, ALIGN_CENTER, ALIGN_CENTER_LEFT, ALIGN_CENTER_RIGHT, ALIGN_CODE_CENTER, ALIGN_CODE_FIT, ALIGN_CODE_HIGH, ALIGN_CODE_LOW, ALIGN_FIT, ALIGN_FIT_LEFT, ALIGN_FIT_RIGHT, ALIGN_TOP_CENTER, ALIGN_TOP_FIT, ALIGN_TOP_LEFT, ALIGN_TOP_RIGHT, COMMENT, DATA_FIELDS_MAX, EOF, FLOAT_COORDS, GEOMETRY_TYPE_NAMES, HAS_DATA, HAS_OFFSET, HAS_ROTATION, LIST, MASK_TYPECODE, NAMING, POINT, POLYGON, POLYLINE, POP, PUSH, RENDER_FINDITEM, RENDER_INDICATION, RENDER_NORMAL, RENDER_SELECTION, ROTATION_MULT, TEXEL_COORD_MAX, TEXEL_COORD_SIZE, TEXT, TILE_COORD_MAX, TILE_SIZE_PIXELS, VALUE |
| Constructor Summary | |
|---|---|
EZ2DGL(boolean softwareRendering,
boolean animated)
|
|
EZ2DGL(boolean softwareRendering,
boolean animated,
boolean highQuality)
|
|
| Method Summary | |
|---|---|
int |
addFont(java.awt.Font font)
|
int |
addFont(GLFont font,
java.lang.Object key)
Registers a font as a set of GL textures, one per character. |
int |
addTexture(GLTexture texture,
java.lang.Object key)
|
int |
addTexture(java.awt.Image image,
boolean modulate)
|
int |
addTexture(java.awt.Image image,
java.lang.Object key)
Registers an image as a GL texture. |
void |
clear()
Clears the buffer and sets it to the background color. |
void |
close()
|
static void |
close(net.java.games.jogl.GLCanvas canvas)
|
void |
display()
Call this to trigger a repaint. |
protected abstract void |
displayImp()
This must be overridden to perform the actual drawing. |
int |
displayListFor(java.lang.Object key)
|
void |
displayThumbTwiddle()
|
void |
drawBullseye()
|
void |
drawCircle(int dataID,
double centerX,
double centerY,
double radius)
|
void |
drawDisplayList(int displayListID)
|
void |
drawPolygon(int dataID,
DoubleBuffer coords)
Draws a filled polygon in the foreground color. |
void |
drawPolyline(int dataID,
DoubleBuffer coords)
Draws a filled polyline in the foreground color. |
protected void |
drawSelectionBox()
|
void |
drawString(int fontID,
double x,
double y,
float rotation,
int alignment,
double fontScale,
java.lang.String text)
|
void |
drawTexture(int dataID,
int textureID,
double x,
double y,
double rotation,
double scale)
Just draws the given texture as a rotated, scaled icon. |
void |
drawTriangle(double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double z)
|
void |
endDisplayList()
|
int[][] |
endSelection()
|
protected void |
finalize()
|
int |
fontIDFor(java.lang.Object key)
|
double |
getFrameCount()
Get the global average frame count. |
double |
getRecentFrameCount()
Get the recent (last 100 frames) average frame count. |
void |
gotoPixelScale()
Throws you in pixel scaled mode, offset so that the origin given is (0, 0) in pixel space. |
void |
init()
|
protected abstract void |
initializeImp()
This must be overridden to perform any initial setup. |
boolean |
isAnimated()
|
void |
logInfo()
|
static void |
main(java.lang.String[] args)
just for testing. |
void |
popMatrix()
|
void |
popName()
|
void |
pushMatrix()
|
void |
pushName(int ID)
|
void |
removeAllTextures()
|
void |
removeDisplayList(int displayListID)
|
void |
removeTexture(int textureID)
|
int[][] |
select(int x,
int y)
Selects items near the given pixel coordinates. |
void |
setActive(boolean isActive)
|
void |
setBackgroundColor(int rgb)
|
void |
setCurrentTexture(int textureID)
Sets up for drawing with textures. |
void |
setForegroundColor(int rgb)
|
void |
setLineStipple(int stipple)
|
void |
setLineWidth(float newWidth)
|
void |
setMarchingAnts(boolean marching)
|
void |
setModelView(double centerX,
double centerY,
double rotation,
double scale)
This sets the viewing parameters, specified as a centerpoint, rotation, and scale. |
void |
sizeChanged()
This is run whenever the canvas is resized. |
int |
startDisplayList(java.lang.Object key)
|
void |
startSelection(int x,
int y)
|
int |
textureIDFor(java.lang.Object key)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public net.java.games.jogl.GLCanvas canvas
public net.java.games.jogl.GL gl
public net.java.games.jogl.GLU glu
public double centerX
public double centerY
public double rotation
public double scale
public float bgRedf
public float bgGreenf
public float bgBluef
public float fgRedf
public float fgGreenf
public float fgBluef
public float fgAlphaf
public int maxTextureID
public java.util.HashMap textures
public java.util.HashMap textureKeys
public java.util.HashMap textureMap
public int currentTextureID
public GLTexture currentTexture
public java.util.ArrayList fonts
public java.util.HashMap fontMap
public int currentFontID
public GLFont currentFont
public OneToOneMapping displayListMapping
public com.partnersoft.gui.EZ2DGL.DisplayListCache displayListCache
public com.partnersoft.gui.EZ2DGL.InnerEar innerEar
public boolean highQuality
protected transient java.nio.ByteBuffer selectionBufferBytes
| Constructor Detail |
|---|
public EZ2DGL(boolean softwareRendering,
boolean animated)
public EZ2DGL(boolean softwareRendering,
boolean animated,
boolean highQuality)
| Method Detail |
|---|
public static void close(net.java.games.jogl.GLCanvas canvas)
public int displayListFor(java.lang.Object key)
public int startDisplayList(java.lang.Object key)
public void endDisplayList()
public void drawDisplayList(int displayListID)
public void removeDisplayList(int displayListID)
public void displayThumbTwiddle()
public void clear()
public void setActive(boolean isActive)
public void logInfo()
public void setBackgroundColor(int rgb)
public void setForegroundColor(int rgb)
public void setLineWidth(float newWidth)
public void setLineStipple(int stipple)
public int addTexture(java.awt.Image image,
java.lang.Object key)
public int addTexture(java.awt.Image image,
boolean modulate)
public int textureIDFor(java.lang.Object key)
public int fontIDFor(java.lang.Object key)
public int addTexture(GLTexture texture,
java.lang.Object key)
public void removeTexture(int textureID)
public void removeAllTextures()
public int addFont(java.awt.Font font)
public int addFont(GLFont font,
java.lang.Object key)
public void drawTexture(int dataID,
int textureID,
double x,
double y,
double rotation,
double scale)
public void drawPolygon(int dataID,
DoubleBuffer coords)
public void drawCircle(int dataID,
double centerX,
double centerY,
double radius)
public void drawPolyline(int dataID,
DoubleBuffer coords)
public void drawString(int fontID,
double x,
double y,
float rotation,
int alignment,
double fontScale,
java.lang.String text)
protected abstract void displayImp()
protected abstract void initializeImp()
public void init()
public void setModelView(double centerX,
double centerY,
double rotation,
double scale)
public void sizeChanged()
public double getFrameCount()
public double getRecentFrameCount()
public void display()
public void drawTriangle(double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double z)
public int[][] select(int x,
int y)
public void startSelection(int x,
int y)
public int[][] endSelection()
public void setCurrentTexture(int textureID)
public void gotoPixelScale()
protected void drawSelectionBox()
public void drawBullseye()
public void setMarchingAnts(boolean marching)
public boolean isAnimated()
public void pushName(int ID)
public void popName()
public void pushMatrix()
public void popMatrix()
public void close()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||