Changeset 8510 in josm for trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java
- Timestamp:
- 2015-06-20T23:42:21+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java
r8444 r8510 250 250 private static final String[] unitsValuesTr = new String[unitsValues.length]; 251 251 static { 252 for (int i =0; i<unitsValues.length; ++i) {252 for (int i = 0; i < unitsValues.length; ++i) { 253 253 unitsValuesTr[i] = tr(unitsValues[i]); 254 254 } … … 315 315 projPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); 316 316 projPanel.setLayout(new GridBagLayout()); 317 projPanel.add(new JLabel(tr("Projection method")), GBC.std().insets(5, 5,0,5));318 projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));319 projPanel.add(projectionCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5,5,5));320 projPanel.add(projectionCodeLabel = new JLabel(tr("Projection code")), GBC.std().insets(25, 5,0,5));321 projPanel.add(projectionCodeGlue = GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));322 projPanel.add(projectionCode, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5,5,5));323 projPanel.add(projectionNameLabel = new JLabel(tr("Projection name")), GBC.std().insets(25, 5,0,5));324 projPanel.add(projectionNameGlue = GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));325 projPanel.add(projectionName, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5,5,5));326 projPanel.add(new JLabel(tr("Bounds")), GBC.std().insets(25, 5,0,5));327 projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));328 projPanel.add(bounds, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5,5,5));329 projPanel.add(projSubPrefPanelWrapper, GBC.eol().fill(GBC.HORIZONTAL).insets(20, 5,5,5));317 projPanel.add(new JLabel(tr("Projection method")), GBC.std().insets(5, 5, 0, 5)); 318 projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL)); 319 projPanel.add(projectionCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5)); 320 projPanel.add(projectionCodeLabel = new JLabel(tr("Projection code")), GBC.std().insets(25, 5, 0, 5)); 321 projPanel.add(projectionCodeGlue = GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL)); 322 projPanel.add(projectionCode, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5)); 323 projPanel.add(projectionNameLabel = new JLabel(tr("Projection name")), GBC.std().insets(25, 5, 0, 5)); 324 projPanel.add(projectionNameGlue = GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL)); 325 projPanel.add(projectionName, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5)); 326 projPanel.add(new JLabel(tr("Bounds")), GBC.std().insets(25, 5, 0, 5)); 327 projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL)); 328 projPanel.add(bounds, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5)); 329 projPanel.add(projSubPrefPanelWrapper, GBC.eol().fill(GBC.HORIZONTAL).insets(20, 5, 5, 5)); 330 330 331 331 projectionCodeLabel.setLabelFor(projectionCode); 332 332 projectionNameLabel.setLabelFor(projectionName); 333 333 334 projPanel.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0, 5,0,10));335 projPanel.add(new JLabel(tr("Display coordinates as")), GBC.std().insets(5, 5,0,5));336 projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));337 projPanel.add(coordinatesCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5,5,5));338 projPanel.add(new JLabel(tr("System of measurement")), GBC.std().insets(5, 5,0,5));339 projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));340 projPanel.add(unitsCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5,5,5));341 projPanel.add(GBC.glue(1, 1), GBC.std().fill(GBC.HORIZONTAL).weight(1.0, 1.0));334 projPanel.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0, 5, 0, 10)); 335 projPanel.add(new JLabel(tr("Display coordinates as")), GBC.std().insets(5, 5, 0, 5)); 336 projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL)); 337 projPanel.add(coordinatesCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5)); 338 projPanel.add(new JLabel(tr("System of measurement")), GBC.std().insets(5, 5, 0, 5)); 339 projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL)); 340 projPanel.add(unitsCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5)); 341 projPanel.add(GBC.glue(1, 1), GBC.std().fill(GBC.HORIZONTAL).weight(1.0, 1.0)); 342 342 343 343 JScrollPane scrollpane = new JScrollPane(projPanel); … … 378 378 setProjection(id, prefs); 379 379 380 if (PROP_COORDINATES.put(((CoordinateFormat)coordinatesCombo.getSelectedItem()).name())) {381 CoordinateFormat.setCoordinateFormat((CoordinateFormat) coordinatesCombo.getSelectedItem());380 if (PROP_COORDINATES.put(((CoordinateFormat) coordinatesCombo.getSelectedItem()).name())) { 381 CoordinateFormat.setCoordinateFormat((CoordinateFormat) coordinatesCombo.getSelectedItem()); 382 382 } 383 383 … … 422 422 // Don't try to update if we're still starting up 423 423 int size = projPanel.getComponentCount(); 424 if (size < 1)424 if (size < 1) 425 425 return; 426 426
Note:
See TracChangeset
for help on using the changeset viewer.