JavaTM 2 Platform
Standard Ed. 6

java.awt.font
类 TransformAttribute

java.lang.Object
  继承者 java.awt.font.TransformAttribute
所有已实现的接口:
Serializable

public final class TransformAttribute
extends Object
implements Serializable

TransformAttribute 类为转换提供一个不可变的包装器,使其可以安全地作为属性使用。

另请参见:
序列化表格

字段摘要
static TransformAttribute IDENTITY
          表示恒等变换的 TransformAttribute
 
构造方法摘要
TransformAttribute(AffineTransform transform)
          包装指定的转换。
 
方法摘要
 boolean equals(Object rhs)
          如果 rhs 是一个变换等效于此 TransformAttribute 变换的 TransformAttribute,则返回 true
 AffineTransform getTransform()
          返回包装转换的一个副本。
 int hashCode()
          返回该对象的哈希码值。
 boolean isIdentity()
          如果包装转换是一个恒等变换,则返回 true
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

IDENTITY

public static final TransformAttribute IDENTITY
表示恒等变换的 TransformAttribute

从以下版本开始:
1.6
构造方法详细信息

TransformAttribute

public TransformAttribute(AffineTransform transform)
包装指定的转换。此转换被复制,并保存该副本的一个引用。初始转换不会更改。如果传递 null 作为参数,则此构造方法的行为与执行恒等变换一样。(注意,在这种情况下首选 IDENTITY。)

参数:
transform - 要包装的指定 AffineTransform,或者为 null。
方法详细信息

getTransform

public AffineTransform getTransform()
返回包装转换的一个副本。

返回:
TransformAttribute 的包装转换的一个副本 AffineTransform

isIdentity

public boolean isIdentity()
如果包装转换是一个恒等变换,则返回 true

返回:
如果包装转换是一个恒等变换,则返回 true;否则返回 false
从以下版本开始:
1.4

hashCode

public int hashCode()
从类 Object 复制的描述
返回该对象的哈希码值。支持此方法是为了提高哈希表(例如 java.util.Hashtable 提供的哈希表)的性能。

hashCode 的常规协定是:

实际上,由 Object 类定义的 hashCode 方法确实会针对不同的对象返回不同的整数。(这一般是通过将该对象的内部地址转换成一个整数来实现的,但是 JavaTM 编程语言不需要这种实现技巧。)

覆盖:
Object 中的 hashCode
返回:
此对象的一个哈希码值。
从以下版本开始:
1.6
另请参见:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object rhs)
如果 rhs 是一个变换等效于此 TransformAttribute 变换的 TransformAttribute,则返回 true

覆盖:
Object 中的 equals
参数:
rhs - 要与之比较的对象
返回:
如果该参数是一个变换等效于此 TransformAttribute 变换的 TransformAttribute,则返回 true
从以下版本开始:
1.6
另请参见:
Object.hashCode(), Hashtable

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only