Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.awt
Class GraphicsConfigTemplate  view GraphicsConfigTemplate download GraphicsConfigTemplate.java

java.lang.Object
  extended byjava.awt.GraphicsConfigTemplate
All Implemented Interfaces:
java.io.Serializable

public abstract class GraphicsConfigTemplate
extends java.lang.Object
implements java.io.Serializable

This allows filtering an array of GraphicsConfigurations for the best one based on various requirements. The resulting configuration has had all non-default attributes set as required to meet or exceed the request.

Since:
1.2

Field Summary
static int PREFERRED
          States that a feature is preferred, but not required, to select a configuration.
static int REQUIRED
          States that a feature is required to select a configuration.
private static long serialVersionUID
          Compatible with JDK 1.2+.
static int UNNECESSARY
          States that a feature is not necessary in the configuration.
 
Constructor Summary
GraphicsConfigTemplate()
          The default constructor.
 
Method Summary
abstract  GraphicsConfiguration getBestConfiguration(GraphicsConfiguration[] array)
          Returns the "best" match among the array of possible configurations, given the criteria of this template.
abstract  boolean isGraphicsConfigSupported(GraphicsConfiguration config)
          Returns true if the given configuration supports all the features required by this template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Compatible with JDK 1.2+.

See Also:
Constant Field Values

REQUIRED

public static final int REQUIRED
States that a feature is required to select a configuration.

See Also:
Constant Field Values

PREFERRED

public static final int PREFERRED
States that a feature is preferred, but not required, to select a configuration. In the case of multiple valid configurations, the tie breaks in favor of the one with the feature.

See Also:
Constant Field Values

UNNECESSARY

public static final int UNNECESSARY
States that a feature is not necessary in the configuration. In the case of multiple valid configurations, the tie breaks in favor of the one without the feature, to reduce overhead.

See Also:
Constant Field Values
Constructor Detail

GraphicsConfigTemplate

public GraphicsConfigTemplate()
The default constructor.

Method Detail

getBestConfiguration

public abstract GraphicsConfiguration getBestConfiguration(GraphicsConfiguration[] array)
Returns the "best" match among the array of possible configurations, given the criteria of this template.


isGraphicsConfigSupported

public abstract boolean isGraphicsConfigSupported(GraphicsConfiguration config)
Returns true if the given configuration supports all the features required by this template.