Venice 0.751beta

nz.org.venice.chart.graph
Interface GraphUI

All Known Implementing Classes:
CountbackLineGraphUI, CustomGraphUI, ExpMovingAverageGraphUI, FiboGraphUI, KDGraphUI, MACDGraphUI, PeriodGraphUI, PointAndFigureGraphUI, RSIGraphUI, SRGraphUI

public interface GraphUI

Defines a user interface for a graph. Graphs often have user-definable settings, such as the period of a moving average graph. Since there are many types of graphs it makes sense standardising how the user-definable settings are handled and how the user interface is displayed to the user. Therefore each graph may have an associated user interface which lets the user modify the graph's settings.

Each implementation of this class is instantiated by the associated graph. Therefore this interface has no set constructor as the constructor can vary depending on the graph.

This user interface will be displayed by the GraphSettingsDialog.

Author:
Andrew Leppard
See Also:
AbstractGraph, Graph, GraphSettingsDialog, GraphSource

Method Summary
 java.lang.String checkSettings()
          Check the current settings displayed in the user interface.
 java.lang.String checkSettings(java.util.HashMap settings)
          Check previously set settings.
 javax.swing.JPanel getPanel()
          Return the user interface.
 java.util.HashMap getSettings()
          Return the current settings displayed in the user interface.
 void setSettings(java.util.HashMap settings)
          Display the given settings in the user interface.
 

Method Detail

getSettings

public java.util.HashMap getSettings()
Return the current settings displayed in the user interface.

Returns:
current settings

checkSettings

public java.lang.String checkSettings()
Check the current settings displayed in the user interface. Return an error message if the settings are invalid.

Returns:
the error message or null if the settings are valid

checkSettings

public java.lang.String checkSettings(java.util.HashMap settings)
Check previously set settings. Return an error message if the settings are invalid.

Parameters:
settings - Previously saved settings
Returns:
the error message or null if the settings are valid

setSettings

public void setSettings(java.util.HashMap settings)
Display the given settings in the user interface.

Parameters:
settings - the new settings

getPanel

public javax.swing.JPanel getPanel()
Return the user interface.

Returns:
the user interface

Venice 0.751beta