stella.parameter
Class FractionalExposureTime

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.parameter.AbstractParameter
                  extended by stella.parameter.AbstractValue
                      extended by stella.parameter.FractionalExposureTime
All Implemented Interfaces:
Cloneable, Parameter, ParameterDepending, Value, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying

public class FractionalExposureTime
extends AbstractValue
implements ParameterDepending, Reloadable

This parameter gives the fractional remaining exposure time. It uses a ExposureTimeLeft parameter and queries its current value plus its count down value. The fractional exposure time is then the total time minus the current count down divided by the total time and thus between zero and one.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static String DEFEXPOSURETIME
          The name of the exposure time global.
static String DEFNAME
          The name of this global (jd).
static String KEY_EXPOSURETIME
          The name of the exposure time left count down.
private  ExposureTimeLeft time
          The time parameter, if registered.
 
Fields inherited from class stella.parameter.AbstractParameter
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN
 
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.PropertySupplying
CONFIG, KEY_CLASS
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
FractionalExposureTime(Map define)
          Constructs a new global representing julian date.
 
Method Summary
 Number getValue()
          Returns the fractinal exposure time already passed.
 void registerParameter(Parameter curtime)
          A parameter depending command should drain the necessarry information to get valid out of a parameter value.
 double rescanned(String key, String old, String newval)
          As any parameter depending instance we fail if the parameter we depend on is now a different one.
 Number setValue(Number val)
          Sets the fractional exposure time.
 
Methods inherited from class stella.parameter.AbstractValue
get, set
 
Methods inherited from class stella.parameter.AbstractParameter
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, init, register, setName, toString
 
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, 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, setObject, setProperties, setProperty, stringProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.Reloadable
reload
 
Methods inherited from interface stella.Parameter
getFormatted, getName, getString
 
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
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 

Field Detail

KEY_EXPOSURETIME

public static final String KEY_EXPOSURETIME
The name of the exposure time left count down.

See Also:
Constant Field Values

DEFNAME

public static final String DEFNAME
The name of this global (jd).

See Also:
Constant Field Values

DEFEXPOSURETIME

private static final String DEFEXPOSURETIME
The name of the exposure time global.

See Also:
Constant Field Values

time

private ExposureTimeLeft time
The time parameter, if registered.

Constructor Detail

FractionalExposureTime

public FractionalExposureTime(Map define)
Constructs a new global representing julian date. Providing a properties object that maps the #KEY_BASEJD to 40587 makes this object produce mjd.

Method Detail

rescanned

public double rescanned(String key,
                        String old,
                        String newval)
As any parameter depending instance we fail if the parameter we depend on is now a different one.

Specified by:
rescanned in interface Reloadable
Overrides:
rescanned in class AbstractParameter

registerParameter

public void registerParameter(Parameter curtime)
Description copied from interface: ParameterDepending
A parameter depending command should drain the necessarry information to get valid out of a parameter value. During rendering, parameter depending commands should receive their data through this method. Note that it is always possible to pile up all the information needed for a single command in a single parameter.

Specified by:
registerParameter in interface ParameterDepending

setValue

public Number setValue(Number val)
                throws UnsupportedOperationException
Sets the fractional exposure time. Exposure time is a read-only variable, therefore this method throws an UnsupportedOperationException.

Specified by:
setValue in interface Value
Throws:
UnsupportedOperationException

getValue

public Number getValue()
Returns the fractinal exposure time already passed. If the required ExposureTimeLeft count-down is not registered, null is returned.

Specified by:
getValue in interface Value