Class SingleGangerFactory<P,A>

java.lang.Object
uk.ac.starlink.ttools.plot2.SingleGangerFactory<P,A>
All Implemented Interfaces:
GangerFactory<P,A>

public class SingleGangerFactory<P,A> extends Object implements GangerFactory<P,A>
GangerFactory implementation for single-zone gangs.
Since:
25 Jan 2016
Author:
Mark Taylor
  • Method Details

    • hasIndependentZones

      public boolean hasIndependentZones()
      Description copied from interface: GangerFactory
      Indicates whether this ganger factory has zones that can be created according to the details of the plot and controlled independently by user request.
      Specified by:
      hasIndependentZones in interface GangerFactory<P,A>
      Returns:
      true iff zones can be manipulated explicitly by the user
    • getGangerKeys

      public ConfigKey<?>[] getGangerKeys()
      Description copied from interface: GangerFactory
      Returns the configuration keys that can be used to configure the gangers produced by this factory.
      Specified by:
      getGangerKeys in interface GangerFactory<P,A>
      Returns:
      ganger configuration keys
    • createGanger

      public Ganger<P,A> createGanger(Padding padding, ConfigMap config, GangContext context)
      Description copied from interface: GangerFactory
      Creates a ganger.
      Specified by:
      createGanger in interface GangerFactory<P,A>
      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
    • instance

      public static <P, A> SingleGangerFactory<P,A> instance()
      Returns the sole instance of this class.
      Returns:
      factory instance
    • createGanger

      public static <P, A> Ganger<P,A> createGanger(Padding padding)
      Returns a single-zone ganger with specified padding.
      Parameters:
      padding - padding, may be null
      Returns:
      new ganger
    • createGanger

      public static <P, A> Ganger<P,A> createGanger()
      Returns a single-zone ganger with default padding.
      Returns:
      new ganger