|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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 3 mouse buttons are pressed. |
boolean |
isControlKeyDown()
Returns true if the CTRL key is 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(MouseEvent me)
Sets the mouse and keyboard input based on the MouseEvent. |
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 3 mouse buttons are pressed.
true
if any of the 3 mouse buttons are pressedpublic boolean isControlKeyDown()
true
if the CTRL key is pressed.
true
of CTRL 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 setMouseButton(int which, boolean state)
which
to be pressed if state
is true.
which
- which buttonstate
- true
if button downpublic void setInput(MouseEvent me)
me
- the mouse event providing the input
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |