Changeset 13333 in josm


Ignore:
Timestamp:
2018-01-16T01:56:32+01:00 (5 months ago)
Author:
Don-vip
Message:

see #15310 - remove Preferences.getColor() methods

File:
1 edited

Legend:

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

    r13173 r13333  
    701701
    702702    /**
    703      * Convenience method for accessing colour preferences.
    704      * <p>
    705      * To be removed: end of 2016
    706      *
    707      * @param colName name of the colour
    708      * @param def default value
    709      * @return a Color object for the configured colour, or the default value if none configured.
    710      * @deprecated Use a {@link NamedColorProperty} instead.
    711      */
    712     @Deprecated
    713     public synchronized Color getColor(String colName, Color def) {
    714         return getColor(colName, null, def);
    715     }
    716 
    717     /**
    718703     * only for preferences
    719704     * @param o color key
     
    738723        } else {
    739724            return fullKey;
    740         }
    741     }
    742 
    743     /**
    744      * Convenience method for accessing colour preferences.
    745      * <p>
    746      * To be removed: end of 2016
    747      * @param colName name of the colour
    748      * @param specName name of the special colour settings
    749      * @param def default value
    750      * @return a Color object for the configured colour, or the default value if none configured.
    751      * @deprecated Use a {@link NamedColorProperty} instead.
    752      * You can replace this by: <code>new NamedColorProperty(colName, def).getChildColor(specName)</code>
    753      */
    754     @Deprecated
    755     public synchronized Color getColor(String colName, String specName, Color def) {
    756         String colKey = org.openstreetmap.josm.data.preferences.ColorProperty.getColorKey(colName);
    757         registerColor(colKey, colName);
    758         String colStr = specName != null ? get(COLOR_PREFIX+specName) : "";
    759         if (colStr.isEmpty()) {
    760             colStr = get(colKey, ColorHelper.color2html(def, true));
    761         }
    762         if (colStr != null && !colStr.isEmpty()) {
    763             return ColorHelper.html2color(colStr);
    764         } else {
    765             return def;
    766725        }
    767726    }
Note: See TracChangeset for help on using the changeset viewer.