Class SkyPositionEntry

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SkyPositionEntry extends JPanel
Component for acquiring from the user a sky position and radius. Object name resolution is provided.
Since:
28 Jan 2008
Author:
Mark Taylor
See Also:
  • Constructor Details

    • SkyPositionEntry

      public SkyPositionEntry(String coordSysLabel)
      Constructor.
      Parameters:
      coordSysLabel - label such as "J2000" identifying the coordinate system for additional info to the user; may be null
  • Method Details

    • addField

      public void addField(DoubleValueField field)
      Adds a field to the list of ones controlled by this component. The added field is placed in a tidy way, and its enable/disablement etc is handled alongside the basic positional fields.
      Parameters:
      field - field to add
    • getRaDegreesField

      public DoubleValueField getRaDegreesField()
      Returns the field containing right ascension in degrees.
      Returns:
      RA field
    • getDecDegreesField

      public DoubleValueField getDecDegreesField()
      Returns the field containing declination in degrees.
      Returns:
      dec field
    • getResolveField

      public JTextField getResolveField()
      Returns the field in which an astronomical object whose position is be resolved can be entered.
      Returns:
      object resolver field
    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class JComponent
    • addActionListener

      public void addActionListener(ActionListener listener)
      Adds an action listener to the entry fields of this component.
      Parameters:
      listener - listener to add
    • removeActionListener

      public void removeActionListener(ActionListener listener)
      Removes an action listener from the entry fields of this component.
      Parameters:
      listener - listener to remove
    • addCaretListener

      public void addCaretListener(CaretListener listener)
      Adds a caret listener to the entry fields of this component.
      Parameters:
      listener - listener to add
    • removeCaretListener

      public void removeCaretListener(CaretListener listener)
      Removes a caret listener from the entry fields of this component.
      Parameters:
      listener - listener to remove
    • setPosition

      public void setPosition(double raDegrees, double decDegrees, boolean clearResolver)
      Sets the current sky position in degrees. This can be called by external code, and resets the resolver field to empty.
      Parameters:
      raDegrees - right ascension in degreees
      decDegrees - declination in degrees
      clearResolver - if true, clear the contents of the resolved object field