java.awt.font
Class TransformAttribute

java.lang.Object
  extended by java.awt.font.TransformAttribute
All Implemented Interfaces:
Serializable

public final class TransformAttribute
extends Object
implements Serializable

This class provides a mechanism for using an AffineTransform as an immutable attribute (for example, in the AttributedString class). Any transform passed to this class is copied before being stored, and any transform handed out by this class is a copy of the stored transform. In this way, it is not possible to modify the stored transform.

See Also:
Serialized Form

Constructor Summary
TransformAttribute(AffineTransform transform)
          Creates a new attribute that contains a copy of the given transform.
 
Method Summary
 AffineTransform getTransform()
          Returns a copy of the transform contained by this attribute.
 boolean isIdentity()
          Returns true if the transform contained by this attribute is an identity transform, and false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformAttribute

public TransformAttribute(AffineTransform transform)
Creates a new attribute that contains a copy of the given transform.

Parameters:
transform - the transform (null not permitted).
Throws:
IllegalArgumentException - if transform is null.
Method Detail

getTransform

public AffineTransform getTransform()
Returns a copy of the transform contained by this attribute.

Returns:
A copy of the transform.

isIdentity

public boolean isIdentity()
Returns true if the transform contained by this attribute is an identity transform, and false otherwise.

Returns:
true if the transform contained by this attribute is an identity transform, and false otherwise.
Since:
1.4