Venice 0.751beta

nz.org.venice.prefs.settings
Class ChartModuleSettings

java.lang.Object
  extended bynz.org.venice.prefs.settings.AbstractSettings
      extended bynz.org.venice.prefs.settings.ChartModuleSettings
All Implemented Interfaces:
Settings

public class ChartModuleSettings
extends AbstractSettings

This class represents ChartModule data which can be saved for the purposes of restoring the modules upon restart.

Author:
Mark Hummel
See Also:
PreferencesManager, Settings

Field Summary
 
Fields inherited from interface nz.org.venice.prefs.settings.Settings
ALERTS, ANALYSER, ANNMODULE, ANNRESULTS, CHART, CHARTMODULE, FRAME, GAMODULE, GARESULTS, GPMODULE, GPRESULTS, GRAPHS, HELP, HELPMODULE, MENUS, MODULE, PAPERTRADEMODULE, PAPERTRADERESULTS, PORTFOLIO, PORTFOLIOMODULE, PORTFOLIOTABLEMODULE, PREFERENCES, PREFERENCESMODULE, PREFS, QUOTEMODULE, ROOTMODULE, TABLE, TRANSACTIONMODULE, WATCHSCREENMODULE
 
Constructor Summary
ChartModuleSettings()
          Create new ChartModule settings.
ChartModuleSettings(java.lang.String key)
          Create new ChartModule settings.
 
Method Summary
 boolean getDefaultZoomEnabled()
          Retrieve the state of the defaultZoom button.
 ChartDrawingModel getDrawnElements()
          Get the ChartDrawingModel for the underlying chart.
 java.lang.Comparable getEndX()
          Return the last entry of the underlying chart.
 java.lang.Comparable getHighlightedEnd()
          Get the end of a highlighted area on the chart
 java.lang.Comparable getHighlightedStart()
          Get the beginning of a highlighted area on the chart
 java.util.List getLevelSettingsList()
          Return the Level settings to reproduce the chart levels
 Module getModule(javax.swing.JDesktopPane desktop)
          Creates a ChartModule based on this ChartModuleSettings.
 boolean getOrientation()
           
 java.lang.Comparable getStartX()
          Return the first entry of the underlying chart.
 java.util.List getSymbolList()
          Return the list of symbols for this chart.
 int getTimelineBarPosition()
           
 boolean getZoomInEnabled()
          Save the state of the zoomIn button.
 void setDefaultZoomEnabled(boolean enabled)
          Save the state of the defaultZoom button.
 void setDrawnElements(ChartDrawingModel drawnElements)
          Save the drawn graphic elements on the chart
 void setEndX(java.lang.Comparable endX)
          Set the vertical bounds of the underlying chart
 void setHighlightedEnd(java.lang.Comparable highlightedEnd)
          Set the end of a highlighted area on the chart
 void setHighlightedStart(java.lang.Comparable highlightedStart)
          Set the beginning of a highlighted area on the chart
 void setLevelSettingsList(java.util.List levelSettingsList)
          Put the level settings for the chart levels
 void setOrientation(boolean normalOrientation)
          Set the vertical orientation of the underlying chart.
 void setStartX(java.lang.Comparable startX)
          Set the vertical bounds of the underlying chart
 void setSymbolList(java.util.List symbolList)
          Set the symbolList of this chart.
 void setTimelineBarPosition(int position)
          Record the value of the time line bar scroll bar
 void setTitle(java.lang.String title)
          Set the Chart title
 void setZoomInEnabled(boolean enabled)
          Save the state of the zoomIn button.
 java.lang.String toString()
           
 
Methods inherited from class nz.org.venice.prefs.settings.AbstractSettings
getGroup, getHBarPolicy, getHBarValue, getKey, getTitle, getType, getVBarPolicy, getVBarValue, setGroup, setHBarPolicy, setHBarValue, setKey, setScrollBarValues, setType, setVBarPolicy, setVBarValue, updateScrollPane
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChartModuleSettings

public ChartModuleSettings()
Create new ChartModule settings.


ChartModuleSettings

