ucar.unidata.idv.control.chart
Class ChartHolder

java.lang.Object
  extended by ucar.unidata.idv.control.chart.ChartHolder

public class ChartHolder
extends Object

Class ChartHolder hodls a chart

Version:
$Revision: 1.9 $
Author:
IDV Development Team

Field Summary
protected  JComponent backgroundSwatch
          For properties dialog
protected  JComponent dataAreaSwatch
          For properties dialog
protected  org.jfree.chart.axis.AxisLocation lastSide
          last axis side
protected  JTextField nameFld
          for gui
protected  JCheckBox showThumbnailCbx
          for gui
protected  JCheckBox showTitleCbx
          for gui
 
Constructor Summary
ChartHolder()
          ctor
ChartHolder(ChartManager chartManager, String name, Dimension preferredSize)
          ctor
 
Method Summary
protected  void add(org.jfree.data.xy.XYDataset dataset, org.jfree.chart.axis.ValueAxis rangeAxis, org.jfree.chart.renderer.xy.XYItemRenderer renderer, org.jfree.chart.axis.AxisLocation side)
          add data set
protected  void applyPlotProperties()
          apply props
protected  boolean applyProperties()
          apply properties
 void doSaveAs()
          write image
 Color getBackgroundColor()
          Get the BackgroundColor property.
protected  boolean getBeingShown()
          Get the BeingShown property.
 ChartManager getChartManager()
          Get the ChartManager property.
protected  org.jfree.chart.ChartPanel getChartPanel()
          get panel
 Color getDataAreaColor()
          Get the DataAreaColor property.
 LineState getDomainLineState()
          Get the DomainLineState property.
 Rectangle getLayoutRect()
          Get the LayoutRect property.
protected  void getMenuItems(List items)
          get items
 String getName()
          Get the Name property.
 org.jfree.chart.plot.Plot getPlot()
          get plot
 Dimension getPreferredSize()
          Get the PreferredSize property.
protected  void getPropertiesComponents(List comps)
          get properties widgets
 LineState getRangeLineState()
          Get the RangeLineState property.
 boolean getShowThumbnail()
          Get the ShowThumbnail property.
 boolean getShowTitle()
          Get the ShowTitle property.
 boolean hasParameters()
          ahs parameters
protected  void init()
          init
protected  void initChart()
          init
 void keyPressed(KeyEvent e)
          Handle event
protected  void panPlot(boolean right)
          Pan plot
protected  void panPlot(boolean right, double percent)
          Pan the plot
protected  void resetChartPanel()
          create new chart panel
 void setBackgroundColor(Color value)
          Set the BackgroundColor property.
protected  void setBeingShown(boolean value)
          Set the BeingShown property.
 void setChartManager(ChartManager value)
          Set the ChartManager property.
 void setDataAreaColor(Color value)
          Set the DataAreaColor property.
 void setDomainLineState(LineState value)
          Set the DomainLineState property.
 void setLayoutRect(Rectangle value)
          Set the LayoutRect property.
 void setName(String value)
          Set the Name property.
 void setPreferredSize(Dimension value)
          Set the PreferredSize property.
 void setRangeLineState(LineState value)
          Set the RangeLineState property.
 void setShowThumbnail(boolean value)
          Set the ShowThumbnail property.
 void setShowTitle(boolean value)
          Set the ShowTitle property.
 void showPropertiesDialog()
          show dialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastSide

protected org.jfree.chart.axis.AxisLocation lastSide
last axis side


showThumbnailCbx

protected JCheckBox showThumbnailCbx
for gui


showTitleCbx

protected JCheckBox showTitleCbx
for gui


backgroundSwatch

protected JComponent backgroundSwatch
For properties dialog


dataAreaSwatch

protected JComponent dataAreaSwatch
For properties dialog


nameFld

protected JTextField nameFld
for gui

Constructor Detail

ChartHolder

public ChartHolder()
ctor


ChartHolder

public ChartHolder(ChartManager chartManager,
                   String name,
                   Dimension preferredSize)
ctor

Parameters:
chartManager - The chart manager
name - name
preferredSize - size
Method Detail

applyProperties

protected boolean applyProperties()
apply properties

Returns:
OK

getPropertiesComponents

