cad.simcad.worldsimulator.objects.buildings
Class Structure

java.lang.Object
  |
  +--cad.simcad.worldsimulator.objects.SimulatedObject
        |
        +--cad.simcad.worldsimulator.objects.buildings.Structure
All Implemented Interfaces:
Drawable2DObject, java.io.Serializable, SimObject
Direct Known Subclasses:
PassiveStructure

public abstract class Structure
extends SimulatedObject
implements Drawable2DObject

Version:
1.0
Author:
Charles-Philip Bentley
See Also:
Serialized Form

Field Summary
 
Fields inherited from class cad.simcad.worldsimulator.objects.SimulatedObject
_am, _className, _height, _id, _name, _om, _owner, _serial, _sime, _stateId, _width
 
Constructor Summary
Structure(SimEnvironment sime, PathPlace current, StructureMediator um, Owner owner, java.lang.String className)
          Creates new Structure
 
Method Summary
abstract  double getBoundingCircleRadius()
          This allows to ask the radius of the objects bounding circle.
 PathPlace getCurrentPathPlace()
          Return the PathPlace for this object Could be null
 java.awt.Color getMiniMapColor()
          Return the Color for a totally zoomed out view
 java.lang.String getObjectType()
          Return the Type of the SimObject
abstract  int getVelocity()
          Here the velocity of an object can be asked.
 int getX()
          Return the X coordinate where the object should be drawn
 int getY()
          Return the Y coordinate where the object should be drawn
abstract  boolean isStatic()
          Can the structure move in someway ?
abstract  void move()
           
abstract  void setVelocity(int value)
          To change the velocity of an object.
 void stopObject()
          Stop the object activity
 void takeTurn()
          This method returns the object name.
 
Methods inherited from class cad.simcad.worldsimulator.objects.SimulatedObject
getClassName, getHeight, getId, getName, getSerialNumber, getStateId, getWidth, setStateId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cad.simcad.objectserver.spec.sim.Drawable2DObject
getHeight, getWidth
 

Constructor Detail

Structure

public Structure(SimEnvironment sime,
                 PathPlace current,
                 StructureMediator um,
                 Owner owner,
                 java.lang.String className)
Creates new Structure

Method Detail

takeTurn

public void takeTurn()
Description copied from interface: SimObject
This method returns the object name. Name used to be shown

Specified by:
takeTurn in interface SimObject
Returns:
a String object

getMiniMapColor

public java.awt.Color getMiniMapColor()
Description copied from interface: Drawable2DObject
Return the Color for a totally zoomed out view

Specified by:
getMiniMapColor in interface Drawable2DObject

isStatic

public abstract boolean isStatic()
Can the structure move in someway ?


move

public abstract void move()

setVelocity

public abstract void setVelocity(int value)
To change the velocity of an object.


getVelocity

public abstract int getVelocity()
Here the velocity of an object can be asked.


getBoundingCircleRadius

public abstract double getBoundingCircleRadius()
This allows to ask the radius of the objects bounding circle.

Specified by:
getBoundingCircleRadius in interface SimObject
Returns:
a double value, the radius of the Bounding circle for this object

getX

public int getX()
Return the X coordinate where the object should be drawn

Specified by:
getX in interface Drawable2DObject

getY

public int getY()
Description copied from interface: Drawable2DObject
Return the Y coordinate where the object should be drawn

Specified by:
getY in interface Drawable2DObject

getObjectType

public java.lang.String getObjectType()
Description copied from interface: SimObject
Return the Type of the SimObject

Specified by:
getObjectType in interface SimObject
Returns:
A String describing the type of the SimObject (unit, structure)

getCurrentPathPlace

public PathPlace getCurrentPathPlace()
Return the PathPlace for this object Could be null

Specified by:
getCurrentPathPlace in interface SimObject
Specified by:
getCurrentPathPlace in class SimulatedObject

stopObject

public void stopObject()
Description copied from interface: SimObject
Stop the object activity

Specified by:
stopObject in interface SimObject
Specified by:
stopObject in class SimulatedObject

Logo

With the help of www.sourceforge.net and www.info.ucl.ac.be