|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.collab.SharableImpl
ucar.unidata.idv.control.DisplayControlBase
ucar.unidata.idv.control.DisplayControlImpl
ucar.unidata.idv.control.GridDisplayControl
ucar.unidata.idv.control.JythonControl
public class JythonControl
Allows for the creation of a display by an end user through the use of Jython
| 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 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.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 |
|---|
public static final String PARAMNAME_THIS
public static final String PARAMNAME_PROBE
public static final String PROBE_NONE
public static final String PROBE_POINT
public static final String PROBE_LEVEL
public static final String PROBE_AREA
public static final String PROBE_VERTICAL
public static final String PROBE_TRANSECT
public static final String[] PROBES
public static final String[] PROBE_NAMES
protected CrossSectionSelector transectProbe
| Constructor Detail |
|---|
public JythonControl()
| Method Detail |
|---|
public boolean init(DataChoice dataChoice)
throws VisADException,
RemoteException
init in class DisplayControlImpldataChoice - the DataChoice of the moment.
RemoteException - Java RMI error
VisADException - VisAD Errorpublic void initDone()
initDone in class DisplayControlImplprotected boolean shouldAddAnimationListener()
shouldAddAnimationListener in class DisplayControlImplprotected void timeChanged(Real time)
timeChanged in class DisplayControlImpltime - new timepublic Object getVar(Object varName)
varName - variable name
public void setVar(Object varName,
Object value)
varName - variable namevalue - variable valuepublic void writeToPlugin()
protected void resetData()
throws VisADException,
RemoteException
resetData in class DisplayControlImplRemoteException - On badness
VisADException - On badness
public List getDataList()
throws RemoteException,
VisADException
RemoteException - Java RMI error
VisADException - VisAD Errorpublic void execJython(String method)
method - jython method to call
public Data sample()
throws RemoteException,
VisADException
RemoteException - On badness
VisADException - On badness
public Data sampleAtTime()
throws RemoteException,
VisADException
RemoteException - On badness
VisADException - On badness
public Data sampleIndex(int index,
boolean atTime)
throws RemoteException,
VisADException
index - Index in the data listatTime - If true then also sample at the current animation time
RemoteException - On badness
VisADException - On badness
public List sampleAll()
throws RemoteException,
VisADException
RemoteException - On badness
VisADException - On badness
public List sampleAllAtTime()
throws RemoteException,
VisADException
RemoteException - On badness
VisADException - On badness
public Data sampleDataAtProbe(FieldImpl field)
throws RemoteException,
VisADException
field - field to sample
RemoteException - On badness
VisADException - On badness
public Data sampleData(EarthLocationTuple[] loc,
FieldImpl field)
throws RemoteException,
VisADException
loc - locationfield - field to sample
RemoteException - On badness
VisADException - On badness
public Real getAnimationTime()
throws RemoteException,
VisADException
RemoteException - On badness
VisADException - On badness
public List getAnimationTimes()
throws RemoteException,
VisADException
RemoteException - On badness
VisADException - On badness
public List getTimesFromData()
throws RemoteException,
VisADException
RemoteException - On badness
VisADException - On badness
public Data sampleData(EarthLocationTuple[] loc,
FieldImpl field,
boolean atTime)
throws RemoteException,
VisADException
loc - locationfield - fieldatTime - if true then also sample at anim time
RemoteException - On badness
VisADException - On badnessprotected String getChangeParameterLabel()
getChangeParameterLabel in class DisplayControlImpl
protected void addNewData(List newChoices)
throws VisADException,
RemoteException
addNewData in class DisplayControlImplnewChoices - new data choices
RemoteException - On badness
VisADException - On badnesspublic void selectData(String message)
message - message to use in dialogpublic void addData(String message)
message - message to use in dialog
public void addData(String message,
String callback)
message - message to use in dialogcallback - The jython procedure to callbackpublic void replaceData(String message)
message - message to use in dialog
public void replaceData(String message,
String callback)
message - message to use in dialogcallback - The jython procedure to callback
public void selectData(String message,
String callback,
boolean replace,
boolean multiples,
List categories)
message - message to use in dialogcallback - The jython procedure to callbackreplace - If true then we remove the current list of data choices and replace it with the selected ones.multiples - Select multiplescategories - Possibly null list of data categories to use
public void doRemove()
throws RemoteException,
VisADException
doRemove in interface DisplayControldoRemove in class DisplayControlImplRemoteException - Java RMI error
VisADException - VisAD Errorpublic Displayable getCurrentProbe()
public Object getProbePosition()
throws VisADException,
RemoteException
RemoteException - Java RMI error
VisADException - VisAD Errorpublic void setProbePosition(Object p)
p - position for probe.
public double[][] getProbeXYZ()
throws VisADException,
RemoteException
RemoteException - Java RMI error
VisADException - VisAD Error
public EarthLocationTuple[] getProbeLocation()
throws VisADException,
RemoteException
RemoteException - Java RMI error
VisADException - VisAD Error
public void receiveShareData(Sharable from,
Object dataId,
Object[] data)
receiveShareData in interface SharablereceiveShareData in class DisplayControlImplfrom - other class.dataId - type of sharingdata - Array of data being shared. In this case, the first
(and only?) object in the array is the levelpublic Container doMakeContents()
doMakeContents in class DisplayControlImplprotected JComponent getExtraLegendComponent(int legendType)
getExtraLegendComponent in class DisplayControlImpllegendType - side or bottom
public void addJythonComponent(Component comp)
comp - component to addpublic void setLegendComponent(Component comp)
comp - legend componentpublic void setJythonComponent(Component comp)
comp - gui
protected void getSaveMenuItems(List items,
boolean forMenuBar)
getSaveMenuItems in class DisplayControlImplitems - List of menu itemsforMenuBar - Is this for the menu in the window's menu bar or
for a popup menu in the legend
protected void getFileMenuItems(List items,
boolean forMenuBar)
getFileMenuItems in class DisplayControlImplitems - list of menu items to add toforMenuBar - for menu bar
protected void getEditMenuItems(List items,
boolean forMenuBar)
getEditMenuItems in class DisplayControlImplitems - list of menu items to add toforMenuBar - for menu bar
protected void getViewMenuItems(List items,
boolean forMenuBar)
getViewMenuItems in class DisplayControlImplitems - list of menu items to add toforMenuBar - for menu bar
public void addFileMenuItem(String name,
String method)
name - menu item namemethod - jython method name to call
public void addSaveMenuItem(String name,
String method)
name - menu item namemethod - jython method name to call
public void addViewMenuItem(String name,
String method)
name - menu item namemethod - jython method name to call
public void addEditMenuItem(String name,
String method)
name - menu item namemethod - jython method name to callpublic void setProbeType(String value)
value - The new value for ProbeTypepublic String getProbeType()
public void setDeveloperMode(boolean value)
value - The new value for DeveloperModepublic boolean getDeveloperMode()
public void setMyName(String value)
value - The new value for MyNamepublic String getMyName()
public void setDataCategories(String value)
value - The new value for CategoryStringpublic String getDataCategories()
public void setJythonDisplayCategory(String value)
value - The new value for DisplayCategorypublic String getJythonDisplayCategory()
public void setJythonCode(String value)
value - The new value for JythonCodepublic String getJythonCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||