uk.ac.starlink.task.Task
, DynamicTask
GenericPlot2Task
, TypedPlot2Task
public abstract class AbstractPlot2Task extends java.lang.Object implements uk.ac.starlink.task.Task, DynamicTask
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
DOC_ZONE_SUFFIX |
|
static java.lang.String |
EXAMPLE_LAYER_SUFFIX |
|
static java.lang.String |
EXAMPLE_ZONE_SUFFIX |
|
static java.lang.String |
LAYER_PREFIX |
|
static java.lang.String |
ZONE_PREFIX |
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractPlot2Task(boolean allowAnimate,
GangerFactory gangerFact) |
Constructor with explicit animation capability.
|
protected |
AbstractPlot2Task(GangerFactory gangerFact) |
Constructor with default animation capability.
|
Modifier and Type | Method | Description |
---|---|---|
uk.ac.starlink.task.DoubleParameter |
createAuxCrowdParameter(java.lang.String suffix) |
Returns a parameter for determining crowding on the aux axis.
|
uk.ac.starlink.task.StringParameter |
createAuxLabelParameter(java.lang.String suffix) |
Returns a parameter for acquiring the aux ramp label.
|
uk.ac.starlink.task.BooleanParameter |
createAuxVisibleParameter(java.lang.String suffix) |
Returns a parameter for determining whether the aux colour ramp
is painted for a given plot zone.
|
uk.ac.starlink.task.IntegerParameter |
createAuxWidthParameter(java.lang.String suffix) |
Returns a parameter for determining aux colour ramp lateral size
in pixels.
|
static uk.ac.starlink.task.StringParameter |
createDataParameter(Input input,
java.lang.String suffix,
boolean fullDetail) |
Returns a parameter for acquiring a column of data.
|
uk.ac.starlink.task.Executable |
createExecutable(uk.ac.starlink.task.Environment env) |
|
static FilterParameter |
createFilterParameter(java.lang.String suffix,
InputTableParameter tableParam) |
Returns a parameter for acquiring a filter applied to the table input
for a given layer.
|
static uk.ac.starlink.task.Parameter<java.lang.String> |
createLabelParameter(java.lang.String suffix) |
Returns a parameter to get a textual label corresponding to the layer
identified by a given layer suffix.
|
static LayerTypeParameter |
createLayerTypeParameter(java.lang.String suffix,
PlotContext context) |
Returns a parameter for acquiring a plotter.
|
DoubleArrayParameter |
createLegendPositionParameter(java.lang.String suffix) |
Returns a parameter to get the legend position for the zone identified
by a given zone suffix.
|
static PaintModeParameter |
createPaintModeParameter() |
Returns a parameter for specifying a paint mode.
|
PlotDisplay |
createPlotComponent(uk.ac.starlink.task.Environment env,
boolean caching) |
Returns a graphical component that displays an interactive view of
the plot described by a value-bearing execution environment.
|
javax.swing.Icon |
createPlotIcon(uk.ac.starlink.task.Environment env) |
Returns an Icon that paints the plot described
by a value-bearing execution environment.
|
static <P,A> javax.swing.Icon |
createPlotIcon(Ganger<P,A> ganger,
SurfaceFactory<P,A> surfFact,
int nz,
ZoneContent[] contents,
P[] profiles,
A[] aspects,
ShadeAxisFactory[] shadeFacts,
Range[] shadeFixRanges,
PaperTypeSelector ptSel,
Compositor compositor,
DataStore dataStore,
int xpix,
int ypix,
boolean forceBitmap) |
Creates an icon which will paint the content of a plot.
|
static InputTableParameter |
createTableParameter(java.lang.String suffix) |
Returns a parameter for acquiring a data table.
|
uk.ac.starlink.task.Parameter<java.lang.String> |
createTitleParameter(java.lang.String suffix) |
Returns a parameter to get a plot title for the zone identified
by a given zone suffix.
|
static uk.ac.starlink.task.Parameter<java.lang.String> |
createZoneParameter(java.lang.String layerSuffix) |
Returns a parameter for associating a zone identifier with a given
layer.
|
uk.ac.starlink.task.Parameter[] |
getBasicParameters() |
Returns the list of parameters supplied by the AbstractPlot2Task
implementation.
|
protected abstract <T> java.lang.String |
getConfigParamDefault(uk.ac.starlink.task.Environment env,
ConfigKey<T> key,
java.lang.String[] suffixes) |
May provide a default value for a given config parameter that is
sensitive to the content of the execution environment.
|
uk.ac.starlink.task.Parameter[] |
getContextParameters(uk.ac.starlink.task.Environment env) |
Returns the parameters for this task in the context of a given
execution environment.
|
uk.ac.starlink.task.Parameter<java.lang.Boolean> |
getLegendBorderParameter() |
Returns the parameter for indicating whether the legend border will
be visible.
|
uk.ac.starlink.task.Parameter<java.lang.Boolean> |
getLegendOpaqueParameter() |
Returns the parameter for indicating whether the legend background
will be opaque.
|
uk.ac.starlink.task.Parameter<java.lang.Boolean> |
getLegendParameter() |
Returns the parameter for indicating whether the legend will be visible.
|
uk.ac.starlink.task.Parameter<java.lang.String[]> |
getLegendSequenceParameter() |
Returns the parameter for determining the sequence and inclusion
of layers in the legend.
|
uk.ac.starlink.task.Parameter<Padding> |
getPaddingParameter() |
Returns the parameter for assigning the plot external padding.
|
uk.ac.starlink.task.Parameter |
getParameterByName(uk.ac.starlink.task.Environment env,
java.lang.String paramName) |
Attempts to find a parameter with a given name that might be used
by this task in the content of the given environment.
|
abstract PlotContext |
getPlotContext(uk.ac.starlink.task.Environment env) |
Concrete subclasses must implement this method to provide
the PlotType and other information from the environment
that may not be available at construction time.
|
uk.ac.starlink.task.Parameter<java.lang.String[]> |
getSequenceParameter() |
Returns the parameter for determining the sequence of layers
appearing in the plot.
|
uk.ac.starlink.task.Parameter<java.lang.Integer> |
getXpixParameter() |
Returns the parameter for assigning the external horizontal
extent of the plot.
|
uk.ac.starlink.task.Parameter<java.lang.Integer> |
getYpixParameter() |
Returns the parameter for assigning the external vertical
extent of the plot.
|
java.util.List<uk.ac.starlink.task.Parameter> |
getZoneKeyParams(ConfigKey[] keys) |
Returns a list of parameters suffixed by zone based on a list of
ConfigKeys.
|
void |
testEnv(uk.ac.starlink.task.Environment env) |
Prepares a plot for this task as specified by a given environment,
but does not run any of the actual plotting code.
|
public static final java.lang.String LAYER_PREFIX
public static final java.lang.String ZONE_PREFIX
public static final java.lang.String EXAMPLE_LAYER_SUFFIX
public static final java.lang.String EXAMPLE_ZONE_SUFFIX
public static final java.lang.String DOC_ZONE_SUFFIX
protected AbstractPlot2Task(boolean allowAnimate, GangerFactory gangerFact)
allowAnimate
- true iff animation options should be providedgangerFact
- controls how plots can be groupedprotected AbstractPlot2Task(GangerFactory gangerFact)
gangerFact
- controls how plots can be groupedpublic abstract PlotContext getPlotContext(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
env
- execution environmentuk.ac.starlink.task.TaskException
protected abstract <T> java.lang.String getConfigParamDefault(uk.ac.starlink.task.Environment env, ConfigKey<T> key, java.lang.String[] suffixes) throws uk.ac.starlink.task.TaskException
env
- execution environmentkey
- config key for which a parameter is requiredsuffixes
- ordered list of the plot layer suffixes
in use for the plot being performedkey
,
or null if none is obviousuk.ac.starlink.task.TaskException
public final uk.ac.starlink.task.Parameter[] getBasicParameters()
public uk.ac.starlink.task.Executable createExecutable(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
createExecutable
in interface uk.ac.starlink.task.Task
uk.ac.starlink.task.TaskException
public uk.ac.starlink.task.Parameter<java.lang.Integer> getXpixParameter()
public uk.ac.starlink.task.Parameter<java.lang.Integer> getYpixParameter()
public uk.ac.starlink.task.Parameter<java.lang.String[]> getSequenceParameter()
public uk.ac.starlink.task.Parameter<java.lang.Boolean> getLegendParameter()
public uk.ac.starlink.task.Parameter<java.lang.Boolean> getLegendBorderParameter()
public uk.ac.starlink.task.Parameter<java.lang.Boolean> getLegendOpaqueParameter()
public uk.ac.starlink.task.Parameter<java.lang.String[]> getLegendSequenceParameter()
public uk.ac.starlink.task.Parameter<Padding> getPaddingParameter()
public javax.swing.Icon createPlotIcon(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException, java.io.IOException, java.lang.InterruptedException
env
- execution environmentuk.ac.starlink.task.TaskException
java.io.IOException
java.lang.InterruptedException
public void testEnv(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
env
- populated environmentuk.ac.starlink.task.TaskException
- in case of errorpublic PlotDisplay createPlotComponent(uk.ac.starlink.task.Environment env, boolean caching) throws uk.ac.starlink.task.TaskException, java.io.IOException, java.lang.InterruptedException
env
- execution environmentcaching
- whether data and plot should be cached or re-read
at every repaintuk.ac.starlink.task.TaskException
java.io.IOException
java.lang.InterruptedException
public uk.ac.starlink.task.Parameter[] getContextParameters(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
DynamicTask
Task.getParameters()
, but found
settings of parameters in the presented environment may lead to
parameters being added to or removed from the list.
This ought not to result in additional prompts to the user.
getContextParameters
in interface DynamicTask
env
- execution environmentuk.ac.starlink.task.TaskException
public uk.ac.starlink.task.Parameter getParameterByName(uk.ac.starlink.task.Environment env, java.lang.String paramName) throws uk.ac.starlink.task.TaskException
DynamicTask
This ought not to result in additional prompts to the user.
getParameterByName
in interface DynamicTask
env
- execution environmentparamName
- requested parameter nameuk.ac.starlink.task.TaskException
public static InputTableParameter createTableParameter(java.lang.String suffix)
suffix
- layer-specific suffixpublic static FilterParameter createFilterParameter(java.lang.String suffix, InputTableParameter tableParam)
suffix
- layer-specific suffixtableParam
- input table parameter associated with the layerpublic static uk.ac.starlink.task.Parameter<java.lang.String> createLabelParameter(java.lang.String suffix)
suffix
- layer suffixpublic uk.ac.starlink.task.Parameter<java.lang.String> createTitleParameter(java.lang.String suffix)
suffix
- zone suffix, or either null or empty string for all zonespublic uk.ac.starlink.task.StringParameter createAuxLabelParameter(java.lang.String suffix)
suffix
- zone suffixpublic uk.ac.starlink.task.BooleanParameter createAuxVisibleParameter(java.lang.String suffix)
suffix
- zone suffixpublic uk.ac.starlink.task.DoubleParameter createAuxCrowdParameter(java.lang.String suffix)
suffix
- zone suffixpublic uk.ac.starlink.task.IntegerParameter createAuxWidthParameter(java.lang.String suffix)
suffix
- zone suffixpublic DoubleArrayParameter createLegendPositionParameter(java.lang.String suffix)
suffix
- zone suffix, or either null or empty string for all zonespublic static LayerTypeParameter createLayerTypeParameter(java.lang.String suffix, PlotContext context)
suffix
- parameter name suffixcontext
- plot contextpublic static uk.ac.starlink.task.Parameter<java.lang.String> createZoneParameter(java.lang.String layerSuffix)
layerSuffix
- identifier for the layer whose zone is to be
determinedpublic static uk.ac.starlink.task.StringParameter createDataParameter(Input input, java.lang.String suffix, boolean fullDetail)
input
- specifies input value required from usersuffix
- layer-specific suffixfullDetail
- if true, extra detail is appended to the descriptionpublic static PaintModeParameter createPaintModeParameter()
public static <P,A> javax.swing.Icon createPlotIcon(Ganger<P,A> ganger, SurfaceFactory<P,A> surfFact, int nz, ZoneContent[] contents, P[] profiles, A[] aspects, ShadeAxisFactory[] shadeFacts, Range[] shadeFixRanges, PaperTypeSelector ptSel, Compositor compositor, DataStore dataStore, int xpix, int ypix, boolean forceBitmap)
ganger
- defines plot surface groupingsurfFact
- surface factorynz
- number of plot zones in gangcontents
- zone contents (nz-element array)aspects
- plot surface aspects by zone (nz-element array)shadeFacts
- shader axis factories by zone (nz-element array),
elements may be null if not requiredshadeFixRanges
- fixed shader ranges by zone (nz-element array)
elements may be null for auto-range or if no
shade axisptSel
- paper type selectorcompositor
- compositor for pixel compositiondataStore
- data storage objectxpix
- horizontal size of icon in pixelsypix
- vertical size of icon in pixelsforceBitmap
- true to force bitmap output of vector graphics,
false to use default behaviourpublic final java.util.List<uk.ac.starlink.task.Parameter> getZoneKeyParams(ConfigKey[] keys)
keys
- config keysCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.