jdk/src/share/classes/sun/awt/SunHints.java
author dxu
Thu, 04 Apr 2013 15:39:17 -0700
changeset 16734 da1901d79073
parent 12813 c10ab96dcf41
child 23256 d71287a532f8
permissions -rw-r--r--
8000406: change files using @GenerateNativeHeader to use @Native Summary: Use @Native annotation to mark constants interested by native codes Reviewed-by: alanb, anthony, prr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
     2
 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package sun.awt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.awt.RenderingHints;
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
    29
import java.lang.annotation.Native;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * This class contains rendering hints that can be used by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * {@link java.awt.Graphics2D} class, and classes that implement
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * {@link java.awt.image.BufferedImageOp} and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * {@link java.awt.image.Raster}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
public class SunHints {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
     * Defines the type of all keys used to control various
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
     * aspects of the rendering and imaging pipelines.  Instances
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
     * of this class are immutable and unique which means that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
     * tests for matches can be made using the == operator instead
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
     * of the more expensive equals() method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    public static class Key extends RenderingHints.Key {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
        String description;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
         * Construct a key using the indicated private key.  Each
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
         * subclass of Key maintains its own unique domain of integer
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
         * keys.  No two objects with the same integer key and of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
         * same specific subclass can be constructed.  An exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
         * will be thrown if an attempt is made to construct another
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
         * object of a given class with the same integer key as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
         * pre-existing instance of that subclass of Key.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        public Key(int privatekey, String description) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
            super(privatekey);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
            this.description = description;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
         * Returns the numeric index associated with this Key.  This
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
         * is useful for use in switch statements and quick lookups
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
         * of the setting of a particular key.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        public final int getIndex() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
            return intKey();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
         * Returns a string representation of the Key.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
        public final String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
            return description;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
         * Returns true if the specified object is a valid value
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
         * for this Key.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        public boolean isCompatibleValue(Object val) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
            if (val instanceof Value) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
                return ((Value)val).isCompatibleKey(this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
            return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     * Defines the type of all "enumerative" values used to control
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     * various aspects of the rendering and imaging pipelines.  Instances
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
     * of this class are immutable and unique which means that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
     * tests for matches can be made using the == operator instead
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     * of the more expensive equals() method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    public static class Value {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        private SunHints.Key myKey;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        private int index;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        private String description;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        private static Value[][] ValueObjects =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
            new Value[NUM_KEYS][VALS_PER_KEY];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        private synchronized static void register(SunHints.Key key,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
                                                  Value value) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
            int kindex = key.getIndex();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
            int vindex = value.getIndex();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
            if (ValueObjects[kindex][vindex] != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
                throw new InternalError("duplicate index: "+vindex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
            ValueObjects[kindex][vindex] = value;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        public static Value get(int keyindex, int valueindex) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            return ValueObjects[keyindex][valueindex];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
         * Construct a value using the indicated private index.  Each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
         * subclass of Value maintains its own unique domain of integer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
         * indices.  Enforcing the uniqueness of the integer indices
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
         * is left to the subclass.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        public Value(SunHints.Key key, int index, String description) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
            this.myKey = key;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            this.index = index;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            this.description = description;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
            register(key, this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
         * Returns the numeric index associated with this Key.  This
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
         * is useful for use in switch statements and quick lookups
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
         * of the setting of a particular key.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        public final int getIndex() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
            return index;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
         * Returns a string representation of this Value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
        public final String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
            return description;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
         * Returns true if the specified object is a valid Key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
         * for this Value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        public final boolean isCompatibleKey(Key k) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
            return myKey == k;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
         * The hash code for all SunHints.Value objects will be the same
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
         * as the system identity code of the object as defined by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
         * System.identityHashCode() method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        public final int hashCode() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
            return System.identityHashCode(this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
         * The equals method for all SunHints.Value objects will return
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
         * the same result as the equality operator '=='.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        public final boolean equals(Object o) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
            return this == o;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    private static final int NUM_KEYS = 9;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
    private static final int VALS_PER_KEY = 8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     * Rendering hint key and values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     */
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   181
    @Native public static final int INTKEY_RENDERING = 0;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   182
    @Native public static final int INTVAL_RENDER_DEFAULT = 0;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   183
    @Native public static final int INTVAL_RENDER_SPEED = 1;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   184
    @Native public static final int INTVAL_RENDER_QUALITY = 2;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     * Antialiasing hint key and values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     */
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   189
    @Native public static final int INTKEY_ANTIALIASING = 1;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   190
    @Native public static final int INTVAL_ANTIALIAS_DEFAULT = 0;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   191
    @Native public static final int INTVAL_ANTIALIAS_OFF = 1;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   192
    @Native public static final int INTVAL_ANTIALIAS_ON = 2;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
     * Text antialiasing hint key and values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
     */
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   197
    @Native public static final int INTKEY_TEXT_ANTIALIASING = 2;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   198
    @Native public static final int INTVAL_TEXT_ANTIALIAS_DEFAULT = 0;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   199
    @Native public static final int INTVAL_TEXT_ANTIALIAS_OFF = 1;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   200
    @Native public static final int INTVAL_TEXT_ANTIALIAS_ON = 2;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   201
    @Native public static final int INTVAL_TEXT_ANTIALIAS_GASP = 3;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   202
    @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_HRGB = 4;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   203
    @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_HBGR = 5;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   204
    @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_VRGB = 6;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   205
    @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_VBGR = 7;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     * Font fractional metrics hint key and values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     */
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   210
    @Native public static final int INTKEY_FRACTIONALMETRICS = 3;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   211
    @Native public static final int INTVAL_FRACTIONALMETRICS_DEFAULT = 0;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   212
    @Native public static final int INTVAL_FRACTIONALMETRICS_OFF = 1;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   213
    @Native public static final int INTVAL_FRACTIONALMETRICS_ON = 2;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     * Dithering hint key and values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     */
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   218
    @Native public static final int INTKEY_DITHERING = 4;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   219
    @Native public static final int INTVAL_DITHER_DEFAULT = 0;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   220
    @Native public static final int INTVAL_DITHER_DISABLE = 1;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   221
    @Native public static final int INTVAL_DITHER_ENABLE = 2;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     * Interpolation hint key and values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     */
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   226
    @Native public static final int INTKEY_INTERPOLATION = 5;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   227
    @Native public static final int INTVAL_INTERPOLATION_NEAREST_NEIGHBOR = 0;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   228
    @Native public static final int INTVAL_INTERPOLATION_BILINEAR = 1;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   229
    @Native public static final int INTVAL_INTERPOLATION_BICUBIC = 2;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     * Alpha interpolation hint key and values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     */
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   234
    @Native public static final int INTKEY_ALPHA_INTERPOLATION = 6;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   235
    @Native public static final int INTVAL_ALPHA_INTERPOLATION_DEFAULT = 0;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   236
    @Native public static final int INTVAL_ALPHA_INTERPOLATION_SPEED = 1;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   237
    @Native public static final int INTVAL_ALPHA_INTERPOLATION_QUALITY = 2;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     * Color rendering hint key and values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
     */
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   242
    @Native public static final int INTKEY_COLOR_RENDERING = 7;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   243
    @Native public static final int INTVAL_COLOR_RENDER_DEFAULT = 0;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   244
    @Native public static final int INTVAL_COLOR_RENDER_SPEED = 1;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   245
    @Native public static final int INTVAL_COLOR_RENDER_QUALITY = 2;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
     * Stroke normalization control hint key and values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
     */
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   250
    @Native public static final int INTKEY_STROKE_CONTROL = 8;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   251
    @Native public static final int INTVAL_STROKE_DEFAULT = 0;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   252
    @Native public static final int INTVAL_STROKE_NORMALIZE = 1;
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   253
    @Native public static final int INTVAL_STROKE_PURE = 2;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     * LCD text contrast control hint key.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     * Value is "100" to make discontiguous with the others which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
     * are all enumerative and are of a different class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
     */
16734
da1901d79073 8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents: 12813
diff changeset
   260
    @Native public static final int INTKEY_AATEXT_LCD_CONTRAST = 100;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     * Rendering hint key and value objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
    public static final Key KEY_RENDERING =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
        new SunHints.Key(SunHints.INTKEY_RENDERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
                         "Global rendering quality key");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
    public static final Object VALUE_RENDER_SPEED =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
        new SunHints.Value(KEY_RENDERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
                           SunHints.INTVAL_RENDER_SPEED,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
                           "Fastest rendering methods");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
    public static final Object VALUE_RENDER_QUALITY =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
        new SunHints.Value(KEY_RENDERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
                           SunHints.INTVAL_RENDER_QUALITY,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
                           "Highest quality rendering methods");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
    public static final Object VALUE_RENDER_DEFAULT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
        new SunHints.Value(KEY_RENDERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
                           SunHints.INTVAL_RENDER_DEFAULT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
                           "Default rendering methods");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
     * Antialiasing hint key and value objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
    public static final Key KEY_ANTIALIASING =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
        new SunHints.Key(SunHints.INTKEY_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
                         "Global antialiasing enable key");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
    public static final Object VALUE_ANTIALIAS_ON =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
        new SunHints.Value(KEY_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
                           SunHints.INTVAL_ANTIALIAS_ON,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
                           "Antialiased rendering mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
    public static final Object VALUE_ANTIALIAS_OFF =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
        new SunHints.Value(KEY_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
                           SunHints.INTVAL_ANTIALIAS_OFF,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
                           "Nonantialiased rendering mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
    public static final Object VALUE_ANTIALIAS_DEFAULT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
        new SunHints.Value(KEY_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
                           SunHints.INTVAL_ANTIALIAS_DEFAULT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
                           "Default antialiasing rendering mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
     * Text antialiasing hint key and value objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
    public static final Key KEY_TEXT_ANTIALIASING =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
        new SunHints.Key(SunHints.INTKEY_TEXT_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
                         "Text-specific antialiasing enable key");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
    public static final Object VALUE_TEXT_ANTIALIAS_ON =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
        new SunHints.Value(KEY_TEXT_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
                           SunHints.INTVAL_TEXT_ANTIALIAS_ON,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
                           "Antialiased text mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
    public static final Object VALUE_TEXT_ANTIALIAS_OFF =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
        new SunHints.Value(KEY_TEXT_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
                           SunHints.INTVAL_TEXT_ANTIALIAS_OFF,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
                           "Nonantialiased text mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
    public static final Object VALUE_TEXT_ANTIALIAS_DEFAULT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
        new SunHints.Value(KEY_TEXT_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
                           SunHints.INTVAL_TEXT_ANTIALIAS_DEFAULT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
                           "Default antialiasing text mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
    public static final Object VALUE_TEXT_ANTIALIAS_GASP =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
        new SunHints.Value(KEY_TEXT_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
                           SunHints.INTVAL_TEXT_ANTIALIAS_GASP,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
                           "gasp antialiasing text mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
    public static final Object VALUE_TEXT_ANTIALIAS_LCD_HRGB =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
        new SunHints.Value(KEY_TEXT_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
                           SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
                           "LCD HRGB antialiasing text mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
    public static final Object VALUE_TEXT_ANTIALIAS_LCD_HBGR =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
        new SunHints.Value(KEY_TEXT_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
                           SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HBGR,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
                           "LCD HBGR antialiasing text mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
    public static final Object VALUE_TEXT_ANTIALIAS_LCD_VRGB =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
        new SunHints.Value(KEY_TEXT_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
                           SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
                           "LCD VRGB antialiasing text mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
    public static final Object VALUE_TEXT_ANTIALIAS_LCD_VBGR =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
        new SunHints.Value(KEY_TEXT_ANTIALIASING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
                           SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VBGR,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
                           "LCD VBGR antialiasing text mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
     * Font fractional metrics hint key and value objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
    public static final Key KEY_FRACTIONALMETRICS =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
        new SunHints.Key(SunHints.INTKEY_FRACTIONALMETRICS,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
                         "Fractional metrics enable key");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
    public static final Object VALUE_FRACTIONALMETRICS_ON =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
        new SunHints.Value(KEY_FRACTIONALMETRICS,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
                           SunHints.INTVAL_FRACTIONALMETRICS_ON,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
                           "Fractional text metrics mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
    public static final Object VALUE_FRACTIONALMETRICS_OFF =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
        new SunHints.Value(KEY_FRACTIONALMETRICS,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
                           SunHints.INTVAL_FRACTIONALMETRICS_OFF,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
                           "Integer text metrics mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
    public static final Object VALUE_FRACTIONALMETRICS_DEFAULT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
        new SunHints.Value(KEY_FRACTIONALMETRICS,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
                           SunHints.INTVAL_FRACTIONALMETRICS_DEFAULT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
                           "Default fractional text metrics mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
     * Dithering hint key and value objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
    public static final Key KEY_DITHERING =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
        new SunHints.Key(SunHints.INTKEY_DITHERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
                         "Dithering quality key");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
    public static final Object VALUE_DITHER_ENABLE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
        new SunHints.Value(KEY_DITHERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
                           SunHints.INTVAL_DITHER_ENABLE,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
                           "Dithered rendering mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
    public static final Object VALUE_DITHER_DISABLE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
        new SunHints.Value(KEY_DITHERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
                           SunHints.INTVAL_DITHER_DISABLE,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
                           "Nondithered rendering mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
    public static final Object VALUE_DITHER_DEFAULT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
        new SunHints.Value(KEY_DITHERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
                           SunHints.INTVAL_DITHER_DEFAULT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
                           "Default dithering mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
     * Interpolation hint key and value objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
    public static final Key KEY_INTERPOLATION =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
        new SunHints.Key(SunHints.INTKEY_INTERPOLATION,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
                         "Image interpolation method key");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
    public static final Object VALUE_INTERPOLATION_NEAREST_NEIGHBOR =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
        new SunHints.Value(KEY_INTERPOLATION,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
                           SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
                           "Nearest Neighbor image interpolation mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
    public static final Object VALUE_INTERPOLATION_BILINEAR =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
        new SunHints.Value(KEY_INTERPOLATION,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
                           SunHints.INTVAL_INTERPOLATION_BILINEAR,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
                           "Bilinear image interpolation mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
    public static final Object VALUE_INTERPOLATION_BICUBIC =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
        new SunHints.Value(KEY_INTERPOLATION,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
                           SunHints.INTVAL_INTERPOLATION_BICUBIC,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
                           "Bicubic image interpolation mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
     * Alpha interpolation hint key and value objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
    public static final Key KEY_ALPHA_INTERPOLATION =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
        new SunHints.Key(SunHints.INTKEY_ALPHA_INTERPOLATION,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
                         "Alpha blending interpolation method key");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
    public static final Object VALUE_ALPHA_INTERPOLATION_SPEED =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
        new SunHints.Value(KEY_ALPHA_INTERPOLATION,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
                           SunHints.INTVAL_ALPHA_INTERPOLATION_SPEED,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
                           "Fastest alpha blending methods");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
    public static final Object VALUE_ALPHA_INTERPOLATION_QUALITY =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
        new SunHints.Value(KEY_ALPHA_INTERPOLATION,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
                           SunHints.INTVAL_ALPHA_INTERPOLATION_QUALITY,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
                           "Highest quality alpha blending methods");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
    public static final Object VALUE_ALPHA_INTERPOLATION_DEFAULT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
        new SunHints.Value(KEY_ALPHA_INTERPOLATION,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
                           SunHints.INTVAL_ALPHA_INTERPOLATION_DEFAULT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
                           "Default alpha blending methods");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
     * Color rendering hint key and value objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
    public static final Key KEY_COLOR_RENDERING =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
        new SunHints.Key(SunHints.INTKEY_COLOR_RENDERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
                         "Color rendering quality key");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
    public static final Object VALUE_COLOR_RENDER_SPEED =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
        new SunHints.Value(KEY_COLOR_RENDERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
                           SunHints.INTVAL_COLOR_RENDER_SPEED,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
                           "Fastest color rendering mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
    public static final Object VALUE_COLOR_RENDER_QUALITY =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
        new SunHints.Value(KEY_COLOR_RENDERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
                           SunHints.INTVAL_COLOR_RENDER_QUALITY,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
                           "Highest quality color rendering mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
    public static final Object VALUE_COLOR_RENDER_DEFAULT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
        new SunHints.Value(KEY_COLOR_RENDERING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
                           SunHints.INTVAL_COLOR_RENDER_DEFAULT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
                           "Default color rendering mode");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
     * Stroke normalization control hint key and value objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
    public static final Key KEY_STROKE_CONTROL =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
        new SunHints.Key(SunHints.INTKEY_STROKE_CONTROL,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
                         "Stroke normalization control key");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
    public static final Object VALUE_STROKE_DEFAULT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
        new SunHints.Value(KEY_STROKE_CONTROL,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
                           SunHints.INTVAL_STROKE_DEFAULT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
                           "Default stroke normalization");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
    public static final Object VALUE_STROKE_NORMALIZE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
        new SunHints.Value(KEY_STROKE_CONTROL,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
                           SunHints.INTVAL_STROKE_NORMALIZE,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
                           "Normalize strokes for consistent rendering");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
    public static final Object VALUE_STROKE_PURE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
        new SunHints.Value(KEY_STROKE_CONTROL,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
                           SunHints.INTVAL_STROKE_PURE,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
                           "Pure stroke conversion for accurate paths");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
    public static class LCDContrastKey extends Key {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
        public LCDContrastKey(int privatekey, String description) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
            super(privatekey, description);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
         * Returns true if the specified object is a valid value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
         * for this Key. The allowable range is 100 to 250.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
        public final boolean isCompatibleValue(Object val) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
            if (val instanceof Integer) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
                int ival = ((Integer)val).intValue();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
                return ival >= 100 && ival <= 250;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
            return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
     * LCD text contrast hint key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
    public static final RenderingHints.Key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
        KEY_TEXT_ANTIALIAS_LCD_CONTRAST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
        new LCDContrastKey(SunHints.INTKEY_AATEXT_LCD_CONTRAST,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
                           "Text-specific LCD contrast key");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
}