simbad.sim
Class LampActuator

java.lang.Object
  extended by simbad.sim.BaseObject
      extended by simbad.sim.Device
          extended by simbad.sim.ActuatorDevice
              extended by simbad.sim.LampActuator

public class LampActuator
extends ActuatorDevice

A lamp which can be turn on or off or blink.


Nested Class Summary
 class LampActuator.LampActuatorJPanel
           
 
Field Summary
private  boolean blink
           
private  javax.vecmath.Color3f blinkColor
           
private  boolean blinkIsOn
           
private  boolean changed
           
private  boolean lampIsOn
           
private  javax.media.j3d.Material material
           
private  javax.vecmath.Color3f offColor
           
private  javax.vecmath.Color3f onColor
           
 
Fields inherited from class simbad.sim.BaseObject
black, branchGroup, canBeTraversed, compilable, detachedFromSceneGraph, group, localBounds, rotation, rotationGroup, translation, translationGroup, white, world
 
Constructor Summary
LampActuator(float size)
          Constructs a LampActuator of the given size.
 
Method Summary
(package private)  void create3D(float size)
           
 javax.swing.JPanel createInspectorPanel()
          Creates the panel associated to the device.
 boolean getBlink()
          Returns the lamp blink state .
 boolean getOn()
          Returns the lamp state .
 void setBlink(boolean blink)
          Sets the lamp blink state on or off.
 void setOn(boolean on)
          Sets the lamp state on or off.
protected  void update()
          to be overriden
 
Methods inherited from class simbad.sim.Device
getName, getOwner, getUpdatePerSecond, reset, setName, setOwner, setUpdateOnEachFrame, setUpdatePerSecond, update
 
Methods inherited from class simbad.sim.BaseObject
addChild, addChild, attach, compile, create3D, detach, getBounds, getCanBeTraversed, getGroup, getNode, getRotationTransform, getRotationTransformGroup, getTranslation, getTranslationTransform, getTranslationTransform, resetTransforms, rotateY, setBounds, setCanBeTraversed, setColor, setWorld, translateTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

material

private javax.media.j3d.Material material

lampIsOn

private boolean lampIsOn

blinkIsOn

private boolean blinkIsOn

blink

private boolean blink

onColor

private javax.vecmath.Color3f onColor

offColor

private javax.vecmath.Color3f offColor

blinkColor

private javax.vecmath.Color3f blinkColor

changed

private boolean changed
Constructor Detail

LampActuator

public LampActuator(float size)
Constructs a LampActuator of the given size.

Parameters:
size - in meter
Method Detail

update

protected void update()
Description copied from class: Device
to be overriden

Overrides:
update in class Device

create3D

void create3D(float size)

setOn

public void setOn(boolean on)
Sets the lamp state on or off.

Parameters:
on - true is on.

getOn

public boolean getOn()
Returns the lamp state .

Returns:
true if on.

setBlink

public void setBlink(boolean blink)
Sets the lamp blink state on or off.

Parameters:
on - true is on.

getBlink

public boolean getBlink()
Returns the lamp blink state .

Returns:
true if on.

createInspectorPanel

public javax.swing.JPanel createInspectorPanel()
Description copied from class: Device
Creates the panel associated to the device. This panel can be inserted in the inspector window for monitoring.

Overrides:
createInspectorPanel in class Device
Returns:
the JPanel. null if no panel can be associated