Ignore:
Timestamp:
2011-06-24T23:13:02+02:00 (13 years ago)
Author:
stoecker
Message:

fix #4140 - make colors in conflict dialog configurable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TheirTableCellRenderer.java

    r3083 r4162  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
    6 import java.awt.Color;
    7 
     6import org.openstreetmap.josm.gui.conflict.ConflictColors;
    87import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
    98
    109public class TheirTableCellRenderer extends TagMergeTableCellRenderer {
    1110
    12     public final static Color BGCOLOR_UNDECIDED = new Color(255,197,197);
    13     public final static Color BGCOLOR_MINE = Color.white;
    14     public final static Color BGCOLOR_THEIR = new Color(217,255,217);
    15     public final static Color BGCOLOR_SELECTED = new Color(143,170,255);
    16 
    1711    protected void setBackgroundColor(TagMergeItem item, boolean isSelected) {
    1812        if (isSelected) {
    19             setBackground(BGCOLOR_SELECTED);
     13            setBackground(ConflictColors.BGCOLOR_SELECTED.get());
    2014            return;
    2115        }
    2216        if (MergeDecisionType.KEEP_MINE.equals(item.getMergeDecision())) {
    23             setBackground(BGCOLOR_MINE);
     17            setBackground(ConflictColors.BGCOLOR_MINE.get());
    2418        } else if (MergeDecisionType.KEEP_THEIR.equals(item.getMergeDecision())) {
    25             setBackground(BGCOLOR_THEIR);
     19            setBackground(ConflictColors.BGCOLOR_THEIR.get());
    2620        } else if (MergeDecisionType.UNDECIDED.equals(item.getMergeDecision())) {
    27             setBackground(BGCOLOR_UNDECIDED);
     21            setBackground(ConflictColors.BGCOLOR_UNDECIDED.get());
    2822        }
    2923    }
     
    3125    protected void setTextColor(TagMergeItem item) {
    3226        if (MergeDecisionType.KEEP_THEIR.equals(item.getMergeDecision())) {
    33             setForeground(Color.black);
     27            setForeground(ConflictColors.FGCOLOR_THEIR.get());
    3428        } else if (MergeDecisionType.KEEP_MINE.equals(item.getMergeDecision())) {
    35             setForeground(Color.LIGHT_GRAY);
     29            setForeground(ConflictColors.FGCOLOR_MINE.get());
    3630        } else if (MergeDecisionType.UNDECIDED.equals(item.getMergeDecision())) {
    37             setForeground(Color.black);
     31            setForeground(ConflictColors.FGCOLOR_UNDECIDED.get());
    3832        }
    3933    }
Note: See TracChangeset for help on using the changeset viewer.