edu.swri.swiftvis.plot
Interface PlotLegend

All Known Implementing Classes:
RectangleGridSurface.RGLegend, ScatterStyle.ScatterLegend

public interface PlotLegend

This interface encapsulates the functionality that is need to adjust legends that are put onto plots.

Author:
Mark Lewis

Method Summary
 void drawToGraphics(java.awt.Graphics2D g, java.awt.geom.Rectangle2D bounds)
          This method will attempt to draw the legend information to the provided graphics object inside the provided bounds.
 javax.swing.JComponent getPropertiesPanel()
          As the name implies, this method returns a panel that can be used to edit the properties of a legend object.
 boolean isDrawn()
          This method tells you whether this legend element is to be drawn based on user settings.
 double relativeVerticalSize()
          This method returns a double for the relative amount of space that this legend component should take.
 

Method Detail

getPropertiesPanel

javax.swing.JComponent getPropertiesPanel()
As the name implies, this method returns a panel that can be used to edit the properties of a legend object.

Returns:
A Swing component setup to allow modification of this object.

drawToGraphics

void drawToGraphics(java.awt.Graphics2D g,
                    java.awt.geom.Rectangle2D bounds)
This method will attempt to draw the legend information to the provided graphics object inside the provided bounds.

Parameters:
g - The Graphics2D object that is being drawn to.
bounds - A rectangle in which the drawing should be confined. Things drawn outside may be clipped.

isDrawn

boolean isDrawn()
This method tells you whether this legend element is to be drawn based on user settings.

Returns:
A boolean for whether it should be drawn.

relativeVerticalSize

double relativeVerticalSize()
This method returns a double for the relative amount of space that this legend component should take. This can be a constant determined by the author or something settable in the GUI.

Returns:
A proportional amount of space this legend element should take up.