Package uk.ac.starlink.topcat.plot2
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 Summary
Constructors Constructor Description LegendControl(MultiConfigger configger)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.float[]
getLegendPosition()
Returns the requested legend fractional position.-
Methods inherited from class uk.ac.starlink.topcat.plot2.TabberControl
addActionListener, addControlTab, addZoneTab, getActionForwarder, getControlIcon, getControlLabel, getPanel, getTabber, removeActionListener
-
-
-
-
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 legendzid
- 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
-
-