/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* This class contains rendering hints that can be used by the
* {@link java.awt.Graphics2D} class, and classes that implement
* {@link java.awt.image.BufferedImageOp} and
* {@link java.awt.image.Raster}.
*/
public class SunHints {
/**
* Defines the type of all keys used to control various
* aspects of the rendering and imaging pipelines. Instances
* of this class are immutable and unique which means that
* tests for matches can be made using the == operator instead
* of the more expensive equals() method.
*/
/**
* Construct a key using the indicated private key. Each
* subclass of Key maintains its own unique domain of integer
* keys. No two objects with the same integer key and of the
* same specific subclass can be constructed. An exception
* will be thrown if an attempt is made to construct another
* object of a given class with the same integer key as a
* pre-existing instance of that subclass of Key.
*/
super(privatekey);
this.description = description;
}
/**
* Returns the numeric index associated with this Key. This
* is useful for use in switch statements and quick lookups
* of the setting of a particular key.
*/
public final int getIndex() {
return intKey();
}
/**
* Returns a string representation of the Key.
*/
return description;
}
/**
* Returns true if the specified object is a valid value
* for this Key.
*/
}
return false;
}
}
/**
* Defines the type of all "enumerative" values used to control
* various aspects of the rendering and imaging pipelines. Instances
* of this class are immutable and unique which means that
* tests for matches can be made using the == operator instead
* of the more expensive equals() method.
*/
public static class Value {
private int index;
}
}
}
/**
* Construct a value using the indicated private index. Each
* subclass of Value maintains its own unique domain of integer
* indices. Enforcing the uniqueness of the integer indices
* is left to the subclass.
*/
this.description = description;
}
/**
* Returns the numeric index associated with this Key. This
* is useful for use in switch statements and quick lookups
* of the setting of a particular key.
*/
public final int getIndex() {
return index;
}
/**
* Returns a string representation of this Value.
*/
return description;
}
/**
* Returns true if the specified object is a valid Key
* for this Value.
*/
return myKey == k;
}
/**
* The hash code for all SunHints.Value objects will be the same
* as the system identity code of the object as defined by the
* System.identityHashCode() method.
*/
public final int hashCode() {
return System.identityHashCode(this);
}
/**
* The equals method for all SunHints.Value objects will return
* the same result as the equality operator '=='.
*/
return this == o;
}
}
/**
* Rendering hint key and values
*/
/**
* Antialiasing hint key and values
*/
/**
* Text antialiasing hint key and values
*/
/**
* Font fractional metrics hint key and values
*/
/**
* Dithering hint key and values
*/
/**
* Interpolation hint key and values
*/
/**
* Alpha interpolation hint key and values
*/
/**
* Color rendering hint key and values
*/
/**
* Stroke normalization control hint key and values
*/
/**
* LCD text contrast control hint key.
* Value is "100" to make discontiguous with the others which
* are all enumerative and are of a different class.
*/
/**
* Rendering hint key and value objects
*/
"Global rendering quality key");
"Fastest rendering methods");
"Highest quality rendering methods");
"Default rendering methods");
/**
* Antialiasing hint key and value objects
*/
"Global antialiasing enable key");
"Antialiased rendering mode");
"Nonantialiased rendering mode");
"Default antialiasing rendering mode");
/**
* Text antialiasing hint key and value objects
*/
"Text-specific antialiasing enable key");
"Antialiased text mode");
"Nonantialiased text mode");
"Default antialiasing text mode");
"gasp antialiasing text mode");
"LCD HRGB antialiasing text mode");
"LCD HBGR antialiasing text mode");
"LCD VRGB antialiasing text mode");
"LCD VBGR antialiasing text mode");
/**
* Font fractional metrics hint key and value objects
*/
"Fractional metrics enable key");
"Fractional text metrics mode");
"Integer text metrics mode");
"Default fractional text metrics mode");
/**
* Dithering hint key and value objects
*/
"Dithering quality key");
"Dithered rendering mode");
"Nondithered rendering mode");
"Default dithering mode");
/**
* Interpolation hint key and value objects
*/
"Image interpolation method key");
"Nearest Neighbor image interpolation mode");
"Bilinear image interpolation mode");
"Bicubic image interpolation mode");
/**
* Alpha interpolation hint key and value objects
*/
"Alpha blending interpolation method key");
"Fastest alpha blending methods");
"Highest quality alpha blending methods");
"Default alpha blending methods");
/**
* Color rendering hint key and value objects
*/
"Color rendering quality key");
"Fastest color rendering mode");
"Highest quality color rendering mode");
"Default color rendering mode");
/**
* Stroke normalization control hint key and value objects
*/
"Stroke normalization control key");
"Default stroke normalization");
"Normalize strokes for consistent rendering");
"Pure stroke conversion for accurate paths");
super(privatekey, description);
}
/**
* Returns true if the specified object is a valid value
* for this Key. The allowable range is 100 to 250.
*/
}
return false;
}
}
/**
* LCD text contrast hint key
*/
public static final RenderingHints.Key
"Text-specific LCD contrast key");
}