Jedit 4.2

edu.bsu.cs.gui
Class AnimObject

java.lang.Object
  extended by edu.bsu.cs.gui.AnimObject

public class AnimObject
extends Object

This object is produced by Algorithm subclasses and placed into a Vector that is then processed by an instance of the Animation class.

Since:
30 Jun 1998
Version:
11 Apr 2001
Author:
Aaron Nall, Sunita Upadrasta

Field Summary
 Color color
          Holds the color that an edge or vertex will be turned to, if this AnimObject is of the appropriate type
static int DELAY
          Indicates that the AnimObject represents a pause in the animation.
static int EDGE
          Indicates that the AnimObject is associated with an edge or arc.
 Object object
          Holds the object used to enact this step in the animation.
 int objectType
          Indicates what the AnimObject is Associate with.
 int period
          Indicates how long, in milliseconds, the animation should wait before proceeding to the next AnimObject in the animation.
static int TEXT
          Indicates that the AnimObject is associated with a text message.
static int VERTEX
          Indicates that the AnimObject is associated with a vertex.
 
Constructor Summary
AnimObject(Object newObject, int newType, Color newColor, int animPeriod)
           
 
Method Summary
 Point getFinalVertexPosition()
          Method to return final position of the vertex
 int getGridX0()
          Method to find the x-limit of the grid layout
 int getGridY0()
          Method to find the y-limit of the grid layout
 Point getPreviousVertexPosition()
          Method to return previous position of the vertex
 boolean isChangingPosition()
          Method to find if a vertexis changing is position
 void newVertexPosition(Point pos)
          Method to set the vertex to its new position
 void previousVertexPosition(Point pos)
          Method to set the vertex to its previous position
 void setGridX0Y0(int x, int y)
          Method that sets the grid to the given limits.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERTEX

public static final int VERTEX
Indicates that the AnimObject is associated with a vertex.

See Also:
Constant Field Values

EDGE

public static final int EDGE
Indicates that the AnimObject is associated with an edge or arc.

See Also:
Constant Field Values

DELAY

public static final int DELAY
Indicates that the AnimObject represents a pause in the animation.

See Also:
Constant Field Values

TEXT

public static final int TEXT
Indicates that the AnimObject is associated with a text message.

See Also:
Constant Field Values

objectType

public int objectType
Indicates what the AnimObject is Associate with.

See also


period

public int period
Indicates how long, in milliseconds, the animation should wait before proceeding to the next AnimObject in the animation.


object

public Object object
Holds the object used to enact this step in the animation. The data types are:


color

public Color color
Holds the color that an edge or vertex will be turned to, if this AnimObject is of the appropriate type

Constructor Detail

AnimObject

public AnimObject(Object newObject,
                  int newType,
                  Color newColor,
                  int animPeriod)
Method Detail

previousVertexPosition

public void previousVertexPosition(Point pos)
Method to set the vertex to its previous position

Parameters:
pos - Point where the vertex previously was.

getPreviousVertexPosition

public Point getPreviousVertexPosition()
Method to return previous position of the vertex

Returns:
Point The previous position of the vertex

newVertexPosition

public void newVertexPosition(Point pos)
Method to set the vertex to its new position

Parameters:
pos - Point where the vertex is to be placed.

getFinalVertexPosition

public Point getFinalVertexPosition()
Method to return final position of the vertex

Returns:
Point The final position of the vertex

isChangingPosition

public boolean isChangingPosition()
Method to find if a vertexis changing is position

Returns:
boolean The flag specifying if the position of a vertex is changed

setGridX0Y0

public void setGridX0Y0(int x,
                        int y)
Method that sets the grid to the given limits.

Parameters:
x - x limit of the grid layout to be set
y - y limit of the grid layout to be set

getGridX0

public int getGridX0()
Method to find the x-limit of the grid layout

Returns:
int The x-limit of the grid layout

getGridY0

public int getGridY0()
Method to find the y-limit of the grid layout

Returns:
int The y-limit of the grid layout

Jedit 4.2