ucar.unidata.idv.control
Class JythonControl

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.idv.control.DisplayControlBase
          extended by ucar.unidata.idv.control.DisplayControlImpl
              extended by ucar.unidata.idv.control.GridDisplayControl
                  extended by ucar.unidata.idv.control.JythonControl
All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, ControlListener, DisplayListener

public class JythonControl
extends GridDisplayControl

Allows for the creation of a display by an end user through the use of Jython

Version:
$Revision: 1.39 $
Author:
Jeff McWhirter/Don Murray

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.unidata.idv.control.DisplayControlImpl
DisplayControlImpl.SideLegendLabel
 
Field Summary
static String PARAMNAME_PROBE
          probe id for the parameter
static String PARAMNAME_THIS
          control id for the parameter
static String PROBE_AREA
          ID for the area probe
static String PROBE_LEVEL
          ID for the level probe
static String[] PROBE_NAMES
          list of probe names - does this need to be public?
static String PROBE_NONE
          Symbol for no probe
static String PROBE_POINT
          ID for the point probe
static String PROBE_TRANSECT
          ID for the transect probe
static String PROBE_VERTICAL
          ID for the line probe
static String[] PROBES
          list of probes - does this need to be public?
protected  CrossSectionSelector transectProbe
          the transect probe
 
Fields inherited from class ucar.unidata.idv.control.GridDisplayControl
CMD_CONTOURDIALOG, CMD_SETLEVELS, gridDataInstance, INITIAL_PROBE_EARTHLOCATION, log_, settingLevel
 
Fields inherited from class ucar.unidata.idv.control.DisplayControlImpl
categories, colorScaleInfo, colorScales, contourInfo, contourInfoParams, contourWidget, controlContext, ctw, dataSelection, defaultView, defaultViewManager, DISPLAY_LIST_NAME, displayListTable, displayListUsesColor, displayMasters, displayUnit, helpUrl, initNoteText, instantiatedWithNoData, noteTextArea, noteWrapper, paramName, requestProperties, selectRangeWidget, settingVisibility, sharables, showNoteText, skipSlider, version, viewManagers, ZFUDGE
 
Fields inherited from class ucar.unidata.idv.control.DisplayControlBase
CMD_BARBSIZE, CMD_COLORS, CMD_COLORTABLE, CMD_INTERVAL, CMD_LEVEL, CMD_LINEWIDTH, CMD_POPUP, CMD_REMOVE, DEFAULT_POINT_SIZE, DEFAULT_SAMPLING_MODE, FIND_ALL, FIND_CATEGORY, FIND_CLASS, FIND_SPECIAL, FIND_THIS, FIND_WITHDATA, FIND_WITHTHISDATA, FIND_WITHTHISFIELD, FIND_WITHTHISVIEW, FLAG_COLOR, FLAG_COLORTABLE, FLAG_COLORUNIT, FLAG_CONTOUR, FLAG_DATACONTROL, FLAG_DISPLAYUNIT, FLAG_GRIDTRAJECTORY, FLAG_LINEWIDTH, FLAG_NONE, FLAG_SELECTRANGE, FLAG_SKIPFACTOR, FLAG_SMOOTHING, FLAG_TEXTUREQUALITY, FLAG_TIMERANGE, FLAG_ZPOSITION, GRID_INSETS, ICON_LOCK, ICON_REMOVE, ICON_UNLOCK, LABEL_NONE, MACRO_DATASOURCENAME, MACRO_DISPLAYNAME, MACRO_DISPLAYUNIT, MACRO_FHOUR, MACRO_LONGNAME, MACRO_POSITION, MACRO_SHORTNAME, MACRO_STATION, MACRO_TIMESTAMP, MACRO_VALUE, NEAREST_NEIGHBOR, PREF_DISPLAYLIST_TEMPLATE, PREF_EXTRALABEL_TEMPLATE, PREF_LEGENDLABEL_TEMPLATE, PROP_REMOVED, SETTINGS_GROUP_DISPLAY, SETTINGS_GROUP_FLAGS, SHARE_CHOICES, SHARE_COLOR, SHARE_COLORSCALE, SHARE_COLORTABLE, SHARE_DISPLAYUNIT, SHARE_POSITION, SHARE_SELECTRANGE, SHARE_SKIPVALUE, SHARE_TRANSECT, SHARE_VISIBILITY, WEIGHTED_AVERAGE
 
