public class ConfigSpecifier
extends uk.ac.starlink.ttools.plot2.config.SpecifierPanel<uk.ac.starlink.ttools.plot2.config.ConfigMap>
By default the GUI component is just a stack of the constituent
specifier components, but these can be decorated by supplying
a suitable ConfigSpecifier.ComponentGui object.
The checkConfig method provides a hook for
additional conditions that will be applied to the ConfigMap output
values from this specifier.
| Modifier and Type | Class and Description |
|---|---|
static interface |
ConfigSpecifier.ComponentGui
GUI component policy.
|
| Constructor and Description |
|---|
ConfigSpecifier(uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] keys)
Constructs a config specifier with a default GUI.
|
ConfigSpecifier(uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] keys,
ConfigSpecifier.ComponentGui gui)
Constructs a config specifier with a custom GUI for constituent keys.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkConfig(uk.ac.starlink.ttools.plot2.config.ConfigMap config)
Performs additional checks on the result produced by this
specifier prior to returning the value from
getSpecifiedValue(). |
static void |
checkRangeSense(uk.ac.starlink.ttools.plot2.config.ConfigMap config,
String axName,
uk.ac.starlink.ttools.plot2.config.ConfigKey<Double> minKey,
uk.ac.starlink.ttools.plot2.config.ConfigKey<Double> maxKey)
Utility method to check that min/max keys specifying a range
are not the wrong way round.
|
protected JComponent |
createComponent() |
uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] |
getConfigKeys()
Returns the keys for which this specifier gathers values.
|
uk.ac.starlink.ttools.plot2.config.ConfigMap |
getSpecifiedValue() |
<T> uk.ac.starlink.ttools.plot2.config.Specifier<T> |
getSpecifier(uk.ac.starlink.ttools.plot2.config.ConfigKey<T> key)
Returns the individual specifier used to gather values for
a particular key owned by this object.
|
void |
reportError(uk.ac.starlink.ttools.plot2.config.ConfigException err)
May be used by a client of this specifier to report an error
associated with one of the config values obtained by this specifier.
|
void |
setSpecifiedValue(uk.ac.starlink.ttools.plot2.config.ConfigMap configMap) |
void |
submitReport(uk.ac.starlink.ttools.plot2.ReportMap report) |
public ConfigSpecifier(uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] keys)
keys - config keys to gather values forpublic ConfigSpecifier(uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] keys,
ConfigSpecifier.ComponentGui gui)
keys - config keys to gather values forgui - specifier generation factory that can provide
customised specifiers for different keysprotected JComponent createComponent()
createComponent in class uk.ac.starlink.ttools.plot2.config.SpecifierPanel<uk.ac.starlink.ttools.plot2.config.ConfigMap>public uk.ac.starlink.ttools.plot2.config.ConfigMap getSpecifiedValue()
protected void checkConfig(uk.ac.starlink.ttools.plot2.config.ConfigMap config)
throws uk.ac.starlink.ttools.plot2.config.ConfigException
getSpecifiedValue().
If something is wrong with the supplied config,
implementations may throw a ConfigException here to indicate the problem.
Per-key specifiers ought in general to police the values that
they return, but this method provides a hook for checks applying
to disallowed interactions between individually legal values.
The default implementation does nothing.
config - config map to checkuk.ac.starlink.ttools.plot2.config.ConfigException - if there's something wrong with
the supplied mapcheckRangeSensepublic void setSpecifiedValue(uk.ac.starlink.ttools.plot2.config.ConfigMap configMap)
public void submitReport(uk.ac.starlink.ttools.plot2.ReportMap report)
public uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] getConfigKeys()
public <T> uk.ac.starlink.ttools.plot2.config.Specifier<T> getSpecifier(uk.ac.starlink.ttools.plot2.config.ConfigKey<T> key)
key - config keypublic void reportError(uk.ac.starlink.ttools.plot2.config.ConfigException err)
err - error encountered in using a value supplied by this
specifierpublic static void checkRangeSense(uk.ac.starlink.ttools.plot2.config.ConfigMap config,
String axName,
uk.ac.starlink.ttools.plot2.config.ConfigKey<Double> minKey,
uk.ac.starlink.ttools.plot2.config.ConfigKey<Double> maxKey)
throws uk.ac.starlink.ttools.plot2.config.ConfigException
config - config mapaxName - axis name, used for error messagesminKey - config key for minimum valuemaxKey - config key for maximum valueuk.ac.starlink.ttools.plot2.config.ConfigException - if the min value is definitely
greater than or equal to the max valueCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.