Changeset 6398 in josm
- Timestamp:
- 2013-11-20T23:12:02+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JumpToAction.java
r6394 r6398 8 8 import java.awt.event.ActionEvent; 9 9 import java.awt.event.KeyEvent; 10 10 11 import javax.swing.Icon; 11 12 12 import javax.swing.JLabel; 13 13 import javax.swing.JOptionPane; … … 19 19 import org.openstreetmap.josm.data.Bounds; 20 20 import org.openstreetmap.josm.data.coor.LatLon; 21 import org.openstreetmap.josm.gui.MapFrame; 22 import org.openstreetmap.josm.gui.MapFrameListener; 21 23 import org.openstreetmap.josm.gui.MapView; 22 24 import org.openstreetmap.josm.gui.widgets.JosmTextField; 23 25 import org.openstreetmap.josm.tools.GBC; 24 26 import org.openstreetmap.josm.tools.OsmUrlToBounds; 25 27 import org.openstreetmap.josm.tools.Shortcut; 26 import org.openstreetmap.josm.gui.widgets.JosmTextField;27 28 28 29 /** … … 36 37 */ 37 38 public JumpToAction() { 38 super(tr("Jump To Position"), (Icon) null, tr("Opens a dialog that allows to jump to a specific location"), Shortcut.registerShortcut("tools:jumpto", tr("Tool: {0}", tr("Jump To Position")), 39 KeyEvent.VK_J, Shortcut.CTRL), true, "action/jumpto", false); 39 super(tr("Jump To Position"), (Icon) null, tr("Opens a dialog that allows to jump to a specific location"), 40 Shortcut.registerShortcut("tools:jumpto", tr("Tool: {0}", tr("Jump To Position")), 41 KeyEvent.VK_J, Shortcut.CTRL), true, "action/jumpto", true); 40 42 } 41 43 … … 185 187 showJumpToDialog(); 186 188 } 189 190 @Override 191 protected void updateEnabledState() { 192 setEnabled(Main.isDisplayingMapView()); 193 } 194 195 @Override 196 protected void installAdapters() { 197 super.installAdapters(); 198 // make this action listen to mapframe change events 199 Main.addMapFrameListener(new MapFrameListener() { 200 @Override 201 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 202 updateEnabledState(); 203 } 204 }); 205 } 187 206 } -
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r6394 r6398 212 212 213 213 /* Tools menu */ 214 /** Tools -> Split Way */ 214 215 public final JosmAction splitWay = new SplitWayAction(); 216 /** Tools -> Combine Way */ 215 217 public final JosmAction combineWay = new CombineWayAction(); 218 /** Tools -> Reverse Ways */ 216 219 public final JosmAction reverseWay = new ReverseWayAction(); 220 /** Tools -> Simplify Way */ 217 221 public final JosmAction simplifyWay = new SimplifyWayAction(); 222 /** Tools -> Align Nodes in Circle */ 218 223 public final JosmAction alignInCircle = new AlignInCircleAction(); 224 /** Tools -> Align Nodes in Line */ 219 225 public final JosmAction alignInLine = new AlignInLineAction(); 226 /** Tools -> Distribute Nodes */ 220 227 public final JosmAction distribute = new DistributeAction(); 228 /** Tools -> Orthogonalize Shape */ 221 229 public final OrthogonalizeAction ortho = new OrthogonalizeAction(); 222 public final JosmAction orthoUndo = new Undo(); // action is not shown in the menu. Only triggered by shortcut 230 /** Orthogonalize undo. Action is not shown in the menu. Only triggered by shortcut */ 231 public final JosmAction orthoUndo = new Undo(); 232 /** Tools -> Mirror */ 223 233 public final JosmAction mirror = new MirrorAction(); 234 /** Tools -> Follow line */ 224 235 public final JosmAction followLine = new FollowLineAction(); 236 /** Tools -> Add Node... */ 225 237 public final AddNodeAction addnode = new AddNodeAction(); 238 /** Tools -> Move Node... */ 226 239 public final MoveNodeAction movenode = new MoveNodeAction(); 240 /** Tools -> Create Circle */ 227 241 public final JosmAction createCircle = new CreateCircleAction(); 242 /** Tools -> Merge Nodes */ 228 243 public final JosmAction mergeNodes = new MergeNodesAction(); 244 /** Tools -> Join Node to Way */ 229 245 public final JosmAction joinNodeWay = new JoinNodeWayAction(); 246 /** Tools -> Disconnect Node from Way */ 230 247 public final JosmAction unJoinNodeWay = new UnJoinNodeWayAction(); 248 /** Tools -> Unglue Ways */ 231 249 public final JosmAction unglueNodes = new UnGlueAction(); 250 /** Tools -> Join overlapping Areas */ 232 251 public final JosmAction joinAreas = new JoinAreasAction(); 252 /** Tools -> Create multipolygon */ 233 253 public final JosmAction createMultipolygon = new CreateMultipolygonAction(); 234 254 … … 240 260 241 261 /* Audio menu */ 262 /** Audio -> Play/Pause */ 242 263 public final JosmAction audioPlayPause = new AudioPlayPauseAction(); 264 /** Audio -> Next marker */ 243 265 public final JosmAction audioNext = new AudioNextAction(); 266 /** Audio -> Previous Marker */ 244 267 public final JosmAction audioPrev = new AudioPrevAction(); 268 /** Audio -> Forward */ 245 269 public final JosmAction audioFwd = new AudioFwdAction(); 270 /** Audio -> Back */ 246 271 public final JosmAction audioBack = new AudioBackAction(); 272 /** Audio -> Faster */ 247 273 public final JosmAction audioFaster = new AudioFasterAction(); 274 /** Audio -> Slower */ 248 275 public final JosmAction audioSlower = new AudioSlowerAction(); 249 276 … … 650 677 viewMenu.add(dialogsToggle); 651 678 652 viewMenu.addSeparator(); 653 add(viewMenu, jumpToAct); 679 add(viewMenu, jumpToAct, true); 654 680 viewMenu.addSeparator(); 655 681 add(viewMenu, info);
Note:
See TracChangeset
for help on using the changeset viewer.