Fields inherited from interface ucar.unidata.idv.DisplayControl
BOTTOM_LEGEND, DEFAULT_PROBEFORMAT, PREF_PREFIX, PREF_PROBEFORMAT, PREF_REMOVEONWINDOWCLOSE, PREF_SAMPLING_MODE, PREF_STANDALONE_REMOVEONCLOSE, PREF_STANDALONE_REMOVEONCLOSE_ASK, PROP_LEGENDICON, RASTERMODE_SHOWALL, RASTERMODE_SHOWNONRASTER, RASTERMODE_SHOWRASTER, SIDE_LEGEND
 
Constructor Summary
JythonControl()
          Ctor
 
Method Summary
 void addData(String message)
          Hook to allow jython to call to bring up data choice selector
 void addData(String message, String callback)
          Hook to allow jython to call to bring up data choice selector
 void addEditMenuItem(String name, String method)
          Hook to call from jython to add to menu
 void addFileMenuItem(String name, String method)
          Hook to call from jython to add to menu
 void addJythonComponent(Component comp)
          Add a python component
protected  void addNewData(List newChoices)
          Gets called whne user has chosen new data
 void addSaveMenuItem(String name, String method)
          Hook to call from jython to add to menu
 void addViewMenuItem(String name, String method)
          Hook to call from jython to add to menu
 Container doMakeContents()
          Make some Plan view controls for the UI.
 void doRemove()
          Remove this control.
 void execJython(String method)
          Execute the jython method
 Real getAnimationTime()
          Get current animation time or null of none
 List getAnimationTimes()
          Get all animation times or null if none
protected  String getChangeParameterLabel()
          Return the appropriate label text for the menu.
 Displayable getCurrentProbe()
          Get the probe being used.
 String getDataCategories()
          Get the CategoryString property.
 List getDataList()
          Get the list of DataChoices
 boolean getDeveloperMode()
          Get the DeveloperMode property.
protected  void getEditMenuItems(List items, boolean forMenuBar)
          add to menu
protected  JComponent getExtraLegendComponent(int legendType)
          Return the extra legend component
protected  void getFileMenuItems(List items, boolean forMenuBar)
          add to menu
 String getJythonCode()
          Get the JythonCode property.
 String getJythonDisplayCategory()
          Get the DisplayCategory property.
 String getMyName()
          Get the MyName property.
 EarthLocationTuple[] getProbeLocation()
          Return an array that holds the location of the current probe.
 Object getProbePosition()
          Get the probe's position
 String getProbeType()
          Get the ProbeType property.
 double[][] getProbeXYZ()
          Return the current probe position in X/Y space.
protected  void getSaveMenuItems(List items, boolean forMenuBar)
          Add the relevant file menu items into the list
 List getTimesFromData()
          Get times from data
 Object getVar(Object varName)
          Get a variable.
protected  void getViewMenuItems(List items, boolean forMenuBar)
          add to menu
 boolean init(DataChoice dataChoice)
          Called to make this kind of Display Control; also calls code to made the Displayable.
 void initDone()
          init done.
 void receiveShareData(Sharable from, Object dataId, Object[] data)
          Method called by other classes that share the probe.
 void replaceData(String message)
          Hook to allow jython to call to bring up data choice selector
 void replaceData(String message, String callback)
          Hook to allow jython to call to bring up data choice selector
protected  void resetData()
          We have new data.
 Data sample()
          Sample the first data at the probe position
 List sampleAll()
          Sample all the data at the probe point
 List sampleAllAtTime()
          Sample all the data at the probe point at the current animation time
 Data sampleAtTime()
          Sample the first data at the probe position and at the current animation time
 Data sampleData(EarthLocationTuple[] loc, FieldImpl field)
          Sample at location
 Data sampleData(EarthLocationTuple[] loc, FieldImpl field, boolean atTime)
          Sample the field at the location and maybe at the animation time
 Data sampleDataAtProbe(FieldImpl field)
          Sample the field at the probe location
 Data sampleIndex(int index, boolean atTime)
          Sample the data at the index at the probe position
 void selectData(String message)
          Hook to allow jython to call to bring up data choice selector
 void selectData(String message, String callback, boolean replace, boolean multiples, List categories)
          Hook to allow jython to call to bring up data choice selector
 void setDataCategories(String value)
          Set the CategoryString property.
 void setDeveloperMode(boolean value)
          Set the DeveloperMode property.
 void setJythonCode(String value)
          Set the JythonCode property.
 void setJythonComponent(Component comp)
          Hook to call from jython to define gui
 void setJythonDisplayCategory(String value)
          Set the DisplayCategory property.
 void setLegendComponent(Component comp)
          Hook to call from jython to add in the legend component
 void setMyName(String value)
          Set the MyName property.
 void setProbePosition(Object p)
          Set the probe position property.
 void setProbeType(String value)
          Set the ProbeType property.
 void setVar(Object varName, Object value)
          Set a variable.
