- Timestamp:
- 2009-11-28T16:01:05+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
r2530 r2533 7 7 import static org.openstreetmap.josm.tools.I18n.tr; 8 8 9 import java.awt.Frame;10 import java.awt.GraphicsDevice;11 import java.awt.GraphicsEnvironment;12 9 import java.awt.event.ActionEvent; 13 10 import java.awt.event.ActionListener; … … 69 66 import org.openstreetmap.josm.actions.UploadSelectionAction; 70 67 import org.openstreetmap.josm.actions.WireframeToggleAction; 68 import org.openstreetmap.josm.actions.FullscreenToggleAction; 71 69 import org.openstreetmap.josm.actions.ZoomInAction; 72 70 import org.openstreetmap.josm.actions.ZoomOutAction; … … 81 79 import org.openstreetmap.josm.gui.layer.Layer; 82 80 import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener; 83 import org.openstreetmap.josm.tools.PlatformHookUnixoid;84 81 import org.openstreetmap.josm.tools.Shortcut; 85 82 /** … … 254 251 } 255 252 256 // 257 // Full Screen action 258 // 259 final GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); 260 261 if (Main.platform instanceof PlatformHookUnixoid && gd.isFullScreenSupported()) { 262 final JCheckBoxMenuItem fullscreen = new JCheckBoxMenuItem(tr("Full Screen")); 263 fullscreen.setSelected(Main.pref.getBoolean("draw.fullscreen", false)); 264 fullscreen.setAccelerator(Shortcut.registerShortcut("menu:view:fullscreen", tr("Toggle Full Screen view"), 265 KeyEvent.VK_F11, Shortcut.GROUP_DIRECT).getKeyStroke()); 266 267 fullscreen.addActionListener(new ActionListener() { 268 public void actionPerformed(ActionEvent ev) { 269 Main.pref.put("draw.fullscreen", fullscreen.isSelected()); 270 271 if (Main.pref.getBoolean("draw.fullscreen")) { 272 Frame frame = (Frame)Main.parent; 273 gd.setFullScreenWindow(frame); 274 } else { 275 gd.setFullScreenWindow(null); 276 } 277 } 278 }); 253 // -- fullscreen toggle action 254 FullscreenToggleAction fullscreenToggleAction = new FullscreenToggleAction(); 255 if (fullscreenToggleAction.canFullscreen()) { 256 final JCheckBoxMenuItem fullscreen = new JCheckBoxMenuItem(fullscreenToggleAction); 279 257 viewMenu.addSeparator(); 280 258 viewMenu.add(fullscreen); 259 fullscreen.setAccelerator(fullscreenToggleAction.getShortcut().getKeyStroke()); 260 fullscreenToggleAction.addButtonModel(fullscreen.getModel()); 281 261 } 282 262
Note:
See TracChangeset
for help on using the changeset viewer.