Alphabetical Class Index   Compound Members  

com.techsoft.hoops.HJCanvas Class Reference

The HJCanvas class provides a HOOPS/MVO-specific implementation of the java.awt canvas class. More...

Inheritance diagram for com.techsoft.hoops.HJCanvas:

com.techsoft.hoops.HCanvas

List of all members.

Public Member Functions

 HJCanvas ()
 Constructor which sets the value of initDone variable to false.
void paint (Graphics g)
 Instructs HOOPS to redraw the scene.
void enable_listeners ()
 Attaches KeyListener, Mouselistener and MouseMotionListener.
void Init ()
 The default implementation initializes the HBaseView object and the view key.
int MapFlags (MouseEvent e)
 Maps the GUI-specific mouse/key state flags to HOOPS/MVO abstracted flags.
int MapKeyFlags (KeyEvent e)
 Maps the GUI-specific key state flags to HOOPS/MVO abstracted flags.
void SetCurrentOperator (HBaseOperator new_operator)
 Deletes the current operator associated with the HBaseView object (if any) and resets the HBaseView's current operator to the new one.

Protected Attributes

HBaseModel m_HModel
 A reference to the HBaseModel object associated with the canvas.
HBaseView m_HView
 A reference to the HBaseView object associated with the canvas.
HSelectionSet m_HSelectionSet
 A reference to the HSelectionSet object associated with the canvas.
HBaseOperator m_HOperator
 Represents the current HBaseOperator object associated with the Panel.
boolean m_initialized
 Used to store the initialization state of the HOOPS/MVO view.

Classes

class  MyKeyAdapter
 Encapsulates keyboard events. More...
class  MyMouseInputAdapter
 Encapsulates mouse event handling. More...


Detailed Description

The HJCanvas class provides a HOOPS/MVO-specific implementation of the java.awt canvas class.

HJCanvas encapsulates the connection of a HOOPS/3dGS driver instance to an AWT Canvas object, which includes redrawing the scene during exposes/resizes. It also encapsulates passing of mouse/keyboard events through to corresponding MVO operator methods.

This is the base class from which a custom HJCanvas class should be derived, and should be used as the canvas in applications that are using both HOOPS/MVO and HOOPS/3dGS.


Member Function Documentation

void com.techsoft.hoops.HJCanvas.paint ( Graphics  g  ) 

Instructs HOOPS to redraw the scene.

Parameters:
g The object representing the graphics context

Reimplemented from com.techsoft.hoops.HCanvas.

int com.techsoft.hoops.HJCanvas.MapFlags ( MouseEvent  e  ) 

Maps the GUI-specific mouse/key state flags to HOOPS/MVO abstracted flags.

Parameters:
e Provides data for the java.awt.event.MouseEvent event
Returns:
variable indicating which MouseButton and Modifier Key is pressed

int com.techsoft.hoops.HJCanvas.MapKeyFlags ( KeyEvent  e  ) 

Maps the GUI-specific key state flags to HOOPS/MVO abstracted flags.

Parameters:
e Provides data for the java.awt.event.KeyEvent event
Returns:
variable indicating which modifier key is pressed

void com.techsoft.hoops.HJCanvas.SetCurrentOperator ( HBaseOperator  new_operator  ) 

Deletes the current operator associated with the HBaseView object (if any) and resets the HBaseView's current operator to the new one.

Parameters:
new_operator A reference to an HBaseOperator object to be used as the new operator


The documentation for this class was generated from the following file:
  • HJCanvas.java