JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d
Class JCActionTable

java.lang.Object
  |
  +--com.klg.jclass.chart3d.JCActionTable
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ActionTable, ActionTable

public abstract class JCActionTable
extends Object
implements Serializable

JCActionTable allows the association of an InputEvent with an action to be performed. In particular, a MouseActionInitiator or a KeyActionInitiator is associated with a class that implements the JCAction interface. At runtime, when the user clicks on the chart with a mouse button, or presses a key while the chart has the input focus, JCActionTable will interrogate its mapping for the corresponding class that implements the desired JCAction. This class is then instantiated to handle the InputEvent. All of the default JCActions can be found in either the com.klg.jclass.chart3d.j2d.actions package or the com.klg.jclass.chart3d.j3d.action package.

See Also:
Serialized Form

Field Summary
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_CANCEL_ACTION
          KeyActionInitiator that cancels the current action.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_CUSTOMIZE_ACTION
          KeyActionInitiator that pops up the customizer.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_RESET_ACTION
          KeyActionInitiator that resets the chart.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SCALE_DOWN_ACTION
          KeyActionInitiator that allows interactive scaling decrease of the chart.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SCALE_UP_ACTION
          KeyActionInitiator that allows interactive scaling increase of the chart.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SPIN_CCW_ACTION
          KeyActionInitiator that spins the chart counter-clockwise.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SPIN_CW_ACTION
          KeyActionInitiator that spins the chart clockwise.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SWITCH_ROTATE_ANY_ACTION
          KeyActionInitiator that removes any constraint for interactive rotation.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SWITCH_ROTATE_EYE_ACTION
          KeyActionInitiator that constrains subsequent interactive rotation to the eye.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SWITCH_ROTATE_X_ACTION
          KeyActionInitiator that constrains subsequent interactive rotation about the X axis.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SWITCH_ROTATE_Y_ACTION
          KeyActionInitiator that constrains subsequent interactive rotation about the Y axis.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SWITCH_ROTATE_Z_ACTION
          KeyActionInitiator that constrains subsequent interactive rotation about the Z axis.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TILT_CCW_ACTION
          KeyActionInitiator that tilts and spins the chart counter-clockwise.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TILT_CW_ACTION
          KeyActionInitiator that tilts and spins the chart clockwise.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TRANSLATE_DOWN_ACTION
          KeyActionInitiator that allows interactive translation (movement) of the chart downwards.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TRANSLATE_LEFT_ACTION
          KeyActionInitiator that allows interactive translation (movement) of the chart to the left.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TRANSLATE_RIGHT_ACTION
          KeyActionInitiator that allows interactive translation (movement) of the chart to the right.
static com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TRANSLATE_UP_ACTION
          KeyActionInitiator that allows interactive translation (movement) of the chart upwards.
static com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_CUSTOMIZE_ACTION
          MouseActionInitiator that pops up the customizer.
static com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_EDIT_ACTION
          MouseActionInitiator that allows interactive editing of the chart.
static com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_PICK_ACTION
          MouseActionInitiator that allows interactive picking of the chart.
static com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ROTATE_ANY_ACTION
          MouseActionInitiator that allows interactive rotation of the chart with no constraint.
static com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ROTATE_EYE_ACTION
          MouseActionInitiator that allows interactive rotation of the chart constrained to the eye.
static com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ROTATE_X_ACTION
          MouseActionInitiator that allows interactive rotation of the chart constrained to the X axis.
static com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ROTATE_Y_ACTION
          MouseActionInitiator that allows interactive rotation of the chart constrained to the Y axis.
static com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ROTATE_Z_ACTION
          MouseActionInitiator that allows interactive rotation of the chart constrained to the Z axis.
static com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_SCALE_ACTION
          MouseActionInitiator that allows interactive scaling of the chart.
static com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_TRANSLATE_ACTION
          MouseActionInitiator that allows interactive translation (movement) of the chart.
static com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ZOOM_ACTION
          MouseActionInitiator that allows interactive zooming of the chart.
protected  TreeMap handlerInstances
          Map of all running action handlers.
protected  TreeMap keyActions
          Map of all key actions.
protected  TreeMap mouseActions
          Map of all mouse actions.
 
Constructor Summary
JCActionTable()
          No args constructor.
 
Method Summary
 void addAction(com.klg.jclass.chart3d.ActionInitiator initiator, String className)
          Associates a given ActionInitiator with an action handler (JCAction) that will handle an action.
 void addAllDefaultActions()
          Re-creates all standard actions.
 void addAllDefaultKeyActions()
          Re-creates all standard key actions.
 void addAllDefaultMouseActions()
          Re-creates all standard mouse actions.
 String getAction(InputEvent event)
          Returns the action mapped to the given event.
