|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object diva.canvas.event.MouseFilter diva.canvas.event.ExtendedMouseFilter
public class ExtendedMouseFilter
A class that accepts mouse events. Instances of this class are used by event-handling code to decide whether they are interested in a particular event. This class supports the extended event mechanism in jdk1.4, which allows proper distinction between ALT and Button2 and Meta and Button3.
Field Summary | |
---|---|
private int |
_button
The mouse button mask |
private int |
_modifierFlags
The modifier flags, after masking |
private int |
_modifierMask
The modifier mask |
private int |
_pressNumber
The button press to trap, or -1 if the button press number is not important, in which events will not be filtered based on press number. |
static MouseFilter |
alternateSelectionFilter
The alternate selection filter -- accepts button 1 with shift. |
static MouseFilter |
defaultFilter
The default mouse filter -- accepts button 1 with no modifiers. |
static MouseFilter |
selectionFilter
The default selection filter -- accepts button 1 with no modifiers. |
Constructor Summary | |
---|---|
ExtendedMouseFilter(int button)
Construct a mouse filter that responds to the given mouse buttons and modifier keys. |
|
ExtendedMouseFilter(int button,
int extendedModifiers)
Construct a mouse filter that responds to the given mouse buttons and modifier keys. |
|
ExtendedMouseFilter(int button,
int extendedModifiers,
int mask)
Construct a mouse filter that responds to the given mouse buttons and modifier keys. |
|
ExtendedMouseFilter(int button,
int extendedModifiers,
int mask,
int pressNumber)
Construct a mouse filter that responds to the given mouse buttons and modifier keys. |
Method Summary | |
---|---|
boolean |
accept(java.awt.event.MouseEvent event)
Test whether the given MouseEvent passes the filter. |
java.lang.String |
toString()
Print a useful description of the mouse filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final MouseFilter defaultFilter
public static final MouseFilter selectionFilter
public static final MouseFilter alternateSelectionFilter
private int _button
private int _modifierMask
private int _modifierFlags
private int _pressNumber
Constructor Detail |
---|
public ExtendedMouseFilter(int button)
public ExtendedMouseFilter(int button, int extendedModifiers)
public ExtendedMouseFilter(int button, int extendedModifiers, int mask)
public ExtendedMouseFilter(int button, int extendedModifiers, int mask, int pressNumber)
Method Detail |
---|
public boolean accept(java.awt.event.MouseEvent event)
accept
in class MouseFilter
public java.lang.String toString()
toString
in class MouseFilter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |