public class McIDASVHistogramWrapper extends HistogramWrapper
PlotWrapper.MyChartPanel
ChartWrapper.FieldProperties
Modifier and Type | Field and Description |
---|---|
private double |
high |
private DisplayControl |
imageControl |
private static org.slf4j.Logger |
logger |
private double |
low |
private org.jfree.chart.plot.XYPlot |
plot
The plot
|
chart, chartPanel, EVENT_DONTPASSON, EVENT_PASSON
animationWidget, dataChoiceWrappers, PROP_SELECTEDTIME, PROP_TIMERANGE, timeFilterSource, timeSelectSource
CMD_SAVEIMAGE, CMD_SAVEMOVIE, displayControl, displayLabel, hasBeenInitialized, isRemoved, PROP_REMOVED
propertiesDialog
Constructor and Description |
---|
McIDASVHistogramWrapper()
Default ctor
|
McIDASVHistogramWrapper(String name,
List dataChoices,
DisplayControlImpl control)
Ctor
|
Modifier and Type | Method and Description |
---|---|
private ActionListener |
buildHistoPropsListener() |
void |
clearHistogram()
Clear the histogram.
|
private void |
createChart()
Create the chart.
|
protected boolean |
doApplyProperties()
Apply the properties
|
JComponent |
doMakeContents() |
void |
doRemove()
Been removed, do any cleanup
|
protected void |
doReset() |
double |
getHigh() |
double |
getLow() |
protected List |
getPopupMenuItems(List items)
Add the default menu items
|
protected org.jfree.data.Range |
getRange() |
boolean |
hasDisplayControl() |
void |
loadData(FlatField data)
Create the histogram.
|
protected boolean |
modifyRange(double lowVal,
double hiVal)
Modify the low and high values of the domain axis.
|
protected boolean |
modifyRange(double lowVal,
double hiVal,
boolean notify)
Modify the low and high values of the domain axis.
|
private void |
reallyLoadData(FlatField data)
Assumes that
data has been validated and is okay to actually try
loading. |
boolean |
removeDisplayComponent()
Remove me
|
void |
resetPlot()
reset the histogram to its previous range
|
void |
setHigh(double val) |
void |
setLow(double val) |
void |
showPopup(JComponent where,
int x,
int y)
SHow the popup menu
|
boolean |
showProperties()
Show the properties dialog
|
applyProperties, canDoColors, canDoWrapperColor, getBins, getPropertiesComponents, getStacked, getTypeName, loadData, setBins, setStacked
annotationChanged, chartPanelGetToolTipText, chartPanelMouseClicked, chartPanelMouseDragged, chartPanelMousePressed, chartPanelMouseReleased, doMakeChartPanel, getAutoRange, getBackgroundColor, getChartPanel, getControl, getDataAreaColor, getDomainLineState, getPreferredChartSize, getPropertyTabs, getRangeLineState, initXYPlot, keyPressed, keyReleased, keyTyped, okToDraw, panPlot, panPlot, setAutoRange, setBackgroundColor, setDataAreaColor, setDomainLineState, setName, setRangeLineState, signalChartChanged
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, wrapDataChoices
addGroupMenuItems, doMakeDisplayLabel, doSaveImage, doSaveMovie, getContents, getDisplayables, getDisplayControl, getDisplayGroup, getDisplayLabel, getIsRemoved, getLabelShown, getName, initAfterUnPersistence, setDisplayControl, setDisplayGroup, setIsRemoved, setLabelShown, toString
addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyListeners, isShowing, removePropertyChangeListener, showProperties
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
private static final org.slf4j.Logger logger
private DisplayControl imageControl
private org.jfree.chart.plot.XYPlot plot
private double low
private double high
public McIDASVHistogramWrapper()
public McIDASVHistogramWrapper(String name, List dataChoices, DisplayControlImpl control)
name
- The name.dataChoices
- List of data choices.control
- "Parent" control.private void createChart()
public JComponent doMakeContents()
doMakeContents
in class HistogramWrapper
public void clearHistogram()
public void loadData(FlatField data) throws IllegalArgumentException, RemoteException, VisADException
data
- Data to use in histogram.IllegalArgumentException
- if data
is all NaNs.RemoteException
- On badnessVisADException
- On badnessprivate void reallyLoadData(FlatField data) throws VisADException, RemoteException
data
has been validated and is okay to actually try
loading.data
- Data to use in histogram. Cannot be null
or all NaNs.VisADException
RemoteException
protected boolean modifyRange(double lowVal, double hiVal)
lowVal
- Low value.hiVal
- High value.false
if plot
is null
. true
otherwise.protected boolean modifyRange(double lowVal, double hiVal, boolean notify)
lowVal
- Low value.hiVal
- High value.notify
- Whether or not listeners should be notified.false
if plot
is null
. true
otherwise.protected org.jfree.data.Range getRange()
protected void doReset()
public void resetPlot()
public double getLow()
public void setLow(double val)
public double getHigh()
public void setHigh(double val)
public void showPopup(JComponent where, int x, int y)
showPopup
in class DisplayComponent
where
- component to show near tox
- xy
- yprotected List getPopupMenuItems(List items)
getPopupMenuItems
in class PlotWrapper
items
- List of menu itemsprivate ActionListener buildHistoPropsListener()
ActionListener
that listens for
ChartPanel.PROPERTIES_COMMAND
events and shows the histogram
properties.public boolean showProperties()
showProperties
in class DisplayComponent
public boolean hasDisplayControl()
public boolean removeDisplayComponent()
removeDisplayComponent
in class DisplayComponent
protected boolean doApplyProperties()
doApplyProperties
in class ChartWrapper
public void doRemove()
doRemove
in class ChartWrapper