|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsim.animator.AnimationEntity
public class AnimationEntity
This class is used as a container for a Shape in the Animator Package of the JSIM simulation package It has data members of type Shape, AffineTransform, and Color
Field Summary | |
---|---|
static java.awt.Color |
BACK_COLOR
Color scheme for JSIM (easy to change) May also need to adjust colors for entities (see SimObject) |
static int |
FACILITY
|
static java.awt.Color |
FACILITY_COLOR
|
static int |
FACILITY_PTS
|
static java.awt.Color |
FORE_COLOR
|
static int |
JOIN
|
static java.awt.Color |
JOIN_COLOR
|
static java.awt.Color |
LABEL_COLOR
|
static java.awt.Color |
QUEUE_COLOR
|
static int |
SERVER
Node numbers |
static java.awt.Color |
SERVER_COLOR
|
static int |
SERVER_PTS
|
static int |
SIGNAL
|
static java.awt.Color |
SIGNAL_COLOR
|
static int |
SIGNAL_PTS
|
static int |
SINK
|
static java.awt.Color |
SINK_COLOR
|
static int |
SINK_PTS
|
static int |
SOURCE
|
static java.awt.Color |
SOURCE_COLOR
|
static int |
SOURCE_PTS
|
static int |
SPLIT
|
static java.awt.Color |
SPLIT_COLOR
|
static java.awt.Color |
TOKEN_COLOR
|
static java.awt.Color |
TRANSPORT_COLOR
|
static int[] |
X_FACILITY
Facility |
static int[] |
X_SERVER
Server |
static int[] |
X_SIGNAL
Signal |
static int[] |
X_SINK
Sink |
static int[] |
X_SOURCE
Source |
static int[] |
Y_FACILITY
|
static int[] |
Y_SERVER
|
static int[] |
Y_SIGNAL
|
static int[] |
Y_SINK
|
static int[] |
Y_SOURCE
|
Constructor Summary | |
---|---|
AnimationEntity(int id,
int type,
java.lang.String name,
java.awt.Point position,
int numTokens)
Constructor intended to be called by a derived JSIM example When building initital graph |
|
AnimationEntity(int id,
java.awt.Shape shape,
java.awt.geom.AffineTransform transform,
java.awt.Color color)
Constructor |
|
AnimationEntity(int id,
java.awt.Shape shape,
java.awt.geom.AffineTransform transform,
java.awt.Color color,
java.lang.String label)
Constructor for Graph node |
Method Summary | |
---|---|
void |
adjustNumServiced(int num)
Adds num to the value of numServiced |
int[] |
move(int[] coordinates,
double length)
Moves the x or y coordinates of a shape |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Color BACK_COLOR
public static final java.awt.Color FORE_COLOR
public static final java.awt.Color SERVER_COLOR
public static final java.awt.Color FACILITY_COLOR
public static final java.awt.Color SIGNAL_COLOR
public static final java.awt.Color SOURCE_COLOR
public static final java.awt.Color SINK_COLOR
public static final java.awt.Color TRANSPORT_COLOR
public static final java.awt.Color TOKEN_COLOR
public static final java.awt.Color QUEUE_COLOR
public static final java.awt.Color LABEL_COLOR
public static final java.awt.Color SPLIT_COLOR
public static final java.awt.Color JOIN_COLOR
public static final int SERVER
public static final int FACILITY
public static final int SIGNAL
public static final int SOURCE
public static final int SINK
public static final int SPLIT
public static final int JOIN
public static final int[] X_SERVER
public static final int[] Y_SERVER
public static final int SERVER_PTS
public static final int[] X_FACILITY
public static final int[] Y_FACILITY
public static final int FACILITY_PTS
public static final int[] X_SIGNAL
public static final int[] Y_SIGNAL
public static final int SIGNAL_PTS
public static final int[] X_SOURCE
public static final int[] Y_SOURCE
public static final int SOURCE_PTS
public static final int[] X_SINK
public static final int[] Y_SINK
public static final int SINK_PTS
Constructor Detail |
---|
public AnimationEntity(int id, java.awt.Shape shape, java.awt.geom.AffineTransform transform, java.awt.Color color)
id
- The id of the new entityshape
- The shape of the new entitytransfrom
- AffineTransform object associated with the entitycolor
- Color associated with the entitypublic AnimationEntity(int id, java.awt.Shape shape, java.awt.geom.AffineTransform transform, java.awt.Color color, java.lang.String label)
id
- The id of the new entityshape
- The shape of the new entitytransfrom
- AffineTransform object associated with the entitycolor
- Color associated with the entitylabel
- Label for the particular nodepublic AnimationEntity(int id, int type, java.lang.String name, java.awt.Point position, int numTokens)
id
- The id of the new Nodetype
- Predefined type of Node (Server etc.)name
- Name for the Nodecolor
- Color associated with the Nodex_position
- x-coordinate for the Nodey_position
- y-coordinate for the NodenumTokens
- number of service tokens at the nodeMethod Detail |
---|
public int[] move(int[] coordinates, double length)
coordinates
- coordinates to movelength
- integer value of the move
public void adjustNumServiced(int num)
num
- the number to add
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |