java.lang.Object
java.awt.GraphicsConfigTemplate
- 所有已实现的接口:
-
Serializable
GraphicsConfigTemplate类用于获取有效的GraphicsConfiguration。用户实例化这些对象,然后根据需要设置所有非默认属性。然后使用GraphicsDevice.getBestConfiguration(java.awt.GraphicsConfigTemplate)方法在GraphicsDevice类中调用此GraphicsConfigTemplate。返回一个有效的GraphicsConfiguration,满足或超出了在GraphicsConfigTemplate中请求的内容。
- 自:
- 1.2
- 参见:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int用于"Enum"(整数)类型的值。static final int用于"Enum"(整数)类型的值。static final int用于"Enum"(整数)类型的值。 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract GraphicsConfiguration返回通过GraphicsConfigTemplate定义的标准的“最佳”配置。abstract boolean返回一个boolean,指示指定的GraphicsConfiguration是否可以用于创建支持指定特性的绘图表面。
-
Field Details
-
REQUIRED
public static final int REQUIRED用于"Enum"(整数)类型的值。表示此特性对于GraphicsConfiguration对象是必需的。如果此特性不可用,则不要选择GraphicsConfiguration对象。- 参见:
-
PREFERRED
public static final int PREFERRED用于"Enum"(整数)类型的值。表示此特性对于GraphicsConfiguration对象是期望的。具有此特性的选择优先于不包括此特性的选择,尽管这两种选择都可以被视为有效匹配。- 参见:
-
UNNECESSARY
public static final int UNNECESSARY用于"Enum"(整数)类型的值。表示此特性对于选择GraphicsConfiguration对象是不必要的。没有此特性的选择优先于包含此特性的选择,因为它没有被使用。- 参见:
-
-
Constructor Details
-
GraphicsConfigTemplate
public GraphicsConfigTemplate()这个类是一个抽象类,因此只能实例化子类。
-
-
Method Details
-
getBestConfiguration
返回通过GraphicsConfigTemplate定义的标准的“最佳”配置。- 参数:
-
gc- 选择的GraphicsConfiguration对象数组。 - 返回:
-
一个
GraphicsConfiguration对象,是可能的最佳配置。 - 参见:
-
isGraphicsConfigSupported
返回一个boolean,指示指定的GraphicsConfiguration是否可以用于创建支持指定特性的绘图表面。- 参数:
-
gc- 要测试的GraphicsConfiguration对象 - 返回:
-
如果这个
GraphicsConfiguration对象可以用于创建支持指定特性的表面,则返回true;如果GraphicsConfiguration不能用于创建此Java(tm) API可用的绘图表面,则返回false。
-