Changeset 13333 in josm
- Timestamp:
- 2018-01-16T01:56:32+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r13173 r13333 701 701 702 702 /** 703 * Convenience method for accessing colour preferences.704 * <p>705 * To be removed: end of 2016706 *707 * @param colName name of the colour708 * @param def default value709 * @return a Color object for the configured colour, or the default value if none configured.710 * @deprecated Use a {@link NamedColorProperty} instead.711 */712 @Deprecated713 public synchronized Color getColor(String colName, Color def) {714 return getColor(colName, null, def);715 }716 717 /**718 703 * only for preferences 719 704 * @param o color key … … 738 723 } else { 739 724 return fullKey; 740 }741 }742 743 /**744 * Convenience method for accessing colour preferences.745 * <p>746 * To be removed: end of 2016747 * @param colName name of the colour748 * @param specName name of the special colour settings749 * @param def default value750 * @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 @Deprecated755 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;766 725 } 767 726 }
Note:
See TracChangeset
for help on using the changeset viewer.