Ignore:
Timestamp:
2006-04-03T22:25:02+02:00 (19 years ago)
Author:
imi
Message:
  • fixed bug in osm import (now reject id=0)
  • added WMS server layer (not finished)
  • added save state for dialogs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/gui/PreferenceDialog.java

    r78 r79  
    6868                                pwd = null;
    6969                        Main.pref.put("osm-server.password", pwd);
     70                        Main.pref.put("wmsServerBaseUrl", wmsServerBaseUrl.getText());
    7071                        Main.pref.put("csvImportString", csvImportString.getText());
    7172                        Main.pref.put("drawRawGpsLines", drawRawGpsLines.isSelected());
     
    106107         * ComboBox with all look and feels.
    107108         */
    108         JComboBox lafCombo = new JComboBox(UIManager.getInstalledLookAndFeels());
     109    private JComboBox lafCombo = new JComboBox(UIManager.getInstalledLookAndFeels());
    109110        /**
    110111         * Combobox with all projections available
    111112         */
    112         JComboBox projectionCombo = new JComboBox(Projection.allProjections);
     113    private JComboBox projectionCombo = new JComboBox(Projection.allProjections);
    113114        /**
    114115         * The main tab panel.
     
    119120         * Editfield for the Base url to the REST API from OSM.
    120121         */
    121         JTextField osmDataServer = new JTextField(20);
     122    private JTextField osmDataServer = new JTextField(20);
    122123        /**
    123124         * Editfield for the username to the OSM account.
    124125         */
    125         JTextField osmDataUsername = new JTextField(20);
     126    private JTextField osmDataUsername = new JTextField(20);
    126127        /**
    127128         * Passwordfield for the userpassword of the REST API.
    128129         */
    129         JPasswordField osmDataPassword = new JPasswordField(20);
     130    private JPasswordField osmDataPassword = new JPasswordField(20);
     131    /**
     132     * Base url of the WMS server. Holds everything except the bbox= argument.
     133     */
     134        private JTextField wmsServerBaseUrl = new JTextField(20);
    130135        /**
    131136         * Comma seperated import string specifier or <code>null</code> if the first
    132137         * data line should be interpreted as one.
    133138         */
    134         JTextField csvImportString = new JTextField(20);
     139    private JTextField csvImportString = new JTextField(20);
    135140        /**
    136141         * The checkbox stating whether nodes should be merged together.
    137142         */
    138         JCheckBox drawRawGpsLines = new JCheckBox("Draw lines between raw gps points.");
     143    private JCheckBox drawRawGpsLines = new JCheckBox("Draw lines between raw gps points.");
    139144        /**
    140145         * The checkbox stating whether raw gps lines should be forced.
    141146         */
    142         JCheckBox forceRawGpsLines = new JCheckBox("Force lines if no line segments imported.");
    143 
    144         JTable colors;
     147    private JCheckBox forceRawGpsLines = new JCheckBox("Force lines if no line segments imported.");
     148
     149    private JTable colors;
    145150       
    146151       
     
    199204                osmDataUsername.setText(Main.pref.get("osm-server.username"));
    200205                osmDataPassword.setText(Main.pref.get("osm-server.password"));
    201                 csvImportString.setText(Main.pref.get("csvImportString"));
     206        wmsServerBaseUrl.setText(Main.pref.get("wmsServerBaseUrl", "http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&width=512&height=512&layers=global_mosaic&styles=&srs=EPSG:4326&format=image/jpeg&"));
     207        csvImportString.setText(Main.pref.get("csvImportString"));
    202208                drawRawGpsLines.setSelected(Main.pref.getBoolean("drawRawGpsLines"));
    203209                forceRawGpsLines.setToolTipText("Force drawing of lines if the imported data contain no line information.");
     
    258264                osmDataUsername.setToolTipText("Login name (email) to the OSM account.");
    259265                osmDataPassword.setToolTipText("Login password to the OSM account. Leave blank to not store any password.");
     266        wmsServerBaseUrl.setToolTipText("The base URL to the server retrieving WMS background pictures from.");
    260267                csvImportString.setToolTipText("<html>Import string specification. lat/lon and time are imported.<br>" +
    261268                                "<b>lat</b>: The latitude coordinate<br>" +
     
    297304                warning.setFont(warning.getFont().deriveFont(Font.ITALIC));
    298305                con.add(warning, GBC.eop().fill(GBC.HORIZONTAL));
     306                con.add(new JLabel("WMS server base url (everything except bbox-parameter)"), GBC.eol());
     307                con.add(wmsServerBaseUrl, GBC.eop().fill(GBC.HORIZONTAL));
     308                con.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.VERTICAL));
    299309                con.add(new JLabel("CSV import specification (empty: read from first line in data)"), GBC.eol());
    300310                con.add(csvImportString, GBC.eop().fill(GBC.HORIZONTAL));
Note: See TracChangeset for help on using the changeset viewer.