stella.jview
Class JTelescopeStatusPanel

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by jview.AbstractDisplayable
                  extended by stella.jview.JTelescopeStatusPanel
All Implemented Interfaces:
Cloneable, Displayable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class JTelescopeStatusPanel
extends AbstractDisplayable

A panel that updates its display whenever a TelescopeStatus event arrives. It is a graphical representation of the info contained within the status.


Nested Class Summary
static class JTelescopeStatusPanel.Show
          Test display.
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  JLabel altitude
          The altitude value label.
private  JLabel altitudeoffset
          The altitude offset value label.
private  JLabel azimuth
          The azimuth value label.
private  JLabel azimuthoffset
          The azimuth offset value label.
private static String DEFALTITUDE
          The text displayed for the azimuth property
private static String DEFALTITUDEOFF
          The text displayed for the azimuth offset property
private static String DEFAZIMUTH
          The text displayed for the azimuth property
private static String DEFAZIMUTHOFF
          The text displayed for the azimuth offset property
private static DecimalFormat DEFDEGREEFORMAT
          The azimuth/altitude formatter.
private static String DEFDEROTATOR
          The text displayed for the derotator position.
private static String DEFERROR
          The text displayed for the focus position.
private static String DEFFOCUS
          The text displayed for the focus position.
private static DecimalFormat DEFFOCUSFORMAT
          The focus formatter.
private static String DEFGUIDE
          The text displayed for the power property
private static Color DEFOFFCOLOR
          The default false color for power/ref etc.
private static DecimalFormat DEFOFFSETFORMAT
          The azimuth/altitude offset formatter.
private static Color DEFONCOLOR
          The default true color for power/ref etc.
private static String DEFPOWER
          The text displayed for the power property
private static String DEFREFERENCED
          The text displayed for the power property
private static String DEFTCABINET
          The text displayed for the cabinet temperature
private static DecimalFormat DEFTEMPFORMAT
          The temperatures formatter.
private static String DEFTM1
          The text displayed for the M1 temperature
private static String DEFTM2
          The text displayed for the M2 temperature
private static String DEFTM3
          The text displayed for the M3 temperature
private static String DEFTRACK
          The text displayed for the power property
private  JLabel derotator
          The derotator value label.
private  JLabel errors
          The error symbol labels.
private  JLabel focus
          The focus value label.
private  CircleIcon guide
          The guide icon.
static String KEY_ALTITUDE
          The text displayed for the azimuth property
static String KEY_ALTITUDEOFF
          The text displayed for the azimuth offset property
static String KEY_AZIMUTH
          The text displayed for the azimuth property
static String KEY_AZIMUTHOFF
          The text displayed for the azimuth offset property
static String KEY_DEGREEFORMAT
          The azimuth/altitude formatter.
static String KEY_DEROTATOR
          The text displayed for the derotator position.
static String KEY_ERROR
          The text displayed for the error symbols.
static String KEY_FOCUS
          The text displayed for the focus position.
static String KEY_FOCUSFORMAT
          The focus formatter.
static String KEY_GUIDE
          The text displayed for the power property
static String KEY_OFFCOLOR
          The default false color for power/ref etc.
static String KEY_OFFSETFORMAT
          The azimuth/altitude offset formatter.
static String KEY_ONCOLOR
          The default true color for power/ref etc.
static String KEY_POWER
          The text displayed for the power property
static String KEY_REFERENCED
          The text displayed for the power property
static String KEY_TCABINET
          The text displayed for the cabinet temperature
static String KEY_TEMPFORMAT
          The temperatures formatter.
static String KEY_TM1
          The text displayed for the M1 temperature
static String KEY_TM2
          The text displayed for the M2 temperature
static String KEY_TM3
          The text displayed for the M3 temperature
static String KEY_TRACK
          The text displayed for the power property
private  CircleIcon power
          The power icon.
private  CircleIcon referenced
          The referenced icon.
private  JPanel status
          My panel, initialized at first call to getRepresentation().
private  JLabel tcabinet
          The temperature at the cabinet value label.
