Class iicm.vrml.vrwave.SceneCanvas
All Packages Class Hierarchy This Package Previous Next Index
Class iicm.vrml.vrwave.SceneCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----iicm.ge3d.OGLCanvas
|
+----iicm.vrml.vrwave.SceneCanvas
- public class SceneCanvas
- extends OGLCanvas
SceneCanvas - Canvas for the Scene
Copyright (c) 1996 IICM
-
SceneCanvas(String, Scene)
- constructor: window title, scene
-
keyDown(Event, int)
- key stroke (down)
-
mouseDown(Event, int, int)
- mouse press (down).
-
mouseDrag(Event, int, int)
- mouse drag (button pressed)
-
mouseEnter(Event, int, int)
- request keyboard focus when mouse enters window
-
mouseMove(Event, int, int)
- mouse move
-
mouseUp(Event, int, int)
- mouse release (up)
-
paint(Graphics)
- draw the scene (paint sounds too slow :-)
-
reset()
- reset state on loading a new scene
-
tofractX(float)
- convert x coordinate to fraction (0 = left, 1 = right)
-
tofractY(float)
- convert y coordinate to fraction (0 = bottom, 1 = top)
SceneCanvas
public SceneCanvas(String title,
Scene s)
- constructor: window title, scene
reset
public void reset()
- reset state on loading a new scene
tofractX
public final float tofractX(float x)
- convert x coordinate to fraction (0 = left, 1 = right)
tofractY
public final float tofractY(float y)
- convert y coordinate to fraction (0 = bottom, 1 = top)
paint
public void paint(Graphics gc)
- draw the scene (paint sounds too slow :-)
- Overrides:
- paint in class OGLCanvas
mouseEnter
public boolean mouseEnter(Event e,
int x,
int y)
- request keyboard focus when mouse enters window
- Overrides:
- mouseEnter in class OGLCanvas
mouseDown
public boolean mouseDown(Event e,
int x,
int y)
- mouse press (down). For 3 button mice Java generates a Meta
modifier for the right mouse button and an Alt event for the
middle mouse button. However, as many keyboards have only a
single Alt/Meta key (and Java may set the Alt modifier
additionally to Meta), we allow using Meta for the right mouse
button and Shift where otherwise the middle mouse button is used.
- Overrides:
- mouseDown in class Component
mouseDrag
public boolean mouseDrag(Event e,
int x,
int y)
- mouse drag (button pressed)
- Overrides:
- mouseDrag in class Component
mouseUp
public boolean mouseUp(Event e,
int x,
int y)
- mouse release (up)
- Overrides:
- mouseUp in class Component
mouseMove
public boolean mouseMove(Event e,
int x,
int y)
- mouse move
- Overrides:
- mouseMove in class Component
keyDown
public boolean keyDown(Event e,
int key)
- key stroke (down)
- Overrides:
- keyDown in class Component
All Packages Class Hierarchy This Package Previous Next Index