protected  boolean shouldAddAnimationListener()
          A hook to allow derived classes to tell us to add this as an animation listener
protected  void timeChanged(Real time)
          Respond to a timeChange event
 void writeToPlugin()
          Generate the control's XML
 
Methods inherited from class ucar.unidata.idv.control.GridDisplayControl
actionPerformed, addTopographyMap, convertColorRange, doMakeContourLevelControl, doMakeDataInstance, doMakeLevelControl, doMakeLevelControl, exportDisplayedData, getColorParamName, getColorRangeFromData, getColorRangeIndex, getColorUnit, getContourInfo, getCursorReadoutData, getCursorReadoutInner, getDataProjection, getDataRangeInColorUnits, getDefaultContourInfo, getDisplayUnit, getGridDataInstance, getInitialColorTable, getInitialRange, getRawDataUnit, haveMultipleFields, initializeDefaultContourInfo, isDisplayUnitAlsoColorUnit, setLevel, setLevel, setLevelFromUser
 
Methods inherited from class ucar.unidata.idv.control.DisplayControlImpl
activateDisplays, addAttributedDisplayable, addAttributedDisplayable, addAttributedDisplayable, addAttributeFlags, addCheckBoxSettings, addDataChoice, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayMaster, addDisplaySettings, addLabelMacros, addNoteText, addPropertiesComponents, addPropertyChangeListener, addRemovable, addSharable, addTimeModeWidget, addToControlContext, addToRangeMenu, addToRangeMenu, addToRangeMenu, addViewManager, appendDataChoices, applyAttributesToDisplayables, applyColor, applyColorScaleInfo, applyColorTable, applyColorUnit, applyContourInfo, applyDisplaySetting, applyDisplayUnit, applyLineWidth, applyPreferences, applyProperties, applyProperties, applyPropertyValues, applyRange, applySelectRange, applySkipFactor, applySmoothing, applyTextureQuality, applyTimeRange, applyZPosition, boundsClose, canBeDocked, canExportData, canSaveDataInCache, captureWindow, centerOnDisplay, changeColorUnit, changeDisplayUnit, checkFlag, checkIfDataOk, checkImageSize, clearDataInstance, clearPrototype, clearViewManagers, close, colorUnitChanged, controlChanged, convertColorRange, convertRange, createDisplayListDisplayable, createIdvWindow, dataChanged, deactivateDisplays, debug, displayableToFront, displayChanged, displayControlFailed, displayUnitChanged, doApplyProperties, doExport, doInitialUpdateLegendAndList, doMakeBottomLegendComponent, doMakeChangeColorMenu, doMakeChangeColorMenu, doMakeChangeParameterMenuItem, doMakeColorControl, doMakeColorControl, doMakeColorScales, doMakeMenuBar, doMakeMenuBarMenus, doMakePointSizeWidget, doMakeRemoveControl, doMakeSideLegendComponent, doMakeSkipFactorSlider, doMakeTextureSlider, doMakeVisibilityControl, doMakeWidgetComponent, doMakeWindow, doMakeZPositionSlider, findDisplayInfo, findDisplays, findDisplays, firePropertyChangeEvent, firstFrameDone, formatForCursorReadout, getActive, getAnimation, getAnimation, getAnimation, getAnimation, getAnimationInfo, getAnimationWidget, getAttributeFlags, getCachedData, getCanDoRemoveAll, getCategories, getCollapseLegend, getColor, getColorDimness, getColorScaleInfo, getColorTable, getColorTableForDisplayable, getColorTableToApply, getColorTableWidget, getColorUnitName, getColorWidgetLabel, getComponentHolder, getContents, getControlChangeSleepTime, getControlContext, getControlMenus, getControlWidgets, getCursorReadout, getCursorReadoutInner, getData, getDataChoice, getDataChoices, getDataForDisplayList, getDataInstance, getDataInstance, getDataProjectionForMenu, getDataProjectionLabel, getDataSelection, getDataSources, getDataTimeRange, getDataTimeRange, getDataTimeSet, getDebugDetails, getDefaultColorScaleInfo, getDefaultDisplayListTemplate, getDefaultDistanceUnit, getDefaultFastRendering, getDefaultSamplingMode, getDefaultSamplingModeValue, getDefaultView, getDefaultViewDescriptor, getDefaultViewManager, getDetailsContents, getDisplayAltitudeType, getDisplayCategory, getDisplayCenter, getDisplayConventions, getDisplayedData, getDisplayId, getDisplayInfos, getDisplayListColor, getDisplayListData, getDisplayListDisplayable, getDisplayListTemplate, getDisplayMaster, getDisplayName, getDisplayScale, getDisplayUnit, getDisplayUnitName, getDisplayVisibility, getDoCursorReadout, getEditMenuItems, getExpandedInTabs, getExtraLabelTemplate, getExtraMenus, getFileMenuItems, getGraphicsConfiguration, getGrid, getGrid, getHadDataChoices, getHaveInitialized, getHelpIds, getHelpMenuItems, getId, getIdv, getImage, getImage, getInitDataChoices, getInitialFastRendering, getInitialZPosition, getInternalAnimation, getInternalAnimation, getIsRaster, getIsTimeDriver, getLabel, getLastFileMenuItems, getLegendButtons, getLegendComponent, getLegendLabel, getLegendLabels, getLegendLabelTemplate, getLegendToolTip, getLineWidth, getLineWidthWidget, getLineWidthWidgetLabel, getLockVisibilityToggle, getLongParamName, getMacroNames, getMainPanel, getMainPanelSize, getMakeWindow, getMapDisplay, getMapViewManager, getMapViewProjection, getMenuLabel, getMyDataChoices, getNavigatedDisplay, getNoteText, getObjectStore, getOkToFireEvents, getOldColorTableOrInitialColorTable, getOriginalDataChoicesLabel, getOuterContents, getPointSize, getProperty, getProperty, getPropertyDisplayName, getRange, getRangeForColorTable, getRangeToApply, getRequestProperties, getSamplingModeName, getSamplingModeValue, getSamplingModeValue, getSelectRange, getSelectRangeEnabled, getSelectRangeWidget, getSettingsPanel, getShortParamName, getShowInDisplayList, getShowInLegend, getShowInTabs, getShowNoteText, getSkipValue, getSkipWidgetLabel, getSmoothingFactor, getSmoothingType, getSomeAnimation, getStore, getTemplateName, getTextureQuality, getTextureQualityLabel, getTimeSet, getTitle, getTransientProperty, getUnitForColor, getUseFastRendering, getUsesTimeDriver, getUseTimesInAnimation, getVersion, getVerticalValue, getViewAnimation, getViewContext, getViewer, getViewManager, getViewManager, getViewManager, getViewManagerClassNames, getViewManagerForCapture, getViewManagers, getViewMenuItems, getVisbilityAnimationPause, getWasUnPersisted, getWindow, getWindowSize, getWindowVisible, getWindowX, getWindowY, getZPosition, getZPositionSliderLabel, guiExported, guiImported, handleDisplayChanged, handleWindowClosing, hasMapProjection, hasTimeMacro, haveDataTimes, haveParameterDefaults, hide, hyperlinkUpdate, inGlobeDisplay, init, init, init, initAfterUnPersistence, initAfterUnPersistence, initAsPrototype, initAsTemplate, initBasic, initializeWithNewData, initWindow, isDisplay3D, isGuiShown, isInitDone, isInTransectView, isInViewManager, itemStateChanged, makeChangeColorMenuItems, makeLegendLabel, makeLockButton, makeRemoveButton, moveTo, notifyViewManagersOfChange, parseProperties, popup, popupDataDialog, popupDataDialog, popupDataDialog, processRequestProperties, projectionChanged, propertyChange, putTransientProperty, reallySetAttributeFlags, redoGuiLayout, reloadDataSource, reloadDataSourceInThread, removeDataChoice, removeDisplayable, removeDisplayables, removeDisplayables, removeOnWindowClose, removePropertyChangeListener, resetDimness, resetViewManager, revertToDefaultColorTable, revertToDefaultColorTable, revertToDefaultRange, revertToDefaultRange, saveAsFavorite, saveAsParameterDefaults, saveAsPrototype, saveAsTemplate, saveDataChoiceInCache, saveImage, selectDataChoices, setAnimationInfo, setAnimationSet, setAttributeFlags, setCachedData, setCanDoRemoveAll, setCategories, setCollapseLegend, setColor, setColorBrighter, setColorDimmer, setColorDimness, setColorScaleInfo, setColorScaleVisible, setColorTable, setColorTable, setColorTableName, setColorUnit, setColorUnitName, setComponentHolder, setContents, setContourInfo, setContourInfoParams, setData, setData, setDataChoices, setDataInstance, setDataInstances, setDataSelection, setDataTimeRange, setDefaultSamplingMode, setDefaultView, setDisplayableVisibility, setDisplayableVisiblity, setDisplayActive, setDisplayCategory, setDisplayId, setDisplayInactive, setDisplayListColor, setDisplayListColor, setDisplayListProperties, setDisplayListTemplate, setDisplayName, setDisplayUnit, setDisplayUnitName, setDisplayVisibility, setDoCursorReadout, setExpandedInTabs, setExtraLabelTemplate, setHadDataChoices, setHelpUrl, setId, setInitDataChoices, setInitialSettings, setInitialViewManager, setIsRaster, setIsTimeDriver, setLabelAsPreference, setLegendBackground, setLegendForeground, setLegendLabel, setLegendLabelTemplate, setLineWidth, setLockVisibilityToggle, setMainPanelDimensions, setMainPanelSize, setMakeWindow, setName, setNameFromUser, setNewColorUnit, setNewDisplayUnit, setNoteText, setOkToFireEvents, setOriginalDataChoicesLabel, setParamName, setPersistedVisadData, setPointSize, setProjectionInView, setProjectionInView, setProperty, setRange, setRange, setSelectRange, setSelectRangeEnabled, setSettingsDisplayUnit, setSharedColorScaleInfo, setShowInDisplayList, setShowInLegend, setShowInTabs, setShowNoteText, setSkipValue, setSmoothingFactor, setSmoothingType, setTemplateName, setTextureQuality, setTitle, setUnitForColor, setUseFastRendering, setUsesTimeDriver, setUseTimesInAnimation, setVersion, setViewer, setViewManagerClassNames, setVisbilityAnimationPause, setWindowSize, setWindowVisible, setWindowX, setWindowY, setZPosition, setZPosition, shouldAddControlListener, shouldAddDisplayListener, shouldApplyFastRendering, shouldBeDocked, shouldWindowBeVisible, show, showColorControlWidget, showColorDialog, showColorDialog, showColorScaleDialog, showColorScales, showColorSwatches, showContourPropertiesDialog, showDetails, showDisplaySettingsDialog, showHelp, showLegendMenu, showNormalCursor, showProperties, showTimeRangeDialog, showWaitCursor, toFront, toggleNoteTextArea, toggleVisibilityForVectorGraphicsRendering, toggleWindow, toString, transectChanged, updateAnimation, updateDataInstance, updateDataSelection, updateDisplayList, updateGridDataInstance, updateLegendAndList, updateLegendLabel, updateLockButton, useSmoothingFactor, useZPosition, viewManagerChanged, viewManagerDestroyed, viewpointChanged, writeTestArchive, xxxsetDisplayActive, zSliderChanged
 
