Ignore:
Timestamp:
2012-05-09T21:29:17+02:00 (12 years ago)
Author:
bastiK
Message:

improvements for custom projection

Location:
trunk/src/org/openstreetmap/josm/gui/preferences/projection
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java

    r5223 r5226  
    11// License: GPL. Copyright 2007 by Immanuel Scholz and others
    2 package org.openstreetmap.josm.gui.preferences.map;
     2package org.openstreetmap.josm.gui.preferences.projection;
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
     6import java.awt.Component;
    67import java.awt.GridBagLayout;
    78import java.awt.event.ActionEvent;
     
    8586    private JPanel projSubPrefPanelWrapper = new JPanel(new GridBagLayout());
    8687
     88    private JLabel projectionCodeLabel;
     89    private Component projectionCodeGlue;
    8790    private JLabel projectionCode = new JLabel();
    8891    private JLabel bounds = new JLabel();
     
    122125        projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
    123126        projPanel.add(projectionCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
    124         projPanel.add(new JLabel(tr("Projection code")), GBC.std().insets(25,5,0,5));
    125         projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
     127        projPanel.add(projectionCodeLabel = new JLabel(tr("Projection code")), GBC.std().insets(25,5,0,5));
     128        projPanel.add(projectionCodeGlue = GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
    126129        projPanel.add(projectionCode, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
    127130        projPanel.add(new JLabel(tr("Bounds")), GBC.std().insets(25,5,0,5));
     
    152155        CoordinateFormat cf = CoordinateFormat.getDefaultFormat();
    153156        bounds.setText(b.getMin().latToString(cf)+"; "+b.getMin().lonToString(cf)+" : "+b.getMax().latToString(cf)+"; "+b.getMax().lonToString(cf));
     157        boolean hideCode = proj instanceof SubPrefsOptions && !((SubPrefsOptions) proj).showProjectionCode();
     158        projectionCodeLabel.setVisible(!hideCode);
     159        projectionCodeGlue.setVisible(!hideCode);
     160        projectionCode.setVisible(!hideCode);
    154161    }
    155162
Note: See TracChangeset for help on using the changeset viewer.