Ignore:
Timestamp:
2008-12-03T18:41:48+01:00 (16 years ago)
Author:
stoecker
Message:

fixed 3 shortcut conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r1084 r1102  
    1010import java.util.Map;
    1111import java.util.Collection;
     12import javax.swing.AbstractButton;
    1213import javax.swing.KeyStroke;
    1314import javax.swing.JMenu;
     
    178179        }
    179180    }
     181    /**
     182     * use this to set a buttons's mnemonic
     183     */
     184    public void setMnemonic(AbstractButton button) {
     185        if (requestedGroup == GROUP_MNEMONIC && assignedModifier == groups.get(requestedGroup + GROUPS_DEFAULT) && getKeyStroke() != null && KeyEvent.getKeyText(assignedKey).length() == 1) {
     186            button.setMnemonic(KeyEvent.getKeyText(assignedKey).charAt(0)); //getKeyStroke().getKeyChar() seems not to work here
     187        }
     188    }
    180189
    181190    /**
Note: See TracChangeset for help on using the changeset viewer.