Package ucar.unidata.idv.control
Class McVHistogramWrapper
- All Implemented Interfaces:
KeyListener,PropertyChangeListener,EventListener,Sharable
Wraps a JFreeChart histogram to ease working with VisAD data.
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.unidata.idv.control.chart.PlotWrapper
PlotWrapper.MyChartPanelNested classes/interfaces inherited from class ucar.unidata.idv.control.chart.ChartWrapper
ChartWrapper.FieldProperties -
Field Summary
Fields inherited from class ucar.unidata.idv.control.chart.PlotWrapper
chart, chartPanel, EVENT_DONTPASSON, EVENT_PASSONFields 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
ConstructorsConstructorDescriptionDefault ctorMcVHistogramWrapper(String name, List dataChoices, DisplayControlImpl control) Ctor -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the histogram.protected booleanApply the properties_more_voiddoRemove()Been removed, do any cleanupprotected voiddoReset()_more_doublegetHigh()_more_doublegetLow()_more_protected ListgetPopupMenuItems(List items) Add the default menu itemsprotected org.jfree.data.RangegetRange()_more_boolean_more_voidCreate the histogram.protected booleanmodifyRange(double lowVal, double hiVal) Modify the low and high values of the domain axis.protected booleanmodifyRange(double lowVal, double hiVal, boolean notify) Modify the low and high values of the domain axis.booleanRemove mevoidreset the histogram to its previous rangevoid_more_voidsetHigh(double val) _more_voidsetLow(double val) _more_voidshowPopup(JComponent where, int x, int y) SHow the popup menubooleanShow the properties dialogMethods inherited from class ucar.unidata.idv.control.chart.HistogramWrapper
applyProperties, canDoColors, canDoWrapperColor, getBins, getPropertiesComponents, getStacked, getTypeName, loadData, setBins, setStackedMethods inherited from class ucar.unidata.idv.control.chart.PlotWrapper
annotationChanged, chartPanelGetToolTipText, chartPanelMouseClicked, chartPanelMouseDragged, chartPanelMousePressed, chartPanelMouseReleased, doMakeChartPanel, getAutoRange, getBackgroundColor, getChartPanel, getDataAreaColor, getDomainLineState, getPreferredChartSize, getPropertyTabs, getRangeLineState, initXYPlot, keyPressed, keyReleased, keyTyped, okToDraw, panPlot, panPlot, setAutoRange, setBackgroundColor, setDataAreaColor, setDomainLineState, setName, setRangeLineState, signalChartChangedMethods 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, canDoWrapperSide, createDataChoiceWrapper, doMakeWrapperDisplayComponent, doMultipleAddFields, filterData, formatValue, getAnimationShareGroup, getCategories, getDataChoices, getDataChoiceWrappers, getDriveTime, getFieldSelectionLabels, getFlatField, getInterpreter, getJython, getMaxDate, getMinDate, getResolution, getShowTime, getTimeFilterRanges, getTimeFilterSource, getTimeRanges, getTimeSelectSource, getTimeValues, init, initDone, initializeJython, 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, doMakeDisplayLabel, doSaveImage, doSaveMovie, getContents, getDisplayables, getDisplayControl, getDisplayGroup, getDisplayLabel, getIsRemoved, getLabelShown, getName, initAfterUnPersistence, setDisplayControl, setDisplayGroup, setIsRemoved, setLabelShown, 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
-
Constructor Details
-
McVHistogramWrapper
public McVHistogramWrapper()Default ctor -
McVHistogramWrapper
Ctor- Parameters:
name- The name.dataChoices- List of data choices.control- "Parent" control.
-
-
Method Details
-
doMakeContents
_more_- Overrides:
doMakeContentsin classHistogramWrapper- Returns:
- _more_
-
clearHistogram
public void clearHistogram()Clear the histogram. -
saveImage
public void saveImage()_more_ -
loadData
public void loadData(FlatField data) throws IllegalArgumentException, RemoteException, VisADException Create the histogram.- Parameters:
data- Data to use in histogram.- Throws:
IllegalArgumentException- ifdatais all NaNs.RemoteException- On badnessVisADException- On badness
-
modifyRange
protected boolean modifyRange(double lowVal, double hiVal) Modify the low and high values of the domain axis.- Parameters:
lowVal- Low value.hiVal- High value.- Returns:
falseifplotisnull.trueotherwise.
-
modifyRange
protected boolean modifyRange(double lowVal, double hiVal, boolean notify) Modify the low and high values of the domain axis.- Parameters:
lowVal- Low value.hiVal- High value.notify- Whether or not listeners should be notified.- Returns:
falseifplotisnull.trueotherwise.
-
getRange
protected org.jfree.data.Range getRange()_more_- Returns:
- _more_
-
doReset
protected void doReset()_more_ -
resetPlot
public void resetPlot()reset the histogram to its previous range -
getLow
public double getLow()_more_- Returns:
- _more_
-
setLow
public void setLow(double val) _more_- Parameters:
val- _more_
-
getHigh
public double getHigh()_more_- Returns:
- _more_
-
setHigh
public void setHigh(double val) _more_- Parameters:
val- _more_
-
showPopup
SHow the popup menu- Overrides:
showPopupin classDisplayComponent- Parameters:
where- component to show near tox- xy- y
-
getPopupMenuItems
Add the default menu items- Overrides:
getPopupMenuItemsin classPlotWrapper- Parameters:
items- List of menu items- Returns:
- The items list
-
showProperties
public boolean showProperties()Show the properties dialog- Overrides:
showPropertiesin classDisplayComponent- Returns:
- Was it ok
-
hasDisplayControl
public boolean hasDisplayControl()_more_- Returns:
- _more_
-
removeDisplayComponent
public boolean removeDisplayComponent()Remove me- Overrides:
removeDisplayComponentin classDisplayComponent- Returns:
- was removed
-
doApplyProperties
protected boolean doApplyProperties()Apply the properties- Overrides:
doApplyPropertiesin classChartWrapper- Returns:
- Success
-
doRemove
public void doRemove()Been removed, do any cleanup- Overrides:
doRemovein classChartWrapper
-