Changeset 8324 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2015-05-04T23:24:14+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r8308 r8324 8 8 9 9 import javax.swing.AbstractAction; 10 import javax.swing.Icon;11 10 12 11 import org.openstreetmap.josm.Main; … … 72 71 * @param toolbarId identifier for the toolbar preferences. The iconName is used, if this parameter is null 73 72 * @param installAdapters false, if you don't want to install layer changed and selection changed adapters 74 * @deprecated do not pass Icon, pass ImageProvider instead75 */76 @Deprecated77 public JosmAction(String name, Icon icon, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdapters) {78 super(name, icon);79 setHelpId();80 sc = shortcut;81 if (sc != null) {82 Main.registerActionShortcut(this, sc);83 }84 setTooltip(tooltip);85 if (getValue("toolbar") == null) {86 putValue("toolbar", toolbarId);87 }88 if (registerInToolbar && Main.toolbar != null) {89 Main.toolbar.register(this);90 }91 if (installAdapters) {92 installAdapters();93 }94 }95 96 /**97 * Constructs a {@code JosmAction}.98 *99 * @param name the action's text as displayed on the menu (if it is added to a menu)100 * @param icon the icon to use101 * @param tooltip a longer description of the action that will be displayed in the tooltip. Please note102 * that html is not supported for menu actions on some platforms.103 * @param shortcut a ready-created shortcut object or null if you don't want a shortcut. But you always104 * do want a shortcut, remember you can always register it with group=none, so you105 * won't be assigned a shortcut unless the user configures one. If you pass null here,106 * the user CANNOT configure a shortcut for your action.107 * @param registerInToolbar register this action for the toolbar preferences?108 * @param toolbarId identifier for the toolbar preferences. The iconName is used, if this parameter is null109 * @param installAdapters false, if you don't want to install layer changed and selection changed adapters110 73 * TODO: do not pass Icon, pass ImageProvider instead 111 74 */
Note:
See TracChangeset
for help on using the changeset viewer.