private String modifiersToString ( int modifiers ) { String result = "" ; if ( ( modifiers & InputEvent . SHIFT_MASK ) != 0 ) { result += "shift " ; } if ( ( modifiers & InputEvent . CTRL_MASK ) != 0 ) { result += "ctrl " ; } if ( ( modifiers & InputEvent . META_MASK ) != 0 ) { result += "meta " ; } if ( ( modifiers & InputEvent . ALT_MASK ) != 0 ) { result += "alt " ; } if ( ( modifiers & InputEvent . ALT_GRAPH_MASK ) != 0 ) { result += "altGraph " ; } return result ; }
Converts the modifiers to a specification string for KeyStroke .