All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.chart.EventTrigger

java.lang.Object
   |
   +----jclass.chart.EventTrigger

public class EventTrigger
extends Object
implements JCSerializable
EventTrigger is responsible for defining a mapping from a user event to a Chart action. For example, EventTrigger can be used to map from a Shift+Left-mouse-button set of events to the rotate action. Note that by default all event triggers are mouse down-drag-up events (which occurs as a single sequence of mouse events). All that can vary are the modifiers.

Properties

Name Method
Modifiers The Modifiers property specifies the modifier keys that are pressed during mouse down-drag-up that trigger the action. It is a bit field made up of a mixture of Event.ALT_MASK, Event.CTRL_MASK, Event.META_MASK and Event_SHIFT_MASK. Using the middle mouse button for a trigger is accomplished by specifying a modifier of Event.ALT_MASK. Using the right mouse button for a trigger is accomplished by specifying a modifier of Event.META_MASK.
Action The Action property determines what action will be performed when the specified AWT event occurs. One of EventTrigger.ROTATE, EventTrigger.EDIT, EventTrigger.ZOOM, EventTrigger.TRANSLATE, EventTrigger.PICK or EventTrigger.DEPTH.


Variable Index

 o DEPTH
 o EDIT
 o PICK
 o ROTATE
 o TRANSLATE
 o ZOOM

Constructor Index

 o EventTrigger(int, int)
A public constructor that creates a mapping from a series of modifiers to a Chart action.

Method Index

 o getAction()
Gets the value of the Action property for this EventTrigger instance.
 o getModifiers()
Gets the value of the Modifiers property for this EventTrigger instance.
 o setAction(int)
Sets the value of the action property for this EventTrigger instance.
 o setModifiers(int)
Sets the value of the modifiers property for this EventTrigger instance.

Variables

 o ROTATE
 public static final int ROTATE
 o ZOOM
 public static final int ZOOM
 o TRANSLATE
 public static final int TRANSLATE
 o EDIT
 public static final int EDIT
 o PICK
 public static final int PICK
 o DEPTH
 public static final int DEPTH

Constructors

 o EventTrigger
 public EventTrigger(int mod,
                     int act)
A public constructor that creates a mapping from a series of modifiers to a Chart action.

Parameters:
mod - bitfield of modifiers from Event. Can include Event.SHIFT_MASK, Event.CTRL_MASK, Event.META_MASK and Event.ALT_MASK.
act - action enum, one of ROTATE, ZOOM, TRANSLATE, EDIT, PICK, or DEPTH.

Methods

 o getModifiers
 public int getModifiers()
Gets the value of the Modifiers property for this EventTrigger instance. The modifiers property specifies the modifier keys that are pressed during mouse down-drag-up that trigger the action.

Returns:
bit fields set using Event.ALT_MASK, Event.CTRL_MASK, Event.META_MASK and Event.SHIFT_MASK
 o setModifiers
 public synchronized void setModifiers(int mod)
Sets the value of the modifiers property for this EventTrigger instance. The modifiers property specifies the modifier keys that are pressed during mouse down-drag-up that trigger the action. A modifier of Event.ALT_MASK can be used to specify the use of the middle mouse button for the trigger. A modifier of Event.META_MASK can be used to specify the use of the right mouse button for the trigger.

Parameters:
mod - bit fields set using Event.ALT_MASK, Event.CTRL_MASK, Event.META_MASK and Event.SHIFT_MASK
Throws: IllegalArgumentException
If the modifier is not either 0, Event.SHIFT_MASK, Event.ALT_MASK, Event.META_MASK or Event.CTRL_MASK
 o getAction
 public int getAction()
Gets the value of the Action property for this EventTrigger instance. The Action property determines what action will be performed when the specified AWT event occurs. One of ROTATE, ZOOM TRANSLATE, EDIT, PICK or DEPTH.

Returns:
Enum specifying chart action
 o setAction
 public synchronized void setAction(int act)
Sets the value of the action property for this EventTrigger instance. The action property determines what action will be performed when the specified AWT event occurs. One of ROTATE, EDIT, ZOOM TRANSLATE, PICK or DEPTH.

Parameters:
act - Enum specifying chart action
Throws: IllegalArgumentException
If the action is not one of ROTATE, ZOOM, TRANSLATE, EDIT, PICK or DEPTH.

All Packages  Class Hierarchy  This Package  Previous  Next  Index