|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.task.Parameter<T>
uk.ac.starlink.task.ChoiceParameter<LayerType>
uk.ac.starlink.ttools.plot2.task.LayerTypeParameter
public class LayerTypeParameter
Parameter that specifies a LayerType to be used for a plot layer. LayerTypes in some cases correspond to Plotters, and in some cases to families of Plotters.
Most of the complication here is generating the auto-documentation. It's not 100% obvious that code belongs here, but I can't think of a better place to put it.
Field Summary |
---|
Fields inherited from class uk.ac.starlink.task.Parameter |
---|
BY_NAME |
Constructor Summary | |
---|---|
LayerTypeParameter(String prefix,
String suffix,
PlotContext context)
Constructor. |
Method Summary | |
---|---|
static Parameter[] |
getConfigParams(ConfigKey[] configKeys,
String suffix,
boolean fullDetail)
Gets parameters used for speciyfing ConfigKey-based values for a plot. |
static Parameter[] |
getCoordParams(Coord[] coords,
String suffix,
boolean fullDetail)
Gets parameters used for specifying coordinate values for a plot. |
String |
getExtraUsage(TableEnvironment env)
Returns an extended usage message. |
static Parameter[] |
getInputParams(String suffix)
Gets parameters used for specifying a table with input data for a plot. |
static LayerType[] |
getLayerTypes(Plotter[] plotters)
Returns the list of LayerTypes represented by a given list of Plotters. |
String |
stringifyOption(LayerType ltype)
Determines how an option will be represented as a string value of this parameter if no name has explicitly been supplied. |
static String |
usageWord(Parameter param)
Returns a "name=<usage>" string for a parameter. |
static List<String> |
usageWords(Parameter[] params)
List of name=usage strings for a given set of parameters. |
Methods inherited from class uk.ac.starlink.task.ChoiceParameter |
---|
addOption, addOption, clearOptions, getName, getOption, getOptionNames, getOptions, getOptionValueList, getUsage, objectToString, setDefaultOption, setUsage, stringToObject |
Methods inherited from class uk.ac.starlink.task.Parameter |
---|
clearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getValueClass, isNullPermitted, objectValue, setDescription, setDescription, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringDefault, setValue, setValueFromObject, setValueFromString, stringValue, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LayerTypeParameter(String prefix, String suffix, PlotContext context)
prefix
- non-suffix part of this parameter's namesuffix
- layer-specific part of this parameter's namecontext
- plot contextMethod Detail |
---|
public String stringifyOption(LayerType ltype)
ChoiceParameter
String.valueOf(option)
,
but this may be overrridden.
stringifyOption
in class ChoiceParameter<LayerType>
ltype
- option value
public String getExtraUsage(TableEnvironment env)
ExtraParameter
getExtraUsage
in interface ExtraParameter
env
- execution envrionment
public static Parameter[] getInputParams(String suffix)
suffix
- layer suffix
public static Parameter[] getCoordParams(Coord[] coords, String suffix, boolean fullDetail)
coords
- coordinates requiredsuffix
- layer suffixfullDetail
- if true, extra detail is appended to the parameter
descriptions
public static Parameter[] getConfigParams(ConfigKey[] configKeys, String suffix, boolean fullDetail)
configKeys
- configuration keyssuffix
- layer suffixfullDetail
- if true, extra detail is appended to the parameter
descriptions
public static List<String> usageWords(Parameter[] params)
params
- parameter list
public static String usageWord(Parameter param)
param
- parameter
public static LayerType[] getLayerTypes(Plotter[] plotters)
plotters
- plotter list
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |