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

Constructor Index

 o SceneCanvas(String, Scene)
constructor: window title, scene

Method Index

 o keyDown(Event, int)
key stroke (down)
 o mouseDown(Event, int, int)
mouse press (down).
 o mouseDrag(Event, int, int)
mouse drag (button pressed)
 o mouseEnter(Event, int, int)
request keyboard focus when mouse enters window
 o mouseMove(Event, int, int)
mouse move
 o mouseUp(Event, int, int)
mouse release (up)
 o paint(Graphics)
draw the scene (paint sounds too slow :-)
 o reset()
reset state on loading a new scene
 o tofractX(float)
convert x coordinate to fraction (0 = left, 1 = right)
 o tofractY(float)
convert y coordinate to fraction (0 = bottom, 1 = top)

Constructors

 o SceneCanvas
  public SceneCanvas(String title,
                     Scene s)
constructor: window title, scene

Methods

 o reset
  public void reset()
reset state on loading a new scene
 o tofractX
  public final float tofractX(float x)
convert x coordinate to fraction (0 = left, 1 = right)
 o tofractY
  public final float tofractY(float y)
convert y coordinate to fraction (0 = bottom, 1 = top)
 o paint
  public void paint(Graphics gc)
draw the scene (paint sounds too slow :-)
Overrides:
paint in class OGLCanvas
 o mouseEnter
  public boolean mouseEnter(Event e,
                            int x,
                            int y)
request keyboard focus when mouse enters window
Overrides:
mouseEnter in class OGLCanvas
 o 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
 o mouseDrag
  public boolean mouseDrag(Event e,
                           int x,
                           int y)
mouse drag (button pressed)
Overrides:
mouseDrag in class Component
 o mouseUp
  public boolean mouseUp(Event e,
                         int x,
                         int y)
mouse release (up)
Overrides:
mouseUp in class Component
 o mouseMove
  public boolean mouseMove(Event e,
                           int x,
                           int y)
mouse move
Overrides:
mouseMove in class Component
 o 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