Package ptolemy.data
Class AWTImageToken
- java.lang.Object
-
- ptolemy.data.Token
-
- ptolemy.data.ObjectToken
-
- ptolemy.data.ImageToken
-
- ptolemy.data.AWTImageToken
-
public class AWTImageToken extends ImageToken
A token that contains a java.awt.Image. This token is used in the standard image processing library.- Since:
- Ptolemy II 3.0
- Version:
- $Id$
- Author:
- James Yeh
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Constructor Summary
Constructors Constructor Description AWTImageToken(java.awt.Image value)Construct a token with a specified java.awt.Image.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.ImageasAWTImage()Because all tokens that contain images must extend ImageToken, we must include the following method.TypegetType()Return the type of this token.java.awt.ImagegetValue()Return the java.awt.Image object associated with this token.java.lang.StringtoString()Return a description of the token.-
Methods inherited from class ptolemy.data.ObjectToken
_isCloseTo, _isEqualTo, convert, equals, getValueClass, hashCode, isCloseTo, isEqualTo, object
-
Methods inherited from class ptolemy.data.Token
add, addReverse, divide, divideReverse, isCloseTo, isNil, modulo, moduloReverse, multiply, multiplyReverse, notSupportedConversionMessage, notSupportedIncomparableConversionMessage, notSupportedIncomparableMessage, notSupportedMessage, notSupportedNullNilStringMessage, one, pow, subtract, subtractReverse, zero, zeroReturnType
-
-
-
-
Method Detail
-
asAWTImage
public java.awt.Image asAWTImage()
Because all tokens that contain images must extend ImageToken, we must include the following method.- Specified by:
asAWTImagein classImageToken- Returns:
- The image.
-
getType
public Type getType()
Description copied from class:ObjectTokenReturn the type of this token.- Overrides:
getTypein classObjectToken- Returns:
- BaseType.OBJECT
-
getValue
public java.awt.Image getValue()
Return the java.awt.Image object associated with this token.- Overrides:
getValuein classObjectToken- Returns:
- the java.awt.Image object.
-
toString
public java.lang.String toString()
Return a description of the token. If possible, derived classes should override this method and return the value of this token as a string that can be parsed by the expression language to recover a token with the same value. Unfortunately, in this base class, we can only return the classname, the width and the height as a string representation of a record.- Overrides:
toStringin classObjectToken- Returns:
- The classname, width and height as string representation of a record.
-
-