stella.jview
Class JMoveTelescope

java.lang.Object
  extended by java.util.EventObject
      extended by util.rmi.RmiEvent
          extended by stella.MessageEvent
              extended by stella.CommandEvent
                  extended by stella.command.MoveTelescope
                      extended by stella.jview.JMoveTelescope
All Implemented Interfaces:
Serializable, Displayable, InitializerDepending, TargetDependingCommand, JDisplayableCommand, ParameterDepending, TargetDepending, TelescopeCommand, Initializable

public class JMoveTelescope
extends MoveTelescope
implements JDisplayableCommand, Initializable

A displayable version for the MoveTelescope command. To get valid, the user must insert a valid right-ascension and declination in the appropriate text fields. The derotator offset can be specified, as well as the desired derotator-follows-telescope flag.

See Also:
Serialized Form

Nested Class Summary
static class JMoveTelescope.Show
          A small class to test the layout.
 
Nested classes/interfaces inherited from class stella.CommandEvent
CommandEvent.Create
 
Field Summary
private  JTextField dec
          The text field used for entering dec.
private  JComboBox decunit
          A drop-down list of declination units.
private  JTextField derot
          The text field for the derotator position.
private  JCheckBox follow
          The checkbox for a following derotator.
private  JButton move
          The button that launches the command.
private  JTextField ra
          The text field used for entering right ascension.
private  JComboBox raunit
          A drop-down list of right-ascension units.
 
Fields inherited from class stella.command.MoveTelescope
KEY_DEROTATOR, KEY_FOLLOW, KEY_USE
 
Fields inherited from class stella.CommandEvent
COMMANDPACKAGE, JVIEWPACKAGE, TYPESEPARATOR
 
Fields inherited from class stella.MessageEvent
SEPCHAR
 
Fields inherited from class util.rmi.RmiEvent
localHost, sourceName
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
JMoveTelescope(Object src)
          Constructs a new JMoveTelescope command.
JMoveTelescope(Object src, String type, long time)
          Constructs a new JMoveTelescope command.
 
Method Summary
 void addActionListener(ActionListener launch)
          Adds a listener to the button that launches the telescope movement.
 CommandEvent getCommand()
          Gets a fully-qualified command.
 Icon getIcon()
          Return null
 Component getRepresentation()
          Returns the representation of the move telescope command.
 void init()
          Initializes the command.
 boolean isEnabled()
          Returns true if the move telescope command is enabled.
 void removeActionListener(ActionListener launch)
          Removes a listener from the launching button.
 void setEnabled(boolean isactive)
          Disables the move telescope command.
 
Methods inherited from class stella.command.MoveTelescope
getDec, getDerot, getLine, getRa, initWith, isFollow, parseLine, registerParameter, registerTarget, registerTargetProperties, setFields, setRaDe
 
Methods inherited from class stella.CommandEvent
classNameToTemplate, createCommand, createCommand, createJCommand, extractType, getExpectedAcknowledgeNumber, parseForStrings, templateToClassName
 
Methods inherited from class stella.MessageEvent
checkType, equals, equalTime, equalTime, fromAscii, getAllCommandLines, getExecuteGroupKey, getHead, getNr, getTime, getType, hashCode, isValid, parseFromSingleString, readFromBufferedStream, setNr, setTime, setType, setValid, toString
 
Methods inherited from class util.rmi.RmiEvent
getHost, getSourceName, setSourceName
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface stella.jview.JDisplayableCommand
getType
 

Field Detail

move

private JButton move
The button that launches the command.


ra

private JTextField ra
The text field used for entering right ascension.


dec

private JTextField dec
The text field used for entering dec.


derot

private JTextField derot
The text field for the derotator position.


follow

private JCheckBox follow
The checkbox for a following derotator.


raunit

private JComboBox raunit
A drop-down list of right-ascension units.


decunit

private JComboBox decunit
A drop-down list of declination units.

Constructor Detail

JMoveTelescope

public JMoveTelescope(Object src)
Constructs a new JMoveTelescope command.


JMoveTelescope

public JMoveTelescope(Object src,
                      String type,
                      long time)
Constructs a new JMoveTelescope command.

Method Detail

init

public void init()
Initializes the command. The required text field are constructed here. Layout is done not before a call to getRepresentation().

Specified by:
init in interface Initializable

getIcon

public Icon getIcon()
Return null

Specified by:
getIcon in interface Displayable

getRepresentation

public Component getRepresentation()
Returns the representation of the move telescope command. It shows the move button to the left, then, in the center, the three text fields and the checkbox on top of each other. To the rgiht of the dec and ra field the unit chooser is displayed.

Specified by:
getRepresentation in interface Displayable

addActionListener

public void addActionListener(ActionListener launch)
Adds a listener to the button that launches the telescope movement.

Specified by:
addActionListener in interface JDisplayableCommand

removeActionListener

public void removeActionListener(ActionListener launch)
Removes a listener from the launching button.

Specified by:
removeActionListener in interface JDisplayableCommand

setEnabled

public void setEnabled(boolean isactive)
Disables the move telescope command.

Specified by:
setEnabled in interface JDisplayableCommand

isEnabled

public boolean isEnabled()
Returns true if the move telescope command is enabled.

Specified by:
isEnabled in interface JDisplayableCommand

getCommand

public CommandEvent getCommand()
Gets a fully-qualified command. Requires that the ra and dec was entered into the text fields. Unit conversion is done according to the selected item in the unit-combo box.

Specified by:
getCommand in interface JDisplayableCommand