if (acceleratorText.length() > 0) {
s += ", " + acceleratorText;
}
}
else if (shortcut instanceof MouseShortcut) {
MouseShortcut mouseShortcut = (MouseShortcut)shortcut;
s = getMouseShortcutText(mouseShortcut.getButton(), mouseShortcut.getModifiers(), mouseShortcut.getClickCount());
}
else {
throw new IllegalArgumentException("unknown shortcut class: " + shortcut);
}
return s;