# Interface GangerFactory<P,A>

All Known Implementing Classes:
  `MatrixGangerFactory, SingleGangerFactory`

public interface GangerFactory<P,A>
Generates Ganger instances for a particular purpose, for instance a particular type of plot, taking account of supplied user preferences.

You can find a basic single-zone implementation in `SingleGangerFactory`.

Since:
  12 Dec 2016
Author:
  Mark Taylor

## Method Summary

Modifier and Type
Method
Description
`Ganger<P,A>`
`createGanger(Padding padding, ConfigMap config, GangContext context)`
Creates a ganger.
`ConfigKey<?>[]`
`getGangerKeys()`
Returns the configuration keys that can be used to configure the gangers produced by this factory.
`boolean`
`hasIndependentZones()`
Indicates whether this ganger factory has zones that can be created according to the details of the plot and controlled independently by user request.

## Method Details

### getGangerKeys

ConfigKey<?>[] getGangerKeys()
Returns the configuration keys that can be used to configure the gangers produced by this factory.

Returns:
  ganger configuration keys

### hasIndependentZones

boolean hasIndependentZones()
Indicates whether this ganger factory has zones that can be created according to the details of the plot and controlled independently by user request.

Returns:
  true iff zones can be manipulated explicitly by the user

### createGanger

Ganger<P,A> createGanger(Padding padding, ConfigMap config, GangContext context)
Creates a ganger.

Parameters:
  `padding` - required padding around plot area
  `config` - configuration map that may contain keys from getGangerKeys
  `context` - additional context required for ganger creation
Returns:
  new ganger