Package uk.ac.starlink.topcat.plot2

# Class SingleZoneLayerManager

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

All Implemented Interfaces:
  `ZoneLayerManager`

public class SingleZoneLayerManager extends Object implements ZoneLayerManager
ZoneLayerManager implementation for a single FormLayerControl working with a single plot zone.

Since:
  18 Aug 2023
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`SingleZoneLayerManager(FormLayerControl flc)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`TopcatLayer[]`
`getLayers(uk.ac.starlink.ttools.plot2.Ganger<?,?> ganger)`
Returns the layers contributed by this control.
`Map<FormControl,List<uk.ac.starlink.ttools.plot2.PlotLayer>>`
`getLayersByControl(uk.ac.starlink.ttools.plot2.Ganger<?,?> ganger)`
Returns a map associating plot layers with form controls that are associated with this object.
`Map<RowSubset,List<uk.ac.starlink.ttools.plot.Style>>`
`getStylesBySubset()`
Returns a map associating plot styles with RowSubsets for the current configuration.
`boolean`
`hasLayers()`
Indicates whether this control will yield any layers in its current state.

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

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

## Constructor Details

### SingleZoneLayerManager

public SingleZoneLayerManager(FormLayerControl flc)
Constructor.

Parameters:
  `flc` - layer control

## Method Details

### hasLayers

public boolean hasLayers()
Description copied from interface: `ZoneLayerManager`
Indicates whether this control will yield any layers in its current state. It returns true if `getLayers` will return a non-empty array. False positives are best avoided, but permitted.

Specified by:
  `hasLayers` in interface `ZoneLayerManager`
Returns:
  true if there is a non-zero number of layers

### getStylesBySubset

public Map<RowSubset,List<uk.ac.starlink.ttools.plot.Style>> getStylesBySubset()
Description copied from interface: `ZoneLayerManager`
Returns a map associating plot styles with RowSubsets for the current configuration.

Specified by:
  `getStylesBySubset` in interface `ZoneLayerManager`
Returns:
  ordered RowSubset->Styles map

### getLayersByControl

public Map<FormControl,List<uk.ac.starlink.ttools.plot2.PlotLayer>> getLayersByControl(uk.ac.starlink.ttools.plot2.Ganger<?,?> ganger)
Description copied from interface: `ZoneLayerManager`
Returns a map associating plot layers with form controls that are associated with this object.

Specified by:
  `getLayersByControl` in interface `ZoneLayerManager`
Parameters:
  `ganger` - ganger
Returns:
  FormControl->PlotLayers map

### getLayers

public TopcatLayer[] getLayers(uk.ac.starlink.ttools.plot2.Ganger<?,?> ganger)
Description copied from interface: `ZoneLayerManager`
Returns the layers contributed by this control.

Specified by:
  `getLayers` in interface `ZoneLayerManager`
Parameters:
  `ganger` - ganger within which layers will be used
Returns:
  layers