< prev index next >

src/java.desktop/share/classes/java/awt/BufferCapabilities.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2011, 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


 137             return super.clone();
 138         } catch (CloneNotSupportedException e) {
 139             // Since we implement Cloneable, this should never happen
 140             throw new InternalError(e);
 141         }
 142     }
 143 
 144     // Inner class FlipContents
 145     /**
 146      * A type-safe enumeration of the possible back buffer contents after
 147      * page-flipping
 148      * @since 1.4
 149      */
 150     public static final class FlipContents extends AttributeValue {
 151 
 152         private static int I_UNDEFINED = 0;
 153         private static int I_BACKGROUND = 1;
 154         private static int I_PRIOR = 2;
 155         private static int I_COPIED = 3;
 156 
 157         private static final String NAMES[] =
 158             { "undefined", "background", "prior", "copied" };
 159 
 160         /**
 161          * When flip contents are {@code UNDEFINED}, the
 162          * contents of the back buffer are undefined after flipping.
 163          * @see #isPageFlipping
 164          * @see #getFlipContents
 165          * @see #BACKGROUND
 166          * @see #PRIOR
 167          * @see #COPIED
 168          */
 169         public static final FlipContents UNDEFINED =
 170             new FlipContents(I_UNDEFINED);
 171 
 172         /**
 173          * When flip contents are {@code BACKGROUND}, the
 174          * contents of the back buffer are cleared with the background color after
 175          * flipping.
 176          * @see #isPageFlipping
 177          * @see #getFlipContents


   1 /*
   2  * Copyright (c) 2000, 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


 137             return super.clone();
 138         } catch (CloneNotSupportedException e) {
 139             // Since we implement Cloneable, this should never happen
 140             throw new InternalError(e);
 141         }
 142     }
 143 
 144     // Inner class FlipContents
 145     /**
 146      * A type-safe enumeration of the possible back buffer contents after
 147      * page-flipping
 148      * @since 1.4
 149      */
 150     public static final class FlipContents extends AttributeValue {
 151 
 152         private static int I_UNDEFINED = 0;
 153         private static int I_BACKGROUND = 1;
 154         private static int I_PRIOR = 2;
 155         private static int I_COPIED = 3;
 156 
 157         private static final String[] NAMES =
 158             { "undefined", "background", "prior", "copied" };
 159 
 160         /**
 161          * When flip contents are {@code UNDEFINED}, the
 162          * contents of the back buffer are undefined after flipping.
 163          * @see #isPageFlipping
 164          * @see #getFlipContents
 165          * @see #BACKGROUND
 166          * @see #PRIOR
 167          * @see #COPIED
 168          */
 169         public static final FlipContents UNDEFINED =
 170             new FlipContents(I_UNDEFINED);
 171 
 172         /**
 173          * When flip contents are {@code BACKGROUND}, the
 174          * contents of the back buffer are cleared with the background color after
 175          * flipping.
 176          * @see #isPageFlipping
 177          * @see #getFlipContents


< prev index next >