SimJava
v2.0

eduni.simanim
Class Anim_param

java.lang.Object
  |
  +--eduni.simanim.Anim_param

public class Anim_param
extends java.lang.Object

An animation parameter, parameters are used to display data relating to its parent entity during an animation.


Field Summary
static java.lang.String[] enum_type
           
static int HIDDEN
          Display type: Don't display.
static int NAME
          Display type: Show parameter's name only.
static int NAME_VALUE
          Display type: Show both the parameter's name and its value.
static int STATE
          Display type: Show as the entity's bitmap.
static int VALUE
          Display type: Show value only.
 
Constructor Summary
Anim_param(java.lang.String name, int type, Param_type ptype)
          Constructor, with co-ordinates defaulting to (0, 0).
Anim_param(java.lang.String name, int type, Param_type ptype, int x, int y)
          Constructor, with Param_type object and (x, y) co-ordinate.
Anim_param(java.lang.String name, int type, java.lang.String value)
          Constructor, with co-ordinates defaulting to (0, 0).
Anim_param(java.lang.String name, int type, java.lang.String value, int x, int y)
          Constructor, with (x, y) co-ordinate.
 
Method Summary
 int get_intval()
          Get integer value of parameter.
 java.lang.String get_value()
          Get string value of parameter.
 void set_value(int val)
          Set value of parameter to integer.
 void set_value(java.lang.String val)
          Set value of parameter to string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIDDEN

public static final int HIDDEN
Display type: Don't display.

STATE

public static final int STATE
Display type: Show as the entity's bitmap.

VALUE

public static final int VALUE
Display type: Show value only.

NAME

public static final int NAME
Display type: Show parameter's name only.

NAME_VALUE

public static final int NAME_VALUE
Display type: Show both the parameter's name and its value.

enum_type

public static final java.lang.String[] enum_type
Constructor Detail

Anim_param

public Anim_param(java.lang.String name,
                  int type,
                  java.lang.String value,
                  int x,
                  int y)
Constructor, with (x, y) co-ordinate.
Parameters:
name - The parameter's name
type - One of the display types above
value - The initial value of the parameter
x - The X co-ordinate of the parameter relative to the left of its parent entity.
y - The Y co-ordinate of the parameter relative to the top of its parent entity.

Anim_param

public Anim_param(java.lang.String name,
                  int type,
                  java.lang.String value)
Constructor, with co-ordinates defaulting to (0, 0).
Parameters:
name - The parameter's name
type - One of the display types above
value - The initial value of the parameter

Anim_param

public Anim_param(java.lang.String name,
                  int type,
                  Param_type ptype,
                  int x,
                  int y)
Constructor, with Param_type object and (x, y) co-ordinate.
Parameters:
name - The parameter's name
type - One of the display types above
ptype - The parameter type object
x - The X co-ordinate of the parameter relative to the left of its parent entity.
y - The Y co-ordinate of the parameter relative to the top of its parent entity.

Anim_param

public Anim_param(java.lang.String name,
                  int type,
                  Param_type ptype)
Constructor, with co-ordinates defaulting to (0, 0).
Parameters:
name - The parameter's name
type - One of the display types above
value - The initial value of the parameter
Method Detail

set_value

public void set_value(java.lang.String val)
Set value of parameter to string.
Parameters:
val - The value of the parameter

set_value

public void set_value(int val)
Set value of parameter to integer. Note that it sets the value to the ith string value.
Parameters:
val - The value of the parameter

get_value

public java.lang.String get_value()
Get string value of parameter.

get_intval

public int get_intval()
Get integer value of parameter.

SimJava
v2.0

The University of Edinburgh, 2002