private  JLabel tm1
          The temperature at M1 value label.
private  JLabel tm2
          The temperature at M2 value label.
private  JLabel tm3
          The temperature at M3 value label.
private  CircleIcon track
          The track icon.
private static char UNDEFINEDCHAR
          The char used in duplication for undefined strings.
 
Fields inherited from class jview.AbstractDisplayable
KEY_COMPONENTNAME, KEY_ICON, KEY_INSETS
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
JTelescopeStatusPanel(Map prop)
          Constructs a new JTelescopeStatusPanel defaulting all properties.
 
Method Summary
 Component getRepresentation()
          Returns the representation of this panel.
private static String getUndefined(DecimalFormat df, double extrem)
          If a quantity is undefined, we return a string here of appropriate length, but consisting only of UNDEFINEDCHARs.
 void updateStatus(TelescopeStatus st)
          Updates relevant field from a TelescopeStatus event.
 
Methods inherited from class jview.AbstractDisplayable
getComponentName, getIcon, getIcon
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Field Detail

KEY_POWER

public static final String KEY_POWER
The text displayed for the power property

See Also:
Constant Field Values

KEY_REFERENCED

public static final String KEY_REFERENCED
The text displayed for the power property

See Also:
Constant Field Values

KEY_TRACK

public static final String KEY_TRACK
The text displayed for the power property

See Also:
Constant Field Values

KEY_GUIDE

public static final String KEY_GUIDE
The text displayed for the power property

See Also:
Constant Field Values

KEY_AZIMUTH

public static final String KEY_AZIMUTH
The text displayed for the azimuth property

See Also:
Constant Field Values

KEY_AZIMUTHOFF

public static final String KEY_AZIMUTHOFF
The text displayed for the azimuth offset property

See Also:
Constant Field Values

KEY_ALTITUDE

public static final String KEY_ALTITUDE
The text displayed for the azimuth property

See Also:
Constant Field Values

KEY_ALTITUDEOFF

public static final String KEY_ALTITUDEOFF
The text displayed for the azimuth offset property

See Also:
Constant Field Values

KEY_DEROTATOR

public static final String KEY_DEROTATOR
The text displayed for the derotator position.

See Also:
Constant Field Values

KEY_FOCUS

public static final String KEY_FOCUS
The text displayed for the focus position.

See Also:
Constant Field Values

KEY_ERROR

public static final String KEY_ERROR
The text displayed for the error symbols.

See Also:
Constant Field Values

KEY_TCABINET

public static final String KEY_TCABINET
The text displayed for the cabinet temperature

See Also:
Constant Field Values

KEY_TM1

public static final String KEY_TM1
The text displayed for the M1 temperature

See Also:
Constant Field Values

KEY_TM2

public static final String KEY_TM2
The text displayed for the M2 temperature

See Also:
Constant Field Values

KEY_TM3

public static final String KEY_TM3
The text displayed for the M3 temperature

See Also:
Constant Field Values

KEY_DEGREEFORMAT

public static final String KEY_DEGREEFORMAT
The azimuth/altitude formatter.

See Also:
Constant Field Values

KEY_OFFSETFORMAT

public static final String KEY_OFFSETFORMAT
The azimuth/altitude offset formatter.

See Also:
Constant Field Values

KEY_FOCUSFORMAT

public static final String KEY_FOCUSFORMAT
The focus formatter.

See Also:
Constant Field Values

KEY_TEMPFORMAT

public static final String KEY_TEMPFORMAT
The temperatures formatter.

See Also:
Constant Field Values

KEY_ONCOLOR

public static final String KEY_ONCOLOR
The default true color for power/ref etc.

See Also:
Constant Field Values

KEY_OFFCOLOR

public static final String KEY_OFFCOLOR
The default false color for power/ref etc.

See Also:
Constant Field Values

DEFPOWER

private static final String DEFPOWER
The text displayed for the power property

See Also:
Constant Field Values

DEFREFERENCED

private static final String DEFREFERENCED
The text displayed for the power property

