lane.sente
Class GameElementUI

java.lang.Object
  |
  +--lane.sente.GameElementUI
All Implemented Interfaces:
ThreeDObject
Direct Known Subclasses:
AnimateGameElementUI, InanimateGameElementUI

public abstract class GameElementUI
extends java.lang.Object
implements ThreeDObject

This is


Field Summary
protected  lane.sente.idx3d_Object sphere
           
protected  RobotArenaUI theContainer
           
protected  float xLocation
           
protected  float xSize
           
protected  float yLocation
           
protected  float ySize
           
protected  float zLocation
           
 
Constructor Summary
GameElementUI(RobotArenaUI theContainer)
          the constructor for the game element
 
Method Summary
 java.lang.String getName()
          returns the name of this element
 lane.sente.idx3d_Object getObject()
          method used to get the 3D sphere for this Element
abstract  void paint(java.awt.Graphics g)
          the paint method defined by a child class
 void setXlocation(float x)
          the method called when the X Location changes
 void setXSize(float s)
          the method called when the X size changes
 void setYlocation(float y)
          the method called when the Y Location changes
 void setYSize(float s)
          the method called when the Y size changes
 void setZlocation(float z)
          the method called when the Z Location changes
 void update()
          the method called to update the sphere position
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sphere

protected lane.sente.idx3d_Object sphere

theContainer

protected RobotArenaUI theContainer

xLocation

protected float xLocation

yLocation

protected float yLocation

zLocation

protected float zLocation

xSize

protected float xSize

ySize

protected float ySize
Constructor Detail

GameElementUI

public GameElementUI(RobotArenaUI theContainer)
the constructor for the game element
Parameters:
theContainer - the UI that this element will be displayed in
Method Detail

getObject

public lane.sente.idx3d_Object getObject()
method used to get the 3D sphere for this Element
Specified by:
getObject in interface ThreeDObject
Returns:
the 3D sphere that represents this object

getName

public java.lang.String getName()
returns the name of this element
Returns:
the unique name of this element

paint

public abstract void paint(java.awt.Graphics g)
the paint method defined by a child class
Parameters:
g - a graphics object to be painted on

update

public void update()
the method called to update the sphere position

setXlocation

public void setXlocation(float x)
the method called when the X Location changes
Parameters:
x - the location of the element in terms of fraction of the total x distance of the container

setYlocation

public void setYlocation(float y)
the method called when the Y Location changes
Parameters:
y - the location of the element in terms of fraction of the total y distance of the container

setZlocation

public void setZlocation(float z)
the method called when the Z Location changes
Parameters:
z - the location of the element in terms of fraction of the total z distance of the container

setXSize

public void setXSize(float s)
the method called when the X size changes
Parameters:
s - the location of the element in terms of fraction of the total x distance of the container

setYSize

public void setYSize(float s)
the method called when the Y size changes
Parameters:
s - the location of the element in terms of fraction of the total y distance of the container