- Timestamp:
- 2020-05-27T11:16:39+02:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r15744 r16509 298 298 299 299 @Override 300 protected boolean listenToSelectionChange() { 301 return false; 302 } 303 304 @Override 300 305 protected void updateEnabledState() { 301 306 setEnabled(!info.isBlacklisted()); -
trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java
r15053 r16509 82 82 83 83 @Override 84 protected boolean listenToSelectionChange() { 85 return false; 86 } 87 88 @Override 84 89 protected void updateEnabledState() { 85 90 setEnabled(getLayerManager().getEditLayer() != null); -
trunk/src/org/openstreetmap/josm/actions/ChangesetManagerToggleAction.java
r16505 r16509 12 12 13 13 import org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager; 14 import org.openstreetmap.josm.tools.ImageProvider; 14 15 import org.openstreetmap.josm.tools.Shortcut; 15 16 … … 26 27 public ChangesetManagerToggleAction() { 27 28 super(tr("Changeset Manager"), 28 "dialogs/changeset/changesetmanager",29 new ImageProvider("dialogs/changeset/changesetmanager").setOptional(true), 29 30 tr("Toggle visibility of Changeset Manager window"), 30 31 Shortcut.registerShortcut("menu:windows:changesetdialog", 31 32 tr("Toggle visibility of Changeset Manager window"), 32 33 KeyEvent.VK_C, Shortcut.ALT_CTRL), 33 true /* register shortcut */ 34 true /* register shortcut */, null, false 34 35 ); 35 36 notifySelectedState(); 36 37 changesetCacheManagerClosedHandler = new ChangesetCacheManagerClosedHandler(); 37 38 setHelpId(ht("/Dialog/ChangesetManager")); 38 }39 40 @Override41 protected void installAdapters() {42 // do nothing43 39 } 44 40 -
trunk/src/org/openstreetmap/josm/actions/DeleteLayerAction.java
r14397 r16509 41 41 42 42 @Override 43 protected boolean listenToSelectionChange() { 44 return false; 45 } 46 47 @Override 43 48 protected void updateEnabledState() { 44 49 setEnabled(getLayerManager().getActiveLayer() != null); -
trunk/src/org/openstreetmap/josm/actions/DownloadAction.java
r14397 r16509 27 27 super(tr("Download data..."), "download", tr("Download map data from a server of your choice"), 28 28 Shortcut.registerShortcut("file:download", tr("File: {0}", tr("Download data")), KeyEvent.VK_DOWN, Shortcut.CTRL_SHIFT), 29 true );29 true, false); 30 30 setHelpId(ht("/Action/Download")); 31 31 } -
trunk/src/org/openstreetmap/josm/actions/DownloadNotesInViewAction.java
r14121 r16509 53 53 54 54 @Override 55 protected boolean listenToSelectionChange() { 56 return false; 57 } 58 59 @Override 55 60 protected void updateEnabledState() { 56 61 setEnabled(getLayerManager().getActiveLayer() != null -
trunk/src/org/openstreetmap/josm/actions/DownloadOsmInViewAction.java
r14121 r16509 41 41 42 42 @Override 43 protected boolean listenToSelectionChange() { 44 return false; 45 } 46 47 @Override 43 48 protected void updateEnabledState() { 44 49 setEnabled(getLayerManager().getActiveLayer() != null -
trunk/src/org/openstreetmap/josm/actions/DrawBoundariesOfDownloadedDataAction.java
r14648 r16509 28 28 29 29 @Override 30 protected boolean listenToSelectionChange() { 31 return false; 32 } 33 34 @Override 30 35 protected void updateEnabledState() { 31 36 setEnabled(MainApplication.getLayerManager().getEditLayer() != null); -
trunk/src/org/openstreetmap/josm/actions/ExpertToggleAction.java
r16138 r16509 9 9 import org.openstreetmap.josm.data.preferences.BooleanProperty; 10 10 import org.openstreetmap.josm.gui.MainApplication; 11 import org.openstreetmap.josm.tools.ImageProvider; 11 12 import org.openstreetmap.josm.tools.ListenerList; 12 13 … … 110 111 public ExpertToggleAction() { 111 112 super(tr("Expert Mode"), 112 "expert",113 new ImageProvider("expert").setOptional(true), 113 114 tr("Enable/disable expert mode"), 114 115 null, 115 false /* register toolbar */ 116 false /* register toolbar */, null, false 116 117 ); 117 118 setToolbarId("expertmode"); -
trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java
r16505 r16509 41 41 tr("Toggle fullscreen view"), 42 42 Shortcut.registerShortcut("menu:view:fullscreen", tr("Toggle fullscreen view"), KeyEvent.VK_F11, Shortcut.DIRECT), 43 false /* register */ 43 false /* register */, null, false 44 44 ); 45 45 setHelpId(ht("/Action/FullscreenView")); … … 49 49 setSelected(Config.getPref().getBoolean("draw.fullscreen", false)); 50 50 notifySelectedState(); 51 }52 53 @Override54 protected void installAdapters() {55 // not needed56 51 } 57 52 -
trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java
r14950 r16509 115 115 } 116 116 117 @Override 118 protected boolean listenToSelectionChange() { 119 return false; 120 } 121 117 122 /** 118 123 * Refreshes the enabled state -
trunk/src/org/openstreetmap/josm/actions/HelpAction.java
r14153 r16509 35 35 super(tr("Help"), "help", null, 36 36 shortcut ? Shortcut.registerShortcut("system:help", tr("Help"), KeyEvent.VK_F1, Shortcut.DIRECT) : null, 37 true );37 true, false); 38 38 setEnabled(!NetworkManager.isOffline(OnlineResource.JOSM_WEBSITE)); 39 39 } -
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r16365 r16509 154 154 155 155 /** 156 * Constructs a new {@code JosmAction} .156 * Constructs a new {@code JosmAction} and installs layer changed and selection changed adapters. 157 157 * 158 158 * Use this super constructor to setup your action. -
trunk/src/org/openstreetmap/josm/actions/JumpToAction.java
r16411 r16509 56 56 super(tr("Jump to Position"), (ImageProvider) null, tr("Opens a dialog that allows to jump to a specific location"), 57 57 Shortcut.registerShortcut("tools:jumpto", tr("Tool: {0}", tr("Jump to Position")), 58 KeyEvent.VK_J, Shortcut.CTRL), true, "action/jumpto", true); 58 KeyEvent.VK_J, Shortcut.CTRL), true, "action/jumpto", false); 59 // make this action listen to mapframe change events 60 MainApplication.addMapFrameListener((o, n) -> updateEnabledState()); 61 59 62 setHelpId(ht("/Action/JumpToPosition")); 60 63 } … … 242 245 setEnabled(MainApplication.isDisplayingMapView()); 243 246 } 244 245 @Override246 protected void installAdapters() {247 super.installAdapters();248 // make this action listen to mapframe change events249 MainApplication.addMapFrameListener((o, n) -> updateEnabledState());250 }251 247 } -
trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java
r15293 r16509 261 261 262 262 @Override 263 protected boolean listenToSelectionChange() { 264 return false; 265 } 266 267 @Override 263 268 protected void updateEnabledState() { 264 269 setEnabled(!getLayerManager().getLayers().isEmpty()); -
trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
r16069 r16509 149 149 public void actionPerformed(ActionEvent e) { 150 150 merge(getSourceLayer()); 151 } 152 153 @Override 154 protected boolean listenToSelectionChange() { 155 return false; 151 156 } 152 157 -
trunk/src/org/openstreetmap/josm/actions/ReorderImageryLayersAction.java
r15207 r16509 40 40 41 41 @Override 42 protected boolean listenToSelectionChange() { 43 return false; 44 } 45 46 @Override 42 47 protected void updateEnabledState() { 43 48 setEnabled(getNonOverlayImageryLayers().count() > 1); -
trunk/src/org/openstreetmap/josm/actions/ReportBugAction.java
r10062 r16509 32 32 super(tr("Report bug"), "bug", tr("Report a ticket to JOSM bugtracker"), 33 33 Shortcut.registerShortcut("reportbug", tr("Report a ticket to JOSM bugtracker"), 34 KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), true );34 KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), true, false); 35 35 this.text = text; 36 36 } -
trunk/src/org/openstreetmap/josm/actions/SaveAction.java
r15496 r16509 93 93 94 94 @Override 95 protected boolean listenToSelectionChange() { 96 return false; 97 } 98 99 @Override 95 100 protected void updateEnabledState() { 96 101 Layer activeLayer = getLayerManager().getActiveLayer(); -
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r15496 r16509 175 175 176 176 @Override 177 protected boolean listenToSelectionChange() { 178 return false; 179 } 180 181 @Override 177 182 protected void updateEnabledState() { 178 183 Layer activeLayer = getLayerManager().getActiveLayer(); -
trunk/src/org/openstreetmap/josm/actions/SearchNotesDownloadAction.java
r15011 r16509 35 35 /** Constructs a new note search action */ 36 36 public SearchNotesDownloadAction() { 37 super(tr("Search Notes..."), "note_search", tr("Download notes from the note search API"), null, false );37 super(tr("Search Notes..."), "note_search", tr("Download notes from the note search API"), null, false, false); 38 38 } 39 39 -
trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java
r14397 r16509 38 38 } 39 39 40 @Override 41 protected boolean listenToSelectionChange() { 42 return false; 43 } 44 40 45 /** 41 46 * Refreshes the enabled state -
trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequencesAction.java
r13434 r16509 35 35 } 36 36 37 @Override 38 protected boolean listenToSelectionChange() { 39 return false; 40 } 41 37 42 /** 38 43 * Update the enabled state of the action when something in -
trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java
r16438 r16509 63 63 */ 64 64 public SessionSaveAsAction() { 65 this(true, true); 65 this(true, false); 66 updateEnabledState(); 66 67 } 67 68 -
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r16438 r16509 64 64 tr("Show status report with useful information that can be attached to bugs"), 65 65 Shortcut.registerShortcut("help:showstatusreport", tr("Help: {0}", 66 tr("Show Status Report")), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), false);66 tr("Show Status Report")), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), true, "help/showstatusreport", false); 67 67 68 68 setHelpId(ht("/Action/ShowStatusReport")); 69 setToolbarId("help/showstatusreport");70 MainApplication.getToolbar().register(this);71 69 } 72 70 -
trunk/src/org/openstreetmap/josm/actions/TaggingPresetSearchAction.java
r16285 r16509 36 36 37 37 @Override 38 protected boolean listenToSelectionChange() { 39 return false; 40 } 41 42 @Override 38 43 protected void updateEnabledState() { 39 44 setEnabled(hasActiveDataLayer()); -
trunk/src/org/openstreetmap/josm/actions/UnselectAllAction.java
r14397 r16509 33 33 } 34 34 35 @Override 36 protected boolean listenToSelectionChange() { 37 return false; 38 } 39 35 40 /** 36 41 * Refreshes the enabled state -
trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java
r16438 r16509 40 40 true); 41 41 setHelpId(ht("/Action/UpdateData")); 42 } 43 44 @Override 45 protected boolean listenToSelectionChange() { 46 return false; 42 47 } 43 48 -
trunk/src/org/openstreetmap/josm/actions/UploadAction.java
r16438 r16509 147 147 148 148 @Override 149 protected boolean listenToSelectionChange() { 150 return false; 151 } 152 153 @Override 149 154 protected void updateEnabledState() { 150 155 OsmDataLayer editLayer = getLayerManager().getEditLayer(); -
trunk/src/org/openstreetmap/josm/actions/ViewportFollowToggleAction.java
r15708 r16509 55 55 56 56 @Override 57 protected boolean listenToSelectionChange() { 58 return false; 59 } 60 61 @Override 57 62 protected void updateEnabledState() { 58 63 setEnabled(getLayerManager().getEditDataSet() != null); -
trunk/src/org/openstreetmap/josm/actions/WireframeToggleAction.java
r16138 r16509 37 37 38 38 @Override 39 protected boolean listenToSelectionChange() { 40 return false; 41 } 42 43 @Override 39 44 protected void updateEnabledState() { 40 45 setEnabled(getLayerManager().getActiveData() != null); -
trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java
r14397 r16509 51 51 52 52 @Override 53 protected boolean listenToSelectionChange() { 54 return false; 55 } 56 57 @Override 53 58 protected void updateEnabledState() { 54 59 setEnabled(!getLayerManager().getLayers().isEmpty()); -
trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java
r14397 r16509 37 37 38 38 @Override 39 protected boolean listenToSelectionChange() { 40 return false; 41 } 42 43 @Override 39 44 protected void updateEnabledState() { 40 45 setEnabled(!getLayerManager().getLayers().isEmpty()); -
trunk/src/org/openstreetmap/josm/actions/audio/AbstractAudioAction.java
r12636 r16509 39 39 40 40 @Override 41 protected boolean listenToSelectionChange() { 42 return false; 43 } 44 45 @Override 41 46 protected void updateEnabledState() { 42 47 setEnabled(isAudioMarkerPresent()); -
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r16438 r16509 483 483 } 484 484 485 @Override 486 protected boolean listenToSelectionChange() { 487 return false; 488 } 489 485 490 /** 486 491 * Refreshes the enabled state -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java
r16438 r16509 64 64 65 65 @Override 66 protected boolean listenToSelectionChange() { 67 return false; 68 } 69 70 @Override 66 71 public void updateEnabledState() { 67 72 setEnabled(MainApplication.isDisplayingMapView()
Note:
See TracChangeset
for help on using the changeset viewer.