Changeset 16138 in josm for trunk/src/org
- Timestamp:
- 2020-03-15T19:15:04+01:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CopyCoordinatesAction.java
r13434 r16138 29 29 KeyEvent.VK_C, Shortcut.CTRL_SHIFT), 30 30 false); 31 putValue("toolbar","copy/coordinates");31 setToolbarId("copy/coordinates"); 32 32 } 33 33 -
trunk/src/org/openstreetmap/josm/actions/ExpertToggleAction.java
r15649 r16138 115 115 false /* register toolbar */ 116 116 ); 117 putValue("toolbar","expertmode");117 setToolbarId("expertmode"); 118 118 if (MainApplication.getToolbar() != null) { 119 119 MainApplication.getToolbar().register(this); -
trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java
r14397 r16138 44 44 ); 45 45 setHelpId(ht("/Action/FullscreenView")); 46 putValue("toolbar","fullscreen");46 setToolbarId("fullscreen"); 47 47 MainApplication.getToolbar().register(this); 48 48 gd = GraphicsEnvironment.isHeadless() ? null : GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); -
trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java
r16123 r16138 36 36 tr("History"), KeyEvent.VK_H, Shortcut.CTRL), false); 37 37 setHelpId(ht("/Action/ObjectHistory")); 38 putValue("toolbar","action/historyinfo");38 setToolbarId("action/historyinfo"); 39 39 MainApplication.getToolbar().register(this); 40 40 setEnabled(true); -
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r15588 r16138 24 24 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil; 25 25 import org.openstreetmap.josm.gui.MainApplication; 26 import org.openstreetmap.josm.gui.help.HelpUtil; 26 27 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; 27 28 import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener; … … 75 76 * the user CANNOT configure a shortcut for your action. 76 77 * @param registerInToolbar register this action for the toolbar preferences? 77 * @param toolbarId identifier for the toolbar preferences . The iconName is used, if this parameter is null78 * @param toolbarId identifier for the toolbar preferences 78 79 * @param installAdapters false, if you don't want to install layer changed and selection changed adapters 79 80 */ … … 99 100 setTooltip(tooltip); 100 101 if (getValue("toolbar") == null) { 101 putValue("toolbar",toolbarId);102 setToolbarId(toolbarId); 102 103 } 103 104 if (registerInToolbar && MainApplication.getToolbar() != null) { … … 292 293 } 293 294 295 /** 296 * Sets the help topic id. 297 * @param helpId help topic id (result of {@link HelpUtil#ht}) 298 * @since 14397 299 */ 294 300 protected void setHelpId(String helpId) { 295 301 putValue("help", helpId); 302 } 303 304 /** 305 * Sets the toolbar id. 306 * @param toolbarId toolbar id 307 * @since 16138 308 */ 309 protected void setToolbarId(String toolbarId) { 310 putValue("toolbar", toolbarId); 296 311 } 297 312 -
trunk/src/org/openstreetmap/josm/actions/PreferenceToggleAction.java
r14149 r16138 31 31 public PreferenceToggleAction(String name, String tooltip, String prefKey, boolean prefDefault) { 32 32 super(name, null, tooltip, null, false); 33 putValue("toolbar","toggle-" + prefKey);33 setToolbarId("toggle-" + prefKey); 34 34 this.pref = new BooleanProperty(prefKey, prefDefault); 35 35 checkbox = new JCheckBoxMenuItem(this); -
trunk/src/org/openstreetmap/josm/actions/RestartAction.java
r14397 r16138 51 51 Shortcut.registerShortcut("file:restart", tr("File: {0}", tr("Restart")), KeyEvent.VK_J, Shortcut.ALT_CTRL_SHIFT), false); 52 52 setHelpId(ht("/Action/Restart")); 53 putValue("toolbar","action/restart");53 setToolbarId("action/restart"); 54 54 if (MainApplication.getToolbar() != null) { 55 55 MainApplication.getToolbar().register(this); -
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r15849 r16138 67 67 68 68 setHelpId(ht("/Action/ShowStatusReport")); 69 putValue("toolbar","help/showstatusreport");69 setToolbarId("help/showstatusreport"); 70 70 MainApplication.getToolbar().register(this); 71 71 } -
trunk/src/org/openstreetmap/josm/actions/TaggingPresetSearchAction.java
r14390 r16138 24 24 super(tr("Search preset..."), "dialogs/search", tr("Show preset search dialog"), 25 25 Shortcut.registerShortcut("preset:search", tr("Search presets"), KeyEvent.VK_F3, Shortcut.DIRECT), false); 26 putValue("toolbar","presets/search");26 setToolbarId("presets/search"); 27 27 MainApplication.getToolbar().register(this); 28 28 } -
trunk/src/org/openstreetmap/josm/actions/WireframeToggleAction.java
r13926 r16138 30 30 false /* register toolbar */ 31 31 ); 32 putValue("toolbar","wireframe");32 setToolbarId("wireframe"); 33 33 MainApplication.getToolbar().register(this); 34 34 setSelected(MapRendererFactory.getInstance().isWireframeMapRendererActive()); -
trunk/src/org/openstreetmap/josm/actions/mapmode/AddNoteAction.java
r14153 r16138 6 6 import java.awt.event.KeyEvent; 7 7 import java.awt.event.MouseEvent; 8 import java.util.Objects; 8 9 9 10 import javax.swing.JOptionPane; … … 17 18 import org.openstreetmap.josm.gui.Notification; 18 19 import org.openstreetmap.josm.gui.util.KeyPressReleaseListener; 19 import org.openstreetmap.josm.tools.CheckParameterUtil;20 20 import org.openstreetmap.josm.tools.ImageProvider; 21 21 import org.openstreetmap.josm.tools.Logging; … … 37 37 super(tr("Add a new Note"), "addnote", tr("Add note mode"), 38 38 ImageProvider.getCursor("crosshair", "create_note")); 39 CheckParameterUtil.ensureParameterNotNull(data, "data"); 40 noteData = data; 39 noteData = Objects.requireNonNull(data, "data"); 41 40 } 42 41 -
trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java
r16096 r16138 56 56 AdjustImageryOffsetAction() { 57 57 super(tr("Imagery offset"), "mapmode/adjustimg", tr("Adjust imagery offset"), null, false, false); 58 putValue("toolbar","imagery-offset");58 setToolbarId("imagery-offset"); 59 59 MainApplication.getToolbar().register(this); 60 60 }
Note:
See TracChangeset
for help on using the changeset viewer.