jsim.animator
Interface Animator

All Known Implementing Classes:
AnimationImp

public interface Animator


Method Summary
 void create(int shapeID, java.lang.String shape, java.awt.Label l, double x, double y, double w, double h, double arcW, double arcH, double x2, double y2, int type, double time)
          Adds a Shape at given location Shapes: Line2D, QuadCurve2D, CubicCurve2D, Rectangle2D, RoundRectangle2D, Arc2D, Ellipse2D
 void destroy(int shapeID, double time)
          Destroys a Shape based on ShapeID
 void rotate(int shapeID, double theta, double x, double y, double time)
          Rotates a shape
 void scale(int shapeID, double sx, double sy, double time)
          Scales a Shape
 void setPaint(int shapeID, java.awt.Color c1, java.awt.Color c2, double time)
          Paint Method for gradient color, uses 2 Color arguments
 void setPaint(int shapeID, java.awt.Color c, double time)
          Paint Method for solid color, uses 1 Color argument
 void shear(int shapeID, double shx, double shy, double time)
          Shears a Shape
 void translate(int shapeID, double tx, double ty, double time)
          Translates a Shape to a new (x,y) location
 

Method Detail

create

void create(int shapeID,
            java.lang.String shape,
            java.awt.Label l,
            double x,
            double y,
            double w,
            double h,
            double arcW,
            double arcH,
            double x2,
            double y2,
            int type,
            double time)
Adds a Shape at given location Shapes: Line2D, QuadCurve2D, CubicCurve2D, Rectangle2D, RoundRectangle2D, Arc2D, Ellipse2D

Parameters:
shapeID - id for the new Shape
shape - Shape of the object
l - Label for the created Shape
x - x-coordinate of the location
y - y-coordinate of the location
w - width of the shape
h - height of the shape
arcW - arc width for curves
arcH - arc height for curves
x2 - double needed for some shapes
y2 - double needed for some shapes
type - type needed for certian shapes
time - Simulation time

destroy

void destroy(int shapeID,
             double time)
Destroys a Shape based on ShapeID

Parameters:
shapeID - id of the Shape to destroy
time - SImulation time

translate

void translate(int shapeID,
               double tx,
               double ty,
               double time)
Translates a Shape to a new (x,y) location

Parameters:
shapeID - id of Shape to translate
tx - new x-coordinate
ty - new y-coordinate
time - Simulation time

rotate

void rotate(int shapeID,
            double theta,
            double x,
            double y,
            double time)
Rotates a shape

Parameters:
shapeID - id of Shape to tanslate
theta - angle of rotation
x - new x-coordinate
y - new y-coordinate
time - Simulation time

scale

void scale(int shapeID,
           double sx,
           double sy,
           double time)
Scales a Shape

Parameters:
shapeID - id of Shape to scale
sx - scaled x-coordinate
sy - scaled y-coordiante
time - Simulation time

shear

void shear(int shapeID,
           double shx,
           double shy,
           double time)
Shears a Shape

Parameters:
shapeID - id of Shape to shear
shx - scaled x-coordinate
shy - scaled y-cooordinate
time - Simulation time

setPaint

void setPaint(int shapeID,
              java.awt.Color c,
              double time)
Paint Method for solid color, uses 1 Color argument

Parameters:
shapeID - id for Shape to paint
c - Color for the Shape
time - Simulation time

setPaint

void setPaint(int shapeID,
              java.awt.Color c1,
              java.awt.Color c2,
              double time)
Paint Method for gradient color, uses 2 Color arguments

Parameters:
shapeID - id for SHape to paint
c1 - 1st Color for Shape
c2 - 2nd Color for Shape
time - Simulation time