Changeset 94 in josm for src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
- Timestamp:
- 2006-04-23T19:51:19+02:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r90 r94 13 13 import org.openstreetmap.josm.Main; 14 14 import org.openstreetmap.josm.actions.JosmAction; 15 import org.openstreetmap.josm.tools.ShortCutLabel; 15 16 16 17 /** … … 44 45 public ToggleDialogAction action; 45 46 46 /** 47 * Create a new ToggleDialog. 48 * @param title The title of the dialog. 49 * @param prefName Name of the base preference setting string (prefix) 50 */ 51 public ToggleDialog(String title, String name, String iconName, String tooltip, String shortCutName, int shortCut, final String prefName) { 52 action = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, "Alt-"+shortCutName, KeyStroke.getKeyStroke(shortCut, KeyEvent.ALT_MASK), prefName); 47 public ToggleDialog(String name, String iconName, String tooltip, int shortCut) { 48 action = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, ShortCutLabel.name(shortCut, KeyEvent.ALT_MASK), KeyStroke.getKeyStroke(shortCut, KeyEvent.ALT_MASK), iconName); 53 49 setLayout(new BorderLayout()); 54 add(new JLabel( title), BorderLayout.NORTH);50 add(new JLabel(name), BorderLayout.NORTH); 55 51 setVisible(false); 56 52 setBorder(BorderFactory.createEtchedBorder());
Note:
See TracChangeset
for help on using the changeset viewer.
