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