[ http://jira.springframework.org/browse/RCP-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lieven Doclo resolved RCP-129.
------------------------------
Assignee: Lieven Doclo
Resolution: Fixed
> Modifier util methods in ActionCommand
> --------------------------------------
>
> Key: RCP-129
> URL: http://jira.springframework.org/browse/RCP-129
> Project: Spring Rich Client Project
> Issue Type: Improvement
> Reporter: Peter De Bruycker
> Assignee: Lieven Doclo
> Priority: Trivial
> Fix For: 1.1.0
>
>
> These methods should be added for easier modifier key detection
> {code}
> /**
> * Returns <code>true</code> if the shift key was down when invoking this
> * <code>ActionCommand</code>.
> * @return <code>true</code> if the shift key was down, <code>false</code>
> * otherwise
> */
> protected boolean isShiftDown() {
> return (getModifiers() & ActionEvent.SHIFT_MASK) != 0;
> }
>
> /**
> * Returns <code>true</code> if the control key was down when invoking this
> * <code>ActionCommand</code>.
> * @return <code>true</code> if the control key was down, <code>false</code>
> * otherwise
> */
> protected boolean isControlDown() {
> return (getModifiers() & ActionEvent.CTRL_MASK) != 0;
> }
>
> /**
> * Returns <code>true</code> if the meta key was down when invoking this
> * <code>ActionCommand</code>.
> * @return <code>true</code> if the meta key was down, <code>false</code>
> * otherwise
> */
> protected boolean isMetaDown() {
> return (getModifiers() & ActionEvent.META_MASK) != 0;
> }
>
> /**
> * Returns <code>true</code> if the alt key was down when invoking this
> * <code>ActionCommand</code>.
> * @return <code>true</code> if the alt key was down, <code>false</code>
> * otherwise
> */
> protected boolean isAltDown() {
> return (getModifiers() & ActionEvent.ALT_MASK) != 0;
> }
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|