Ignore:
Timestamp:
2020-10-11T11:23:04+02:00 (4 years ago)
Author:
simon04
Message:

see #7548 - Re-organize the preference dialog (connection preferences)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java

    r15020 r17160  
    55
    66import java.awt.Font;
    7 import java.awt.GridBagConstraints;
    87import java.awt.GridBagLayout;
    9 import java.awt.Insets;
    108import java.awt.event.ActionEvent;
    119import java.awt.event.ActionListener;
     
    3836import org.openstreetmap.josm.spi.preferences.Config;
    3937import org.openstreetmap.josm.spi.preferences.IUrls;
     38import org.openstreetmap.josm.tools.GBC;
    4039import org.openstreetmap.josm.tools.ImageProvider;
    4140import org.openstreetmap.josm.tools.Logging;
     
    8281    protected final void build() {
    8382        setLayout(new GridBagLayout());
    84         GridBagConstraints gc = new GridBagConstraints();
    8583
    8684        // the checkbox for the default UL
    87         gc.fill = GridBagConstraints.HORIZONTAL;
    88         gc.anchor = GridBagConstraints.NORTHWEST;
    89         gc.weightx = 1.0;
    90         gc.insets = new Insets(0, 0, 0, 0);
    91         gc.gridwidth = 4;
    92         add(buildDefaultServerUrlPanel(), gc);
    93 
     85        add(buildDefaultServerUrlPanel(), GBC.eop().fill(GBC.HORIZONTAL));
    9486
    9587        // the input field for the URL
    96         gc.gridx = 0;
    97         gc.gridy = 1;
    98         gc.gridwidth = 1;
    99         gc.weightx = 0.0;
    100         gc.insets = new Insets(0, 0, 0, 3);
    101         add(lblApiUrl, gc);
    102 
    103         gc.gridx = 1;
    104         gc.weightx = 1.0;
    105         add(tfOsmServerUrl, gc);
     88        add(lblApiUrl, GBC.std().insets(0, 0, 3, 0));
     89        add(tfOsmServerUrl, GBC.std().fill(GBC.HORIZONTAL).insets(0, 0, 3, 0));
    10690        lblApiUrl.setLabelFor(tfOsmServerUrl);
    10791        SelectAllOnFocusGainedDecorator.decorate(tfOsmServerUrl.getEditorComponent());
     
    11296        tfOsmServerUrl.addFocusListener(propagator);
    11397
    114         gc.gridx = 2;
    115         gc.weightx = 0.0;
    116         add(lblValid, gc);
    117 
    118         gc.gridx = 3;
    119         gc.weightx = 0.0;
     98        add(lblValid, GBC.std().insets(0, 0, 3, 0));
     99
    120100        ValidateApiUrlAction actTest = new ValidateApiUrlAction();
    121101        tfOsmServerUrl.getEditorComponent().getDocument().addDocumentListener(actTest);
    122102        btnTest = new JButton(actTest);
    123         add(btnTest, gc);
     103        add(btnTest, GBC.eop());
    124104    }
    125105
Note: See TracChangeset for help on using the changeset viewer.