< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java

Print this page




 705         // as it stands currently we don't need to do layout since
 706         // layout is done in the Component upon setFont.
 707         //layout();
 708         repaint();
 709     }
 710 
 711     public Font getFont() {
 712         return font;
 713     }
 714 
 715     public void updateCursorImmediately() {
 716         XGlobalCursorManager.getCursorManager().updateCursorImmediately();
 717     }
 718 
 719     public final void pSetCursor(Cursor cursor) {
 720         this.pSetCursor(cursor, true);
 721     }
 722 
 723     /*
 724      * The method changes the cursor.
 725      * @param cursor - a new cursor to change to.
 726      * @param ignoreSubComponents - if {@code true} is passed then
 727      *                              the new cursor will be installed on window.
 728      *                              if {@code false} is passed then
 729      *                              subsequent components will try to handle
 730      *                              this request and install their cursor.
 731      */
 732     //ignoreSubComponents not used here
 733     public void pSetCursor(Cursor cursor, boolean ignoreSubComponents) {
 734         XToolkit.awtLock();
 735         try {
 736             long xcursor = XGlobalCursorManager.getCursor(cursor);
 737 
 738             XSetWindowAttributes xwa = new XSetWindowAttributes();
 739             xwa.set_cursor(xcursor);
 740 
 741             long valuemask = XConstants.CWCursor;
 742 
 743             XlibWrapper.XChangeWindowAttributes(XToolkit.getDisplay(),getWindow(),valuemask,xwa.pData);
 744             XlibWrapper.XFlush(XToolkit.getDisplay());
 745             xwa.dispose();
 746         } finally {




 705         // as it stands currently we don't need to do layout since
 706         // layout is done in the Component upon setFont.
 707         //layout();
 708         repaint();
 709     }
 710 
 711     public Font getFont() {
 712         return font;
 713     }
 714 
 715     public void updateCursorImmediately() {
 716         XGlobalCursorManager.getCursorManager().updateCursorImmediately();
 717     }
 718 
 719     public final void pSetCursor(Cursor cursor) {
 720         this.pSetCursor(cursor, true);
 721     }
 722 
 723     /*
 724      * The method changes the cursor.
 725      * @param cursor  a new cursor to change to.
 726      * @param ignoreSubComponents   if {@code true} is passed then
 727      *                              the new cursor will be installed on window.
 728      *                              if {@code false} is passed then
 729      *                              subsequent components will try to handle
 730      *                              this request and install their cursor.
 731      */
 732     //ignoreSubComponents not used here
 733     public void pSetCursor(Cursor cursor, boolean ignoreSubComponents) {
 734         XToolkit.awtLock();
 735         try {
 736             long xcursor = XGlobalCursorManager.getCursor(cursor);
 737 
 738             XSetWindowAttributes xwa = new XSetWindowAttributes();
 739             xwa.set_cursor(xcursor);
 740 
 741             long valuemask = XConstants.CWCursor;
 742 
 743             XlibWrapper.XChangeWindowAttributes(XToolkit.getDisplay(),getWindow(),valuemask,xwa.pData);
 744             XlibWrapper.XFlush(XToolkit.getDisplay());
 745             xwa.dispose();
 746         } finally {


< prev index next >