Package org.eclipse.gef.requests
Class SelectionRequest
java.lang.Object
org.eclipse.gef.Request
org.eclipse.gef.requests.LocationRequest
org.eclipse.gef.requests.SelectionRequest
A request to select an edit part.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the last button that was pressed.intReturns the statemask for this request.booleanReturnstrueif the ALT key is currently pressed.booleanReturnstrueif any mouse button is currently pressed.booleanReturnstrueif the COMMAND key is currently pressed.booleanReturnstrueif the CTRL key is currently pressed.booleanReturnstrueif the left mouse button is pressed.booleanReturnstrueif the right mouse button is pressed.booleanReturnstrueif the SHIFT key is currently pressed.voidsetLastButtonPressed(int button) Sets the last mouse button that was pressed.voidsetModifiers(int mask) Sets the statemask for this request.Methods inherited from class org.eclipse.gef.requests.LocationRequestgetLocation, setLocationMethods inherited from class org.eclipse.gef.RequestgetExtendedData, getType, setExtendedData, setType
- 
Constructor Details- 
SelectionRequestpublic SelectionRequest()
 
- 
- 
Method Details- 
getLastButtonPressedpublic 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
 
- 
getModifierspublic int getModifiers()Returns the statemask for this request.- Returns:
- the statemask
- Since:
- 3.7
 
- 
isAltKeyPressedpublic boolean isAltKeyPressed()Returnstrueif the ALT key is currently pressed.- Returns:
- whether the ALT key is pressed
 
- 
isAnyMouseButtonPressedpublic boolean isAnyMouseButtonPressed()Returnstrueif any mouse button is currently pressed.- Returns:
- whether any mouse button is pressed
 
- 
isCommandKeyPressedpublic boolean isCommandKeyPressed()Returnstrueif the COMMAND key is currently pressed.- Returns:
- whether the COMMAND key is pressed
- Since:
- 3.7
 
- 
isControlKeyPressedpublic boolean isControlKeyPressed()Returnstrueif the CTRL key is currently pressed.- Returns:
- whether the CTRL key is pressed
 
- 
isLeftMouseButtonPressedpublic boolean isLeftMouseButtonPressed()Returnstrueif the left mouse button is pressed.- Returns:
- whether the left mouse button is pressed
 
- 
isRightMouseButtonPressedpublic boolean isRightMouseButtonPressed()Returnstrueif the right mouse button is pressed.- Returns:
- whether the right mouse button is pressed
 
- 
isShiftKeyPressedpublic boolean isShiftKeyPressed()Returnstrueif the SHIFT key is currently pressed.- Returns:
- whether the SHIFT key is pressed
 
- 
setModifierspublic void setModifiers(int mask) Sets the statemask for this request.- Parameters:
- mask- the statemask
 
- 
setLastButtonPressedpublic void setLastButtonPressed(int button) Sets the last mouse button that was pressed.- Parameters:
- button- the last button pressed
 
 
-