/**
* Creates nice textual representation of KeyStroke.
* Modifiers and an actual key label are concated by plus signs
* @param the KeyStroke to get description of
* @return String describing the KeyStroke
*/
public static String keyStrokeToString( KeyStroke stroke ) {
String modifText = KeyEvent.getKeyModifiersText( stroke.getModifiers() );
String keyText = (stroke.getKeyCode() == KeyEvent.VK_UNDEFINED) ?
String.valueOf(stroke.getKeyChar()) : getKeyText(stroke.getKeyCode());
if( modifText.length() > 0 ) return modifText + '+' + keyText;
else return keyText;
}
Utilities.java 文件源码
java
阅读 40
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录