public ChartModuleSettings(java.lang.String key)
Create new ChartModule settings.

Parameters:
key - The graph Settings Identifier
Method Detail

setSymbolList

public void setSymbolList(java.util.List symbolList)
Set the symbolList of this chart.

Parameters:
symbolList - A list of symbols

getSymbolList

public java.util.List getSymbolList()
Return the list of symbols for this chart.

Returns:
A List of symbols.

getLevelSettingsList

public java.util.List getLevelSettingsList()
Return the Level settings to reproduce the chart levels

Returns:
A List of levels.

setLevelSettingsList

public void setLevelSettingsList(java.util.List levelSettingsList)
Put the level settings for the chart levels

Parameters:
levelSettingsList - A list of level settings

setTitle

public void setTitle(java.lang.String title)
Set the Chart title

Specified by:
setTitle in interface Settings
Overrides:
setTitle in class AbstractSettings
Parameters:
title - The chart title

setStartX

public void setStartX(java.lang.Comparable startX)
Set the vertical bounds of the underlying chart

Parameters:
startX - The first entry of the chart.

setEndX

public void setEndX(java.lang.Comparable endX)
Set the vertical bounds of the underlying chart

Parameters:
endX - The last entry of the chart.

getStartX

public java.lang.Comparable getStartX()
Return the first entry of the underlying chart.

Returns:
A comparable representing the lower bound.

getEndX

public java.lang.Comparable getEndX()
Return the last entry of the underlying chart.

Returns:
A comparable representing the upper bound.

setHighlightedStart

public void setHighlightedStart(java.lang.Comparable highlightedStart)
Set the beginning of a highlighted area on the chart

Parameters:
highlightedStart - The start of the highlighted area.

setHighlightedEnd

public void setHighlightedEnd(java.lang.Comparable highlightedEnd)
Set the end of a highlighted area on the chart

Parameters:
highlightedEnd - The end of the highlighted area.

getHighlightedStart

public java.lang.Comparable getHighlightedStart()
Get the beginning of a highlighted area on the chart

Returns:
The start of the highlighted area.

getHighlightedEnd

public java.lang.Comparable getHighlightedEnd()
Get the end of a highlighted area on the chart

Returns:
The end of the highlighted area.

setDefaultZoomEnabled

public void setDefaultZoomEnabled(boolean enabled)
Save the state of the defaultZoom button.

Parameters:
enabled - The state of the button

getDefaultZoomEnabled

public boolean getDefaultZoomEnabled()
Retrieve the state of the defaultZoom button.

Returns:
The state of the button

setZoomInEnabled

public void setZoomInEnabled(boolean enabled)
Save the state of the zoomIn button.

Parameters:
enabled - The state of the button

getZoomInEnabled

public boolean getZoomInEnabled()
Save the state of the zoomIn button.

Returns:
The state of the button

setDrawnElements

public void setDrawnElements(ChartDrawingModel drawnElements)
Save the drawn graphic elements on the chart

Parameters:
drawnElements - The ChartDrawingModel for the underlying chart

getDrawnElements

public ChartDrawingModel getDrawnElements()
Get the ChartDrawingModel for the underlying chart.

Returns:
A ChartDrawingModel containing graphic data drawn on the chart

setOrientation

public void setOrientation(boolean normalOrientation)
Set the vertical orientation of the underlying chart.

Parameters:
normalOrientation - True if the origin is at at bottom left corner.

getOrientation

public boolean getOrientation()
Returns:
the orientation of the chart.

getTimelineBarPosition

public int getTimelineBarPosition()
Returns:
the value of the timeline scrollbar

setTimelineBarPosition

public void setTimelineBarPosition(int position)
Record the value of the time line bar scroll bar

Parameters:
position - The hbar value of the timeline bar.

getModule

public Module getModule(javax.swing.JDesktopPane desktop)
Creates a ChartModule based on this ChartModuleSettings.

Specified by:
getModule in interface Settings
Overrides:
getModule in class AbstractSettings

toString

public java.lang.String toString()
Overrides:
toString in class AbstractSettings

Venice 0.751beta