Ignore:
Timestamp:
2005-10-23T22:13:33+02:00 (14 years ago)
Author:
imi
Message:

starting restructure of dataset. Checkpoint is broken!

Location:
src/org/openstreetmap/josm/data/projection
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/data/projection/Projection.java

    r21 r22  
    88import javax.swing.event.ChangeListener;
    99
    10 import org.openstreetmap.josm.command.DataSet;
    1110import org.openstreetmap.josm.data.GeoPoint;
    1211
     
    8180         * This implementation does nothing. It is provided only for subclasses
    8281         * to initialize their data members.
    83          *
    84          * @param dataSet
    85          *            The dataset, which will be displayed on screen. Later, all
    86          *            projections should be relative to the given dataset. Any
    87          *            reverse projections (xy2latlon) can be assumed to be in near
    88          *            distance to nodes of this dataset (that means, it is ok, if
    89          *            there is a conversion error, if the requested x/y to xy2latlon
    90          *            is far away from any coordinate in the dataset)
    9182         */
    92         public void init(DataSet dataSet) {}
     83        public void init() {}
    9384       
    9485        /**
  • src/org/openstreetmap/josm/data/projection/UTM.java

    r21 r22  
    1616
    1717import org.openstreetmap.josm.Main;
    18 import org.openstreetmap.josm.command.DataSet;
    1918import org.openstreetmap.josm.data.Bounds;
    2019import org.openstreetmap.josm.data.GeoPoint;
     
    8079        };
    8180
    82         private enum Hemisphere {north, south};
     81        private enum Hemisphere {north, south}
    8382
    8483        /**
     
    102101         * Spinner with all possible zones for the configuration panel
    103102         */
    104         private JSpinner zoneSpinner;
     103        JSpinner zoneSpinner;
    105104        /**
    106105         * Hemisphere combo for the configuration panel
    107106         */
    108         private JComboBox hemisphereCombo;
     107        JComboBox hemisphereCombo;
    109108
    110109       
     
    193192        /**
    194193         * Try to autodetect the zone and hemisphere from the dataset.
    195          * @param dataSet The dataset to extrakt zone information from.
    196194         * @return The zone data extrakted from the dataset.
    197195         */
    198         private ZoneData autoDetect(DataSet dataSet) {
     196        ZoneData autoDetect() {
    199197                ZoneData zd = new ZoneData();
    200198               
    201                 Bounds b = dataSet.getBoundsLatLon();
     199                Bounds b = Main.main.ds.getBoundsLatLon();
    202200                if (b == null)
    203201                        return zd;
     
    234232         */
    235233        @Override
    236         public void init(DataSet dataSet) {
     234        public void init() {
    237235                if (zone == 0) {
    238                         ZoneData zd = autoDetect(dataSet);
     236                        ZoneData zd = autoDetect();
    239237                        zone = zd.zone;
    240238                        hemisphere = zd.hemisphere;
     
    274272                        public void actionPerformed(ActionEvent e) {
    275273                                if (Main.main.getMapFrame() != null) {
    276                                         DataSet ds = Main.main.getMapFrame().mapView.getActiveDataSet();
    277                                         ZoneData zd = autoDetect(ds);
     274                                        ZoneData zd = autoDetect();
    278275                                        if (zd.zone == 0)
    279276                                                JOptionPane.showMessageDialog(Main.main, "Autodetection failed. Maybe the data set contain too few information.");
Note: See TracChangeset for help on using the changeset viewer.