- Timestamp:
- 2013-06-24T17:32:19+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r5965 r6020 10 10 import java.awt.Font; 11 11 import java.awt.GridBagLayout; 12 import java.awt.KeyboardFocusManager;13 12 import java.awt.Rectangle; 14 13 import java.awt.event.ActionEvent; … … 19 18 import java.util.Collection; 20 19 import java.util.HashMap; 21 import java.util.HashSet;22 20 import java.util.List; 23 21 import java.util.Map; … … 76 74 import org.openstreetmap.josm.tools.Destroyable; 77 75 import org.openstreetmap.josm.tools.GBC; 76 import org.openstreetmap.josm.tools.Shortcut; 78 77 79 78 … … 145 144 private final DialogsPanel dialogsPanel; 146 145 146 private final boolean unregisterTab; 147 147 148 /** 148 149 * Default width of the toggle dialog area. … … 237 238 statusLine = new MapStatus(this); 238 239 MapView.addLayerChangeListener(this); 240 241 unregisterTab = Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null; 242 if (unregisterTab) { 243 for (JComponent c: allDialogButtons) c.setFocusTraversalKeysEnabled(false); 244 for (JComponent c: allMapModeButtons) c.setFocusTraversalKeysEnabled(false); 245 } 239 246 } 240 247 … … 404 411 toolBarActions.setInheritsPopupMenu(true); 405 412 sideToolBar.add(toolBarActions); 406 listAllMapModesButton.setAlignmentX(0.5f);407 listAllMapModesButton.setBorder(null);408 listAllMapModesButton.setFont(listAllMapModesButton.getFont().deriveFont(Font.PLAIN));413 listAllMapModesButton.setAlignmentX(0.5f); 414 listAllMapModesButton.setBorder(null); 415 listAllMapModesButton.setFont(listAllMapModesButton.getFont().deriveFont(Font.PLAIN)); 409 416 listAllMapModesButton.setInheritsPopupMenu(true); 410 417 sideToolBar.add(listAllMapModesButton); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r6019 r6020 6 6 import java.awt.AlphaComposite; 7 7 import java.awt.Color; 8 8 9 import java.awt.Dimension; 9 10 import java.awt.Graphics; … … 229 230 public MapView(final JPanel contentPane, final ViewportData viewportData) { 230 231 Main.pref.addPreferenceChangeListener(this); 232 final boolean unregisterTab = Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null; 231 233 232 234 addComponentListener(new ComponentAdapter(){ … … 237 239 add(zoomSlider); 238 240 zoomSlider.setBounds(3, 0, 114, 30); 241 zoomSlider.setFocusTraversalKeysEnabled(!unregisterTab); 239 242 240 243 MapScaler scaler = new MapScaler(MapView.this); … … 277 280 }); 278 281 279 if (Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null) 280 { 282 if (Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null) { 281 283 setFocusTraversalKeysEnabled(false); 282 284 } -
trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
r5979 r6020 1024 1024 control.removeAll(); 1025 1025 buttonActions.clear(); 1026 boolean unregisterTab = Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null; 1026 1027 1027 1028 for (ActionDefinition action : getDefinedActions()) { … … 1048 1049 } 1049 1050 b.setInheritsPopupMenu(true); 1050 } 1051 } 1051 b.setFocusTraversalKeysEnabled(!unregisterTab); 1052 } 1053 } 1054 control.setFocusTraversalKeysEnabled(!unregisterTab); 1052 1055 control.setVisible(control.getComponentCount() != 0); 1053 1056 }
Note:
See TracChangeset
for help on using the changeset viewer.