< prev index next >

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

Print this page


   1 /*
   2  * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 713     public Image createImage(ImageProducer producer) {
 714         return new ToolkitImage(producer);
 715     }
 716 
 717     public Image createImage(int width, int height) {
 718         return graphicsConfig.createAcceleratedImage(target, width, height);
 719     }
 720 
 721     public VolatileImage createVolatileImage(int width, int height) {
 722         return new SunVolatileImage(target, width, height);
 723     }
 724 
 725     public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
 726         return Toolkit.getDefaultToolkit().prepareImage(img, w, h, o);
 727     }
 728 
 729     public int checkImage(Image img, int w, int h, ImageObserver o) {
 730         return Toolkit.getDefaultToolkit().checkImage(img, w, h, o);
 731     }
 732 
 733     public Dimension preferredSize() {
 734         return getPreferredSize();
 735     }
 736 
 737     public Dimension minimumSize() {
 738         return getMinimumSize();
 739     }
 740 
 741     public Insets getInsets() {
 742         return new Insets(0, 0, 0, 0);
 743     }
 744 
 745     public void beginValidate() {
 746     }
 747 
 748     public void endValidate() {
 749     }
 750 
 751 
 752     /**
 753      * DEPRECATED:  Replaced by getInsets().
 754      */
 755 
 756     public Insets insets() {
 757         return getInsets();
 758     }
 759 
 760     // Returns true if we are inside begin/endLayout and
 761     // are waiting for native painting
 762     public boolean isPaintPending() {
 763         return paintPending && isLayouting;
 764     }
 765 
 766     public boolean handlesWheelScrolling() {
 767         return false;
 768     }
 769 
 770     public void beginLayout() {
 771         // Skip all painting till endLayout
 772         isLayouting = true;
 773 
 774     }
 775 
 776     public void endLayout() {
 777         if (!paintPending && !paintArea.isEmpty()
 778             && !AWTAccessor.getComponentAccessor().getIgnoreRepaint(target))
 779         {


   1 /*
   2  * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 713     public Image createImage(ImageProducer producer) {
 714         return new ToolkitImage(producer);
 715     }
 716 
 717     public Image createImage(int width, int height) {
 718         return graphicsConfig.createAcceleratedImage(target, width, height);
 719     }
 720 
 721     public VolatileImage createVolatileImage(int width, int height) {
 722         return new SunVolatileImage(target, width, height);
 723     }
 724 
 725     public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
 726         return Toolkit.getDefaultToolkit().prepareImage(img, w, h, o);
 727     }
 728 
 729     public int checkImage(Image img, int w, int h, ImageObserver o) {
 730         return Toolkit.getDefaultToolkit().checkImage(img, w, h, o);
 731     }
 732 








 733     public Insets getInsets() {
 734         return new Insets(0, 0, 0, 0);
 735     }
 736 
 737     public void beginValidate() {
 738     }
 739 
 740     public void endValidate() {
 741     }
 742 









 743     // Returns true if we are inside begin/endLayout and
 744     // are waiting for native painting
 745     public boolean isPaintPending() {
 746         return paintPending && isLayouting;
 747     }
 748 
 749     public boolean handlesWheelScrolling() {
 750         return false;
 751     }
 752 
 753     public void beginLayout() {
 754         // Skip all painting till endLayout
 755         isLayouting = true;
 756 
 757     }
 758 
 759     public void endLayout() {
 760         if (!paintPending && !paintArea.isEmpty()
 761             && !AWTAccessor.getComponentAccessor().getIgnoreRepaint(target))
 762         {


< prev index next >