ubc.cs.JLog.Animation
Class aAttributeTranslation

java.lang.Object
  extended by 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

Constructor Summary
aAttributeTranslation()
           
 
Method Summary
static jTerm convertFromColor(java.awt.Color c)
           
static jTerm convertFromFont(FloatFont f)
           
static jTerm convertFromPolygon(FloatPolygon p)
           
static jTerm convertFromRectangle(FloatRectangle r)
           
static aAnimationObject convertToAnimationObject(jTerm t, aAnimationEnvironment ae)
           
static aAnimationShape convertToAnimationShape(jTerm t)
           
static aAttributeTranslation convertToAttributesObject(jTerm t)
           
static boolean convertToBoolean(jTerm t)
           
static java.awt.Color convertToColor(jTerm t)
           
static float convertToFloat(jTerm t, boolean promote)
           
static FloatFont convertToFont(jTerm t)
           
static int convertToInt(jTerm t, boolean demote)
           
static jList convertToList(jTerm t)
           
static FloatPolygon convertToPolygon(jTerm t)
           
static FloatRectangle convertToRectangle(jTerm t)
           
static java.lang.String convertToString(jTerm t)
           
static jTerm[] convertToTerms(jTerm t)
           
static jTerm[] convertToTerms(jTerm t, int args)
           
 jTermTranslation getTermTranslation()
          Get the current translation unit for this object.
static void setDefaultsForTranslation(jTermTranslation t)
           
protected static void setObjectDefaults(jTermTranslation t)
           
static void setStringKeysForTranslation(jTermTranslation t, java.lang.String skey, java.lang.Object okey, java.lang.Object tkey)
          Registers existing converters with a new name.
protected static void setTermDefaults(jTermTranslation t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ubc.cs.JLog.Foundation.iAttributes
getAttributes, setAttributes
 

Constructor Detail

aAttributeTranslation

public aAttributeTranslation()
Method Detail

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)