uk.ac.starlink.topcat.plot2
Class LegendControl

java.lang.Object
  extended by uk.ac.starlink.topcat.plot2.TabberControl
      extended by 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
LegendControl(MultiConfigger configger)
          Constructor.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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


Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.