See Also:
Constant Field Values

DEFTRACK

private static final String DEFTRACK
The text displayed for the power property

See Also:
Constant Field Values

DEFGUIDE

private static final String DEFGUIDE
The text displayed for the power property

See Also:
Constant Field Values

DEFAZIMUTH

private static final String DEFAZIMUTH
The text displayed for the azimuth property

See Also:
Constant Field Values

DEFAZIMUTHOFF

private static final String DEFAZIMUTHOFF
The text displayed for the azimuth offset property

See Also:
Constant Field Values

DEFALTITUDE

private static final String DEFALTITUDE
The text displayed for the azimuth property

See Also:
Constant Field Values

DEFALTITUDEOFF

private static final String DEFALTITUDEOFF
The text displayed for the azimuth offset property

See Also:
Constant Field Values

DEFDEROTATOR

private static final String DEFDEROTATOR
The text displayed for the derotator position.

See Also:
Constant Field Values

DEFFOCUS

private static final String DEFFOCUS
The text displayed for the focus position.

See Also:
Constant Field Values

DEFERROR

private static final String DEFERROR
The text displayed for the focus position.

See Also:
Constant Field Values

DEFTCABINET

private static final String DEFTCABINET
The text displayed for the cabinet temperature

See Also:
Constant Field Values

DEFTM1

private static final String DEFTM1
The text displayed for the M1 temperature

See Also:
Constant Field Values

DEFTM2

private static final String DEFTM2
The text displayed for the M2 temperature

See Also:
Constant Field Values

DEFTM3

private static final String DEFTM3
The text displayed for the M3 temperature

See Also:
Constant Field Values

DEFONCOLOR

private static final Color DEFONCOLOR
The default true color for power/ref etc.


DEFOFFCOLOR

private static final Color DEFOFFCOLOR
The default false color for power/ref etc.


DEFDEGREEFORMAT

private static final DecimalFormat DEFDEGREEFORMAT
The azimuth/altitude formatter.


DEFOFFSETFORMAT

private static final DecimalFormat DEFOFFSETFORMAT
The azimuth/altitude offset formatter.


DEFFOCUSFORMAT

private static final DecimalFormat DEFFOCUSFORMAT
The focus formatter.


DEFTEMPFORMAT

private static final DecimalFormat DEFTEMPFORMAT
The temperatures formatter.


UNDEFINEDCHAR

private static final char UNDEFINEDCHAR
The char used in duplication for undefined strings.

See Also:
Constant Field Values

power

private CircleIcon power
The power icon.


referenced

private CircleIcon referenced
The referenced icon.


track

private CircleIcon track
The track icon.


guide

private CircleIcon guide
The guide icon.


azimuth

private JLabel azimuth
The azimuth value label.


azimuthoffset

private JLabel azimuthoffset
The azimuth offset value label.


altitude

private JLabel altitude
The altitude value label.


altitudeoffset

private JLabel altitudeoffset
The altitude offset value label.


derotator

private JLabel derotator
The derotator value label.


focus

private JLabel focus
The focus value label.


errors

private JLabel errors
The error symbol labels.


tcabinet

private JLabel tcabinet
The temperature at the cabinet value label.


tm1

private JLabel tm1
The temperature at M1 value label.


tm2

private JLabel tm2
The temperature at M2 value label.


tm3

private JLabel tm3
The temperature at M3 value label.


status

private JPanel status
My panel, initialized at first call to getRepresentation().

Constructor Detail

JTelescopeStatusPanel

public JTelescopeStatusPanel(Map prop)
Constructs a new JTelescopeStatusPanel defaulting all properties.

Method Detail

getRepresentation

public Component getRepresentation()
Returns the representation of this panel. Updates occur directly on the fields in the panel.


updateStatus

public void updateStatus(TelescopeStatus st)
Updates relevant field from a TelescopeStatus event.


getUndefined

private static final String getUndefined(DecimalFormat df,
                                         double extrem)
If a quantity is undefined, we return a string here of appropriate length, but consisting only of UNDEFINEDCHARs.