java.awt.font

Class TransformAttribute

public final class TransformAttribute extends Object implements Serializable

This class provides a mechanism for using an {@link AffineTransform} as an immutable attribute (for example, in the {@link java.text.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.
Constructor Summary
TransformAttribute(AffineTransform transform)
Creates a new attribute that contains a copy of the given transform.
Method Summary
AffineTransformgetTransform()
Returns a copy of the transform contained by this attribute.
booleanisIdentity()
Returns true if the transform contained by this attribute is an identity transform, and false otherwise.

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