Package jgl.wt.awt
Class GLCanvas
java.lang.Object
java.awt.Component
java.awt.Canvas
jgl.wt.awt.GLCanvas
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
- Direct Known Subclasses:
bezcurve
,bezmesh
,bezsurf
,checker
,clip
,colormat
,cube
,doublebuffer
,EmulGLCanvas
,hello
,light
,lines
,list
,material
,mipmap
,model
,movelight
,pickdepth
,picksquare
,planet
,polys
,quadric
,robot
,scene
,select
,simple
,smooth
,stroke
,surface
,tea
,teapots
,texbind
,texgen
,texsub
,texture3d
,texturesurf
,torus
,unproject
GLCanvas is the canvas class of jGL 2.4.
- Version:
- 0.1, 18 Apr 2001
- Author:
- Robin Bing-Yu Chen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.Canvas
Canvas.AccessibleAWTCanvas
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Can be used to update image if camera has changed position.getGL()
getGLU()
getGLUT()
protected void
Pixel scale is used to model the pixel ratio introduced by HiDPIvoid
glut_enable_events
(long cap, boolean state) void
void
This override letGLUT.processEvent(AWTEvent)
be informed ofAWTEvent
traversing this canvas (mouse, keyboard, resize).void
void
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
-
Field Details
-
myGL
-
myGLU
-
myUT
-
-
Constructor Details
-
GLCanvas
public GLCanvas()
-
-
Method Details
-
processEvent
This override letGLUT.processEvent(AWTEvent)
be informed ofAWTEvent
traversing this canvas (mouse, keyboard, resize). One should registerGLUT.glutDisplayFunc(String)
to register a display callback,GLUT.glutMotionFunc(String)
to register a mouse motion callback, etc. NB : This relies on the fact the GLUT already invokedinvalid @link
{@link this#glut_enable_events
- Overrides:
processEvent
in classComponent
-
glut_enable_events
public void glut_enable_events(long cap, boolean state) -
update
-
paint
-
getPixelScaleFromG2D
Pixel scale is used to model the pixel ratio introduced by HiDPI -
getGL
-
getGLU
-
getGLUT
-
setGL
-
forceRepaint
public void forceRepaint()Can be used to update image if camera has changed position. FIXME : Warning if this is invoked by a thread external to AWT, maybe this will require to redraw GL while GL is already used by AWT.
-