|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJSci.instruments.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 ChangeListeners 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 PositionControlp - the positionpublic abstract double getPosition()
getPosition in interface PositionControlpublic abstract double getActualPosition()
getActualPosition in interface PositionControlpublic abstract double getMinimum()
getMinimum in interface PositionControlpublic abstract double getMaximum()
getMaximum in interface PositionControlpublic abstract void sleep()
sleep in interface PositionControlpublic abstract java.awt.Component getControlComponent()
getControlComponent in interface PositionControlpublic abstract java.lang.String getUnit()
getUnit in interface PositionControlpublic void addChangeListener(javax.swing.event.ChangeListener l)
addChangeListener in interface PositionControll - the ChangeListener to addremoveChangeListener(javax.swing.event.ChangeListener)public void removeChangeListener(javax.swing.event.ChangeListener l)
removeChangeListener in interface PositionControll - the ChangeListener to removeaddChangeListener(javax.swing.event.ChangeListener)public javax.swing.event.ChangeListener[] getChangeListeners()
ChangeListeners added
to this model with addChangeListener().
getChangeListeners in interface PositionControlChangeListeners added or an empty
array if no listeners have been addedprotected void fireStateChanged()
#setValue,
EventListenerListpublic java.util.EventListener[] getListeners(java.lang.Class listenerType)
getListeners in interface PositionControllistenerType - 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 | |||||||||