Methods inherited from class ucar.unidata.idv.control.DisplayControlBase
boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToScreen, calculateRectangle, createStationTfo, earthToBox, earthToBox, earthToBoxTuple, earthToScreen, formatLevels, getLabeledReal, getLevelReal, getScreenCenter, getSelectedStation, getTmpProperty, isLeftButtonDown, logException, logException, makeEarthLocation, putTmpProperty, removeTmpProperty, screenToBox, screenToBox, screenToEarth, setStations, setStations, toBox, toEarth, userErrorMessage, userMessage
 
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ucar.unidata.idv.DisplayControl
getTmpProperty, putTmpProperty, removeTmpProperty
 
Methods inherited from interface ucar.unidata.collab.Sharable
getReceiveShareTime, getShareGroup, getSharing, getUniqueId, setReceiveShareTime
 

Field Detail

PARAMNAME_THIS

public static final String PARAMNAME_THIS
control id for the parameter

See Also:
Constant Field Values

PARAMNAME_PROBE

public static final String PARAMNAME_PROBE
probe id for the parameter

See Also:
Constant Field Values

PROBE_NONE

public static final String PROBE_NONE
Symbol for no probe

See Also:
Constant Field Values

PROBE_POINT

public static final String PROBE_POINT
ID for the point probe

