ubc.cs.JLog.Animation
Class aAttributeTranslation
java.lang.Object
ubc.cs.JLog.Animation.aAttributeTranslation
- All Implemented Interfaces:
- iAttributes
- Direct Known Subclasses:
- aAnimationObject, aAnimationShape
public abstract class aAttributeTranslation
- extends java.lang.Object
- implements iAttributes
The base class for animation objects and shapes. It provides a standard foundation
for attributes and translation between terms and objects.
- Author:
- Glendon Holst
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
aAttributeTranslation
public aAttributeTranslation()
getTermTranslation
public jTermTranslation getTermTranslation()
- Get the current translation unit for this object. Usually, it will get a translation
unit for the class. The returned unit should not be modified (since it belongs to the
class).
- Returns:
- The
jTermTranslation
translation unit.
setDefaultsForTranslation
public static void setDefaultsForTranslation(jTermTranslation t)
setStringKeysForTranslation
public static void setStringKeysForTranslation(jTermTranslation t,
java.lang.String skey,
java.lang.Object okey,
java.lang.Object tkey)
- Registers existing converters with a new name. The existing converters are referenced
via their keys.
- Parameters:
t
- The jTermTranslation
unit to register to.skey
- The string key to use (is used for both object->term and term->object
conversions.okey
- An existing TermToObject key.tkey
- An existing ObjectToTerm key.
setObjectDefaults
protected static void setObjectDefaults(jTermTranslation t)
setTermDefaults
protected static void setTermDefaults(jTermTranslation t)
convertToTerms
public static jTerm[] convertToTerms(jTerm t)
convertToTerms
public static jTerm[] convertToTerms(jTerm t,
int args)
convertToList
public static jList convertToList(jTerm t)
convertToFloat
public static float convertToFloat(jTerm t,
boolean promote)
convertToInt
public static int convertToInt(jTerm t,
boolean demote)
convertToString
public static java.lang.String convertToString(jTerm t)
convertToBoolean
public static boolean convertToBoolean(jTerm t)
convertToColor
public static java.awt.Color convertToColor(jTerm t)
convertFromColor
public static jTerm convertFromColor(java.awt.Color c)
convertToFont
public static FloatFont convertToFont(jTerm t)
convertFromFont
public static jTerm convertFromFont(FloatFont f)
convertToAnimationObject
public static aAnimationObject convertToAnimationObject(jTerm t,
aAnimationEnvironment ae)
convertToAnimationShape
public static aAnimationShape convertToAnimationShape(jTerm t)
convertToAttributesObject
public static aAttributeTranslation convertToAttributesObject(jTerm t)
convertToPolygon
public static FloatPolygon convertToPolygon(jTerm t)
convertFromPolygon
public static jTerm convertFromPolygon(FloatPolygon p)
convertToRectangle
public static FloatRectangle convertToRectangle(jTerm t)
convertFromRectangle
public static jTerm convertFromRectangle(FloatRectangle r)