Changeset 11552 in josm
- Timestamp:
- 2017-02-12T12:51:09+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java
r10977 r11552 16 16 import javax.swing.JLabel; 17 17 import javax.swing.JTable; 18 import javax.swing.UIDefaults;19 18 import javax.swing.UIManager; 20 19 import javax.swing.table.DefaultTableCellRenderer; … … 42 41 43 42 static { 44 UIDefaults defaults = UIManager.getDefaults(); 45 SELECTED_BG = new ColorProperty(marktr("Discardable key: selection Background"), 46 defaults.getColor("Table.selectionBackground")).cached(); 47 NORMAL_BG = new ColorProperty(marktr("Discardable key: background"), 48 defaults.getColor("Table.background")).cached(); 43 Color selectionBackground = UIManager.getColor("Table.selectionBackground"); 44 if (selectionBackground == null) { 45 selectionBackground = Color.BLUE; 46 } 47 SELECTED_BG = new ColorProperty(marktr("Discardable key: selection Background"), selectionBackground).cached(); 48 Color background = UIManager.getColor("Table.background"); 49 if (background == null) { 50 background = Color.WHITE; 51 } 52 NORMAL_BG = new ColorProperty(marktr("Discardable key: background"), background).cached(); 49 53 } 50 54 … … 57 61 c.setBackground((isSelected ? SELECTED_BG : NORMAL_BG).get()); 58 62 } else { 59 UIDefaults defaults = UIManager.getDefaults(); 60 c.setForeground(defaults.getColor("Table."+(isSelected ? "selectionF" : "f")+"oreground")); 61 c.setBackground(defaults.getColor("Table."+(isSelected ? "selectionB" : "b")+"ackground")); 63 c.setForeground(UIManager.getColor("Table."+(isSelected ? "selectionF" : "f")+"oreground")); 64 c.setBackground(UIManager.getColor("Table."+(isSelected ? "selectionB" : "b")+"ackground")); 62 65 } 63 66 }
Note:
See TracChangeset
for help on using the changeset viewer.