See Also:
Constant Field Values

PROBE_LEVEL

public static final String PROBE_LEVEL
ID for the level probe

See Also:
Constant Field Values

PROBE_AREA

public static final String PROBE_AREA
ID for the area probe

See Also:
Constant Field Values

PROBE_VERTICAL

public static final String PROBE_VERTICAL
ID for the line probe

See Also:
Constant Field Values

PROBE_TRANSECT

public static final String PROBE_TRANSECT
ID for the transect probe

See Also:
Constant Field Values

PROBES

public static final String[] PROBES
list of probes - does this need to be public?


PROBE_NAMES

public static final String[] PROBE_NAMES
list of probe names - does this need to be public?


transectProbe

protected CrossSectionSelector transectProbe
the transect probe

Constructor Detail

JythonControl

public JythonControl()
Ctor

Method Detail

init

public boolean init(DataChoice dataChoice)
             throws VisADException,
                    RemoteException
Called to make this kind of Display Control; also calls code to made the Displayable. This method is called from inside DisplayControlImpl init(several args).

Overrides:
init in class DisplayControlImpl
Parameters:
dataChoice - the DataChoice of the moment.
Returns:
true if successful
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

initDone

public void initDone()
init done. call some jython

Overrides:
initDone in class DisplayControlImpl

