Ignore:
Timestamp:
2008-09-18T09:43:02+02:00 (16 years ago)
Author:
stoecker
Message:

cleanup preferences handling and default entries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSInfo.java

    r10382 r10767  
    88 * @author Frederik Ramm <frederik@remote.org>
    99 */
    10 public class WMSInfo {
     10public class WMSInfo implements Comparable {
    1111       
    1212        String name;
     
    2323                Main.pref.put("wmsplugin.url." + prefid + ".url", url);
    2424        }
    25        
     25        public int compareTo(Object c)
     26        {
     27                Integer i = 0;
     28                if(c instanceof WMSInfo)
     29                {
     30                        WMSInfo in = (WMSInfo)c;
     31                        i = name.compareTo(in.name);
     32                        if(i == 0)
     33                                i = url.compareTo(in.url);
     34                        if(i == 0)
     35                                i = prefid-in.prefid;
     36                }
     37                return i;
     38        }
    2639}
Note: See TracChangeset for help on using the changeset viewer.