Changeset 20197 in osm for applications/editors
- Timestamp:
- 2010-02-28T07:51:34+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/tageditor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/tageditor/build.xml
r20079 r20197 28 28 29 29 30 <property name="commit.message" value=" Tageditor: fixed josm bug 2416" />30 <property name="commit.message" value="Fixed rendering of background color for selected cells" /> 31 31 <property name="plugin.main.version" value="3015" /> 32 32 -
applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TableCellRenderer.java
r20058 r20197 120 120 * @param model the tag editor model 121 121 */ 122 protected void renderBackgroundColor(TagModel tagModel, TagEditorModel model) { 123 setBackground(UIManager.getColor("Table.background")); 122 protected void renderColor(TagModel tagModel, TagEditorModel model, boolean isSelected) { 123 if (isSelected){ 124 setBackground(UIManager.getColor("Table.selectionBackground")); 125 setForeground(UIManager.getColor("Table.selectionForeground")); 126 } else { 127 setBackground(UIManager.getColor("Table.background")); 128 setForeground(UIManager.getColor("Table.foreground")); 129 } 124 130 if (belongsToSelectedPreset(tagModel, model)) { 125 131 setBackground(BG_COLOR_HIGHLIGHTED); … … 143 149 144 150 resetRenderer(); 145 146 // set background color147 //148 if (isSelected){149 setBackground(UIManager.getColor("Table.selectionBackground"));150 setForeground(UIManager.getColor("Table.selectionForeground"));151 } else {152 setBackground(UIManager.getColor("Table.background"));153 setForeground(UIManager.getColor("Table.foreground"));154 }155 156 151 TagModel tagModel = (TagModel)value; 157 152 switch(vColIndex) { … … 159 154 case 1: renderTagValue(tagModel); break; 160 155 } 161 render BackgroundColor(tagModel, (TagEditorModel)table.getModel());156 renderColor(tagModel, (TagEditorModel)table.getModel(),isSelected); 162 157 if (hasFocus && isSelected) { 163 158 if (table.getSelectedColumnCount() == 1 && table.getSelectedRowCount() == 1) {
Note:
See TracChangeset
for help on using the changeset viewer.