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...

Classes

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

Public Member Functions

 HJCanvas ()
 Constructor which sets the value of initDone variable to false.
 
void paint (Graphics g)
 Instructs HOOPS to redraw the scene. More...
 
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. More...
 
int MapKeyFlags (KeyEvent e)
 Maps the GUI-specific key state flags to HOOPS/MVO abstracted flags. More...
 
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. More...
 
- Public Member Functions inherited from com.techsoft.hoops.HCanvas
native void paint (Graphics g)
 Native entry point for painting. More...
 
native long get_window_handle (Graphics g)
 Native entry point which gets the underlying native window handle associated with the awt canvas. More...
 

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.
 

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

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

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

Parameters
eProvides 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
eProvides data for the java.awt.event.KeyEvent event
Returns
variable indicating which modifier key is pressed
void com.techsoft.hoops.HJCanvas.paint ( Graphics  g)

Instructs HOOPS to redraw the scene.

Parameters
gThe object representing the graphics context

References HJ.Control_Update_By_Key(), and com.techsoft.hoops.HJCanvas.m_HView.

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_operatorA reference to an HBaseOperator object to be used as the new operator

References com.techsoft.hoops.HJCanvas.m_HOperator.


The documentation for this class was generated from the following file: