/** * Sets a mnemomic for the specified button. * * @param b button * @param mnem mnemonics that have already been assigned */ public static void setMnemonic(final AbstractButton b, final StringBuilder mnem) { // do not set mnemonics for Mac! Alt+key used for special characters. if (Prop.MAC) return; // find and assign unused mnemomic final String label = b.getText(); final int ll = label.length(); for (int l = 0; l < ll; l++) { final char ch = Character.toLowerCase(label.charAt(l)); if (!letter(ch) || mnem.indexOf(Character.toString(ch)) != -1) continue; b.setMnemonic(ch); mnem.append(ch); break; } }
@Override public void refresh(final GUI main, final AbstractButton button) { button.setEnabled(text.marked()); }
@Override public void refresh(final GUI main, final AbstractButton button) { button.setEnabled(clip() != null); }
@Override public void refresh(final GUI main, final AbstractButton button) { button.setEnabled(!undo.last()); }