- Timestamp:
- 2014-11-25T22:14:29+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DialogsToggleAction.java
r6327 r7746 8 8 import java.awt.event.KeyEvent; 9 9 10 import javax.swing.Icon;11 12 10 import org.openstreetmap.josm.Main; 11 import org.openstreetmap.josm.tools.ImageProvider; 13 12 import org.openstreetmap.josm.tools.Shortcut; 14 13 … … 25 24 public DialogsToggleAction() { 26 25 super(tr("Toggle dialogs panel"), 27 (I con) null, /* no icon */26 (ImageProvider) null, /* no icon */ 28 27 tr("Toggle dialogs panel, maximize mapview"), 29 28 Shortcut.registerShortcut("menu:view:dialogspanel", tr("Toggle dialogs panel"),KeyEvent.VK_TAB, Shortcut.DIRECT), -
trunk/src/org/openstreetmap/josm/actions/ToggleAction.java
r7005 r7746 7 7 8 8 import javax.swing.ButtonModel; 9 import javax.swing.Icon;10 9 import javax.swing.JCheckBox; 11 10 import javax.swing.JCheckBoxMenuItem; … … 15 14 16 15 import org.openstreetmap.josm.Main; 16 import org.openstreetmap.josm.tools.ImageProvider; 17 17 import org.openstreetmap.josm.tools.Shortcut; 18 18 … … 40 40 * @param installAdapters false, if you don't want to install layer changed and selection changed adapters 41 41 */ 42 public ToggleAction(String name, I conicon, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdapters) {42 public ToggleAction(String name, ImageProvider icon, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdapters) { 43 43 super(name, icon, tooltip, shortcut, registerInToolbar, toolbarId, installAdapters); 44 44 // It is required to set the SELECTED_KEY to a non-null value in order to let Swing components update it … … 82 82 } 83 83 } 84 84 85 85 /** 86 86 * Adds a button model … … 103 103 } 104 104 } 105 105 106 106 protected void notifySelectedState() { 107 107 boolean selected = isSelected(); … … 121 121 */ 122 122 protected final void toggleSelectedState(ActionEvent e) { 123 if (e == null || !(e.getSource() instanceof JToggleButton || 124 e.getSource() instanceof JCheckBox || 125 e.getSource() instanceof JRadioButton || 126 e.getSource() instanceof JCheckBoxMenuItem || 127 e.getSource() instanceof JRadioButtonMenuItem 123 if (e == null || !(e.getSource() instanceof JToggleButton || 124 e.getSource() instanceof JCheckBox || 125 e.getSource() instanceof JRadioButton || 126 e.getSource() instanceof JCheckBoxMenuItem || 127 e.getSource() instanceof JRadioButtonMenuItem 128 128 )) { 129 129 setSelected(!isSelected());
Note:
See TracChangeset
for help on using the changeset viewer.