|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--iicm.ge3d.OGLCanvas
OGLCanvas - window context for GE3D. Copyright 1998 IICM, Graz University of Technology.
Field Summary | |
protected int |
cheight
|
protected int |
cwidth
|
static boolean |
loadedlib
|
protected int |
mesa_backbuf
|
protected boolean |
verbose
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
OGLCanvas(java.lang.String t)
constructor |
Method Summary | |
boolean |
hasContext()
check whether native methods are callable |
java.awt.Dimension |
minimumSize()
... and minimum size |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
paint(java.awt.Graphics goofy)
create an OpenGL canvas on first painting. derived class must also call setContext () before issuing OpenGL commands paint of a derived class will typically look like this: (see also SampleCanvas in ge3dsample package) super.paint (gc); // create context on first draw if (! |
java.awt.Dimension |
preferredSize()
my preferred size ... |
protected boolean |
setContext(boolean shading)
activate the context before issuing OpenGL commands in paint |
protected void |
swapBuffers()
when finished with drawing, swap buffers or flush drawings (for double buffering resp. single buffering) |
void |
update(java.awt.Graphics gc)
no need to clear background on graphics update (will be done by 3D drawing) |
Methods inherited from class java.awt.Canvas |
addNotify |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
disableEvents,
dispatchEvent,
doLayout,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getMinimumSize,
getName,
getParent,
getPeer,
getPreferredSize,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
paramString,
postEvent,
prepareImage,
prepareImage,
print,
printAll,
processComponentEvent,
processEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setFont,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus,
validate |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static boolean loadedlib
protected boolean verbose
protected int cwidth
protected int cheight
protected int mesa_backbuf
Constructor Detail |
public OGLCanvas(java.lang.String t)
t
- window title (needed to identify window)Method Detail |
public java.awt.Dimension preferredSize()
public java.awt.Dimension minimumSize()
public void update(java.awt.Graphics gc)
public void paint(java.awt.Graphics goofy)
super.paint (gc); // create context on first draw if (!hasContext () || !setContext ()) // no context return; // should clear background in this case // now ready to draw with OpenGL commands // on first draw you should call GE3D.initGE3D () swapBuffers (); // finish drawing
public boolean hasContext()
protected boolean setContext(boolean shading)
shading
- flag - should be set to true unless wireframe drawingsprotected void swapBuffers()
public void mouseEntered(java.awt.event.MouseEvent e)
public void mouseExited(java.awt.event.MouseEvent e)
Component.mouseEnter(java.awt.Event, int, int)
public void mousePressed(java.awt.event.MouseEvent e)
public void mouseReleased(java.awt.event.MouseEvent e)
public void mouseClicked(java.awt.event.MouseEvent e)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |