jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
changeset 4371 dc9dcb8b0ae7
parent 2 90ce3da70b43
child 5506 202f599c92aa
--- a/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java	Fri Dec 04 15:07:15 2009 +0300
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java	Mon Dec 07 13:43:04 2009 +0300
@@ -60,7 +60,7 @@
 import javax.swing.plaf.BorderUIResource;
 import java.awt.im.InputMethodRequests;
 import sun.awt.CausedFocusEvent;
-import sun.awt.ComponentAccessor;
+import sun.awt.AWTAccessor;
 
 
 class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
@@ -119,13 +119,14 @@
         textPane.setVisible(true);
         textPane.validate();
 
-        foreground = ComponentAccessor.getForeground(target);
+        AWTAccessor.ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
+        foreground = compAccessor.getForeground(target);
         if (foreground == null)  {
             foreground = SystemColor.textText;
         }
         setForeground(foreground);
 
-        background = ComponentAccessor.getBackground(target);
+        background = compAccessor.getBackground(target);
         if (background == null) {
             if (target.isEditable()) background = SystemColor.text;
             else background = SystemColor.control;
@@ -134,8 +135,8 @@
 
         if (!target.isBackgroundSet()) {
             // This is a way to set the background color of the TextArea
-            // without calling setBackground - go through reflection
-            ComponentAccessor.setBackground(target, background);
+            // without calling setBackground - go through accessor
+            compAccessor.setBackground(target, background);
         }
         if (!target.isForegroundSet()) {
             target.setForeground(SystemColor.textText);
@@ -311,13 +312,13 @@
     }
 
     void handleJavaKeyEvent(KeyEvent e) {
-        ComponentAccessor.processEvent(jtext,e);
+        AWTAccessor.getComponentAccessor().processEvent(jtext,e);
     }
 
     public boolean handlesWheelScrolling() { return true; }
 
     void handleJavaMouseWheelEvent(MouseWheelEvent e) {
-        ComponentAccessor.processEvent(textPane,e);
+        AWTAccessor.getComponentAccessor().processEvent(textPane,e);
     }
 
     public void handleJavaMouseEvent( MouseEvent e ) {
@@ -1111,7 +1112,7 @@
             this.xwin = xwin;
             setDoubleBuffered(true);
             jt.addFocusListener(this);
-            ComponentAccessor.setParent(this,parent);
+            AWTAccessor.getComponentAccessor().setParent(this,parent);
             setViewportBorder(new BevelBorder(false,SystemColor.controlDkShadow,SystemColor.controlLtHighlight) );
             this.jtext = jt;
             setFocusable(false);
@@ -1308,7 +1309,7 @@
                         c = current.getButton();
                         p = toLocalSpace( c, p );
                     }
-                    ComponentAccessor.processEvent( c, newMouseEvent( c, p, event ) );
+                    AWTAccessor.getComponentAccessor().processEvent( c, newMouseEvent( c, p, event ) );
                     break;
             }
         }