Changeset 2530 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-11-28T14:06:35+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r2373 r2530 3 3 package org.openstreetmap.josm.gui; 4 4 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 import static org.openstreetmap.josm.tools.I18n.marktr; 6 7 import static org.openstreetmap.josm.tools.I18n.tr; … … 25 26 import org.openstreetmap.josm.actions.AlignInLineAction; 26 27 import org.openstreetmap.josm.actions.AutoScaleAction; 28 import org.openstreetmap.josm.actions.CloseChangesetAction; 27 29 import org.openstreetmap.josm.actions.CombineWayAction; 28 30 import org.openstreetmap.josm.actions.CopyAction; … … 58 60 import org.openstreetmap.josm.actions.ShowStatusReportAction; 59 61 import org.openstreetmap.josm.actions.SplitWayAction; 60 import org.openstreetmap.josm.actions.CloseChangesetAction;61 62 import org.openstreetmap.josm.actions.ToggleGPXLinesAction; 62 63 import org.openstreetmap.josm.actions.UnGlueAction; … … 67 68 import org.openstreetmap.josm.actions.UploadAction; 68 69 import org.openstreetmap.josm.actions.UploadSelectionAction; 70 import org.openstreetmap.josm.actions.WireframeToggleAction; 69 71 import org.openstreetmap.josm.actions.ZoomInAction; 70 72 import org.openstreetmap.josm.actions.ZoomOutAction; … … 81 83 import org.openstreetmap.josm.tools.PlatformHookUnixoid; 82 84 import org.openstreetmap.josm.tools.Shortcut; 83 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;84 85 /** 85 86 * This is the JOSM main menu bar. It is overwritten to initialize itself and provide all menu … … 237 238 add(editMenu, preferences); 238 239 239 // TODO move code to an "action" like the others? 240 final JCheckBoxMenuItem wireframe = new JCheckBoxMenuItem(tr("Wireframe View")); 241 wireframe.setSelected(Main.pref.getBoolean("draw.wireframe", false)); 242 wireframe.setAccelerator(Shortcut.registerShortcut("menu:view:wireframe", tr("Toggle Wireframe view"), 243 KeyEvent.VK_W, Shortcut.GROUP_MENU).getKeyStroke()); 244 wireframe.addActionListener(new ActionListener() { 245 public void actionPerformed(ActionEvent ev) { 246 Main.pref.put("draw.wireframe", wireframe.isSelected()); 247 if (Main.map != null) { 248 Main.map.mapView.repaint(); 249 } 250 } 251 }); 240 // -- wireframe toggle action 241 WireframeToggleAction wireFrameToggleAction = new WireframeToggleAction(); 242 final JCheckBoxMenuItem wireframe = new JCheckBoxMenuItem(wireFrameToggleAction); 252 243 viewMenu.add(wireframe); 244 wireframe.setAccelerator(wireFrameToggleAction.getShortcut().getKeyStroke()); 245 wireFrameToggleAction.addButtonModel(wireframe.getModel()); 246 253 247 viewMenu.addSeparator(); 254 248 add(viewMenu, new ZoomInAction());
Note:
See TracChangeset
for help on using the changeset viewer.