# Class ShaderParameter

java.lang.Object
uk.ac.starlink.task.Parameter<Shader>
uk.ac.starlink.task.AbstractChoiceParameter<Shader,Shader>
uk.ac.starlink.task.ChoiceParameter<Shader>
uk.ac.starlink.ttools.plottask.StyleParameter<Shader>
uk.ac.starlink.ttools.plottask.ShaderParameter

public class ShaderParameter extends StyleParameter<Shader>
Parameter for choosing `Shader` objects.

Since:
  7 Aug 2008
Author:
  Mark Taylor

## Field Summary

### Fields inherited from class uk.ac.starlink.task.Parameter

`BY_NAME`

## Constructor Summary

Constructors
Constructor
Description
`ShaderParameter(String name)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static String[]`
`getDefaultValues(int count)`
Returns some suitable default values for a set of related ShaderParameters.
`String`
`getName(Shader option)`
`Shader`
`shaderValue(uk.ac.starlink.task.Environment env)`
Returns the value of this parameter as a Shader object.

### Methods inherited from class StyleParameter

`getOptionList, getUsage, setUsage, stringifyOption`

### Methods inherited from class uk.ac.starlink.task.ChoiceParameter

`objectToString, setDefaultOption, stringToObject`

### Methods inherited from class uk.ac.starlink.task.AbstractChoiceParameter

`addOption, addOption, choiceToString, clearOptions, getOption, getOptionNames, getOptions, getOptionValueList, stringToChoice`

### 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 Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ShaderParameter

public ShaderParameter(String name)
Constructor.

Parameters:
  `name` - parameter name

## Method Details

### shaderValue

public Shader shaderValue(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
Returns the value of this parameter as a Shader object.

Parameters:
  `env` - execution environment
Returns:
  shader
Throws:
  `uk.ac.starlink.task.TaskException`

### getName

public String getName(Shader option)

Overrides:
  `getName` in class `uk.ac.starlink.task.AbstractChoiceParameter<Shader,Shader>`

### getDefaultValues

public static String[] getDefaultValues(int count)
Returns some suitable default values for a set of related ShaderParameters.

Parameters:
  `count` - number of parameters to get defaults for
Returns:
  array of default values, one for each parameter