Changeset 4162 in josm for trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation
- 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/relation/RelationMemberTableCellRenderer.java
r4072 r4162 17 17 import org.openstreetmap.josm.data.osm.RelationMember; 18 18 import org.openstreetmap.josm.gui.DefaultNameFormatter; 19 import org.openstreetmap.josm.gui.conflict.ConflictColors; 19 20 import org.openstreetmap.josm.gui.conflict.pair.ListMergeModel; 20 21 import org.openstreetmap.josm.tools.ImageProvider; … … 25 26 */ 26 27 public class RelationMemberTableCellRenderer extends JLabel implements TableCellRenderer { 27 public final static Color BGCOLOR_SELECTED = new Color(143,170,255);28 public final static Color BGCOLOR_EMPTY_ROW = new Color(234,234,234);29 30 public final static Color BGCOLOR_NOT_IN_OPPOSITE = new Color(255,197,197);31 public final static Color BGCOLOR_IN_OPPOSITE = new Color(255,234,213);32 public final static Color BGCOLOR_SAME_POSITION_IN_OPPOSITE = new Color(217,255,217);33 34 public final static Color BGCOLOR_PARTICIPAING_IN_COMPARISON = Color.BLACK;35 public final static Color FGCOLOR_PARTICIPAING_IN_COMPARISON = Color.WHITE;36 37 public final static Color BGCOLOR_FROZEN = new Color(234,234,234);38 39 28 private Border rowNumberBorder = null; 40 29 … … 84 73 */ 85 74 protected void reset() { 86 setBackground(Co lor.WHITE);87 setForeground(Co lor.BLACK);75 setBackground(ConflictColors.BGCOLOR.get()); 76 setForeground(ConflictColors.FGCOLOR.get()); 88 77 setBorder(null); 89 78 setIcon(null); … … 92 81 93 82 protected void renderBackground(ListMergeModel<Node>.EntriesTableModel model, RelationMember member, int row, int col, boolean isSelected) { 94 Color bgc = Co lor.WHITE;83 Color bgc = ConflictColors.BGCOLOR.get(); 95 84 if (col == 0) { 96 85 if (model.getListMergeModel().isFrozen()) { 97 bgc = BGCOLOR_FROZEN;86 bgc = ConflictColors.BGCOLOR_FROZEN.get(); 98 87 } else if (model.isParticipatingInCurrentComparePair()) { 99 bgc = BGCOLOR_PARTICIPAING_IN_COMPARISON;88 bgc = ConflictColors.BGCOLOR_PARTICIPAING_IN_COMPARISON.get(); 100 89 } else if (isSelected) { 101 bgc = BGCOLOR_SELECTED;90 bgc = ConflictColors.BGCOLOR_SELECTED.get(); 102 91 } 103 92 } else { 104 93 if (model.getListMergeModel().isFrozen()) { 105 bgc = BGCOLOR_FROZEN;94 bgc = ConflictColors.BGCOLOR_FROZEN.get(); 106 95 } else if (member == null) { 107 bgc = BGCOLOR_EMPTY_ROW;96 bgc = ConflictColors.BGCOLOR_EMPTY_ROW.get(); 108 97 } else if (isSelected) { 109 bgc = BGCOLOR_SELECTED;98 bgc = ConflictColors.BGCOLOR_SELECTED.get(); 110 99 } else { 111 100 if (model.isParticipatingInCurrentComparePair()) { 112 101 if (model.isSamePositionInOppositeList(row)) { 113 bgc = BGCOLOR_SAME_POSITION_IN_OPPOSITE;102 bgc = ConflictColors.BGCOLOR_SAME_POSITION_IN_OPPOSITE.get(); 114 103 } else if (model.isIncludedInOppositeList(row)) { 115 bgc = BGCOLOR_IN_OPPOSITE;104 bgc = ConflictColors.BGCOLOR_IN_OPPOSITE.get(); 116 105 } else { 117 bgc = BGCOLOR_NOT_IN_OPPOSITE;106 bgc = ConflictColors.BGCOLOR_NOT_IN_OPPOSITE.get(); 118 107 } 119 108 } … … 124 113 125 114 protected void renderForeground(ListMergeModel<Node>.EntriesTableModel model, RelationMember member, int row, int col, boolean isSelected) { 126 Color fgc = Co lor.BLACK;115 Color fgc = ConflictColors.FGCOLOR.get(); 127 116 if (col == 0 && model.isParticipatingInCurrentComparePair() && ! model.getListMergeModel().isFrozen()) { 128 fgc = Co lor.WHITE;117 fgc = ConflictColors.FGCOLOR_PARTICIPAING_IN_COMPARISON.get(); 129 118 } 130 119 setForeground(fgc); … … 155 144 protected void renderEmptyRow() { 156 145 setIcon(null); 157 setBackground( BGCOLOR_EMPTY_ROW);146 setBackground(ConflictColors.BGCOLOR_EMPTY_ROW.get()); 158 147 setText(""); 159 148 }
Note:
See TracChangeset
for help on using the changeset viewer.