Ignore:
Timestamp:
2016-08-17T09:18:31+02:00 (8 years ago)
Author:
Don-vip
Message:

see #13309 - Caching and notifying preferences (patch by michael2402) - gsoc-core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/ConflictColors.java

    r10134 r10824  
    66import java.awt.Color;
    77
    8 import org.openstreetmap.josm.Main;
    9 import org.openstreetmap.josm.data.Preferences.ColorKey;
     8import org.openstreetmap.josm.data.preferences.ColorProperty;
    109
    1110/**
     
    1312 * @since 4162
    1413 */
    15 public enum ConflictColors implements ColorKey {
     14public enum ConflictColors {
    1615
    1716    /** Conflict background: no conflict */
     
    8382    FGCOLOR_MEMBER_REMOVE(marktr("Conflict foreground: remove member"), Color.black);
    8483
    85     private final String name;
    86     private final Color defaultColor;
     84    private final ColorProperty property;
    8785
    8886    ConflictColors(String name, Color defaultColor) {
    89         this.name = name;
    90         this.defaultColor = defaultColor;
    91     }
    92 
    93     @Override
    94     public String getColorName() {
    95         return name;
    96     }
    97 
    98     @Override
    99     public Color getDefaultValue() {
    100         return defaultColor;
    101     }
    102 
    103     @Override
    104     public String getSpecialName() {
    105         return null;
     87        property = new ColorProperty(name, defaultColor);
    10688    }
    10789
     
    11193     */
    11294    public Color get() {
    113         return Main.pref.getColor(this);
     95        return property.get();
    11496    }
    11597
Note: See TracChangeset for help on using the changeset viewer.