< prev index next >

src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java

Print this page




 646             }
 647         }));
 648     }
 649 
 650     @Override
 651     public synchronized void setForeground(Color c) {
 652         foreground = c;
 653         _setForeground(c.getRGB());
 654     }
 655 
 656     @Override
 657     public synchronized void setBackground(Color c) {
 658         background = c;
 659         _setBackground(c.getRGB());
 660     }
 661 
 662     /**
 663      * This method is intentionally not synchronized as it is called while
 664      * holding other locks.
 665      *
 666      * @see sun.java2d.d3d.D3DScreenUpdateManager#validate(D3DWindowSurfaceData)
 667      */
 668     public Color getBackgroundNoSync() {
 669         return background;
 670     }
 671 
 672     private native void _setForeground(int rgb);
 673     private native void _setBackground(int rgb);
 674 
 675     @Override
 676     public synchronized void setFont(Font f) {
 677         font = f;
 678         _setFont(f);
 679     }
 680     synchronized native void _setFont(Font f);
 681     @Override
 682     public void updateCursorImmediately() {
 683         WGlobalCursorManager.getCursorManager().updateCursorImmediately();
 684     }
 685 
 686     // TODO: consider moving it to KeyboardFocusManagerPeerImpl




 646             }
 647         }));
 648     }
 649 
 650     @Override
 651     public synchronized void setForeground(Color c) {
 652         foreground = c;
 653         _setForeground(c.getRGB());
 654     }
 655 
 656     @Override
 657     public synchronized void setBackground(Color c) {
 658         background = c;
 659         _setBackground(c.getRGB());
 660     }
 661 
 662     /**
 663      * This method is intentionally not synchronized as it is called while
 664      * holding other locks.
 665      *
 666      * @see sun.java2d.d3d.D3DScreenUpdateManager#validate
 667      */
 668     public Color getBackgroundNoSync() {
 669         return background;
 670     }
 671 
 672     private native void _setForeground(int rgb);
 673     private native void _setBackground(int rgb);
 674 
 675     @Override
 676     public synchronized void setFont(Font f) {
 677         font = f;
 678         _setFont(f);
 679     }
 680     synchronized native void _setFont(Font f);
 681     @Override
 682     public void updateCursorImmediately() {
 683         WGlobalCursorManager.getCursorManager().updateCursorImmediately();
 684     }
 685 
 686     // TODO: consider moving it to KeyboardFocusManagerPeerImpl


< prev index next >