stella.parameter
Class AbstractTargetParameter

java.lang.Object
  extended by util.PropertyContainer
      extended by stella.parameter.AbstractParameter
          extended by stella.parameter.AbstractTargetParameter
All Implemented Interfaces:
Cloneable, Parameter, TargetDepending, TargetDependingParameter, ExitCleaning, Initializable, PropertyBearing
Direct Known Subclasses:
AbstractTargetValue, DitherParameter, FocusStar, FrameProvider, ImageType, TargetCatalogName, TargetName, TargetType, TargetUser

public abstract class AbstractTargetParameter
extends AbstractParameter
implements TargetDependingParameter

An abstract base class for some target depending parameters. It only provides a commonn formatting method.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
private static String DEFINDEX
          The default index.
static String KEY_INDEX
          The key to the star index this target parameter refers to.
 
Fields inherited from class stella.parameter.AbstractParameter
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
protected AbstractTargetParameter(Map prop)
          Constructs a new target parameter.
 
Method Summary
protected static StarDescription getAsStar(TargetDefinition target, Object id)
          Converts a map returned from a target definition into a StarDescription.
protected static Object getConstant(TargetDefinition target, Object sid, String name)
          Returns a setup from the target.
 String getFormattedFor(TargetDefinition td)
          Deviates the formatting to the protected version in AbstractParameter.
protected static AbstractTarget.Setup getSetup(TargetDefinition target, Object id)
          Returns a setup from the target.
 
Methods inherited from class stella.parameter.AbstractParameter
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, init, register, rescanned, setName, toString
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, isNew, keyCreate, keyCreate, parseObject, reload, 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 stella.TargetDependingParameter
getForTarget
 
Methods inherited from interface stella.Parameter
get, getFormatted, getName, getString, set
 
Methods inherited from interface util.PropertyBearing
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getLocalized, getProperties, getProperty, getResource, getResourceAsStream, getResources, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 
Methods inherited from interface stella.TargetDepending
registerTarget
 

Field Detail

KEY_INDEX

public static final String KEY_INDEX
The key to the star index this target parameter refers to.

See Also:
Constant Field Values

DEFINDEX

private static final String DEFINDEX
The default index.

See Also:
Constant Field Values
Constructor Detail

AbstractTargetParameter

protected AbstractTargetParameter(Map prop)
Constructs a new target parameter. The index of the star may be set in the properties, otherwise it defaults to DEFINDEX.

Method Detail

getAsStar

protected static final StarDescription getAsStar(TargetDefinition target,
                                                 Object id)
Converts a map returned from a target definition into a StarDescription. If this is not possible, null is returned.


getSetup

protected static AbstractTarget.Setup getSetup(TargetDefinition target,
                                               Object id)
Returns a setup from the target.


getConstant

protected static Object getConstant(TargetDefinition target,
                                    Object sid,
                                    String name)
Returns a setup from the target.


getFormattedFor

public String getFormattedFor(TargetDefinition td)
Deviates the formatting to the protected version in AbstractParameter.

Specified by:
getFormattedFor in interface TargetDependingParameter