Package org.eclipse.gef.requests
Class SelectionRequest
- java.lang.Object
-
- org.eclipse.gef.Request
-
- org.eclipse.gef.requests.LocationRequest
-
- org.eclipse.gef.requests.SelectionRequest
-
public class SelectionRequest extends LocationRequest
A request to select an edit part.
-
-
Constructor Summary
Constructors Constructor Description SelectionRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLastButtonPressed()
Returns the last button that was pressed.int
getModifiers()
Returns the statemask for this request.boolean
isAltKeyPressed()
Returnstrue
if the ALT key is currently pressed.boolean
isAnyMouseButtonPressed()
Returnstrue
if any mouse button is currently pressed.boolean
isCommandKeyPressed()
Returnstrue
if the COMMAND key is currently pressed.boolean
isControlKeyPressed()
Returnstrue
if the CTRL key is currently pressed.boolean
isLeftMouseButtonPressed()
Returnstrue
if the left mouse button is pressed.boolean
isRightMouseButtonPressed()
Returnstrue
if the right mouse button is pressed.boolean
isShiftKeyPressed()
Returnstrue
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.-
Methods inherited from class org.eclipse.gef.requests.LocationRequest
getLocation, setLocation
-
Methods inherited from class org.eclipse.gef.Request
getExtendedData, getType, setExtendedData, setType
-
-
-
-
Method Detail
-
getLastButtonPressed
public int getLastButtonPressed()
Returns the last button that was pressed. This is useful if there is more than one mouse button pressed and the most recent button pressed needs to be identified.- Returns:
- the last button pressed
-
getModifiers
public int getModifiers()
Returns the statemask for this request.- Returns:
- the statemask
- Since:
- 3.7
-
isAltKeyPressed
public boolean isAltKeyPressed()
Returnstrue
if the ALT key is currently pressed.- Returns:
- whether the ALT key is pressed
-
isAnyMouseButtonPressed
public boolean isAnyMouseButtonPressed()
Returnstrue
if any mouse button is currently pressed.- Returns:
- whether any mouse button is pressed
-
isCommandKeyPressed
public boolean isCommandKeyPressed()
Returnstrue
if the COMMAND key is currently pressed.- Returns:
- whether the COMMAND key is pressed
- Since:
- 3.7
-
isControlKeyPressed
public boolean isControlKeyPressed()
Returnstrue
if the CTRL key is currently pressed.- Returns:
- whether the CTRL key is pressed
-
isLeftMouseButtonPressed
public boolean isLeftMouseButtonPressed()
Returnstrue
if the left mouse button is pressed.- Returns:
- whether the left mouse button is pressed
-
isRightMouseButtonPressed
public boolean isRightMouseButtonPressed()
Returnstrue
if the right mouse button is pressed.- Returns:
- whether the right mouse button is pressed
-
isShiftKeyPressed
public boolean isShiftKeyPressed()
Returnstrue
if the SHIFT key is currently pressed.- Returns:
- whether the SHIFT key is pressed
-
setModifiers
public void setModifiers(int mask)
Sets the statemask for this request.- Parameters:
mask
- the statemask
-
setLastButtonPressed
public void setLastButtonPressed(int button)
Sets the last mouse button that was pressed.- Parameters:
button
- the last button pressed
-
-