Class LegendControl

  • All Implemented Interfaces:
    Control

    public class LegendControl
    extends TabberControl
    Control for defining legend characteristics.
    Since:
    13 Mar 2013
    Author:
    Mark Taylor
    • Constructor Detail

      • LegendControl

        public LegendControl​(MultiConfigger configger)
        Constructor.
        Parameters:
        configger - config source containing some plot-wide config, specifically captioner style
    • Method Detail

      • createLegendIcon

        public uk.ac.starlink.ttools.plot2.LegendIcon createLegendIcon​(uk.ac.starlink.ttools.plot2.LegendEntry[] entries,
                                                                       ZoneId zid)
        Returns the legend icon for the current state of the stack model.
        Parameters:
        entries - entries to include in legend
        zid - zone identifier for legend zone
        Returns:
        legend icon, or null if not visible
      • getLegendPosition

        public float[] getLegendPosition()
        Returns the requested legend fractional position.
        Returns:
        2-element array giving x, y fractional positions for legend (each in range 0..1), or null for absent or external legend