edu.wisc.ssec.mcidasv.control
Class McIDASVHistogramWrapper

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.collab.PropertiedThing
          extended by ucar.unidata.idv.control.multi.DisplayComponent
              extended by ucar.unidata.idv.control.chart.ChartWrapper
                  extended by ucar.unidata.idv.control.chart.PlotWrapper
                      extended by ucar.unidata.idv.control.chart.HistogramWrapper
                          extended by edu.wisc.ssec.mcidasv.control.McIDASVHistogramWrapper
All Implemented Interfaces:
KeyListener, PropertyChangeListener, EventListener, Sharable

public class McIDASVHistogramWrapper
extends HistogramWrapper

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.MyChartPanel
 
Nested classes/interfaces inherited from class ucar.unidata.idv.control.chart.ChartWrapper
ChartWrapper.FieldProperties
 
Field Summary
private  double high
           
private  DisplayControl imageControl
           
private static org.slf4j.Logger logger
           
private  double low
           
private  org.jfree.chart.plot.XYPlot plot
          The plot
 
Fields inherited from class ucar.unidata.idv.control.chart.PlotWrapper
chart, chartPanel, EVENT_DONTPASSON, EVENT_PASSON
 
Fields 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
McIDASVHistogramWrapper()
          Default ctor
McIDASVHistogramWrapper(String name, List dataChoices, DisplayControlImpl control)
          Ctor
 
Method Summary
private  ActionListener buildHistoPropsListener()
           
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 charts
protected  boolean modifyRange(double lowVal, double hiVal)
           
 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
 
Methods inherited from class ucar.unidata.idv.control.chart.HistogramWrapper
applyProperties, canDoColors, canDoWrapperColor, getBins, getPropertiesComponents, getStacked, getTypeName, loadData, setBins, setStacked
 
Methods 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, signalChartChanged
 
Methods 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, wrapDataChoices
 
Methods 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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static final org.slf4j.Logger logger

imageControl

private DisplayControl imageControl

plot

private org.jfree.chart.plot.XYPlot plot
The plot


low

private double low

high

private double high
Constructor Detail

McIDASVHistogramWrapper

public McIDASVHistogramWrapper()
Default ctor


McIDASVHistogramWrapper

public McIDASVHistogramWrapper(String name,
                               List dataChoices,
                               DisplayControlImpl control)
Ctor

Parameters:
name - The name.
dataChoices - List of data choices.
control - "Parent" control.
Method Detail

createChart

private void createChart()
Create the chart


doMakeContents

public JComponent doMakeContents()
Overrides:
doMakeContents in class HistogramWrapper

loadData

public void loadData(FlatField data)
              throws VisADException,
                     RemoteException
Create the charts

Throws:
RemoteException - On badness
VisADException - On badness

modifyRange

protected boolean modifyRange(double lowVal,
                              double hiVal)

getRange

protected org.jfree.data.Range getRange()

doReset

protected void doReset()

resetPlot

public void resetPlot()
reset the histogram to its previous range


getLow

public double getLow()

setLow

public void setLow(double val)

getHigh

public double getHigh()

setHigh

public void setHigh(double val)

showPopup

public void showPopup(JComponent where,
                      int x,
                      int y)
SHow the popup menu

Overrides:
showPopup in class DisplayComponent
Parameters:
where - component to show near to
x - x
y - y

getPopupMenuItems

protected List getPopupMenuItems(List items)
Add the default menu items

Overrides:
getPopupMenuItems in class PlotWrapper
Parameters:
items - List of menu items
Returns:
The items list

buildHistoPropsListener

private ActionListener buildHistoPropsListener()
Returns:

showProperties

public boolean showProperties()
Show the properties dialog

Overrides:
showProperties in class DisplayComponent
Returns:
Was it ok

hasDisplayControl

public boolean hasDisplayControl()

removeDisplayComponent

public boolean removeDisplayComponent()
Remove me

Overrides:
removeDisplayComponent in class DisplayComponent
Returns:
was removed

doApplyProperties

protected boolean doApplyProperties()
Apply the properties

Overrides:
doApplyProperties in class ChartWrapper
Returns:
Success

doRemove

public void doRemove()
Been removed, do any cleanup

Overrides:
doRemove in class ChartWrapper