Class TransformAttribute
java.lang.Object
java.awt.font.TransformAttribute
- All Implemented Interfaces:
Serializable
The
TransformAttribute class provides an immutable
wrapper for a transform so that it is safe to use as an attribute.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TransformAttributeATransformAttributerepresenting the identity transform. -
Constructor Summary
ConstructorsConstructorDescriptionTransformAttribute(AffineTransform transform) Wraps the specified transform. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif rhs is aTransformAttributewhose transform is equal to thisTransformAttribute's transform.Returns a copy of the wrapped transform.inthashCode()Answers an integer hash code for the receiver.booleanReturnstrueif the wrapped transform is an identity transform.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Field Details
-
IDENTITY
ATransformAttributerepresenting the identity transform.- Since:
- 1.6
-
-
Constructor Details
-
TransformAttribute
Wraps the specified transform. The transform is cloned and a reference to the clone is kept. The original transform is unchanged. If null is passed as the argument, this constructor behaves as though it were the identity transform. (Note that it is preferable to useIDENTITYin this case.)- Parameters:
transform- the specifiedAffineTransformto be wrapped, or null.
-
-
Method Details
-
getTransform
Returns a copy of the wrapped transform.- Returns:
- an
AffineTransformthat is a copy of the wrapped transform of thisTransformAttribute.
-
isIdentity
public boolean isIdentity()Returnstrueif the wrapped transform is an identity transform.- Returns:
trueif the wrapped transform is an identity transform;falseotherwise.- Since:
- 1.4
-
hashCode
-
equals
Returnstrueif rhs is aTransformAttributewhose transform is equal to thisTransformAttribute's transform.
-