Changeset 16155 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2020-03-16T22:53:21+01:00 (4 years ago)
Author:
Don-vip
Message:

fix #18943 - add data types caption in Download along dialogues

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/OSMDownloadSource.java

    r13927 r16155  
    22package org.openstreetmap.josm.gui.download;
    33
     4import static org.openstreetmap.josm.tools.I18n.marktr;
    45import static org.openstreetmap.josm.tools.I18n.tr;
    56
     
    145146
    146147        /**
     148         * Label used in front of data types available for download. Made public for reuse in other download dialogs.
     149         * @since 16155
     150         */
     151        public static final String DATA_SOURCES_AND_TYPES = marktr("Data Sources and Types:");
     152
     153        /**
    147154         * Creates a new {@link OSMDownloadSourcePanel}.
    148155         * @param dialog the parent download dialog, as {@code DownloadDialog.getInstance()} might not be initialized yet
     
    159166
    160167            // adding the download tasks
    161             add(new JLabel(tr("Data Sources and Types:")), GBC.std().insets(5, 5, 1, 5).anchor(GBC.CENTER));
     168            add(new JLabel(tr(DATA_SOURCES_AND_TYPES)), GBC.std().insets(5, 5, 1, 5).anchor(GBC.CENTER));
    162169            cbDownloadOsmData = new JCheckBox(tr("OpenStreetMap data"), true);
    163170            cbDownloadOsmData.setToolTipText(tr("Select to download OSM data in the selected download area."));
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java

    r15971 r16155  
    1919import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
    2020import org.openstreetmap.josm.gui.MainApplication;
     21import org.openstreetmap.josm.gui.download.OSMDownloadSource.OSMDownloadSourcePanel;
    2122import org.openstreetmap.josm.spi.preferences.Config;
    2223import org.openstreetmap.josm.tools.GBC;
     
    6162        this.prefNear = prefNear;
    6263
     64        add(new JLabel(tr(OSMDownloadSourcePanel.DATA_SOURCES_AND_TYPES)), GBC.std().insets(5, 5, 1, 5).anchor(GBC.CENTER));
    6365        cbDownloadOsmData = new JCheckBox(tr("OpenStreetMap data"), Config.getPref().getBoolean(prefOsm, true));
    6466        cbDownloadOsmData.setToolTipText(tr("Select to download OSM data."));
     
    6971
    7072        add(new JLabel(tr("Download everything within:")), GBC.std());
     73        JPanel panel1 = new JPanel(new GridBagLayout());
    7174        buffer = new JSpinner(new SpinnerNumberModel(Config.getPref().getDouble(prefDist, 50.0), 1.0, 5000.0, 1.0));
    72         add(buffer, GBC.std().insets(5, 5, 5, 5));
    73         add(new JLabel(tr("meters")), GBC.eol());
     75        panel1.add(buffer, GBC.std().insets(5, 5, 5, 5));
     76        panel1.add(new JLabel(tr("meters")), GBC.eol());
     77        add(panel1, GBC.eol());
    7478
    7579        add(new JLabel(tr("Maximum area per request:")), GBC.std());
     80        JPanel panel2 = new JPanel(new GridBagLayout());
    7681        maxRect = new JSpinner(new SpinnerNumberModel(Config.getPref().getDouble(prefArea, 20.0), 0.01, 25.0, 0.01)) {
    7782            @Override
     
    8085            }
    8186        };
    82         add(maxRect, GBC.std().insets(5, 5, 5, 5));
    83         add(new JLabel("km\u00b2"), GBC.eol());
     87        panel2.add(maxRect, GBC.std().insets(5, 5, 5, 5));
     88        panel2.add(new JLabel("km\u00b2"), GBC.eol());
     89        add(panel2, GBC.eol());
    8490
    8591        if (prefNear != null) {
Note: See TracChangeset for help on using the changeset viewer.