JSci.instruments
Class DummyPositionControl

java.lang.Object
  extended by JSci.instruments.PositionControlAdapter
      extended by JSci.instruments.DummyPositionControl
All Implemented Interfaces:
Control, PositionControl
Direct Known Subclasses:
PiezoServo

public class DummyPositionControl
extends PositionControlAdapter

A simple PositionControl that does nothing!


Field Summary
 
Fields inherited from class JSci.instruments.PositionControlAdapter
listenerList
 
Constructor Summary
DummyPositionControl()
           
 
Method Summary
protected  void doSetPosition(double p)
           
 double getActualPosition()
          get the actual position of the device.
 java.awt.Component getControlComponent()
          get a Component through which we can control the position
 double getMajorStep()
           
 double getMaximum()
          get the maximum position
 double getMinimum()
          get the minimum position
 double getMinorStep()
           
 double getPosition()
          get the position that must be reached.
 java.lang.String getUnit()
          get a String with the description of the units used for all the values.
static void main(java.lang.String[] args)
           
 void setPosition(double p)
          set the position
 void sleep()
          sleeps for the time needed to stabilize the position.
 
Methods inherited from class JSci.instruments.PositionControlAdapter
addChangeListener, fireStateChanged, getChangeListeners, getListeners, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyPositionControl

public DummyPositionControl()
Method Detail

setPosition

public void setPosition(double p)
Description copied from class: PositionControlAdapter
set the position

Specified by:
setPosition in interface PositionControl
Specified by:
setPosition in class PositionControlAdapter
Parameters:
p - the position

doSetPosition

protected void doSetPosition(double p)

getPosition

public double getPosition()
Description copied from class: PositionControlAdapter
get the position that must be reached. Since the mechanical device needs some time to reach the position, getPosition() can be different from getActualPosition()

Specified by:
getPosition in interface PositionControl
Specified by:
getPosition in class PositionControlAdapter
Returns:
the position that must be reached

getActualPosition

public double getActualPosition()
Description copied from class: PositionControlAdapter
get the actual position of the device. Since the mechanical device needs some time to reach the position, getPosition() can be different from getActualPosition()

Specified by:
getActualPosition in interface PositionControl
Specified by:
getActualPosition in class PositionControlAdapter
Returns:
the actual position

getMinimum

public double getMinimum()
Description copied from class: PositionControlAdapter
get the minimum position

Specified by:
getMinimum in interface PositionControl
Specified by:
getMinimum in class PositionControlAdapter
Returns:
the minimum position

getMaximum

public double getMaximum()
Description copied from class: PositionControlAdapter
get the maximum position

Specified by:
getMaximum in interface PositionControl
Specified by:
getMaximum in class PositionControlAdapter
Returns:
the maximum position

getMinorStep

public double getMinorStep()

getMajorStep

public double getMajorStep()

sleep

public void sleep()
Description copied from class: PositionControlAdapter
sleeps for the time needed to stabilize the position.

Specified by:
sleep in interface PositionControl
Specified by:
sleep in class PositionControlAdapter

getControlComponent

public java.awt.Component getControlComponent()
Description copied from class: PositionControlAdapter
get a Component through which we can control the position

Specified by:
getControlComponent in interface Control
Specified by:
getControlComponent in interface PositionControl
Specified by:
getControlComponent in class PositionControlAdapter
Returns:
the Component with the controls for the position

getUnit

public java.lang.String getUnit()
Description copied from class: PositionControlAdapter
get a String with the description of the units used for all the values.

Specified by:
getUnit in interface PositionControl
Specified by:
getUnit in class PositionControlAdapter
Returns:
the unit

main

public static void main(java.lang.String[] args)