Class LegendControl

java.lang.Object
uk.ac.starlink.topcat.plot2.TabberControl
uk.ac.starlink.topcat.plot2.LegendControl
All Implemented Interfaces:
Control

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

    • LegendControl

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

    • createLegendIcon

      public uk.ac.starlink.ttools.plot2.LegendIcon createLegendIcon(uk.ac.starlink.ttools.plot2.LegendEntry[] entries)
      Returns the legend icon for the current state of the stack model.
      Parameters:
      entries - entries to include in legend
      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
    • getInsideModel

      public ToggleButtonModel getInsideModel()
      Returns the model used to specify whether the legend is internal or external to the plot bounds.
      Returns:
      inside model