Changeset 15753 in josm for trunk/src


Ignore:
Timestamp:
2020-01-23T21:22:41+01:00 (5 years ago)
Author:
simon04
Message:

fix #5794 - BoundingBoxSelection: place text fields in diamond pattern

File:
1 edited

Legend:

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

    r13050 r15753  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
     6import java.awt.BorderLayout;
    67import java.awt.Color;
    78import java.awt.Dimension;
    89import java.awt.GridBagLayout;
     10import java.awt.Panel;
    911import java.awt.event.ActionEvent;
    1012import java.awt.event.ActionListener;
     
    9799        tfOsmUrl.setBorder(latlon[0].getBorder());
    98100
    99         dlg.add(new JLabel(tr("min lat")), GBC.std().insets(10, 20, 5, 0));
    100         dlg.add(latlon[0], GBC.std().insets(0, 20, 0, 0));
    101         dlg.add(new JLabel(tr("min lon")), GBC.std().insets(10, 20, 5, 0));
    102         dlg.add(latlon[1], GBC.eol().insets(0, 20, 0, 0));
    103         dlg.add(new JLabel(tr("max lat")), GBC.std().insets(10, 0, 5, 0));
    104         dlg.add(latlon[2], GBC.std());
    105         dlg.add(new JLabel(tr("max lon")), GBC.std().insets(10, 0, 5, 0));
    106         dlg.add(latlon[3], GBC.eol());
     101        final Panel latlonPanel = new Panel(new BorderLayout());
     102        final String[] labels = new String[]{tr("min lat"), tr("min lon"), tr("max lat"), tr("max lon")};
     103        final String[] positions = new String[]{BorderLayout.SOUTH, BorderLayout.WEST, BorderLayout.NORTH, BorderLayout.EAST};
     104        for (int i = 0; i < latlon.length; i++) {
     105            final Panel panel = new Panel(new GridBagLayout());
     106            panel.add(new JLabel(labels[i]), GBC.std().insets(10, 0, 3, 0));
     107            panel.add(latlon[i]);
     108            latlonPanel.add(panel, positions[i]);
     109        }
     110        dlg.add(latlonPanel, GBC.eop().insets(0, 20, 0, 0));
    107111
    108112        final JButton btnClear = new JButton(tr("Clear textarea"));
Note: See TracChangeset for help on using the changeset viewer.