Package uk.ac.starlink.topcat.plot2

# Class OptionalConfigSpecifier

java.lang.Object
uk.ac.starlink.ttools.plot2.config.SpecifierPanel<uk.ac.starlink.ttools.plot2.config.ConfigMap>
uk.ac.starlink.topcat.plot2.ConfigSpecifier
uk.ac.starlink.topcat.plot2.OptionalConfigSpecifier

All Implemented Interfaces:
  `uk.ac.starlink.ttools.plot2.config.Specifier<uk.ac.starlink.ttools.plot2.config.ConfigMap>`

public class OptionalConfigSpecifier extends ConfigSpecifier
ConfigSpecifier subclass that adds checkboxes for some of its component specifiers, indicating whether those specifiers should be used for the result or not. Where they are not used, the relevant GUI controls are disabled.

This is quite like `AutoConfigSpecifier`, but the override value is not reflected in the GUI. Perhaps the two classes should be combined?

Since:
  18 Mar 2013
Author:
  Mark Taylor

## Nested Class Summary

## Nested classes/interfaces inherited from class uk.ac.starlink.topcat.plot2.ConfigSpecifier

`ConfigSpecifier.ComponentGui`

## Constructor Summary

Constructors
Constructor
Description
`OptionalConfigSpecifier(uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] allKeys, uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] optKeys, String optionText)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`configureFrom(OptionalConfigSpecifier template)`
Configures this specifier with the current state of a supplied template.
`uk.ac.starlink.ttools.plot2.config.ConfigMap`
`getSpecifiedValue()`

### Methods inherited from class uk.ac.starlink.topcat.plot2.ConfigSpecifier

`checkConfig, checkRangeSense, createComponent, getConfigKeys, getSpecifier, reportError, setSpecifiedValue, submitReport`

### Methods inherited from class uk.ac.starlink.ttools.plot2.config.SpecifierPanel

`addActionListener, fireAction, getActionForwarder, getChangeForwarder, getComponent, isXFill, removeActionListener`

### Methods inherited from class java.lang.Object

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

## Constructor Details

### OptionalConfigSpecifier

public OptionalConfigSpecifier(uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] allKeys, uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] optKeys, String optionText)
Constructor.

Parameters:
  `allKeys` - all of the keys
  `optKeys` - subset of allKeys which should be annotated with activation checkboxes; any entries not contained in allKeys are ignored
  `optionText` - text to annotate the checkboxes

## Method Details

### getSpecifiedValue

public uk.ac.starlink.ttools.plot2.config.ConfigMap getSpecifiedValue()

Specified by:
  `getSpecifiedValue` in interface `uk.ac.starlink.ttools.plot2.config.Specifier<uk.ac.starlink.ttools.plot2.config.ConfigMap>`
Overrides:
  `getSpecifiedValue` in class `ConfigSpecifier`

### configureFrom

public void configureFrom(OptionalConfigSpecifier template)
Configures this specifier with the current state of a supplied template.

Parameters:
  `template` - specifier supplying required configuration