abstract  com.klg.jclass.chart3d.JCAction getActionHandlerInstance(InputEvent event, Object object)
          Returns an instance of the JCAction to handle the InputEvent.
 Set getAllKeyActions()
          Returns a Set of the Key Actions.
 Set getAllMouseActions()
          Returns a Set of the Mouse Actions.
abstract  String getDefaultCancelActionClass()
          Returns the name of the default class that implements the Cancel Action.
abstract  String getDefaultCustomizeActionClass()
          Returns the name of the default class that implements the Customize Action.
abstract  String getDefaultEditActionClass()
          Returns the name of the default class that implements the Edit Action.
abstract  String getDefaultPickActionClass()
          Returns the name of the default class that implements the Pick Action.
abstract  String getDefaultResetActionClass()
          Returns the name of the default class that implements the Reset Action.
abstract  String getDefaultRotateActionClass()
          Returns the name of the default class that implements the Rotate Action.
abstract  String getDefaultRotateEyeActionClass()
          Returns the name of the default class that implements the RotateEye Action.
abstract  String getDefaultRotateXActionClass()
          Returns the name of the default class that implements the RotateX Action.
abstract  String getDefaultRotateYActionClass()
          Returns the name of the default class that implements the RotateY Action.
abstract  String getDefaultRotateZActionClass()
          Returns the name of the default class that implements the RotateZ Action.
abstract  String getDefaultScaleActionClass()
          Returns the name of the default class that implements the Scale Action.
abstract  String getDefaultSwitchRotateAnyActionClass()
          Returns the name of the default class that implements the RotateAny Action.
abstract  String getDefaultSwitchRotateEyeActionClass()
          Returns the name of the default class that implements the SwitchRotateEye Action.
abstract  String getDefaultSwitchRotateXActionClass()
          Returns the name of the default class that implements the SwitchRotateX Action.
abstract  String getDefaultSwitchRotateYActionClass()
          Returns the name of the default class that implements the SwitchRotateY Action.
abstract  String getDefaultSwitchRotateZActionClass()
          Returns the name of the default class that implements the SwitchRotateZ Action.
abstract  String getDefaultTranslateActionClass()
          Returns the name of the default class that implements the Translate Action.
abstract  String getDefaultZoomActionClass()
          Returns the name of the default class that implements the Zoom Action.
 void removeAction(com.klg.jclass.chart3d.ActionInitiator initiator)
          Removes an action.
 void removeAllActions()
          Removes all actions from JClass Chart 3D.
 void removeAllKeyActions()
          Removes all key actions from JClass Chart 3D.
 void removeAllMouseActions()
          Removes all mouse actions from JClass Chart 3D.
 void removeKeyAction(com.klg.jclass.chart3d.KeyActionInitiator initiator)
          Removes a key action.
 void removeMouseAction(com.klg.jclass.chart3d.MouseActionInitiator initiator)
          Removes a mouse action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mouseActions

protected TreeMap mouseActions
Map of all mouse actions.


keyActions

protected TreeMap keyActions
Map of all key actions.


handlerInstances

protected TreeMap handlerInstances
Map of all running action handlers.


DEFAULT_MOUSE_CUSTOMIZE_ACTION

public static final com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_CUSTOMIZE_ACTION
MouseActionInitiator that pops up the customizer.


DEFAULT_KEY_CUSTOMIZE_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_CUSTOMIZE_ACTION
KeyActionInitiator that pops up the customizer.


DEFAULT_MOUSE_EDIT_ACTION

public static final com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_EDIT_ACTION
MouseActionInitiator that allows interactive editing of the chart.


DEFAULT_MOUSE_PICK_ACTION

public static final com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_PICK_ACTION
MouseActionInitiator that allows interactive picking of the chart.


DEFAULT_MOUSE_ROTATE_ANY_ACTION

public static final com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ROTATE_ANY_ACTION
MouseActionInitiator that allows interactive rotation of the chart with no constraint.


DEFAULT_MOUSE_ROTATE_EYE_ACTION

public static final com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ROTATE_EYE_ACTION
MouseActionInitiator that allows interactive rotation of the chart constrained to the eye.


DEFAULT_MOUSE_ROTATE_X_ACTION

public static final com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ROTATE_X_ACTION
MouseActionInitiator that allows interactive rotation of the chart constrained to the X axis.


DEFAULT_MOUSE_ROTATE_Y_ACTION

public static final com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ROTATE_Y_ACTION
MouseActionInitiator that allows interactive rotation of the chart constrained to the Y axis.


DEFAULT_MOUSE_ROTATE_Z_ACTION