shouldAddAnimationListener

protected boolean shouldAddAnimationListener()
A hook to allow derived classes to tell us to add this as an animation listener

Overrides:
shouldAddAnimationListener in class DisplayControlImpl
Returns:
Add as animation listener

timeChanged

protected void timeChanged(Real time)
Respond to a timeChange event

Overrides:
timeChanged in class DisplayControlImpl
Parameters:
time - new time

getVar

public Object getVar(Object varName)
Get a variable.

Parameters:
varName - variable name
Returns:
variable corresponding to the name

setVar

public void setVar(Object varName,
                   Object value)
Set a variable.

Parameters:
varName - variable name
value - variable value

writeToPlugin

public void writeToPlugin()
Generate the control's XML


resetData

protected void resetData()
                  throws VisADException,
                         RemoteException
We have new data. Reload

Overrides:
resetData in class DisplayControlImpl
Throws:
RemoteException - On badness
VisADException - On badness

getDataList

public List getDataList()
                 throws RemoteException,
                        VisADException
Get the list of DataChoices

Returns:
list of DataChoices
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

execJython

public void execJython(String method)
Execute the jython method

Parameters:
method - jython method to call

sample

public Data sample()
            throws RemoteException,
                   VisADException
Sample the first data at the probe position

Returns:
sampled data
Throws:
RemoteException - On badness
VisADException - On badness

sampleAtTime

public Data sampleAtTime()
                  throws RemoteException,
                         VisADException
Sample the first data at the probe position and at the current animation time

Returns:
sampled data
Throws:
RemoteException - On badness
VisADException - On badness

sampleIndex

public Data sampleIndex(int index,
                        boolean atTime)
                 throws RemoteException,
                        VisADException
Sample the data at the index at the probe position

Parameters:
index - Index in the data list
atTime - If true then also sample at the current animation time
Returns:
sampled data
Throws:
RemoteException - On badness
VisADException - On badness

sampleAll

public List sampleAll()
               throws RemoteException,
                      VisADException
Sample all the data at the probe point

Returns:
Sampled data
Throws:
RemoteException - On badness
VisADException - On badness

sampleAllAtTime

public List sampleAllAtTime()
                     throws RemoteException,
                            VisADException
Sample all the data at the probe point at the current animation time

Returns:
sampled data
Throws:
RemoteException - On badness
VisADException - On badness

sampleDataAtProbe

