Changeset 17160 in josm for trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
- Timestamp:
- 2020-10-11T11:23:04+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
r15020 r17160 5 5 6 6 import java.awt.Font; 7 import java.awt.GridBagConstraints;8 7 import java.awt.GridBagLayout; 9 import java.awt.Insets;10 8 import java.awt.event.ActionEvent; 11 9 import java.awt.event.ActionListener; … … 38 36 import org.openstreetmap.josm.spi.preferences.Config; 39 37 import org.openstreetmap.josm.spi.preferences.IUrls; 38 import org.openstreetmap.josm.tools.GBC; 40 39 import org.openstreetmap.josm.tools.ImageProvider; 41 40 import org.openstreetmap.josm.tools.Logging; … … 82 81 protected final void build() { 83 82 setLayout(new GridBagLayout()); 84 GridBagConstraints gc = new GridBagConstraints();85 83 86 84 // 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)); 94 86 95 87 // 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)); 106 90 lblApiUrl.setLabelFor(tfOsmServerUrl); 107 91 SelectAllOnFocusGainedDecorator.decorate(tfOsmServerUrl.getEditorComponent()); … … 112 96 tfOsmServerUrl.addFocusListener(propagator); 113 97 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 120 100 ValidateApiUrlAction actTest = new ValidateApiUrlAction(); 121 101 tfOsmServerUrl.getEditorComponent().getDocument().addDocumentListener(actTest); 122 102 btnTest = new JButton(actTest); 123 add(btnTest, gc);103 add(btnTest, GBC.eop()); 124 104 } 125 105
Note:
See TracChangeset
for help on using the changeset viewer.