Changeset 3872 in josm


Ignore:
Timestamp:
2011-02-08T19:52:58+01:00 (14 years ago)
Author:
stoecker
Message:

see #5532 - add missing addProjectsions() function nobody seems able to add when asked to do so

Location:
trunk/src/org/openstreetmap/josm
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java

    r3779 r3872  
    1414import org.openstreetmap.josm.data.coor.LatLon;
    1515import org.openstreetmap.josm.data.projection.Projection;
     16import org.openstreetmap.josm.data.projection.Projections;
    1617import org.openstreetmap.josm.data.projection.ProjectionInfo;
    1718import org.openstreetmap.josm.gui.layer.ImageryLayer;
     
    5152        proj = ProjectionInfo.getProjectionByCode(projectionStr);
    5253        if (proj == null) {
    53             for (Projection proj : Projection.allProjections) {
     54            for (Projection proj : Projections.getProjections()) {
    5455                if (proj.getCacheDirectoryName().equals(projectionStr)) {
    5556                    this.proj = proj;
  • trunk/src/org/openstreetmap/josm/data/projection/Projection.java

    r3689 r3872  
    1313 */
    1414public interface Projection {
    15     /**
    16      * List of all available projections.
    17      */
    18     public static Projection[] allProjections = new Projection[]{
    19         // global projections
    20         new Epsg4326(),
    21         new Mercator(),
    22         new UTM(),
    23         // regional - alphabetical order by country name
    24         new LambertEST(), // Still needs proper default zoom
    25         new Lambert(),    // Still needs proper default zoom
    26         new LambertCC9Zones(),    // Still needs proper default zoom
    27         new UTM_France_DOM(),
    28         new TransverseMercatorLV(),
    29         new Puwg(),
    30         new Epsg3008(), // SWEREF99 13 30
    31         new SwissGrid(),
    32     };
    33 
    3415    /**
    3516     * Returns the default zoom scale in pixel per degree ({@see #NavigatableComponent#scale}))
  • trunk/src/org/openstreetmap/josm/data/projection/ProjectionInfo.java

    r3821 r3872  
    2121    static {
    2222        allCodes = new HashMap<String, Projection>();
    23         for (Projection proj : Projection.allProjections) {
     23        for (Projection proj : Projections.getProjections()) {
    2424            if (proj instanceof ProjectionSubPrefs) {
    2525                ProjectionSubPrefs projSub = recreateProj((ProjectionSubPrefs)proj);
  • trunk/src/org/openstreetmap/josm/gui/preferences/AddWMSLayerPanel.java

    r3720 r3872  
    4747import org.openstreetmap.josm.data.Bounds;
    4848import org.openstreetmap.josm.data.projection.Projection;
     49import org.openstreetmap.josm.data.projection.Projections;
    4950import org.openstreetmap.josm.data.projection.ProjectionSubPrefs;
    5051import org.openstreetmap.josm.gui.bbox.SlippyMapBBoxChooser;
     
    400401
    401402    private boolean isProjSupported(String crs) {
    402         for (Projection proj : Projection.allProjections) {
     403        for (Projection proj : Projections.getProjections()) {
    403404            if (proj instanceof ProjectionSubPrefs) {
    404405                if (((ProjectionSubPrefs) proj).getPreferencesFromCode(crs) == null) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/ProjectionPreference.java

    r3779 r3872  
    2727import org.openstreetmap.josm.data.projection.Mercator;
    2828import org.openstreetmap.josm.data.projection.Projection;
     29import org.openstreetmap.josm.data.projection.Projections;
    2930import org.openstreetmap.josm.data.projection.ProjectionSubPrefs;
    3031import org.openstreetmap.josm.gui.NavigatableComponent;
     
    8485     * Combobox with all projections available
    8586     */
    86     private JComboBox projectionCombo = new JComboBox(Projection.allProjections);
     87    private JComboBox projectionCombo = new JComboBox(Projections.getProjections().toArray());
    8788
    8889    /**
Note: See TracChangeset for help on using the changeset viewer.