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
Control for defining legend characteristics.
- Since:
- 13 Mar 2013
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionuk.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.Returns the model used to specify whether the legend is internal or external to the plot bounds.float[]
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 Details
-
LegendControl
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
Returns the model used to specify whether the legend is internal or external to the plot bounds.- Returns:
- inside model
-