-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
low
-
-
Java API
-
SE
Summary
Create two new methods to provide consistent and centralised behaviour to remove LookAndFeel installed colors and fonts from Swing components.
Problem
There are convenience methods to install colors and fonts, but no inverse methods to remove them. Consequently the removals are performed manually and inconsistently.
Solution
Implement two new public API convenience methods which mirror other similar convenience methods.
Provided L&Fs are updated to use these.
Specification
Provide two new convenience methods on the class javax.swing.LookAndFeel
+ /**
+ * Convenience method for removing a component's foreground
+ * and background color properties by setting them to null.
+ *
+ * @see #uninstallColorsAndFont
+ * @see #installColors
+ * @param c component from which to remove the colors
+ */
+ public static void uninstallColors(JComponent c)
+ /**
+ * Convenience method for removing a component's foreground color,
+ * background color and font properties by setting them to null.
+ *
+ * @see #uninstallColors
+ * @see #installColorsAndFont
+ * @param c component from which to remove the colors and font
+ */
+ public static void uninstallColorsAndFont(JComponent c)
- csr of
-
JDK-8278620 properties installed by javax.swing.LookAndFeel installColors and installColorsAndFont are not uninstalled
-
- Open
-