Package ucar.unidata.idv.control.chart
Class PlotWrapper
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.collab.PropertiedThing
ucar.unidata.idv.control.multi.DisplayComponent
ucar.unidata.idv.control.chart.ChartWrapper
ucar.unidata.idv.control.chart.PlotWrapper
- All Implemented Interfaces:
KeyListener
,PropertyChangeListener
,EventListener
,Sharable
- Direct Known Subclasses:
HistogramWrapper
,ScatterPlotChartWrapper
,TimeSeriesChartWrapper
Abstract class for chart implementations
- Version:
- $Revision: 1.15 $
- Author:
- IDV Development Team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Class MyChartPanel adds items to a popup menuNested classes/interfaces inherited from class ucar.unidata.idv.control.chart.ChartWrapper
ChartWrapper.FieldProperties
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.jfree.chart.JFreeChart
The chartprotected PlotWrapper.MyChartPanel
The main chart gui componentprotected static final boolean
Used by the MyChartPanel event bridgeprotected static final boolean
Used by the MyChartPanel event bridgeFields inherited from class ucar.unidata.idv.control.chart.ChartWrapper
animationWidget, dataChoiceWrappers, PROP_SELECTEDTIME, PROP_TIMERANGE, timeFilterSource, timeSelectSource
Fields inherited from class ucar.unidata.idv.control.multi.DisplayComponent
CMD_SAVEIMAGE, CMD_SAVEMOVIE, displayControl, displayLabel, hasBeenInitialized, isRemoved, PROP_REMOVED
Fields inherited from class ucar.unidata.collab.PropertiedThing
propertiesDialog
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
annotationChanged
(ChartAnnotation chartAnnotation) The annotation changed somehowprotected boolean
Apply propertiesprotected boolean
Can this chart do colorsHook to intercept these calls on the chartboolean
Hook to intercept these calls on the chartboolean
chartPanelMouseDragged
(MouseEvent event) Hook to intercept these calls on the chartboolean
Hook to intercept these calls on the chartboolean
Hook to intercept these calls on the chartprotected PlotWrapper.MyChartPanel
doMakeChartPanel
(org.jfree.chart.JFreeChart chart) Make the panel for the chartboolean
Get the AutoRange property.Get the BackgroundColor property.protected org.jfree.chart.ChartPanel
Get the chartGet the DataAreaColor property.Get the DomainLineState property.protected List
getPopupMenuItems
(List items) Get the menu itemsprotected Dimension
Get the chart sizeprotected void
getPropertiesComponents
(List comps, int tabIdx) Create the properties contentsString[]
Get the list of tab names for the properties dialogGet the RangeLineState property.protected void
initXYPlot
(org.jfree.chart.plot.XYPlot plot) Utility to init xy plotsvoid
Handle eventvoid
Noopvoid
Noopboolean
okToDraw
(ChartAnnotation annotation) Is the annotation ok to drawprotected void
panPlot
(boolean right) Pan plotprotected void
panPlot
(boolean right, double percent) Pan the plotvoid
setAutoRange
(boolean value) Set the AutoRange property.void
setBackgroundColor
(Color value) Set the BackgroundColor property.void
setDataAreaColor
(Color value) Set the DataAreaColor property.void
setDomainLineState
(LineState value) Set the DomainLineState property.void
Set the Name property.void
setRangeLineState
(LineState value) Set the RangeLineState property.void
update chartMethods inherited from class ucar.unidata.idv.control.chart.ChartWrapper
addDataChoice, addDataChoices, addField, animationTimeChanged, applyJython, applyJython, canBeASourceForTimeSelectionEvents, canDoDataChoiceList, canDoDriveTime, canDoJython, canDoMinMaxDate, canDoParameters, canDoRemoveParameters, canDoResolution, canDoTimeFilters, canDoTimeSelect, canDoWrapperColor, canDoWrapperSide, createDataChoiceWrapper, doApplyProperties, doMakeWrapperDisplayComponent, doMultipleAddFields, doRemove, filterData, formatValue, getAnimationShareGroup, getCategories, getDataChoices, getDataChoiceWrappers, getDriveTime, getFieldSelectionLabels, getFlatField, getInterpreter, getJython, getMaxDate, getMinDate, getResolution, getShowTime, getTimeFilterRanges, getTimeFilterSource, getTimeRanges, getTimeSelectSource, getTimeValues, getTypeName, init, initDone, initializeJython, loadData, propertyChange, removeTimeFilterSource, removeTimeSelectSource, setAnimationShareGroup, setDataChoiceWrappers, setDriveTime, setJython, setMaxDate, setMinDate, setResolution, setShowTime, setTimeFilterSource, setTimeFromAnimation, setTimeSelectSource, wrapDataChoices
Methods inherited from class ucar.unidata.idv.control.multi.DisplayComponent
addGroupMenuItems, doMakeContents, doMakeDisplayLabel, doSaveImage, doSaveMovie, getContents, getDisplayables, getDisplayControl, getDisplayGroup, getDisplayLabel, getIsRemoved, getLabelShown, getName, initAfterUnPersistence, removeDisplayComponent, setDisplayControl, setDisplayGroup, setIsRemoved, setLabelShown, showPopup, showProperties, toString
Methods inherited from class ucar.unidata.collab.PropertiedThing
addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyListeners, isShowing, removePropertyChangeListener, showProperties
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
-
Field Details
-
EVENT_PASSON
protected static final boolean EVENT_PASSONUsed by the MyChartPanel event bridge- See Also:
-
EVENT_DONTPASSON
protected static final boolean EVENT_DONTPASSONUsed by the MyChartPanel event bridge- See Also:
-
chartPanel
The main chart gui component -
chart
protected org.jfree.chart.JFreeChart chartThe chart
-
-
Constructor Details
-
PlotWrapper
public PlotWrapper()Default ctor -
PlotWrapper
Ctor- Parameters:
name
- The namedataChoices
- List of data choices
-
-
Method Details
-
keyReleased
Noop- Specified by:
keyReleased
in interfaceKeyListener
- Overrides:
keyReleased
in classChartWrapper
- Parameters:
e
- The event
-
keyTyped
Noop- Specified by:
keyTyped
in interfaceKeyListener
- Overrides:
keyTyped
in classChartWrapper
- Parameters:
e
- The event
-
okToDraw
Is the annotation ok to draw- Parameters:
annotation
- The annotation- Returns:
- ok to draw
-
canDoColors
protected boolean canDoColors()Can this chart do colors- Returns:
- true
-
annotationChanged
The annotation changed somehow- Parameters:
chartAnnotation
- The annotation
-
getPropertyTabs
Get the list of tab names for the properties dialog- Overrides:
getPropertyTabs
in classPropertiedThing
- Returns:
- List of tab names
-
getPropertiesComponents
Create the properties contents- Overrides:
getPropertiesComponents
in classChartWrapper
- Parameters:
comps
- List of componentstabIdx
- Which tab
-
applyProperties
protected boolean applyProperties()Apply properties- Overrides:
applyProperties
in classChartWrapper
- Returns:
- Was successful
-
getPopupMenuItems
Get the menu items- Overrides:
getPopupMenuItems
in classChartWrapper
- Parameters:
items
- List of menu items- Returns:
- The items list
-
setName
Set the Name property.- Overrides:
setName
in classDisplayComponent
- Parameters:
value
- The new value for Name
-
chartPanelGetToolTipText
Hook to intercept these calls on the chart- Parameters:
event
- The event- Returns:
- Was this event handled by the ChartWrapper
-
chartPanelMousePressed
Hook to intercept these calls on the chart- Parameters:
e
- The event- Returns:
- Was this event handled by the ChartWrapper
-
chartPanelMouseClicked
Hook to intercept these calls on the chart- Parameters:
e
- The event- Returns:
- Was this event handled by the ChartWrapper
-
chartPanelMouseDragged
Hook to intercept these calls on the chart- Parameters:
event
- The event- Returns:
- Was this event handled by the ChartWrapper
-
chartPanelMouseReleased
Hook to intercept these calls on the chart- Parameters:
event
- The event- Returns:
- Was this event handled by the ChartWrapper
-
getChartPanel
protected org.jfree.chart.ChartPanel getChartPanel()Get the chart- Returns:
- The chart_
-
signalChartChanged
public void signalChartChanged()update chart -
doMakeChartPanel
Make the panel for the chart- Parameters:
chart
- The chart- Returns:
- The panel
-
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
-
keyPressed
Handle event- Specified by:
keyPressed
in interfaceKeyListener
- Overrides:
keyPressed
in classChartWrapper
- Parameters:
e
- The event
-
initXYPlot
protected void initXYPlot(org.jfree.chart.plot.XYPlot plot) Utility to init xy plots- Parameters:
plot
- the plotx
-
getPreferredChartSize
Get the chart size- Returns:
- size
-
setBackgroundColor
Set the BackgroundColor property.- Overrides:
setBackgroundColor
in classDisplayComponent
- Parameters:
value
- The new value for BackgroundColor
-
getBackgroundColor
Get the BackgroundColor property.- Overrides:
getBackgroundColor
in classDisplayComponent
- Returns:
- The BackgroundColor
-
setDataAreaColor
Set the DataAreaColor property.- Parameters:
value
- The new value for DataAreaColor
-
getDataAreaColor
Get the DataAreaColor property.- Returns:
- The DataAreaColor
-
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
-
setAutoRange
public void setAutoRange(boolean value) Set the AutoRange property.- Parameters:
value
- The new value for AutoRange
-
getAutoRange
public boolean getAutoRange()Get the AutoRange property.- Returns:
- The AutoRange
-