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 classClass 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.JFreeChartThe chartprotected PlotWrapper.MyChartPanelThe main chart gui componentprotected static final booleanUsed by the MyChartPanel event bridgeprotected static final booleanUsed by the MyChartPanel event bridgeFields inherited from class ucar.unidata.idv.control.chart.ChartWrapper
animationWidget, dataChoiceWrappers, PROP_SELECTEDTIME, PROP_TIMERANGE, timeFilterSource, timeSelectSourceFields inherited from class ucar.unidata.idv.control.multi.DisplayComponent
CMD_SAVEIMAGE, CMD_SAVEMOVIE, displayControl, displayLabel, hasBeenInitialized, isRemoved, PROP_REMOVEDFields inherited from class ucar.unidata.collab.PropertiedThing
propertiesDialog -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidannotationChanged(ChartAnnotation chartAnnotation) The annotation changed somehowprotected booleanApply propertiesprotected booleanCan this chart do colorsHook to intercept these calls on the chartbooleanHook to intercept these calls on the chartbooleanchartPanelMouseDragged(MouseEvent event) Hook to intercept these calls on the chartbooleanHook to intercept these calls on the chartbooleanHook to intercept these calls on the chartprotected PlotWrapper.MyChartPaneldoMakeChartPanel(org.jfree.chart.JFreeChart chart) Make the panel for the chartbooleanGet the AutoRange property.Get the BackgroundColor property.protected org.jfree.chart.ChartPanelGet the chartGet the DataAreaColor property.Get the DomainLineState property.protected ListgetPopupMenuItems(List items) Get the menu itemsprotected DimensionGet the chart sizeprotected voidgetPropertiesComponents(List comps, int tabIdx) Create the properties contentsString[]Get the list of tab names for the properties dialogGet the RangeLineState property.protected voidinitXYPlot(org.jfree.chart.plot.XYPlot plot) Utility to init xy plotsvoidHandle eventvoidNoopvoidNoopbooleanokToDraw(ChartAnnotation annotation) Is the annotation ok to drawprotected voidpanPlot(boolean right) Pan plotprotected voidpanPlot(boolean right, double percent) Pan the plotvoidsetAutoRange(boolean value) Set the AutoRange property.voidsetBackgroundColor(Color value) Set the BackgroundColor property.voidsetDataAreaColor(Color value) Set the DataAreaColor property.voidsetDomainLineState(LineState value) Set the DomainLineState property.voidSet the Name property.voidsetRangeLineState(LineState value) Set the RangeLineState property.voidupdate 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, wrapDataChoicesMethods 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, toStringMethods inherited from class ucar.unidata.collab.PropertiedThing
addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyListeners, isShowing, removePropertyChangeListener, showPropertiesMethods 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:
keyReleasedin interfaceKeyListener- Overrides:
keyReleasedin classChartWrapper- Parameters:
e- The event
-
keyTyped
Noop- Specified by:
keyTypedin interfaceKeyListener- Overrides:
keyTypedin 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:
getPropertyTabsin classPropertiedThing- Returns:
- List of tab names
-
getPropertiesComponents
Create the properties contents- Overrides:
getPropertiesComponentsin classChartWrapper- Parameters:
comps- List of componentstabIdx- Which tab
-
applyProperties
protected boolean applyProperties()Apply properties- Overrides:
applyPropertiesin classChartWrapper- Returns:
- Was successful
-
getPopupMenuItems
Get the menu items- Overrides:
getPopupMenuItemsin classChartWrapper- Parameters:
items- List of menu items- Returns:
- The items list
-
setName
Set the Name property.- Overrides:
setNamein 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:
keyPressedin interfaceKeyListener- Overrides:
keyPressedin 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:
setBackgroundColorin classDisplayComponent- Parameters:
value- The new value for BackgroundColor
-
getBackgroundColor
Get the BackgroundColor property.- Overrides:
getBackgroundColorin 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
-