protected void getPropertiesComponents(List comps)
get properties widgets

Parameters:
comps - widgets

applyPlotProperties

protected void applyPlotProperties()
apply props


init

protected void init()
init


setBeingShown

protected void setBeingShown(boolean value)
Set the BeingShown property.

Parameters:
value - The new value for BeingShown

getBeingShown

protected boolean getBeingShown()
Get the BeingShown property.

Returns:
The BeingShown

getChartPanel

protected org.jfree.chart.ChartPanel getChartPanel()
get panel

Returns:
panel

getPlot

public org.jfree.chart.plot.Plot getPlot()
get plot

Returns:
plot

doSaveAs

public void doSaveAs()
write image


showPropertiesDialog

public void showPropertiesDialog()
show dialog


getMenuItems

protected void getMenuItems(List items)
get items

Parameters:
items - items

resetChartPanel

protected void resetChartPanel()
create new chart panel


keyPressed

public void keyPressed(KeyEvent e)
Handle event

Parameters:
e - The event

panPlot

protected void panPlot(boolean right)
Pan plot

Parameters:
right - to right

panPlot

protected void panPlot(boolean right,
                       double percent)
Pan the plot

Parameters:
right - to right
percent - by how much

initChart

protected void initChart()
init


add

protected void add(org.jfree.data.xy.XYDataset dataset,
                   org.jfree.chart.axis.ValueAxis rangeAxis,
                   org.jfree.chart.renderer.xy.XYItemRenderer renderer,
                   org.jfree.chart.axis.AxisLocation side)
add data set

Parameters:
dataset - dataset
rangeAxis - axis
renderer - renderer
side - which side

hasParameters

public boolean hasParameters()
ahs parameters

Returns:
has parameters

setLayoutRect

public void setLayoutRect(Rectangle value)
Set the LayoutRect property.

Parameters:
value - The new value for LayoutRect

getLayoutRect

public Rectangle getLayoutRect()
Get the LayoutRect property.

Returns:
The LayoutRect

setName

public void setName(String value)
Set the Name property.

Parameters:
value - The new value for Name

getName

public String getName()
Get the Name property.

Returns:
The Name

setChartManager

public void setChartManager(ChartManager value)
Set the ChartManager property.

Parameters:
value - The new value for ChartManager

getChartManager

public ChartManager getChartManager()
Get the ChartManager property.

Returns:
The ChartManager

setDomainLineState

public void setDomainLineState(LineState value)
Set the DomainLineState property.

Parameters:
value - The new value for DomainLineState

getDomainLineState

public LineState getDomainLineState()
Get the DomainLineState property.

Returns:
The DomainLineState

setRangeLineState

public void setRangeLineState(LineState value)
Set the RangeLineState property.

Parameters:
value - The new value for RangeLineState

getRangeLineState

public LineState getRangeLineState()
Get the RangeLineState property.

Returns:
The RangeLineState

setShowThumbnail

public void setShowThumbnail(boolean value)
Set the ShowThumbnail property.

Parameters:
value - The new value for ShowThumbnail

getShowThumbnail

public boolean getShowThumbnail()
Get the ShowThumbnail property.

Returns:
The ShowThumbnail

setBackgroundColor

public void setBackgroundColor(Color value)
Set the BackgroundColor property.

Parameters:
value - The new value for BackgroundColor

getBackgroundColor

public Color getBackgroundColor()
Get the BackgroundColor property.

Returns:
The BackgroundColor

setDataAreaColor

public void setDataAreaColor(Color value)
Set the DataAreaColor property.

Parameters:
value - The new value for DataAreaColor

getDataAreaColor

public Color getDataAreaColor()
Get the DataAreaColor property.

Returns:
The DataAreaColor

setShowTitle

public void setShowTitle(boolean value)
Set the ShowTitle property.

Parameters:
value - The new value for ShowTitle

getShowTitle

public boolean getShowTitle()
Get the ShowTitle property.

Returns:
The ShowTitle

setPreferredSize

public void setPreferredSize(Dimension value)
Set the PreferredSize property.

Parameters:
value - The new value for PreferredSize

getPreferredSize

public Dimension getPreferredSize()
Get the PreferredSize property.

Returns:
The PreferredSize