|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.instruments.PositionControlAdapter
public abstract class PositionControlAdapter
A mechanical device that can control the position of something. Implements the methods to notify changes.
Field Summary | |
---|---|
protected javax.swing.event.EventListenerList |
listenerList
The list of ChangeListeners for this model. |
Constructor Summary | |
---|---|
PositionControlAdapter()
|
Method Summary | |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l)
Adds a ChangeListener to the model's listener list. |
protected void |
fireStateChanged()
Run each ChangeListeners stateChanged() method. |
abstract double |
getActualPosition()
get the actual position of the device. |
javax.swing.event.ChangeListener[] |
getChangeListeners()
Returns an array of all the ChangeListener s added
to this model with addChangeListener(). |
abstract java.awt.Component |
getControlComponent()
get a Component through which we can control the position |
java.util.EventListener[] |
getListeners(java.lang.Class listenerType)
Return an array of all the listeners of the given type that were added to this model. |
abstract double |
getMaximum()
get the maximum position |
abstract double |
getMinimum()
get the minimum position |
abstract double |
getPosition()
get the position that must be reached. |
abstract java.lang.String |
getUnit()
get a String with the description of the units used for all the values. |
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener from the model's listener list. |
abstract void |
setPosition(double p)
set the position |
abstract void |
sleep()
sleeps for the time needed to stabilize the position. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.swing.event.EventListenerList listenerList
Constructor Detail |
---|
public PositionControlAdapter()
Method Detail |
---|
public abstract void setPosition(double p)
setPosition
in interface PositionControl
p
- the positionpublic abstract double getPosition()
getPosition
in interface PositionControl
public abstract double getActualPosition()
getActualPosition
in interface PositionControl
public abstract double getMinimum()
getMinimum
in interface PositionControl
public abstract double getMaximum()
getMaximum
in interface PositionControl
public abstract void sleep()
sleep
in interface PositionControl
public abstract java.awt.Component getControlComponent()
getControlComponent
in interface Control
getControlComponent
in interface PositionControl
public abstract java.lang.String getUnit()
getUnit
in interface PositionControl
public void addChangeListener(javax.swing.event.ChangeListener l)
addChangeListener
in interface PositionControl
l
- the ChangeListener to addremoveChangeListener(javax.swing.event.ChangeListener)
public void removeChangeListener(javax.swing.event.ChangeListener l)
removeChangeListener
in interface PositionControl
l
- the ChangeListener to removeaddChangeListener(javax.swing.event.ChangeListener)
public javax.swing.event.ChangeListener[] getChangeListeners()
ChangeListener
s added
to this model with addChangeListener().
getChangeListeners
in interface PositionControl
ChangeListener
s added or an empty
array if no listeners have been addedprotected void fireStateChanged()
EventListenerList
public java.util.EventListener[] getListeners(java.lang.Class listenerType)
getListeners
in interface PositionControl
listenerType
- the type of listeners to return, e.g. ChangeListener.class
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |