|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICanvas
A ICanvas
holds a Renderer3d
and a View
. It moreover allows
adding and removing listeners for handling mouse or key events.
In the case a user wants to override a concrete ICanvas
painting policy,
such as introducing layers in a CanvasAWT
or CanvasSwing
,
he must be aware that the canvas may be repainted either by forceRepaint() or
by its "original" paint function (that is, the paint function provided by the
Component it extends (GLJpanel, GLCanvas, etc)).
Method Summary | |
---|---|
void |
addKeyListener(java.awt.event.KeyListener listener)
|
void |
addMouseListener(java.awt.event.MouseListener listener)
|
void |
addMouseMotionListener(java.awt.event.MouseMotionListener listener)
|
void |
addMouseWheelListener(java.awt.event.MouseWheelListener listener)
|
void |
dispose()
Performs all required cleanup when destroying a Canvas. |
void |
forceRepaint()
Invoked when a user requires the Canvas to be repainted (e.g. a non 3d layer has changed). |
int |
getRendererHeight()
Returns the renderer's height, i.e. the display height. |
int |
getRendererWidth()
Returns the renderer's width, i.e. the display width. |
View |
getView()
Returns a reference to the held view. |
void |
removeKeyListener(java.awt.event.KeyListener listener)
|
void |
removeMouseListener(java.awt.event.MouseListener listener)
|
void |
removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
|
void |
removeMouseWheelListener(java.awt.event.MouseWheelListener listener)
|
java.awt.image.BufferedImage |
screenshot()
Returns an image with the current renderer's size |
Method Detail |
---|
View getView()
int getRendererWidth()
int getRendererHeight()
void forceRepaint()
java.awt.image.BufferedImage screenshot()
void dispose()
void addMouseListener(java.awt.event.MouseListener listener)
void removeMouseListener(java.awt.event.MouseListener listener)
void addMouseWheelListener(java.awt.event.MouseWheelListener listener)
void removeMouseWheelListener(java.awt.event.MouseWheelListener listener)
void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
void removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
void addKeyListener(java.awt.event.KeyListener listener)
void removeKeyListener(java.awt.event.KeyListener listener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |