001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.gui.preferences.projection;
003
004import static org.openstreetmap.josm.tools.I18n.tr;
005
006import java.awt.GridBagLayout;
007import java.awt.event.ActionListener;
008
009import javax.swing.Box;
010import javax.swing.JPanel;
011
012import org.openstreetmap.josm.gui.widgets.HtmlPanel;
013import org.openstreetmap.josm.tools.GBC;
014
015/**
016 * ProjectionChoice for Swiss grid, CH1903 / LV03 military coordinates (EPSG:21781).
017 * <p>
018 * This is the old system and <b>not</b> CH1903+ from 1995.
019 * @see <a href="https://en.wikipedia.org/wiki/Swiss_coordinate_system">swiss grid</a>
020 */
021public class SwissGridProjectionChoice extends SingleProjectionChoice {
022
023    /**
024     * Constructs a new {@code SwissGridProjectionChoice}.
025     */
026    public SwissGridProjectionChoice() {
027        super(tr("Swiss Grid (Switzerland)"), /* NO-ICON */ "core:swissgrid", "EPSG:21781");
028    }
029
030    @Override
031    public JPanel getPreferencePanel(ActionListener listener) {
032        JPanel p = new JPanel(new GridBagLayout());
033        p.add(new HtmlPanel(tr("<i>CH1903 / LV03</i>")), GBC.eol().fill(GBC.HORIZONTAL));
034        p.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
035        return p;
036    }
037}