Changeset 155 in josm for src/org/openstreetmap/josm/Main.java
- Timestamp:
- 2006-10-08T17:29:58+02:00 (20 years ago)
- File:
-
- 1 edited
-
src/org/openstreetmap/josm/Main.java (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/Main.java
r154 r155 8 8 import java.awt.Toolkit; 9 9 import java.awt.event.ActionEvent; 10 import java.awt.event.KeyEvent; 10 11 import java.io.File; 11 12 import java.net.URI; … … 22 23 import javax.swing.AbstractAction; 23 24 import javax.swing.Action; 25 import javax.swing.JComponent; 24 26 import javax.swing.JMenu; 25 27 import javax.swing.JMenuBar; … … 28 30 import javax.swing.JSeparator; 29 31 import javax.swing.JToolBar; 30 import javax.swing. SwingUtilities;32 import javax.swing.KeyStroke; 31 33 import javax.swing.UIManager; 32 34 … … 37 39 import org.openstreetmap.josm.actions.ExternalToolsAction; 38 40 import org.openstreetmap.josm.actions.GpxExportAction; 41 import org.openstreetmap.josm.actions.HelpAction; 39 42 import org.openstreetmap.josm.actions.OpenAction; 40 43 import org.openstreetmap.josm.actions.PreferencesAction; … … 104 107 */ 105 108 public static PleaseWaitDialog pleaseWaitDlg; 109 /** 110 * The access to the help subsystem 111 */ 112 public HelpAction help; 106 113 107 114 … … 192 199 final Action exitAction = new ExitAction(); 193 200 final Action preferencesAction = new PreferencesAction(); 201 help = new HelpAction(); 194 202 final Action aboutAction = new AboutAction(); 195 203 … … 235 243 final JMenu helpMenu = new JMenu(tr("Help")); 236 244 helpMenu.setMnemonic('H'); 245 helpMenu.add(help); 246 helpMenu.add(aboutAction); 247 helpMenu.addSeparator(); 237 248 helpMenu.add(annotationTesterAction); 238 helpMenu.addSeparator();239 helpMenu.add(aboutAction);240 249 mainMenu.add(helpMenu); 241 250 … … 256 265 contentPane.add(toolBar, BorderLayout.NORTH); 257 266 267 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), "Help"); 268 contentPane.getActionMap().put("Help", help); 269 258 270 contentPane.updateUI(); 259 260 // Plugins 261 if (Main.pref.hasKey("plugins")) { 271 } 272 273 /** 274 * Load all plugins specified in preferences. Has to be called after the complete 275 * GUI has been set up. (post-constructor) 276 */ 277 public void loadPlugins() { 278 if (Main.pref.hasKey("plugins")) { 262 279 for (String pluginName : Main.pref.get("plugins").split(",")) { 263 280 try { … … 273 290 } 274 291 } 275 276 SwingUtilities.updateComponentTreeUI(parent); 277 for (DownloadTask task : downloadAction.downloadTasks) 278 task.getCheckBox().updateUI(); 279 } 292 } 280 293 281 294 /**
Note:
See TracChangeset
for help on using the changeset viewer.
