public static KeyStroke getKeyStroke ( String key ) throws NoSuchElementException { key = key . toUpperCase ( ) ; int _sep = key . indexOf ( "/" ) ; String _mask = key . substring ( 0 , _sep ) ; String _keyCode = key . substring ( _sep + 1 ) ; Integer _m = theMaskTable . get ( _mask ) ; Integer _t = theKeyTable . get ( _keyCode ) ; if ( null == _m || null == _t ) { throw new NoSuchElementException ( key ) ; } return ( KeyStroke . getKeyStroke ( _t . intValue ( ) , _m . intValue ( ) ) ) ; }
Return a KeyStroke corresponding to the given code .