Changeset 4162 in josm for trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TheirTableCellRenderer.java
- Timestamp:
- 2011-06-24T23:13:02+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TheirTableCellRenderer.java
r3083 r4162 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.Color; 7 6 import org.openstreetmap.josm.gui.conflict.ConflictColors; 8 7 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType; 9 8 10 9 public class TheirTableCellRenderer extends TagMergeTableCellRenderer { 11 10 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 17 11 protected void setBackgroundColor(TagMergeItem item, boolean isSelected) { 18 12 if (isSelected) { 19 setBackground( BGCOLOR_SELECTED);13 setBackground(ConflictColors.BGCOLOR_SELECTED.get()); 20 14 return; 21 15 } 22 16 if (MergeDecisionType.KEEP_MINE.equals(item.getMergeDecision())) { 23 setBackground( BGCOLOR_MINE);17 setBackground(ConflictColors.BGCOLOR_MINE.get()); 24 18 } else if (MergeDecisionType.KEEP_THEIR.equals(item.getMergeDecision())) { 25 setBackground( BGCOLOR_THEIR);19 setBackground(ConflictColors.BGCOLOR_THEIR.get()); 26 20 } else if (MergeDecisionType.UNDECIDED.equals(item.getMergeDecision())) { 27 setBackground( BGCOLOR_UNDECIDED);21 setBackground(ConflictColors.BGCOLOR_UNDECIDED.get()); 28 22 } 29 23 } … … 31 25 protected void setTextColor(TagMergeItem item) { 32 26 if (MergeDecisionType.KEEP_THEIR.equals(item.getMergeDecision())) { 33 setForeground(Co lor.black);27 setForeground(ConflictColors.FGCOLOR_THEIR.get()); 34 28 } else if (MergeDecisionType.KEEP_MINE.equals(item.getMergeDecision())) { 35 setForeground(Co lor.LIGHT_GRAY);29 setForeground(ConflictColors.FGCOLOR_MINE.get()); 36 30 } else if (MergeDecisionType.UNDECIDED.equals(item.getMergeDecision())) { 37 setForeground(Co lor.black);31 setForeground(ConflictColors.FGCOLOR_UNDECIDED.get()); 38 32 } 39 33 }
Note:
See TracChangeset
for help on using the changeset viewer.