public static final com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ROTATE_Z_ACTION
MouseActionInitiator that allows interactive rotation of the chart constrained to the Z axis.


DEFAULT_KEY_SWITCH_ROTATE_ANY_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SWITCH_ROTATE_ANY_ACTION
KeyActionInitiator that removes any constraint for interactive rotation.


DEFAULT_KEY_SWITCH_ROTATE_EYE_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SWITCH_ROTATE_EYE_ACTION
KeyActionInitiator that constrains subsequent interactive rotation to the eye.


DEFAULT_KEY_SWITCH_ROTATE_X_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SWITCH_ROTATE_X_ACTION
KeyActionInitiator that constrains subsequent interactive rotation about the X axis.


DEFAULT_KEY_SWITCH_ROTATE_Y_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SWITCH_ROTATE_Y_ACTION
KeyActionInitiator that constrains subsequent interactive rotation about the Y axis.


DEFAULT_KEY_SWITCH_ROTATE_Z_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SWITCH_ROTATE_Z_ACTION
KeyActionInitiator that constrains subsequent interactive rotation about the Z axis.


DEFAULT_KEY_SPIN_CCW_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SPIN_CCW_ACTION
KeyActionInitiator that spins the chart counter-clockwise.


DEFAULT_KEY_SPIN_CW_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SPIN_CW_ACTION
KeyActionInitiator that spins the chart clockwise.


DEFAULT_KEY_TILT_CCW_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TILT_CCW_ACTION
KeyActionInitiator that tilts and spins the chart counter-clockwise.


DEFAULT_KEY_TILT_CW_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TILT_CW_ACTION
KeyActionInitiator that tilts and spins the chart clockwise.


DEFAULT_MOUSE_SCALE_ACTION

public static final com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_SCALE_ACTION
MouseActionInitiator that allows interactive scaling of the chart.


DEFAULT_KEY_SCALE_UP_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SCALE_UP_ACTION
KeyActionInitiator that allows interactive scaling increase of the chart.


DEFAULT_KEY_SCALE_DOWN_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_SCALE_DOWN_ACTION
KeyActionInitiator that allows interactive scaling decrease of the chart.


DEFAULT_MOUSE_TRANSLATE_ACTION

public static final com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_TRANSLATE_ACTION
MouseActionInitiator that allows interactive translation (movement) of the chart.


DEFAULT_KEY_TRANSLATE_LEFT_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TRANSLATE_LEFT_ACTION
KeyActionInitiator that allows interactive translation (movement) of the chart to the left.


DEFAULT_KEY_TRANSLATE_RIGHT_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TRANSLATE_RIGHT_ACTION
KeyActionInitiator that allows interactive translation (movement) of the chart to the right.


DEFAULT_KEY_TRANSLATE_UP_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TRANSLATE_UP_ACTION
KeyActionInitiator that allows interactive translation (movement) of the chart upwards.


DEFAULT_KEY_TRANSLATE_DOWN_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_TRANSLATE_DOWN_ACTION
KeyActionInitiator that allows interactive translation (movement) of the chart downwards.


DEFAULT_MOUSE_ZOOM_ACTION

public static final com.klg.jclass.chart3d.MouseActionInitiator DEFAULT_MOUSE_ZOOM_ACTION
MouseActionInitiator that allows interactive zooming of the chart.


DEFAULT_KEY_RESET_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_RESET_ACTION
KeyActionInitiator that resets the chart.


DEFAULT_KEY_CANCEL_ACTION

public static final com.klg.jclass.chart3d.KeyActionInitiator DEFAULT_KEY_CANCEL_ACTION
KeyActionInitiator that cancels the current action.

Constructor Detail

JCActionTable

public JCActionTable()
No args constructor.

Method Detail

addAction

public void addAction(com.klg.jclass.chart3d.ActionInitiator initiator,
                      String className)
Associates a given ActionInitiator with an action handler (JCAction) that will handle an action.

Parameters:
initiator - the MouseActionInitiator or KeyActionInitiator that specifies the InputEvent
className - the fully specified name of the class that implements the JCAction interface

getActionHandlerInstance

public abstract com.klg.jclass.chart3d.JCAction getActionHandlerInstance(InputEvent event,
                                                                         Object object)
Returns an instance of the JCAction to handle the InputEvent. This method must be overridden by subclasses.

Parameters:
event -
object -
Returns:
a JCAction instance

getAction

public String getAction(InputEvent event)
Returns the action mapped to the given event. If no action exists, null is returned.

Parameters:
event -
Returns:
action mapped to the given event

removeAction

public void removeAction(com.klg.jclass.chart3d.ActionInitiator initiator)
Removes an action.

