Changeset 9223 in josm for trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
- Timestamp:
- 2015-12-30T21:26:57+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r9070 r9223 5 5 6 6 import java.awt.BasicStroke; 7 import java.awt.Color; 7 8 import java.awt.Component; 8 9 import java.awt.Container; … … 43 44 import org.openstreetmap.josm.gui.widgets.HtmlPanel; 44 45 import org.openstreetmap.josm.tools.CheckParameterUtil; 46 import org.openstreetmap.josm.tools.ColorHelper; 45 47 import org.openstreetmap.josm.tools.GBC; 46 48 import org.openstreetmap.josm.tools.ImageOverlay; … … 367 369 } 368 370 } 371 372 /** 373 * Sets the background color for this component, and adjust the foreground color so the text remains readable. 374 * @param c component 375 * @param background background color 376 * @since 9223 377 */ 378 public static void setBackgroundReadable(JComponent c, Color background) { 379 c.setBackground(background); 380 c.setForeground(ColorHelper.getForegroundColor(background)); 381 } 369 382 }
Note:
See TracChangeset
for help on using the changeset viewer.