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.
|
-
DEPTH
-
-
EDIT
-
-
PICK
-
-
ROTATE
-
-
TRANSLATE
-
-
ZOOM
-
-
EventTrigger(int, int)
- A public constructor that creates a mapping from a series of
modifiers to a Chart action.
-
getAction()
- Gets the value of the Action property for this EventTrigger instance.
-
getModifiers()
- Gets the value of the Modifiers property for this EventTrigger
instance.
-
setAction(int)
- Sets the value of the action property for this EventTrigger instance.
-
setModifiers(int)
- Sets the value of the modifiers property for this EventTrigger
instance.
ROTATE
public final static int ROTATE
ZOOM
public final static int ZOOM
TRANSLATE
public final static int TRANSLATE
EDIT
public final static int EDIT
PICK
public final static int PICK
DEPTH
public final static int DEPTH
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.
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
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
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
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