# Class ConfigStyler

java.lang.Object
uk.ac.starlink.topcat.plot2.ConfigStyler

public class ConfigStyler extends Object
Manages creation of PlotLayers from Plotters by turning ConfigMaps into appropriate Style instances. This would be just a case of calling the relevant Plotter method, except that method can throw a ConfigException, and we have to manage behaviour in the case that that happens. This is currently done by popping up a dialogue window the first time the error occurs.

Since:
  25 Feb 2015
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`ConfigStyler(Component parent)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`<S extends uk.ac.starlink.ttools.plot.Style>
uk.ac.starlink.ttools.plot2.PlotLayer`
`createLayer(uk.ac.starlink.ttools.plot2.Plotter<S> plotter, uk.ac.starlink.ttools.plot2.DataGeom geom, uk.ac.starlink.ttools.plot2.data.DataSpec dataSpec, uk.ac.starlink.ttools.plot2.config.ConfigMap config)`
Creates a new layer from a plotter.

### Methods inherited from class Object

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

## Constructor Details

### ConfigStyler

public ConfigStyler(Component parent)
Constructor.

Parameters:
  `parent` - parent component for dialogue windows

## Method Details

### createLayer

public <S extends uk.ac.starlink.ttools.plot.Style> uk.ac.starlink.ttools.plot2.PlotLayer createLayer(uk.ac.starlink.ttools.plot2.Plotter<S> plotter, uk.ac.starlink.ttools.plot2.DataGeom geom, uk.ac.starlink.ttools.plot2.data.DataSpec dataSpec, uk.ac.starlink.ttools.plot2.config.ConfigMap config)
Creates a new layer from a plotter.

Parameters:
  `plotter` - plotter
  `geom` - data geom
  `dataSpec` - data spec
  `config` - style configuration
Returns:
  layer, or null in case of failure