所有类
java.awt
类 GraphicsConfigTemplate
java.lang.Object
java.awt.GraphicsConfigTemplate
- 所有已实现的接口:
- Serializable
public abstract class GraphicsConfigTemplate
- extends Object
- implements Serializable
GraphicsConfigTemplate
类用于获取有效的 GraphicsConfiguration
。用户实例化其中的一个对象,然后根据需要设置所有非默认的属性。然后,使用此 GraphicsConfigTemplate
调用可在 GraphicsDevice
类中找到的 GraphicsDevice.getBestConfiguration(java.awt.GraphicsConfigTemplate)
方法。返回一个有效的 GraphicsConfiguration
,它可满足或超过 GraphicsConfigTemplate
中的要求。
- 从以下版本开始:
- 1.2
- 另请参见:
GraphicsDevice
, GraphicsConfiguration
, 序列化表格
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REQUIRED
public static final int REQUIRED
- 用于“枚举”(整数)类型的值。声明此功能对于
GraphicsConfiguration
对象是必需的。如果此功能不可用,则不要选择 GraphicsConfiguration
对象。 - 另请参见:
- 常量字段值
PREFERRED
public static final int PREFERRED
- 用于“枚举”(整数)类型的值。声明此功能是
GraphicsConfiguration
对象所期望的。尽管这两个选项都被视为有效的匹配,但具有此功能的选项要优先于不包含此功能的选项。 - 另请参见:
- 常量字段值
UNNECESSARY
public static final int UNNECESSARY
- 用于“枚举”(整数)类型的值。声明此功能对于选择
GraphicsConfiguration
对象不是必需的。没有此功能的选项要优先于包含此功能的选项,因为没有使用该功能。 - 另请参见:
- 常量字段值
GraphicsConfigTemplate
public GraphicsConfigTemplate()
- 此类是一个抽象类,因此只有子类才可以实例化。
getBestConfiguration
public abstract GraphicsConfiguration getBestConfiguration(GraphicsConfiguration[] gc)
- 返回通过了
GraphicsConfigTemplate
中定义的标准的可能“最佳”配置。
- 参数:
gc
- 要从其选择的 GraphicsConfiguration
对象的数组。 - 返回:
- 一个可能是最佳配置的
GraphicsConfiguration
对象。 - 另请参见:
GraphicsConfiguration
isGraphicsConfigSupported
public abstract boolean isGraphicsConfigSupported(GraphicsConfiguration gc)
- 返回一个
boolean
,它指示指定的 GraphicsConfiguration
是否可用于创建支持指定功能的绘图面。
- 参数:
gc
- 要测试的 GraphicsConfiguration
对象 - 返回:
- 如果此
GraphicsConfiguration
对象可用于创建支持指定功能的画面,则返回 true
;如果 GraphicsConfiguration
不能用于创建此 Java(tm) API 可用的绘图面,则返回 false
。
所有类