|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectubc.cs.JLog.Animation.aAttributeTranslation
ubc.cs.JLog.Animation.aAnimationShape
ubc.cs.JLog.Animation.aAnimationShape_polygon
public class aAnimationShape_polygon
Field Summary | |
---|---|
protected FloatPolygon |
cached_rotshape
|
protected java.awt.Polygon |
cached_transhape
|
protected java.awt.Color |
colour
|
static java.lang.String |
COLOUR_ATTR_KEY
|
protected boolean |
fill
|
protected FloatPolygon |
original_shape
|
static java.lang.String |
POLYGON_ATTR_KEY
|
Fields inherited from class ubc.cs.JLog.Animation.aAnimationShape |
---|
name, NAME_ATTR_KEY, object, OBJECT_ATTR_KEY, ROTATION_ATTR_KEY, rotation_offset, TYPE_ATTR_KEY, X_ATTR_KEY, x_offset, Y_ATTR_KEY, y_offset |
Constructor Summary | |
---|---|
aAnimationShape_polygon(aAnimationObject ao,
java.lang.String n,
FloatPolygon p,
boolean f,
java.awt.Color c)
|
Method Summary | |
---|---|
void |
draw(java.awt.Graphics g)
Draw the shape in the Graphics environment
provided. |
protected FloatPolygon |
generateRotatedPolygon(FloatPolygon original)
|
protected java.awt.Polygon |
generateTranslatedPolygon(FloatPolygon fp)
|
java.util.Hashtable |
getAttributes()
Returns a hashtable of every attribute associated with this object. |
java.awt.Rectangle |
getBounds()
Returns the bounding rectangle for this shape, given in global coordinates. |
jTermTranslation |
getTermTranslation()
Get the current translation unit for this object. |
java.lang.String |
getType()
Sub-classes should return their type value (i.e., the value used to specify the shape type to create in the animation<addshape> predicate command). |
void |
setAttributes(java.util.Hashtable attributes)
Set the attributes of the object to those in the given Hashtable. |
static void |
setDefaultsForTranslation(jTermTranslation t)
|
void |
setLocalPosition(float x,
float y)
Set the new location of the shape to the given offset values. |
void |
setLocalRotation(float r)
Set the object relative rotation of the shape to the given angle in radians. |
void |
setPolygon(FloatPolygon p)
|
void |
updateMagnification()
Update notification. |
void |
updatePosition()
Update notification. |
void |
updateRotation()
Update notification. |
Methods inherited from class ubc.cs.JLog.Animation.aAnimationShape |
---|
getEnclosingObject, getName, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String POLYGON_ATTR_KEY
public static final java.lang.String COLOUR_ATTR_KEY
protected boolean fill
protected java.awt.Color colour
protected FloatPolygon original_shape
protected FloatPolygon cached_rotshape
protected java.awt.Polygon cached_transhape
Constructor Detail |
---|
public aAnimationShape_polygon(aAnimationObject ao, java.lang.String n, FloatPolygon p, boolean f, java.awt.Color c)
Method Detail |
---|
public void draw(java.awt.Graphics g)
aAnimationShape
Graphics
environment
provided.
draw
in class aAnimationShape
g
- The Graphics
environment to draw into.public java.awt.Rectangle getBounds()
aAnimationShape
getBounds
in class aAnimationShape
Rectangle
bounding this shape.public java.lang.String getType()
aAnimationShape
getType
in class aAnimationShape
public void setPolygon(FloatPolygon p)
public void setLocalPosition(float x, float y)
aAnimationShape
setLocalPosition
in class aAnimationShape
x
- The new x position component, relative to enclosing object.y
- The new y position component, relative to enclosing object.public void setLocalRotation(float r)
aAnimationShape
setLocalRotation
in class aAnimationShape
r
- The new angle of the shape in radians.public static void setDefaultsForTranslation(jTermTranslation t)
public jTermTranslation getTermTranslation()
aAttributeTranslation
getTermTranslation
in class aAnimationShape
jTermTranslation
translation unit.public java.util.Hashtable getAttributes()
iAttributes
getAttributes
in interface iAttributes
getAttributes
in class aAnimationShape
public void setAttributes(java.util.Hashtable attributes)
iAttributes
setAttributes
in interface iAttributes
setAttributes
in class aAnimationShape
attributes
- The Hashtable of attribute name-value pairings.public void updatePosition()
aAnimationShape
updatePosition
in class aAnimationShape
public void updateRotation()
aAnimationShape
updateRotation
in class aAnimationShape
public void updateMagnification()
aAnimationShape
updateMagnification
in class aAnimationShape
protected FloatPolygon generateRotatedPolygon(FloatPolygon original)
protected java.awt.Polygon generateTranslatedPolygon(FloatPolygon fp)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |