jdk/src/java.desktop/share/classes/javax/swing/JComponent.java
changeset 32485 e00f713e6103
parent 30469 bac0a7ff7e1e
child 32494 f67e3c52f31f
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java	Fri Aug 21 20:59:07 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java	Mon Aug 24 16:06:36 2015 +0400
@@ -377,7 +377,8 @@
     /**
      * AA text hints.
      */
-    transient private Object aaTextInfo;
+    transient private Object aaHint;
+    transient private Object lcdRenderingHint;
 
     static Graphics safelyGetGraphics(Component c) {
         return safelyGetGraphics(c, SwingUtilities.getRoot(c));
@@ -655,8 +656,10 @@
         uninstallUIAndProperties();
 
         // aaText shouldn't persist between look and feels, reset it.
-        aaTextInfo =
-            UIManager.getDefaults().get(SwingUtilities2.AA_TEXT_PROPERTY_KEY);
+        aaHint = UIManager.getDefaults().get(
+                RenderingHints.KEY_TEXT_ANTIALIASING);
+        lcdRenderingHint = UIManager.getDefaults().get(
+                RenderingHints.KEY_TEXT_LCD_CONTRAST);
         ComponentUI oldUI = ui;
         ui = newUI;
         if (ui != null) {
@@ -4048,8 +4051,10 @@
      * @see #putClientProperty
      */
     public final Object getClientProperty(Object key) {
-        if (key == SwingUtilities2.AA_TEXT_PROPERTY_KEY) {
-            return aaTextInfo;
+        if (key == RenderingHints.KEY_TEXT_ANTIALIASING) {
+            return aaHint;
+        } else if (key == RenderingHints.KEY_TEXT_LCD_CONTRAST) {
+            return lcdRenderingHint;
         } else if (key == SwingUtilities2.COMPONENT_UI_PROPERTY_KEY) {
             return ui;
         }
@@ -4091,8 +4096,11 @@
      * @see #addPropertyChangeListener
      */
     public final void putClientProperty(Object key, Object value) {
-        if (key == SwingUtilities2.AA_TEXT_PROPERTY_KEY) {
-            aaTextInfo = value;
+        if (key == RenderingHints.KEY_TEXT_ANTIALIASING) {
+            aaHint = value;
+            return;
+        } else if (key == RenderingHints.KEY_TEXT_LCD_CONTRAST) {
+            lcdRenderingHint = value;
             return;
         }
         if (value == null && clientProperties == null) {