Class MultiController<C>

  • Type Parameters:
    C - object that manages fixed Controls in the stack
    Direct Known Subclasses:
    MultiAxisController, MultiShaderController

    public class MultiController<C>
    extends java.lang.Object
    Manaages control of controller objects that work with multiple plotting zones. A controller (the parameterised type <C>) in this context is an object that manages one or more fixed Controls in the non-layer part of the control stack.
    Since:
    12 Feb 2016
    Author:
    Mark Taylor
    • Constructor Detail

      • MultiController

        public MultiController​(MultiController.ControllerFactory<C> cfact,
                               ZoneFactory zfact,
                               MultiConfigger configger)
        Constructor.
        Parameters:
        cfact - encapsulates management with a particular type of controller object C
        zfact - zone id factory
        configger - manages global and per-zone axis config items
    • Method Detail

      • getStackControls

        public Control[] getStackControls()
        Returns the fixed controls managed by this object that can be inserted into the control stack. The return value does not change over the lifetime of this object.
        Returns:
        control array
      • getController

        public C getController​(ZoneId zid)
        Returns the controller associated with a particular zone. This should be for a zone that has previously been submitted with a call to setZones.
        Parameters:
        zid - zone id
        Returns:
        controller for zone
      • getConfigger

        public MultiConfigger getConfigger()
        Returns this controller's config manager.
        Returns:
        configger manages global and per-zone axis config items
      • setZones

        public void setZones​(ZoneId[] zones,
                             uk.ac.starlink.ttools.plot2.Gang gang)
        Sets the list of zone obects that are to be visible in the current state of the GUI.
        Parameters:
        zones - ordered list of zoneIds whose configuration will be accessible from the GUI
        gang - gang to which the zones belong; the sequence of the zones array must match that of the gang elements
      • getZones

        public ZoneId[] getZones()
        Returns the currently available list of zones.
        Returns:
        most recently submitted zone list
      • getControllerMap

        protected java.util.Map<ZoneId,​C> getControllerMap()
        Returns a map of zone ids to controller objects.
        Returns:
        controller map