|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.collab.SharableImpl
ucar.unidata.collab.PropertiedThing
ucar.unidata.idv.control.multi.DisplayComponent
ucar.unidata.idv.control.chart.ChartWrapper
public abstract class ChartWrapper
Abstract class for chart implementations
| Nested Class Summary | |
|---|---|
protected static class |
ChartWrapper.FieldProperties
Class FieldProperties holds state for the data choice wrappers in the properties dialog |
| Field Summary | |
|---|---|
protected AnimationWidget |
animationWidget
The widget |
protected List |
dataChoiceWrappers
List of data choices |
static String |
PROP_SELECTEDTIME
Property change id |
static String |
PROP_TIMERANGE
Property change id |
protected TimeSeriesChartWrapper |
timeFilterSource
This is the time series that we get the time segments from for subsetting |
protected ChartWrapper |
timeSelectSource
This is the source for time selects |
| 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 | |
|---|---|
ChartWrapper()
Default ctor |
|
ChartWrapper(String name,
List dataChoices)
Ctor |
|
| Method Summary | |
|---|---|
void |
addDataChoice(DataChoice dataChoice)
Add the dta choice |
void |
addDataChoices(List newDataChoices)
Add the data choices |
void |
addField()
Add a field to thei chart |
void |
animationTimeChanged(Real time)
Use the animation time to set the domain crosshairs |
void |
applyJython()
Get the jython text from the text field and apply it |
protected void |
applyJython(String jython)
Evaluate the jython. |
protected boolean |
applyProperties()
Apply properties |
protected boolean |
canBeASourceForTimeSelectionEvents()
Can this component be a source for time selection events |
boolean |
canDoDataChoiceList()
ok to show the data choice list |
protected boolean |
canDoDriveTime()
Can this chart drive the times in the main display. |
protected boolean |
canDoJython()
Should the jython field be shown in the properties |
protected boolean |
canDoMinMaxDate()
Can this chart subset the entire data set on time |
boolean |
canDoParameters()
Can we add fields |
boolean |
canDoRemoveParameters()
Can we remove fields |
protected boolean |
canDoResolution()
Should show resolution widget |
protected boolean |
canDoTimeFilters()
Can this chart use time subset filters. |
protected boolean |
canDoTimeSelect()
Can this chart use time selects This is used to determine whether the checkbox should be shown in the menus |
boolean |
canDoWrapperColor()
Can the color swatch be shown in the properties for the data choice wrappers. |
boolean |
canDoWrapperSide()
Can the Side menu be shown in the properties for the data choice wrappers. |
protected DataChoiceWrapper |
createDataChoiceWrapper(DataChoice dataChoice)
A utility to create a data choice wrapper |
protected boolean |
doApplyProperties()
Apply the properties |
protected JComponent |
doMakeWrapperDisplayComponent(int idx,
ChartWrapper.FieldProperties fieldProperty)
Make the widget for the field |
boolean |
doMultipleAddFields()
When selecting data does the data tree support multiple selections |
void |
doRemove()
Cleanup the chart |
protected double[][] |
filterData(double[] samples,
double[] timeValues)
Utility to pull subset the given samples based on the time filter ranges |
String |
formatValue(double v)
utility to format the value |
String |
getAnimationShareGroup()
Get the AnimationShareGroup property. |
List |
getCategories()
Get the data categories for selecting data choices |
List |
getDataChoices()
Create and return a list of the data choices held by the data choice wrappers. |
List |
getDataChoiceWrappers()
Get the DataChoiceWrappers property. |
boolean |
getDriveTime()
Get the DriveTime property. |
List |
getFieldSelectionLabels()
Returns the list of labels used for selecting data choices. |
protected FlatField |
getFlatField(FieldImpl data)
Utility to extract a FlatField from the data |
protected org.python.util.PythonInterpreter |
getInterpreter()
Create, if needed, and return the interpreter |
String |
getJython()
Get the Jython property. |
double |
getMaxDate()
Get the MaxDate property. |
double |
getMinDate()
Get the MinDate property. |
protected List |
getPopupMenuItems(List items)
Add the default menu items |
protected void |
getPropertiesComponents(List comps,
int tabIdx)
Create the properties contents |
double |
getResolution()
Get the Resolution property. |
boolean |
getShowTime()
Get the ShowTime property. |
protected List |
getTimeFilterRanges()
Get get list of Ranges for time subsetting. |
TimeSeriesChartWrapper |
getTimeFilterSource()
Get the FilterSource property. |
List |
getTimeRanges()
Get the time ranges to use |
ChartWrapper |
getTimeSelectSource()
Get the SelectSource property. |
double[] |
getTimeValues(double[][] samples,
FlatField data)
Convert the time from the data (in samples[1]) into an array of milliseconds |
abstract String |
getTypeName()
Overwritten by derived classes to return the name of the type of this chart. |
void |
init(MultiDisplayHolder displayControl,
List dataChoices)
Initialize |
void |
initDone()
Called after this chart has been created. |
protected void |
initializeJython(org.python.util.PythonInterpreter interpreter)
Add the state of this chart to the interpreter |
void |
keyPressed(KeyEvent e)
Noop |
void |
keyReleased(KeyEvent e)
Noop |
void |
keyTyped(KeyEvent e)
Noop |
void |
loadData()
create shapes for an individual time step. |
void |
propertyChange(PropertyChangeEvent event)
Handle the event |
void |
removeTimeFilterSource()
Remove the current time filter source |
void |
removeTimeSelectSource()
Remove the current time select source |
void |
setAnimationShareGroup(String value)
Set the AnimationShareGroup property. |
void |
setDataChoiceWrappers(List value)
Set the DataChoiceWrappers property. |
void |
setDriveTime(boolean value)
Set the DriveTime property. |
void |
setJython(String value)
Set the Jython property. |
void |
setMaxDate(double value)
Set the MaxDate property. |
void |
setMinDate(double value)
Set the MinDate property. |
void |
setResolution(double value)
Set the Resolution property. |
void |
setShowTime(boolean value)
Set the ShowTime property. |
void |
setTimeFilterSource(TimeSeriesChartWrapper value)
Set the FilterSource property. |
void |
setTimeFromAnimation(Real time)
Animation in main display changed. |
void |
setTimeSelectSource(ChartWrapper value)
Set the SelectSource property. |
protected List |
wrapDataChoices(List choices)
A utility that takes a list of DataChoice-s and wraps each one in the DataChoiceWrapper. |
| Methods inherited from class ucar.unidata.idv.control.multi.DisplayComponent |
|---|
addGroupMenuItems, doMakeContents, doMakeDisplayLabel, doSaveImage, doSaveMovie, getBackgroundColor, getContents, getDisplayables, getDisplayControl, getDisplayGroup, getDisplayLabel, getIsRemoved, getLabelShown, getName, initAfterUnPersistence, removeDisplayComponent, setBackgroundColor, setDisplayControl, setDisplayGroup, setIsRemoved, setLabelShown, setName, showPopup, showProperties, toString |
| Methods inherited from class ucar.unidata.collab.PropertiedThing |
|---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyListeners, getPropertyTabs, isShowing, removePropertyChangeListener, showProperties |
| Methods inherited from class ucar.unidata.collab.SharableImpl |
|---|
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setShareGroup, setSharing, setUniqueId, showSharableDialog |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_TIMERANGE
public static final String PROP_SELECTEDTIME
protected AnimationWidget animationWidget
protected List dataChoiceWrappers
protected TimeSeriesChartWrapper timeFilterSource
protected ChartWrapper timeSelectSource
| Constructor Detail |
|---|
public ChartWrapper()
public ChartWrapper(String name,
List dataChoices)
name - The namedataChoices - List of data choices| Method Detail |
|---|
public List getCategories()
public void init(MultiDisplayHolder displayControl,
List dataChoices)
displayControl - The display control we're in.dataChoices - List of data choicespublic void initDone()
initDone in class DisplayComponent
protected FlatField getFlatField(FieldImpl data)
throws VisADException,
RemoteException
data - The data
RemoteException - On badness
VisADException - On badnesspublic abstract String getTypeName()
getTypeName in class DisplayComponentpublic void keyPressed(KeyEvent e)
keyPressed in interface KeyListenere - The eventpublic void keyReleased(KeyEvent e)
keyReleased in interface KeyListenere - The eventpublic void keyTyped(KeyEvent e)
keyTyped in interface KeyListenere - The eventprotected List wrapDataChoices(List choices)
choices - List of data choices
protected DataChoiceWrapper createDataChoiceWrapper(DataChoice dataChoice)
dataChoice - The data choice
protected List getTimeFilterRanges()
public List getTimeRanges()
protected List getPopupMenuItems(List items)
getPopupMenuItems in class DisplayComponentitems - List of menu items
protected org.python.util.PythonInterpreter getInterpreter()
public void applyJython()
protected void applyJython(String jython)
jython - The jythonprotected void initializeJython(org.python.util.PythonInterpreter interpreter)
interpreter - The interpreter to initializeprotected boolean canDoJython()
protected boolean canBeASourceForTimeSelectionEvents()
protected boolean canDoTimeFilters()
protected boolean canDoTimeSelect()
protected boolean canDoDriveTime()
protected boolean canDoMinMaxDate()
protected boolean canDoResolution()
public boolean canDoParameters()
public boolean canDoRemoveParameters()
public boolean canDoDataChoiceList()
public boolean canDoWrapperColor()
public boolean canDoWrapperSide()
public void propertyChange(PropertyChangeEvent event)
propertyChange in interface PropertyChangeListenerpropertyChange in class PropertiedThingevent - The eventpublic void doRemove()
doRemove in class DisplayComponent
protected void getPropertiesComponents(List comps,
int tabIdx)
getPropertiesComponents in class DisplayComponentcomps - List of componentstabIdx - Which tab
protected JComponent doMakeWrapperDisplayComponent(int idx,
ChartWrapper.FieldProperties fieldProperty)
idx - which onefieldProperty - The wrapper wrapper
protected boolean applyProperties()
applyProperties in class DisplayComponentprotected boolean doApplyProperties()
doApplyProperties in class DisplayComponentpublic void addField()
public List getFieldSelectionLabels()
public boolean doMultipleAddFields()
public String formatValue(double v)
v - the value
public void addDataChoice(DataChoice dataChoice)
throws VisADException,
RemoteException
dataChoice - the choice
RemoteException - On badness
VisADException - On badness
public void addDataChoices(List newDataChoices)
throws VisADException,
RemoteException
newDataChoices - the choices
RemoteException - On badness
VisADException - On badness
public void loadData()
throws VisADException,
RemoteException
loadData in class DisplayComponentRemoteException - On badness
VisADException - On badnesspublic void setTimeFromAnimation(Real time)
time - the animation timepublic void animationTimeChanged(Real time)
animationTimeChanged in class DisplayComponenttime - The timepublic void setDataChoiceWrappers(List value)
value - The new value for DataChoiceWrapperspublic List getDataChoiceWrappers()
public void setResolution(double value)
value - The new value for Resolutionpublic double getResolution()
public List getDataChoices()
public void removeTimeFilterSource()
public void setTimeFilterSource(TimeSeriesChartWrapper value)
value - The new value for FilterSourcepublic TimeSeriesChartWrapper getTimeFilterSource()
public void removeTimeSelectSource()
public void setTimeSelectSource(ChartWrapper value)
value - The new value for SelectSourcepublic ChartWrapper getTimeSelectSource()
protected double[][] filterData(double[] samples,
double[] timeValues)
throws VisADException,
RemoteException
samples - The datatimeValues - The times
RemoteException - On badness_
VisADException - On badness_
public double[] getTimeValues(double[][] samples,
FlatField data)
throws VisADException,
RemoteException
samples - The datadata - Where the data came from
RemoteException - On badness
VisADException - On badnesspublic void setShowTime(boolean value)
value - The new value for ShowTimepublic boolean getShowTime()
public void setDriveTime(boolean value)
value - The new value for DriveTimepublic boolean getDriveTime()
public void setMinDate(double value)
value - The new value for MinDatepublic double getMinDate()
public void setMaxDate(double value)
value - The new value for MaxDatepublic double getMaxDate()
public void setJython(String value)
value - The new value for Jythonpublic String getJython()
public void setAnimationShareGroup(String value)
value - The new value for AnimationShareGrouppublic String getAnimationShareGroup()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||