Changeset 17036 in josm


Ignore:
Timestamp:
2020-09-17T21:42:16+02:00 (4 years ago)
Author:
Klumbumbus
Message:

Add icons in preferences and for copy coordinates

Location:
trunk/src/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/CopyCoordinatesAction.java

    r16438 r17036  
    2828     */
    2929    public CopyCoordinatesAction() {
    30         super(tr("Copy Coordinates"), null,
     30        super(tr("Copy Coordinates"), "copy",
    3131                tr("Copy coordinates of selected nodes to clipboard."),
    3232                Shortcut.registerShortcut("copy:coordinates", tr("Edit: {0}", tr("Copy Coordinates")),
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java

    r16913 r17036  
    6060import org.openstreetmap.josm.spi.preferences.StringSetting;
    6161import org.openstreetmap.josm.tools.GBC;
     62import org.openstreetmap.josm.tools.ImageProvider;
    6263import org.openstreetmap.josm.tools.Logging;
    6364import org.openstreetmap.josm.tools.Territories;
     
    9697    private static final class EditBoundariesAction extends AbstractAction {
    9798        EditBoundariesAction() {
    98             super(tr("Edit boundaries"));
     99            super(tr("Edit boundaries"), ImageProvider.get("dialogs/edit", ImageProvider.ImageSizes.MENU));
    99100        }
    100101
     
    111112    private final class ResetPreferencesAction extends AbstractAction {
    112113        ResetPreferencesAction() {
    113             super(tr("Reset preferences"));
     114            super(tr("Reset preferences"), ImageProvider.get("undo", ImageProvider.ImageSizes.MENU));
    114115        }
    115116
     
    201202        scroll.setPreferredSize(new Dimension(400, 200));
    202203
    203         JButton add = new JButton(tr("Add"));
     204        JButton add = new JButton(tr("Add"), ImageProvider.get("dialogs/add", ImageProvider.ImageSizes.SMALLICON));
    204205        p.add(Box.createHorizontalGlue(), GBC.std().fill(GBC.HORIZONTAL));
    205206        p.add(add, GBC.std().insets(0, 5, 0, 0));
     
    213214        });
    214215
    215         JButton edit = new JButton(tr("Edit"));
     216        JButton edit = new JButton(tr("Edit"), ImageProvider.get("dialogs/edit", ImageProvider.ImageSizes.SMALLICON));
    216217        p.add(edit, GBC.std().insets(5, 5, 5, 0));
    217218        edit.addActionListener(e -> {
     
    221222        table.getSelectionModel().addListSelectionListener(event -> edit.setEnabled(table.getSelectedRowCount() == 1));
    222223
    223         JButton reset = new JButton(tr("Reset"));
     224        JButton reset = new JButton(tr("Reset"), ImageProvider.get("undo", ImageProvider.ImageSizes.SMALLICON));
    224225        p.add(reset, GBC.std().insets(0, 5, 0, 0));
    225226        reset.addActionListener(e -> table.resetPreferences(gui));
    226227        table.getSelectionModel().addListSelectionListener(event -> reset.setEnabled(table.getSelectedRowCount() > 0));
    227228
    228         JButton read = new JButton(tr("Read from file"));
     229        JButton read = new JButton(tr("Read from file"), ImageProvider.get("open", ImageProvider.ImageSizes.SMALLICON));
    229230        p.add(read, GBC.std().insets(5, 5, 0, 0));
    230231        read.addActionListener(e -> readPreferencesFromXML());
    231232
    232         JButton export = new JButton(tr("Export selected items"));
     233        JButton export = new JButton(tr("Export selected items"), ImageProvider.get("save", ImageProvider.ImageSizes.SMALLICON));
    233234        p.add(export, GBC.std().insets(5, 5, 0, 0));
    234235        export.addActionListener(e -> exportSelectedToXML());
     
    408409    private JMenu getProfileMenu() {
    409410        final JMenu p = new JMenu(tr("Load profile"));
     411        p.setIcon(ImageProvider.get("open", ImageProvider.ImageSizes.MENU));
    410412        p.addMenuListener(new MenuListener() {
    411413            @Override
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java

    r16438 r17036  
    2424import org.openstreetmap.josm.spi.preferences.Setting;
    2525import org.openstreetmap.josm.tools.Utils;
     26import org.openstreetmap.josm.tools.ImageProvider;
    2627
    2728/**
     
    4142    public ExportProfileAction(Preferences prefs, String schemaKey, String prefPattern) {
    4243        super(tr("Save {0} profile", tr(schemaKey)));
     44        new ImageProvider("save").getResource().attachImageIcon(this, true);
    4345        this.prefs = prefs;
    4446        this.prefPattern = prefPattern;
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java

    r16799 r17036  
    491491            putValue(NAME, tr("Load from list..."));
    492492            putValue(SHORT_DESCRIPTION, tr("Load plugins from a list of plugins"));
     493            new ImageProvider("misc/statusreport").getResource().attachImageIcon(this);
    493494        }
    494495
Note: See TracChangeset for help on using the changeset viewer.