uk.ac.starlink.ast.gui
Interface PlotController


public interface PlotController

An interface for interacting with a PlotConfigurator. This defines methods that make requests for the current PlotConfiguration to be applied, for a optional colour to be used for the background and for access to the current Frame used by the Plot (so that values can be formatted correctly for the axes being used, RA/Dec etc.).

Version:
$Id$
Author:
Peter W. Draper
See Also:
Plot, PlotConfigurator, PlotConfiguration

Method Summary
 Color getPlotColour()
          Get the current colour of the Component that contains the Plot.
 Frame getPlotCurrentFrame()
          Return a reference to the current Frame that is used when creating the controlled Plots.
 void setPlotColour(Color color)
          Apply a colour to the Component that contains the Plot.
 void updatePlot()
          Apply the current PlotConfiguration object state to the Plot.
 

Method Detail

updatePlot

void updatePlot()
Apply the current PlotConfiguration object state to the Plot. The current configuration can be obtained as single String using the PlotConfiguration.getAst method.


setPlotColour

void setPlotColour(Color color)
Apply a colour to the Component that contains the Plot. Only needed if any ComponentColourControls instances are used, otherwise the implementation may do nothing.


getPlotColour

Color getPlotColour()
Get the current colour of the Component that contains the Plot. Only needed if any ComponentColourControls instances are used, otherwise the implementation may do nothing.


getPlotCurrentFrame

Frame getPlotCurrentFrame()
Return a reference to the current Frame that is used when creating the controlled Plots. This is used for formatting and unformatting data values in a way that is natural for the Plot axes (i.e. can be used to enter RA and Dec values as dd:hh:ss.ss). A FrameSet can be returned (which could be the Plot if it is guaranteed to be always available), in which case the current Frame of that will be used.

Note this may never return a null, if this may be the case then consider using a different Frame/FrameSet (i.e. the one read from the original dataset).



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.