public class SelectionRequest extends LocationRequest
Constructor and Description |
---|
SelectionRequest() |
Modifier and Type | Method and Description |
---|---|
int |
getLastButtonPressed()
Returns the last button that was pressed.
|
int |
getModifiers()
Returns the statemask for this request.
|
boolean |
isAltKeyPressed()
Returns
true if the ALT key is currently pressed. |
boolean |
isAnyMouseButtonPressed()
Returns
true if any mouse button is currently pressed. |
boolean |
isCommandKeyPressed()
Returns
true if the COMMAND key is currently pressed. |
boolean |
isControlKeyPressed()
Returns
true if the CTRL key is currently pressed. |
boolean |
isLeftMouseButtonPressed()
Returns
true if the left mouse button is pressed. |
boolean |
isRightMouseButtonPressed()
Returns
true if the right mouse button is pressed. |
boolean |
isShiftKeyPressed()
Returns
true if the SHIFT key is currently pressed. |
void |
setLastButtonPressed(int button)
Sets the last mouse button that was pressed.
|
void |
setModifiers(int mask)
Sets the statemask for this request.
|
getLocation, setLocation
getExtendedData, getType, setExtendedData, setType
public int getLastButtonPressed()
public int getModifiers()
public boolean isAltKeyPressed()
true
if the ALT key is currently pressed.public boolean isAnyMouseButtonPressed()
true
if any mouse button is currently pressed.public boolean isCommandKeyPressed()
true
if the COMMAND key is currently pressed.public boolean isControlKeyPressed()
true
if the CTRL key is currently pressed.public boolean isLeftMouseButtonPressed()
true
if the left mouse button is pressed.public boolean isRightMouseButtonPressed()
true
if the right mouse button is pressed.public boolean isShiftKeyPressed()
true
if the SHIFT key is currently pressed.public void setModifiers(int mask)
mask
- the statemaskpublic void setLastButtonPressed(int button)
button
- the last button pressedCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.