Parameters:
initiator - the ActionInitiator to remove

removeKeyAction

public void removeKeyAction(com.klg.jclass.chart3d.KeyActionInitiator initiator)
Removes a key action.

Parameters:
initiator - the KeyActionInitiator to remove

removeMouseAction

public void removeMouseAction(com.klg.jclass.chart3d.MouseActionInitiator initiator)
Removes a mouse action.

Parameters:
initiator - the MouseActionInitiator to remove

removeAllKeyActions

public void removeAllKeyActions()
Removes all key actions from JClass Chart 3D.


removeAllMouseActions

public void removeAllMouseActions()
Removes all mouse actions from JClass Chart 3D.


removeAllActions

public void removeAllActions()
Removes all actions from JClass Chart 3D.


getAllKeyActions

public Set getAllKeyActions()
Returns a Set of the Key Actions.

Returns:
a Set of the Key Actions

getAllMouseActions

public Set getAllMouseActions()
Returns a Set of the Mouse Actions.

Returns:
a Set of the Mouse Actions

addAllDefaultActions

public void addAllDefaultActions()
Re-creates all standard actions. Call removeAllActions() first if you want to start anew.


addAllDefaultKeyActions

public void addAllDefaultKeyActions()
Re-creates all standard key actions. Call removeAllKeyActions() first if you want to start anew with key actions.


addAllDefaultMouseActions

public void addAllDefaultMouseActions()
Re-creates all standard mouse actions. Call removeAllMouseActions() first if you want to start anew with mouse actions.


getDefaultCancelActionClass

public abstract String getDefaultCancelActionClass()
Returns the name of the default class that implements the Cancel Action.

Returns:
default class name

getDefaultCustomizeActionClass

public abstract String getDefaultCustomizeActionClass()
Returns the name of the default class that implements the Customize Action.

Returns:
default class name

getDefaultEditActionClass

public abstract String getDefaultEditActionClass()
Returns the name of the default class that implements the Edit Action.

Returns:
default class name

getDefaultPickActionClass

public abstract String getDefaultPickActionClass()
Returns the name of the default class that implements the Pick Action.

Returns:
default class name

getDefaultResetActionClass

public abstract String getDefaultResetActionClass()
Returns the name of the default class that implements the Reset Action.

Returns:
default class name

getDefaultRotateActionClass

public abstract String getDefaultRotateActionClass()
Returns the name of the default class that implements the Rotate Action.

Returns:
default class name

getDefaultRotateEyeActionClass

public abstract String getDefaultRotateEyeActionClass()
Returns the name of the default class that implements the RotateEye Action.

Returns:
default class name

getDefaultRotateXActionClass

public abstract String getDefaultRotateXActionClass()
Returns the name of the default class that implements the RotateX Action.

Returns:
default class name

getDefaultRotateYActionClass

public abstract String getDefaultRotateYActionClass()
Returns the name of the default class that implements the RotateY Action.

Returns:
default class name

getDefaultRotateZActionClass

public abstract String getDefaultRotateZActionClass()
Returns the name of the default class that implements the RotateZ Action.

Returns:
default class name

getDefaultScaleActionClass

public abstract String getDefaultScaleActionClass()
Returns the name of the default class that implements the Scale Action.

Returns:
default class name

getDefaultSwitchRotateAnyActionClass

public abstract String getDefaultSwitchRotateAnyActionClass()
Returns the name of the default class that implements the RotateAny Action.

Returns:
default class name

getDefaultSwitchRotateEyeActionClass

public abstract String getDefaultSwitchRotateEyeActionClass()
Returns the name of the default class that implements the SwitchRotateEye Action.

Returns:
default class name

getDefaultSwitchRotateXActionClass

public abstract String getDefaultSwitchRotateXActionClass()
Returns the name of the default class that implements the SwitchRotateX Action.

Returns:
default class name

getDefaultSwitchRotateYActionClass

public abstract String getDefaultSwitchRotateYActionClass()
Returns the name of the default class that implements the SwitchRotateY Action.

Returns:
default class name

getDefaultSwitchRotateZActionClass

public abstract String getDefaultSwitchRotateZActionClass()
Returns the name of the default class that implements the SwitchRotateZ Action.

Returns:
default class name

getDefaultTranslateActionClass

public abstract String getDefaultTranslateActionClass()
Returns the name of the default class that implements the Translate Action.

Returns:
default class name

getDefaultZoomActionClass

public abstract String getDefaultZoomActionClass()
Returns the name of the default class that implements the Zoom Action.

Returns:
default class name

Copyright © 2004 Quest Software Inc..
All rights reserved.