public Data sampleDataAtProbe(FieldImpl field)
                       throws RemoteException,
                              VisADException
Sample the field at the probe location

Parameters:
field - field to sample
Returns:
sampled data
Throws:
RemoteException - On badness
VisADException - On badness

sampleData

public Data sampleData(EarthLocationTuple[] loc,
                       FieldImpl field)
                throws RemoteException,
                       VisADException
Sample at location

Parameters:
loc - location
field - field to sample
Returns:
sampled data
Throws:
RemoteException - On badness
VisADException - On badness

getAnimationTime

public Real getAnimationTime()
                      throws RemoteException,
                             VisADException
Get current animation time or null of none

Returns:
animation time
Throws:
RemoteException - On badness
VisADException - On badness

getAnimationTimes

public List getAnimationTimes()
                       throws RemoteException,
                              VisADException
Get all animation times or null if none

Returns:
animation time
Throws:
RemoteException - On badness
VisADException - On badness

getTimesFromData

public List getTimesFromData()
                      throws RemoteException,
                             VisADException
Get times from data

Returns:
animation time
Throws:
RemoteException - On badness
VisADException - On badness

sampleData

public Data sampleData(EarthLocationTuple[] loc,
                       FieldImpl field,
                       boolean atTime)
                throws RemoteException,
                       VisADException
Sample the field at the location and maybe at the animation time

Parameters:
loc - location
field - field
atTime - if true then also sample at anim time
Returns:
sampled data
Throws:
RemoteException - On badness
VisADException - On badness

getChangeParameterLabel

protected String getChangeParameterLabel()
Return the appropriate label text for the menu.

Overrides:
getChangeParameterLabel in class DisplayControlImpl
Returns:
the label text

addNewData

protected void addNewData(List newChoices)
                   throws VisADException,
                          RemoteException
Gets called whne user has chosen new data

Overrides:
addNewData in class DisplayControlImpl
Parameters:
newChoices - new data choices
Throws:
RemoteException - On badness
VisADException - On badness

selectData

public void selectData(String message)
Hook to allow jython to call to bring up data choice selector

Parameters:
message - message to use in dialog

addData

public void addData(String message)
Hook to allow jython to call to bring up data choice selector

Parameters:
message - message to use in dialog

addData

public void addData(String message,
                    String callback)
Hook to allow jython to call to bring up data choice selector

Parameters:
message - message to use in dialog
callback - The jython procedure to callback

replaceData

public void replaceData(String message)
Hook to allow jython to call to bring up data choice selector

Parameters:
message - message to use in dialog

replaceData

public void replaceData(String message,
                        String callback)
Hook to allow jython to call to bring up data choice selector

Parameters:
message - message to use in dialog
callback - The jython procedure to callback

selectData

public void selectData(String message,
                       String callback,
                       boolean replace,
                       boolean multiples,
                       List categories)
Hook to allow jython to call to bring up data choice selector

Parameters:
message - message to use in dialog
callback - The jython procedure to callback
replace - If true then we remove the current list of data choices and replace it with the selected ones.
multiples - Select multiples
categories - Possibly null list of data categories to use

doRemove

public void doRemove()
              throws RemoteException,
                     VisADException
Remove this control.

Specified by:
doRemove in interface DisplayControl
Overrides:
doRemove in class DisplayControlImpl
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

getCurrentProbe

public Displayable getCurrentProbe()
Get the probe being used.

Returns:
current probe.

getProbePosition

public Object getProbePosition()
                        throws VisADException,
                               RemoteException
Get the probe's position

Returns:
position of the probe
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

setProbePosition

public void setProbePosition(Object p)
Set the probe position property.

Parameters:
p - position for probe.

getProbeXYZ

public double[][] getProbeXYZ()
                       throws VisADException,
                              RemoteException
Return the current probe position in X/Y space.

Returns:
a 2-D array of the form data[N][0] = X, data[N][1] = Y, data[N][2] = Z
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

getProbeLocation

public EarthLocationTuple[] getProbeLocation()
                                      throws VisADException,
                                             RemoteException
Return an array that holds the location of the current probe. For point, level and vertical probes the length is 1 For the horizonal probe the length 2 (the end points of the probe line) For the area probe the length is 4 (upper-left, upper-right, lower-right, lower-left)

Returns:
An array holding the probe location
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

receiveShareData

