Package ucar.unidata.idv.control.chart
Class ChartHolder
java.lang.Object
ucar.unidata.idv.control.chart.ChartHolder
Class ChartHolder hodls a chart
- Version:
- $Revision: 1.9 $
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JComponentFor properties dialogprotected JComponentFor properties dialogprotected org.jfree.chart.axis.AxisLocationlast axis sideprotected JTextFieldfor guiprotected JCheckBoxfor guiprotected JCheckBoxfor gui -
Constructor Summary
ConstructorsConstructorDescriptionctorChartHolder(ChartManager chartManager, String name, Dimension preferredSize) ctor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadd(org.jfree.data.xy.XYDataset dataset, org.jfree.chart.axis.ValueAxis rangeAxis, org.jfree.chart.axis.ValueAxis domainAxis, org.jfree.chart.renderer.xy.XYItemRenderer renderer, org.jfree.chart.axis.AxisLocation side) add data setprotected voidadd(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 setprotected voidadd(org.jfree.data.xy.XYDataset dataset, org.jfree.chart.renderer.xy.XYItemRenderer renderer, org.jfree.chart.axis.AxisLocation side) add data setprotected voidapply propsprotected booleanapply propertiesvoiddoSaveAs()write imageGet the BackgroundColor property.protected booleanGet the BeingShown property.Get the ChartManager property.protected org.jfree.chart.ChartPanelget panelGet the DataAreaColor property.Get the date format for this plot.Get the DomainLineState property.Get the LayoutRect property.protected voidgetMenuItems(List items) get itemsgetName()Get the Name property.org.jfree.chart.plot.PlotgetPlot()get plotGet the PreferredSize property.protected voidgetPropertiesComponents(List comps) get properties widgetsGet the RangeLineState property.booleanGet the ShowThumbnail property.booleanGet the ShowTitle property.booleanahs parametersprotected voidinit()initprotected voidinitvoidHandle eventprotected voidpanPlot(boolean right) Pan plotprotected voidpanPlot(boolean right, double percent) Pan the plotprotected voidcreate new chart panelvoidsetBackgroundColor(Color value) Set the BackgroundColor property.protected voidsetBeingShown(boolean value) Set the BeingShown property.voidsetChartManager(ChartManager value) Set the ChartManager property.voidsetDataAreaColor(Color value) Set the DataAreaColor property.voidsetDateFormat(String dateFormat) Set the date format for this plot.voidsetDomainLineState(LineState value) Set the DomainLineState property.voidsetLayoutRect(Rectangle value) Set the LayoutRect property.voidSet the Name property.voidsetPreferredSize(Dimension value) Set the PreferredSize property.voidsetRangeLineState(LineState value) Set the RangeLineState property.voidsetShowThumbnail(boolean value) Set the ShowThumbnail property.voidsetShowTitle(boolean value) Set the ShowTitle property.voidshow dialog
-
Field Details
-
lastSide
protected org.jfree.chart.axis.AxisLocation lastSidelast axis side -
showThumbnailCbx
for gui -
showTitleCbx
for gui -
backgroundSwatch
For properties dialog -
dataAreaSwatch
For properties dialog -
nameFld
for gui
-
-
Constructor Details
-
ChartHolder
public ChartHolder()ctor -
ChartHolder
ctor- Parameters:
chartManager- The chart managername- namepreferredSize- size
-
-
Method Details
-
applyProperties
protected boolean applyProperties()apply properties- Returns:
- OK
-
getPropertiesComponents
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
get items- Parameters:
items- items
-
resetChartPanel
protected void resetChartPanel()create new chart panel -
keyPressed
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 rightpercent- by how much
-
initChart
protected void initChart()init -
add
protected void add(org.jfree.data.xy.XYDataset dataset, org.jfree.chart.renderer.xy.XYItemRenderer renderer, org.jfree.chart.axis.AxisLocation side) add data set- Parameters:
dataset- datasetrenderer- rendererside- which side
-
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- datasetrangeAxis- axisrenderer- rendererside- which side
-
add
protected void add(org.jfree.data.xy.XYDataset dataset, org.jfree.chart.axis.ValueAxis rangeAxis, org.jfree.chart.axis.ValueAxis domainAxis, org.jfree.chart.renderer.xy.XYItemRenderer renderer, org.jfree.chart.axis.AxisLocation side) add data set- Parameters:
dataset- datasetrangeAxis- axisdomainAxis- axisrenderer- rendererside- which side
-
hasParameters
public boolean hasParameters()ahs parameters- Returns:
- has parameters
-
setLayoutRect
Set the LayoutRect property.- Parameters:
value- The new value for LayoutRect
-
getLayoutRect
Get the LayoutRect property.- Returns:
- The LayoutRect
-
setName
Set the Name property.- Parameters:
value- The new value for Name
-
getName
Get the Name property.- Returns:
- The Name
-
setChartManager
Set the ChartManager property.- Parameters:
value- The new value for ChartManager
-
getChartManager
Get the ChartManager property.- Returns:
- The ChartManager
-
setDomainLineState
Set the DomainLineState property.- Parameters:
value- The new value for DomainLineState
-
getDomainLineState
Get the DomainLineState property.- Returns:
- The DomainLineState
-
setRangeLineState
Set the RangeLineState property.- Parameters:
value- The new value for RangeLineState
-
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
Set the BackgroundColor property.- Parameters:
value- The new value for BackgroundColor
-
getBackgroundColor
Get the BackgroundColor property.- Returns:
- The BackgroundColor
-
setDataAreaColor
Set the DataAreaColor property.- Parameters:
value- The new value for DataAreaColor
-
getDataAreaColor
Get the DataAreaColor property.- Returns:
- The DataAreaColor
-
getDateFormat
Get the date format for this plot.- Returns:
- the date format for this plot.
-
setDateFormat
Set the date format for this plot.- Parameters:
dateFormat- The date format for this plot.
-
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
Set the PreferredSize property.- Parameters:
value- The new value for PreferredSize
-
getPreferredSize
Get the PreferredSize property.- Returns:
- The PreferredSize
-