|
Eclipse GEF 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gef.util.FlagSupport
org.eclipse.gef.tools.AbstractTool.Input
Allows the user to access mouse and keyboard input.
| Constructor Summary | |
AbstractTool.Input()
|
|
| Method Summary | |
protected int |
getModifiers()
Returns the event modifiers. |
Point |
getMouseLocation()
Returns the current location of the mouse. |
boolean |
isAltKeyDown()
Returns true if the ALT key is pressed. |
boolean |
isAnyButtonDown()
Returns true if any of the mouse buttons are pressed. |
boolean |
isControlKeyDown()
Returns true if the CTRL key is pressed. |
boolean |
isModKeyDown(int mod)
Returns true if any of the given mod keys are pressed. |
boolean |
isMouseButtonDown(int which)
Returns true if the specified button is down. |
boolean |
isShiftKeyDown()
Returns true if the SHIFT key is pressed. |
void |
setInput(KeyEvent ke)
Sets the keyboard input based on the KeyEvent. |
void |
setMouseButton(int which,
boolean state)
Sets mouse button # which to be pressed if state is true. |
| Methods inherited from class org.eclipse.gef.util.FlagSupport |
getFlag, setFlag |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractTool.Input()
| Method Detail |
protected int getModifiers()
MouseEvent#stateMask,
and include things like the mouse buttons and keyboard modifier keys.
public Point getMouseLocation()
public boolean isAltKeyDown()
true if the ALT key is pressed.
true if the ALT key is pressedpublic boolean isAnyButtonDown()
true if any of the mouse buttons are pressed.
true if any of the mouse buttons are pressedpublic boolean isControlKeyDown()
true if the CTRL key is pressed.
true of CTRL pressedpublic boolean isModKeyDown(int mod)
true if any of the given mod keys are pressed.
mod - SWT.MOD1, SWT.MOD2, SWT.MOD3, SWT.MOD4 or any combination thereof
true if the given mod key is pressedpublic boolean isMouseButtonDown(int which)
true if the specified button is down.
which - which button
true if the button is downpublic boolean isShiftKeyDown()
true if the SHIFT key is pressed.
true if SHIFT pressedpublic void setInput(KeyEvent ke)
ke - the key event providing the input
public void setMouseButton(int which,
boolean state)
which to be pressed if state is true.
which - which buttonstate - true if button down
|
Eclipse GEF 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||