public void receiveShareData(Sharable from,
                             Object dataId,
                             Object[] data)
Method called by other classes that share the probe.

Specified by:
receiveShareData in interface Sharable
Overrides:
receiveShareData in class DisplayControlImpl
Parameters:
from - other class.
dataId - type of sharing
data - Array of data being shared. In this case, the first (and only?) object in the array is the level

doMakeContents

public Container doMakeContents()
Make some Plan view controls for the UI.

Overrides:
doMakeContents in class DisplayControlImpl
Returns:
create the contents for the UI.

getExtraLegendComponent

protected JComponent getExtraLegendComponent(int legendType)
Return the extra legend component

Overrides:
getExtraLegendComponent in class DisplayControlImpl
Parameters:
legendType - side or bottom
Returns:
component to put in legend

addJythonComponent

public void addJythonComponent(Component comp)
Add a python component

Parameters:
comp - component to add

setLegendComponent

public void setLegendComponent(Component comp)
Hook to call from jython to add in the legend component

Parameters:
comp - legend component

setJythonComponent

public void setJythonComponent(Component comp)
Hook to call from jython to define gui

Parameters:
comp - gui

getSaveMenuItems

protected void getSaveMenuItems(List items,
                                boolean forMenuBar)
Add the relevant file menu items into the list

Overrides:
getSaveMenuItems in class DisplayControlImpl
Parameters:
items - List of menu items
forMenuBar - Is this for the menu in the window's menu bar or for a popup menu in the legend

getFileMenuItems

protected void getFileMenuItems(List items,
                                boolean forMenuBar)
add to menu

Overrides:
getFileMenuItems in class DisplayControlImpl
Parameters:
items - list of menu items to add to
forMenuBar - for menu bar

getEditMenuItems

protected void getEditMenuItems(List items,
                                boolean forMenuBar)
add to menu

Overrides:
getEditMenuItems in class DisplayControlImpl
Parameters:
items - list of menu items to add to
forMenuBar - for menu bar

getViewMenuItems

protected void getViewMenuItems(List items,
                                boolean forMenuBar)
add to menu

Overrides:
getViewMenuItems in class DisplayControlImpl
Parameters:
items - list of menu items to add to
forMenuBar - for menu bar

addFileMenuItem

public void addFileMenuItem(String name,
                            String method)
Hook to call from jython to add to menu

Parameters:
name - menu item name
method - jython method name to call

addSaveMenuItem

public void addSaveMenuItem(String name,
                            String method)
Hook to call from jython to add to menu

Parameters:
name - menu item name
method - jython method name to call

addViewMenuItem

public void addViewMenuItem(String name,
                            String method)
Hook to call from jython to add to menu

Parameters:
name - menu item name
method - jython method name to call

addEditMenuItem

public void addEditMenuItem(String name,
                            String method)
Hook to call from jython to add to menu

Parameters:
name - menu item name
method - jython method name to call

setProbeType

public void setProbeType(String value)
Set the ProbeType property.

Parameters:
value - The new value for ProbeType

getProbeType

public String getProbeType()
Get the ProbeType property.

Returns:
The ProbeType

setDeveloperMode

public void setDeveloperMode(boolean value)
Set the DeveloperMode property.

Parameters:
value - The new value for DeveloperMode

getDeveloperMode

public boolean getDeveloperMode()
Get the DeveloperMode property.

Returns:
The DeveloperMode

setMyName

public void setMyName(String value)
Set the MyName property.

Parameters:
value - The new value for MyName

getMyName

public String getMyName()
Get the MyName property.

Returns:
The MyName

setDataCategories

public void setDataCategories(String value)
Set the CategoryString property.

Parameters:
value - The new value for CategoryString

getDataCategories

public String getDataCategories()
Get the CategoryString property.

Returns:
The CategoryString

setJythonDisplayCategory

public void setJythonDisplayCategory(String value)
Set the DisplayCategory property.

Parameters:
value - The new value for DisplayCategory

getJythonDisplayCategory

public String getJythonDisplayCategory()
Get the DisplayCategory property.

Returns:
The DisplayCategory

setJythonCode

public void setJythonCode(String value)
Set the JythonCode property.

Parameters:
value - The new value for JythonCode

getJythonCode

public String getJythonCode()
Get the JythonCode property.

Returns:
The JythonCode