public class IntegratedDataViewer extends IdvBase implements ControlContext, ViewContext, DataContext, java.awt.event.ActionListener, javax.swing.event.HyperlinkListener, LogUtil.DialogManager
DefaultIdv
). This class serves as the nexus
of a collection of editors and managers (e.g., IdvUIManager, VMManager, etc.)
Its base class, IdvBase
, holds these editors and managers and
uses a set of factory methods (e.g., doMakeStationModelManager)
for creating them. One can override, in a derived class,
one of these factory methods to create special purpose
components or handlers.
To run the IDV you:
DefaultIdv.main(String[])
)
ArgsManager
.
initPropertyFiles(List)
to add in any application specific
property file. Properties in files at the end of the list will overwrite
properties from files that are in the beginning of the list.
ArgsManager.parseArgs()
. This parses the command line arguments.
If your IDV app needs to have its own command line arguments then override the
doMakeArgsManager (String[]args)
to create your own ArgsManager.
StateManager.loadProperties()
to load in the property files.
Modifier and Type | Field and Description |
---|---|
protected java.util.Hashtable |
controlDescriptorMap
Mapping from control descriptor id to
ControlDescriptor |
protected java.util.List |
controlDescriptors
List of the
ControlDescriptor s defined in the controls.xml file |
protected java.util.List |
displayControls
List of all of the
DisplayControl s currently active |
aliasEditor, args, argsManager, autoDisplayEditor, chooserManager, collabManager, colorTableEditor, colorTableManager, dataManager, displayConventions, idv, imageGenerator, installManager, jythonManager, paramDefaultsEditor, paramGroupsEditor, persistenceManager, pluginManager, preferenceManager, projectionManager, publishManager, resourceManager, resourceViewer, stateManager, stationModelManager, testManager, uiManager, vmManager
ARG_B64BUNDLE, ARG_B64ISL, ARG_BUNDLE, ARG_CATALOG, ARG_CHOOSER, ARG_CLEARDEFAULT, ARG_CODE, ARG_CONNECT, ARG_CURRENTTIME, ARG_DATA, ARG_DEBUG, ARG_DEFAULT, ARG_DISPLAY, ARG_DXML, ARG_FIXEDTIME, ARG_HELP, ARG_IMAGE, ARG_IMAGESERVER, ARG_INSTALLPLUGIN, ARG_ISLFILE, ARG_ISLINTERACTIVE, ARG_LISTRESOURCES, ARG_MAINCLASS, ARG_MOVIE, ARG_MSG_DEBUG, ARG_MSG_RECORD, ARG_NODEFAULT, ARG_NOERRORSINGUI, ARG_NOGUI, ARG_NOONEINSTANCE, ARG_NOPLUGINS, ARG_NOPREF, ARG_ONEINSTANCEPORT, ARG_PLUGIN, ARG_PORT, ARG_PRINTJNLP, ARG_PROPERTIES, ARG_SCRIPT, ARG_SERVER, ARG_SETFILES, ARG_SITEPATH, ARG_TEMPLATE, ARG_TEST, ARG_TESTEVAL, ARG_TRACE, ARG_TRACEONLY, ARG_USERPATH, DEFAULT_DATE_FORMAT, DEFAULT_DOCPATH, DEFAULT_TIMEZONE, FILTER_CPT, FILTER_ISL, FILTER_JNLP, FILTER_XIDV, FILTER_XIDVZIDV, FILTER_XML, FILTER_ZIDV, ID_COMMANDSTORUN, ID_DATASOURCES, ID_DISPLAYCONTROLS, ID_IDV, ID_JYTHON, ID_MESSAGE, ID_MISCHASHTABLE, ID_NCIDV_VERSION, ID_VERSION, ID_VIEWMANAGERS, ID_WINDOWS, INITIAL_PROBE_EARTHLOCATION, NULL_DATA_SELECTION, NULL_STRING, PREF_ARCHIVEDIR, PREF_ARCHIVENAME, PREF_AUTODISPLAYS_ENABLE, PREF_AUTODISPLAYS_SHOWGUI, PREF_AUTOSELECTDATA, PREF_CACHESIZE, PREF_CONTROLSINTABS, PREF_DATAPREFIX, PREF_DATE_FORMAT, PREF_DISTANCEUNIT, PREF_DOCACHE, PREF_EMBEDDATACHOOSERINDASHBOARD, PREF_EMBEDFIELDSELECTORINDASHBOARD, PREF_EMBEDLEGENDINDASHBOARD, PREF_EMBEDQUICKLINKSINDASHBOARD, PREF_EVENT_KEYBOARDMAP, PREF_EVENT_MOUSEMAP, PREF_EVENT_WHEELMAP, PREF_FAST_RENDER, PREF_FIELD_CACHETHRESHOLD, PREF_FILEREADDIR, PREF_FILEWRITEDIR, PREF_GEOMETRY_BY_REF, PREF_HISTORY, PREF_IMAGE_BY_REF, PREF_LARGE_REMOTE_DATA_WARN, PREF_LASTVERSION, PREF_LATLON_FORMAT, PREF_LEGEND_SHOWICONS, PREF_LOCALE, PREF_LOOKANDFEEL, PREF_MAXIMAGESIZE, PREF_MEMORY, PREF_NPOT_IMAGE, PREF_OPEN_ASK, PREF_OPEN_MERGE, PREF_OPEN_REMOVE, PREF_PROJ_LIST, PREF_SAMPLINGMODE, PREF_SHOWCONTROLWINDOW, PREF_SHOWDASHBOARD, PREF_SHOWDECODEDIALOG, PREF_SHOWHIDDENFILES, PREF_SHOWQUITCONFIRM, PREF_SITEPATH, PREF_THREADS_DATA, PREF_THREADS_RENDER, PREF_TIMEZONE, PREF_VERTICALCS, PREF_VERTICALUNIT, PREF_WINDOW_SHOWTOOLBAR, PREF_ZIDV_ASK, PREF_ZIDV_DIRECTORY, PREF_ZIDV_SAVETOTMP, PROP_3DMODE, PROP_ABOUTTEXT, PROP_APPRESOURCEPATH, PROP_CHOOSERS, PROP_CHOOSERS_ALL, PROP_CONTROLDESCRIPTORS, PROP_CONTROLDESCRIPTORS_ALL, PROP_DATAHOLDERBOUNDS, PROP_DEFAULTLOCATIONS, PROP_DISPLAYLIST_GROUP, PROP_FIXFILELOCKUP, PROP_JNLPCODEBASE, PROP_JNLPTEMPLATE, PROP_JNLPTITLE, PROP_LOADINGXML, PROP_MAP_GLOBE_LEVEL, PROP_MAP_MAP_LEVEL, PROP_MINIMUMFRAMECYCLETIME, PROP_MONITORPORT, PROP_OLDCONTROLDESCRIPTORS, PROP_ONEINSTANCEPORT, PROP_PREFERENCES, PROP_PROJ_NAME, PROP_RESOURCEFILES, PROP_SHOWCLOCK_DASH, PROP_SHOWCLOCK_VIEW, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, PROP_USE_DISPLAYAREA, PROP_USE_TIMEDRIVER, PROP_VERSIONFILE, PROP_WINDOW_SCREENSIZEOFFSET, PROP_WINDOW_SIZEHEIGHT, PROP_WINDOW_SIZEWIDTH, PROP_WINDOW_USESCREENSIZE, SUFFIX_BAT, SUFFIX_CPT, SUFFIX_ISL, SUFFIX_JNLP, SUFFIX_RBI, SUFFIX_SH, SUFFIX_XIDV, SUFFIX_XML, SUFFIX_ZIDV
Constructor and Description |
---|
IntegratedDataViewer()
Parameterless constructor.
|
IntegratedDataViewer(boolean interactiveMode)
Ctor for when some other code is calling us.
|
IntegratedDataViewer(java.lang.String[] args)
The main constructor.
|
IntegratedDataViewer(java.lang.String[] args,
boolean interactiveMode)
ctor
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Implementation of the
ActionListener interface. |
protected void |
addControlDescriptor(ControlDescriptor cd)
Add a new
ControlDescriptor into the controlDescriptor
list and controlDescriptorMap hashtable. |
void |
addDisplayControl(DisplayControl control)
Add the given
DisplayControl into the list of
display controls. |
void |
addErrorButtons(javax.swing.JDialog dialog,
java.util.List buttonList,
java.lang.String msg,
java.lang.Throwable exc)
Implement the LogUtil.DialogManager interface to add buttons to the dialog.
|
void |
addToHistoryList(History newHistory)
Add the given
History object into the history list. |
void |
addToHistoryList(java.lang.String filename)
Add the given file to the history list.
|
void |
applyPreferences()
Apply preferences.
|
protected void |
checkSystem()
Check whether the system has the necessary components (ex: Java 3D).
|
void |
cleanup()
Remove all state, etc.
|
protected void |
clearCachedData()
This is called when the CacheManager detects the need ot clear memory.
|
void |
clearHistoryList()
Empty the history list and write it out.
|
void |
clearWaitCursor()
Pass through to
IdvUIManager.clearWaitCursor() |
void |
closeCurrentWindow()
close current window
|
void |
controlHasBeenInitialized(DisplayControl control)
Called by the given
DisplayControl when it has been fully
initialized. |
DataSelector |
createDataSelector()
Create a
DataSelector window. |
DataSourceResults |
createDataSource(java.lang.Object definingObject,
java.lang.String dataType,
java.util.Hashtable properties,
boolean checkAlias)
Create the data source (or data sources) defined by the
given definingObject.
|
DisplayControl |
createDisplay(java.lang.String dataSourceName,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String properties)
Create a display from the given datasource/paramname pair.
|
DisplayControl |
createDisplay(java.lang.String dataSourceName,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String properties,
boolean initDisplayInThread)
Create a display from the given datasource/paramname pair.
|
void |
createImage(java.lang.String imageName,
java.lang.String dataSourceName,
java.lang.String paramName,
java.lang.String displayName)
This method loads in the data, creates the display from the
given paramName and writes out a screen image.
|
void |
createNewWindow()
Create a new window containing a new
MapViewManager |
void |
dataSourceChanged(DataSource source)
Implementation of the DataContext method.
|
java.lang.Object |
decodeObject(java.lang.String xml)
Create and return the Object defined by the given xml.
|
void |
doClearDefaults()
Called from the menu command to clear the default bundle
|
void |
doImport()
Have the user select an xidv bundle file and then unpersist the bundle.
|
void |
doMakeBackgroundImage()
Make the background wms image
|
DisplayControl |
doMakeControl(DataChoice dataChoice,
ControlDescriptor descriptor,
java.lang.String properties)
|
DisplayControl |
doMakeControl(DataChoice dataChoice,
ControlDescriptor descriptor,
java.lang.String properties,
DataSelection dataSelection)
|
DisplayControl |
doMakeControl(java.util.List dataChoices,
ControlDescriptor descriptor)
Create the
DisplayControl , identified by the given
ControlDescriptor for the given list of
DataChoice s |
DisplayControl |
doMakeControl(java.util.List dataChoices,
ControlDescriptor descriptor,
java.util.Hashtable properties,
DataSelection dataSelection)
Create the
DisplayControl , identified by the given
ControlDescriptor for the given list of
DataChoice s |
DisplayControl |
doMakeControl(java.util.List dataChoices,
ControlDescriptor descriptor,
java.util.Hashtable properties,
DataSelection dataSelection,
boolean initDisplayInThread)
Finally, we really create the
DisplayControl , identified by
the given * ControlDescriptor using the given list of
DataChoice s |
DisplayControl |
doMakeControl(java.util.List dataChoices,
ControlDescriptor descriptor,
java.lang.String propertiesString,
DataSelection dataSelection)
Create the
DisplayControl , identified by the given
ControlDescriptor for the given list of
DataChoice s |
DisplayControl |
doMakeControl(java.util.List dataChoices,
ControlDescriptor descriptor,
java.lang.String propertiesString,
DataSelection dataSelection,
boolean initDisplayInThread)
Finally, we really create the
DisplayControl , identified by the given
ControlDescriptor using the given list of
DataChoice s |
DisplayControl |
doMakeControl(java.lang.String controlName)
This method is called by the helptips, passing in the name
of the display control (from controls.xml).
|
DisplayControl |
doMakeControl(java.lang.String controlName,
DataChoice dataChoice)
make a control
|
DisplayControl |
doMakeControl(java.lang.String controlName,
java.util.List dataChoices)
make a control
|
javax.swing.JMenu |
doMakeDataChoiceMenu(DataChoice dataChoice)
Make and return the menu of commands that can be applied
to the given
DataChoice . |
void |
doOpen()
Have the user select an xidv bundle file, remove all data sources and displays,
and then unpersist the bundle.
|
void |
doOpen(java.lang.String bundleUri)
Load in the given bundle.
|
void |
doOpen(java.lang.String filename,
boolean checkUserPreference,
boolean andRemove)
Have the user select an xidv file.
|
void |
doOpenDefault()
Called from the menu command to open the default bundle
|
void |
doSave()
Save the current state off to the current xidv filename
|
void |
doSaveAs()
Have the user select an xidv filename and
write the current application state to it.
|
void |
doSaveAsDefault()
Called from the menu command to save the current state as the default bundle
|
java.lang.String |
encodeObject(java.lang.Object object,
boolean prettyPrint)
Return the xml representation of the given object.
|
java.lang.String |
encodeObject(java.lang.Object object,
boolean prettyPrint,
boolean withHeader)
Return the xml representation of the given object.
|
void |
evaluateAndSave(DataChoice dataChoice)
Evalute the data choice and then save it off in a CacheDataSource
|
protected void |
exit(int exitCode)
Exit the application.
|
void |
flushDataCache()
Flush the data cache
|
java.util.List |
getAllControlDescriptors()
Return all the
ControlDescriptor s |
java.util.List |
getAllDataSources()
Gets all of the data sources.
|
boolean |
getAllDisplaysIntialized()
Have all of the displays been initialixed
|
java.util.List |
getBackgroundImages()
Get the background images resource
|
javax.swing.JCheckBox |
getChangeDataPathCbx()
Get the checkbox to show to change data
|
boolean |
getChangeDataPaths()
Did the user select to change the data paths when loading in a bundle
|
ControlDescriptor |
getControlDescriptor(java.lang.String name)
Return the
ControlDescriptor with the given name, or null
if not found. |
java.util.List |
getControlDescriptors()
This returns the set of
ControlDescriptor s
that can be shown. |
java.util.List |
getControlDescriptors(boolean includeTemplates)
This returns the set of
ControlDescriptor s
that can be shown. |
java.util.List |
getDataSources()
Wrapper method around
DataManager.getDataSources() . |
java.util.List |
getDerivedDataChoices(DataSource dataSource,
java.util.List dataChoices)
Get the list of derived data choices
|
java.util.List |
getDisplayControls()
Return the list of
DisplayControl s currently active |
protected XmlEncoder |
getEncoder()
Get the XmlEncoder for this instance
|
protected XmlEncoder |
getEncoder(boolean forRead)
Create an
XmlEncoder and initialize it
with the VisADPersistence delegates. |
XmlEncoder |
getEncoderForRead()
Create a new
XmlEncoder for doing
unpersisting. |
XmlEncoder |
getEncoderForWrite()
Create a new
XmlEncoder for doing
persisting. |
boolean |
getHaveInitialized()
Has this IDV been fully initialized
|
java.util.List |
getHistory()
Create, if needed, and return the history list.
|
boolean |
getInteractiveMode()
Are we interactive
|
java.util.List |
getLocationList()
Create (if null) and return the list NamedStationTable-s defined by the
locationResources XmlResourceCollection.
|
int |
getMaxDataThreadCount()
Get the max number of threads to be used when reading data
|
int |
getMaxRenderThreadCount()
Get the max number of threads to be used when rendering in visad
|
protected java.util.List |
getProjections()
Return the list of
Projection s |
boolean |
getServerMode()
See if we are in server mode or not
|
protected byte[] |
getStaticImage(java.lang.String bundle)
Get image
|
boolean |
getUseTimeDriver()
Get whether we are using the time driver facility
|
ViewManager |
getViewManager()
Create, if needed, and return the default 3d view manager
|
ViewManager |
getViewManager(ViewDescriptor viewDescriptor)
Implementation of the ControlContext interface call.
|
ViewManager |
getViewManager(ViewDescriptor viewDescriptor,
boolean newWindow,
java.lang.String properties)
Creates, if needed, and returns the
ViewManager that is specified
by the given ViewDescriptor |
java.lang.String |
getViewManagerProperties()
Return a String of semi-colon separated name=value pairs
that define the default properties for ViewManagers.
|
boolean |
handleAction(java.lang.String action)
handle action
|
boolean |
handleAction(java.lang.String action,
java.util.Hashtable properties)
This method tries to handle the given action.
|
boolean |
handleAction(java.lang.String action,
java.util.Hashtable properties,
boolean checkForAlias)
This method tries to handle the given action.
|
protected boolean |
handleFileOrUrlAction(java.lang.String action,
java.util.Hashtable properties)
This method checks if the given action is one of the following.
|
void |
hyperlinkUpdate(javax.swing.event.HyperlinkEvent e)
Implement the hyperlinklistener interface.
|
void |
hyperlinkUpdate(javax.swing.event.HyperlinkEvent e,
java.util.Hashtable properties)
Handle the click
|
protected void |
init()
This is a wrapper that calls initInner within a thread.
|
void |
initCacheManager()
Set the state in the cache manager
|
void |
initDone()
Gets called when all initialization is finished.
|
protected void |
initEncoder(XmlEncoder encoder,
boolean forRead)
A hook so derived classes can add their own initialization to the
given encoder.
|
protected void |
initInner()
Build the gui, process bundles, etc.
|
protected void |
initPreferences(IdvPreferenceManager preferenceManager)
Add into the
IdvPreferenceManager the different gui components/preference managers |
void |
initPropertyFiles(java.util.List files)
A hook to allow derived classes to add in their own property files.
|
java.lang.String |
listApi(java.lang.Object o)
Utility to list the public api of the given object
|
protected void |
loadDataFiles(java.util.List files)
Load in a datasource for each file/url in the given files list.
|
boolean |
loadDataSource(DataSource dataSource)
Load in a
DataSource . |
void |
loadRbiFile(java.lang.String filename)
Sometime we will be able to dynamically load in a rbi file (resource bundle)
|
void |
logException(java.lang.String msg,
java.lang.Throwable exc)
Helper method that calls LogUtil.printException
|
static void |
main(java.lang.String[] args)
Default main implementation.
|
void |
makeDataSource(DataSourceDescriptor descriptor)
Make the data source.
|
boolean |
makeDataSource(java.lang.Object definingObject,
java.lang.String dataType,
java.util.Hashtable properties)
Create the datasource, identified by the given dataType if non-null,
with the given definingObject and properties.
|
boolean |
makeDataSource(java.lang.Object definingObject,
java.lang.String dataType,
java.util.Hashtable properties,
boolean checkAlias)
Create the datasource, identified by the given dataType if non-null,
with the given definingObject and properties.
|
boolean |
makeDataSource(java.lang.Object definingObject,
java.lang.String dataType,
java.util.Hashtable properties,
boolean checkAlias,
java.lang.String displayType)
Create the datasource, identified by the given dataType if non-null,
with the given definingObject and properties.
|
DataSourceResults |
makeDataSourceFromXml(java.lang.String dataSourceXml)
This creates a new data source from the xml encoded representation
of a persisted data source.
|
javax.swing.JComponent |
makeHelpButton(java.lang.String helpId)
Make a help button for a particular help topic
|
javax.swing.JComponent |
makeHelpButton(java.lang.String helpId,
java.lang.String toolTip)
Make a help button for a particular help topic
|
DataSource |
makeOneDataSource(java.lang.Object definingObject,
java.lang.String dataType,
java.util.Hashtable properties)
A helper method that will create a data source from the
given defining object (e.g., url, filename, collection
of images, etc.) and dataType, will show any
errors, and, if a data source was created will return it.
|
void |
moveHistoryToFront(History history)
Move a history to the front of the list
|
boolean |
okToShowWindows()
Is it ok to show any windows.
|
void |
printCache()
Call CacheManager.printStats
|
void |
printCacheStats()
Print cache statistics
|
void |
printDataCacheStats()
Print the data cache stats
|
static void |
processScript(java.lang.String scriptFile)
Get the image from the given isl script.
|
boolean |
quit()
Called to end execution of this process.
|
void |
registerHelpKey(javax.swing.JComponent comp,
java.lang.String helpId)
Register a help key for a component
|
void |
reloadAllDataSources()
reload all data sources
|
void |
removeAllDataSources()
Remove all current data sources.
|
void |
removeAllDisplays()
Remove all of the displays.
|
void |
removeAllDisplays(boolean payAttentionToCanDoRemoveAll)
remove all displays
|
void |
removeDataSource(DataSource dataSource)
Remove the data source from the DataManager and from any DataTree-s.
|
void |
removeDisplayControl(DisplayControl control)
Remove the given
DisplayControl from the list of
display controls. |
protected void |
runImageServer(int port,
java.lang.String propertyFile)
startup and run the image server
|
void |
saveInCache(DataChoice dataChoice,
visad.Data data)
Clone the data choice and then save it off in a CacheDataSource
|
void |
saveInCache(DataChoice dataChoice,
visad.Data data,
DataSelection dataSelection)
Save the given data in the CacheDataSource
|
void |
saveInCache(DataChoice dataChoice,
visad.Data data,
DataSelection dataSelection,
java.lang.String name)
Clone the data choice and then save it off in a CacheDataSource
|
void |
saveInCache(DataChoice dataChoice,
visad.Data data,
java.lang.String name)
Clone the data choice and then save it off in a CacheDataSource
|
DataChoice |
selectDataChoice(ControlDescriptor descriptor)
Popup a dialog containing a
DataTree
showing the DataChoice s that are applicable
to the given ControlDescriptor . |
java.util.List |
selectDataChoices(java.util.List fullParamNames)
Popup a dialog containing a DataTree for each operand in the given fullParamNames list
Return a List of DataChoice's the user selects or null if they canceled.
|
java.lang.String |
selectDataType(java.lang.Object definingObject)
Ask the user to select a data type for the given defining object
|
java.lang.String |
selectDataType(java.lang.Object definingObject,
java.lang.String message)
Popup a dialog to allows the user to select data source type
|
java.util.List |
selectUserChoices(java.lang.String msg,
java.util.List userChoices)
Popup a JTextField containing dialog that allows the user
to enter text values, one for each name in the userChoices List.
|
void |
showConsole()
Show the error message console.
|
void |
showNormalCursor()
Pass through to
IdvUIManager.showNormalCursor() |
void |
showWaitCursor()
Pass through to
IdvUIManager.showWaitCursor() |
void |
showWindow(DisplayControl control,
IdvWindow window)
Implementation of the ControlContext method.
|
protected void |
startMonitor()
Start up the IDV montior server.
|
void |
toFront(DisplayControl control)
Move the given display control to the front.
|
void |
waitLabelClicked()
The user clicked on the wait label
|
void |
waitUntilDisplaysAreDone()
Wait until the displays have been rendered
|
void |
writeHistoryList()
Persist the history list into its own file.
|
addPluginClass, createElement, doMakeAliasEditor, doMakeArgsManager, doMakeAutoDisplayEditor, doMakeCollabManager, doMakeColorTableEditor, doMakeColorTableManager, doMakeDataManager, doMakeDisplayConventions, doMakeIdvChooserManager, doMakeIdvProjectionManager, doMakeIdvUIManager, doMakeImageGenerator, doMakeInstallManager, doMakeJythonManager, doMakeParamDefaultsEditor, doMakeParamGroupsEditor, doMakePersistenceManager, doMakePluginManager, doMakePreferenceManager, doMakePublishManager, doMakeResourceManager, doMakeResourceViewer, doMakeStateManager, doMakeStationModelManager, doMakeTestManager, doMakeVMManager, getAliasEditor, getArgsManager, getAutoDisplayEditor, getCollabManager, getColorProperty, getColorTableEditor, getColorTableManager, getDataManager, getDisplayConventions, getIdv, getIdvChooserManager, getIdvProjectionManager, getIdvUIManager, getImageGenerator, getInstallManager, getJythonManager, getObjectStore, getParamDefaultsEditor, getParamGroupsEditor, getPersistenceManager, getPluginManager, getPreference, getPreference, getPreferenceManager, getProperty, getProperty, getProperty, getProperty, getPublishManager, getResourceManager, getResourceViewer, getStateManager, getStationModelManager, getStore, getTestManager, getVMManager, haveCollabManager, initFromXml, makeManager, setIdv, showAliasEditor, showAutoDisplayEditor, showChooser, showChooserModal, showColorTableEditor, showColorTableEditor, showDefaultsEditor, showIdvProjectionManager, showParamGroupsEditor, showPreferenceManager, showResourceViewer, showStationModelEditor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getColorTableManager, getDisplayConventions, getIdv, getObjectStore, getPersistenceManager, getPreferenceManager, getResourceManager, getStationModelManager
getJythonManager, getPreference
getColorProperty, getProperty, getProperty
protected java.util.List displayControls
DisplayControl
s currently activeprotected java.util.List controlDescriptors
ControlDescriptor
s defined in the controls.xml fileprotected java.util.Hashtable controlDescriptorMap
ControlDescriptor
public IntegratedDataViewer() throws visad.VisADException, java.rmi.RemoteException
visad.VisADException
- from construction of VisAd objectsjava.rmi.RemoteException
- from construction of VisAD objectspublic IntegratedDataViewer(java.lang.String[] args) throws visad.VisADException, java.rmi.RemoteException
init()
method should be called.
We have the derived class call init so that the object
has been fully instantiated when init is called.args
- The command line argumentsvisad.VisADException
- from construction of VisAd objectsjava.rmi.RemoteException
- from construction of VisAD objectspublic IntegratedDataViewer(boolean interactiveMode) throws visad.VisADException, java.rmi.RemoteException
interactiveMode
- Is interactivejava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic IntegratedDataViewer(java.lang.String[] args, boolean interactiveMode) throws visad.VisADException, java.rmi.RemoteException
args
- cmd line argsinteractiveMode
- Are we interactive mode. Normally we are, including when running an isl.
However, we use this flag when code from some jvm calls us directly. eg: when generating an image.java.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic boolean getServerMode()
public boolean getInteractiveMode()
protected void checkSystem()
public void waitUntilDisplaysAreDone()
protected final void init()
protected void loadDataFiles(java.util.List files)
files
- String file or urlsprotected void initInner() throws visad.VisADException, java.rmi.RemoteException
visad.VisADException
- the VisAD exceptionjava.rmi.RemoteException
- the remote exceptionpublic void initDone()
protected void startMonitor()
public void initCacheManager()
protected void clearCachedData()
public boolean getHaveInitialized()
public boolean okToShowWindows()
public void initPropertyFiles(java.util.List files)
files
- A list of file names or urls (String) that point to
the property files that are to be loaded in. Properties from later
files in the list overwrite properties from earlier files.public void registerHelpKey(javax.swing.JComponent comp, java.lang.String helpId)
comp
- componenthelpId
- the help id for that componentpublic javax.swing.JComponent makeHelpButton(java.lang.String helpId)
helpId
- the id of the topicpublic javax.swing.JComponent makeHelpButton(java.lang.String helpId, java.lang.String toolTip)
helpId
- the topic idtoolTip
- the tooltippublic void loadRbiFile(java.lang.String filename)
filename
- The rbi file.public java.util.List getLocationList()
getLocationList
in interface ControlContext
NamedStationTable
sprotected java.util.List getProjections()
Projection
sProjection
sprotected void addControlDescriptor(ControlDescriptor cd)
ControlDescriptor
into the controlDescriptor
list and controlDescriptorMap hashtable. Only add this in
if we do not already have one loaded with the same idcd
- The ControlDescriptor to addprotected void initPreferences(IdvPreferenceManager preferenceManager)
IdvPreferenceManager
the different gui components/preference managerspreferenceManager
- The preferenceManager to initializepublic DataSelector createDataSelector()
DataSelector
window.public DataChoice selectDataChoice(ControlDescriptor descriptor)
DataTree
showing the DataChoice
s that are applicable
to the given ControlDescriptor
. Return the select data choice.descriptor
- The ControlDescriptor
to select a DataChoice for.DataChoice
or null if none selected.public java.util.List selectDataChoices(java.util.List fullParamNames)
selectDataChoices
in interface DataContext
fullParamNames
- List of String names representing the operands or parameters that
are to be chosen.DataChoice
spublic java.util.List selectUserChoices(java.lang.String msg, java.util.List userChoices)
(String,List)
selectUserChoices
in interface DataContext
msg
- The message to display in the GUIuserChoices
- List of Strings, one for each valuepublic void dataSourceChanged(DataSource source)
dataSourceChanged
in interface DataContext
source
- The data source that changedpublic void evaluateAndSave(DataChoice dataChoice)
dataChoice
- The data chocie to evaluatepublic void saveInCache(DataChoice dataChoice, visad.Data data)
dataChoice
- The data choice to savedata
- The datapublic void saveInCache(DataChoice dataChoice, visad.Data data, DataSelection dataSelection)
dataChoice
- data choicedata
- datadataSelection
- data selectionpublic void saveInCache(DataChoice dataChoice, visad.Data data, java.lang.String name)
dataChoice
- The data choice to savedata
- The dataname
- The name to usepublic void saveInCache(DataChoice dataChoice, visad.Data data, DataSelection dataSelection, java.lang.String name)
dataChoice
- The data choice to savedata
- The datadataSelection
- data selectionname
- The name to usepublic java.util.List getDerivedDataChoices(DataSource dataSource, java.util.List dataChoices)
dataSource
- data sourcedataChoices
- data choicespublic javax.swing.JMenu doMakeDataChoiceMenu(DataChoice dataChoice)
DataChoice
.
Just a pass through to the IdvUIManager.doMakeDataChoiceMenu(DataChoice)
doMakeDataChoiceMenu
in interface ControlContext
dataChoice
- The data choice to make the menu forpublic java.lang.String getViewManagerProperties()
ViewManager
public void createNewWindow()
MapViewManager
public ViewManager getViewManager()
public ViewManager getViewManager(ViewDescriptor viewDescriptor)
ViewManager
that is specified
by the given ViewDescriptor
getViewManager
in interface ControlContext
viewDescriptor
- Defines the name and type of the ViewManager
that is to be found or created.public ViewManager getViewManager(ViewDescriptor viewDescriptor, boolean newWindow, java.lang.String properties)
ViewManager
that is specified
by the given ViewDescriptor
getViewManager
in interface ControlContext
viewDescriptor
- Defines the name and type of the ViewManager
that is to be found or created.newWindow
- If true we create a new window and add the ViewManager into itproperties
- The properties to pass through to the
ViewManager if we are creating a new one.public java.util.List getAllControlDescriptors()
ControlDescriptor
spublic java.util.List getControlDescriptors()
ControlDescriptor
s
that can be shown. That is, the control descriptors that the
user has chosen to show through the user preferences.public java.util.List getControlDescriptors(boolean includeTemplates)
ControlDescriptor
s
that can be shown. That is, the control descriptors that the
user has chosen to show through the user preferences.includeTemplates
- If true then include the display templatespublic ControlDescriptor getControlDescriptor(java.lang.String name)
ControlDescriptor
with the given name, or null
if not found.name
- ControlDescriptor name to look uppublic java.util.List getDisplayControls()
DisplayControl
s currently activepublic boolean getAllDisplaysIntialized()
public void toFront(DisplayControl control)
control
- The display controlpublic void controlHasBeenInitialized(DisplayControl control)
DisplayControl
when it has been fully
initialized.control
- The initialized DisplayControlpublic void addDisplayControl(DisplayControl control)
DisplayControl
into the list of
display controls. Update the user interfaces.addDisplayControl
in interface ControlContext
control
- The new display controlpublic void removeDisplayControl(DisplayControl control)
DisplayControl
from the list of
display controls. Update the user interfaces.removeDisplayControl
in interface ControlContext
control
- The removed display controlpublic void removeAllDisplays()
public void removeAllDisplays(boolean payAttentionToCanDoRemoveAll)
payAttentionToCanDoRemoveAll
- Remove allpublic void hyperlinkUpdate(javax.swing.event.HyperlinkEvent e)
handleAction(String,Hashtable)
.hyperlinkUpdate
in interface javax.swing.event.HyperlinkListener
e
- The HyperlinkEvent
eventpublic void hyperlinkUpdate(javax.swing.event.HyperlinkEvent e, java.util.Hashtable properties)
e
- eventproperties
- any propertiesprotected boolean handleFileOrUrlAction(java.lang.String action, java.util.Hashtable properties)
action
- The string actionproperties
- any propertiespublic boolean handleAction(java.lang.String action)
action
- actionpublic boolean handleAction(java.lang.String action, java.util.Hashtable properties)
handleAction
in interface ControlContext
action
- The action (file, data source url, etc.)properties
- Properties to pass to the data source creationpublic boolean handleAction(java.lang.String action, java.util.Hashtable properties, boolean checkForAlias)
action
- The action (file, data source url, etc.)properties
- Properties to pass to the data source creationcheckForAlias
- Data sources can have aliases, (e.g., ETA means a dods url
pointing to the latest eta run on a remote server). This flag, if true,
has this routine check if the given action is indeed an alias.public void actionPerformed(java.awt.event.ActionEvent event)
ActionListener
interface. This
passes the the action command from the given ActionEvent
off to the handleAction method.actionPerformed
in interface java.awt.event.ActionListener
event
- The ActionEvent
public void removeDataSource(DataSource dataSource)
dataSource
- The data source to removepublic void removeAllDataSources()
public void reloadAllDataSources()
public java.util.List getDataSources()
DataManager.getDataSources()
.
Returns the list of DataSource
-s
currently being used in the application.getDataSources
in interface DataContext
public java.util.List getAllDataSources()
getAllDataSources
in interface DataContext
public DataSource makeOneDataSource(java.lang.Object definingObject, java.lang.String dataType, java.util.Hashtable properties)
definingObject
- Defines the data source. e.g., filename, url, list of imagesdataType
- Defines the data source type id. From datasources.xml. If null
then the data source type is found by checking for a pattern match on the
defining object from the patterns in datasources.xmlproperties
- Optional properties to pass to the data source. May also
contain the data source type id.public boolean makeDataSource(java.lang.Object definingObject, java.lang.String dataType, java.util.Hashtable properties)
definingObject
- Defines the data source. e.g., filename, url, list of imagesdataType
- Defines the data source type id. From datasources.xml. If null
then the data source type is found by checking for a pattern match on the
defining object from the patterns in datasources.xmlproperties
- Optional properties to pass to the data source. May also
contain the data source type id.public void makeDataSource(DataSourceDescriptor descriptor)
descriptor
- descriptorpublic boolean makeDataSource(java.lang.Object definingObject, java.lang.String dataType, java.util.Hashtable properties, boolean checkAlias)
definingObject
- Defines the data source. e.g., filename, url, list of imagesdataType
- Defines the data source type id. From datasources.xml. If null
then the data source type is found by checking for a pattern match on the
defining object from the patterns in datasources.xmlproperties
- Optional properties to pass to the data source. May also
contain the data source type id.checkAlias
- If true then see if the given definineObject is a data source alias name.public boolean makeDataSource(java.lang.Object definingObject, java.lang.String dataType, java.util.Hashtable properties, boolean checkAlias, java.lang.String displayType)
definingObject
- Defines the data source. e.g., filename, url, list of imagesdataType
- Defines the data source type id. From datasources.xml. If null
then the data source type is found by checking for a pattern match on the
defining object from the patterns in datasources.xmlproperties
- Optional properties to pass to the data source. May also
contain the data source type id.checkAlias
- If true then see if the given definineObject is a data source alias name.displayType
- If non-null hten also create this displaypublic void moveHistoryToFront(History history)
history
- the history item to movepublic DataSourceResults makeDataSourceFromXml(java.lang.String dataSourceXml)
dataSourceXml
- The xml encoded data source representationpublic DataSourceResults createDataSource(java.lang.Object definingObject, java.lang.String dataType, java.util.Hashtable properties, boolean checkAlias)
definingObject
- Defines the data source. e.g., filename, url, list of imagesdataType
- Defines the data source type id. From datasources.xml. If null
then the data source type is found by checking for a pattern match on the
defining object from the patterns in datasources.xmlproperties
- Optional properties to pass to the data source. May also
contain the data source type id.checkAlias
- If true then see if the given definineObject is a data source alias name.DataSourceResults
that
hold the results of this method.public java.lang.String selectDataType(java.lang.Object definingObject)
selectDataType
in interface DataContext
definingObject
- The defining object for the data sourcepublic java.lang.String selectDataType(java.lang.Object definingObject, java.lang.String message)
selectDataType
in interface DataContext
definingObject
- the object to create the data source withmessage
- message to show the userpublic boolean loadDataSource(DataSource dataSource)
DataSource
. Called from the
DataManager
when a new data source has
been created or unpersisted.loadDataSource
in interface DataContext
dataSource
- Data source to load in.public int getMaxRenderThreadCount()
public int getMaxDataThreadCount()
public boolean getUseTimeDriver()
public void createImage(java.lang.String imageName, java.lang.String dataSourceName, java.lang.String paramName, java.lang.String displayName)
imageName
- The file name of the imagedataSourceName
- The data source to load (e.g., a filename or url)paramName
- The parameter to create the display with.displayName
- The id of the display. From controls.xmlpublic DisplayControl createDisplay(java.lang.String dataSourceName, java.lang.String paramName, java.lang.String displayName, java.lang.String properties)
dataSourceName
- The data source to load (e.g., a filename or url)paramName
- The parameter to create the display with.displayName
- The id of the display. From controls.xmlproperties
- Semi-color delimited list of name=value properties to pass to the display.DisplayControl
public DisplayControl createDisplay(java.lang.String dataSourceName, java.lang.String paramName, java.lang.String displayName, java.lang.String properties, boolean initDisplayInThread)
createDisplay
in interface ControlContext
dataSourceName
- The data source to load (e.g., a filename or url)paramName
- The parameter to create the display with.displayName
- The id of the display. From controls.xmlproperties
- Semi-color delimited list of name=value properties to pass to the display.initDisplayInThread
- If true then initialize the display in a separate threadDisplayControl
public void showWindow(DisplayControl control, IdvWindow window)
showWindow
in interface ControlContext
control
- The DisplayControl
whose window we should show.window
- The windowpublic java.util.List getBackgroundImages()
public void doMakeBackgroundImage()
public DisplayControl doMakeControl(DataChoice dataChoice, ControlDescriptor descriptor, java.lang.String properties)
dataChoice
- The data choice.descriptor
- Defines the control to create.properties
- Semi-colon delimited list of name=value properties to pass to the control.public DisplayControl doMakeControl(java.lang.String controlName)
DisplayControl
without any data.controlName
- Id of the display controlpublic DisplayControl doMakeControl(java.lang.String controlName, DataChoice dataChoice)
controlName
- name of controldataChoice
- with data choicepublic DisplayControl doMakeControl(java.lang.String controlName, java.util.List dataChoices)
controlName
- name of controldataChoices
- list of data choicespublic DisplayControl doMakeControl(java.util.List dataChoices, ControlDescriptor descriptor)
DisplayControl
, identified by the given
ControlDescriptor
for the given list of
DataChoice
sdataChoices
- The list of data choices.descriptor
- Defines the control to create.public DisplayControl doMakeControl(DataChoice dataChoice, ControlDescriptor descriptor, java.lang.String properties, DataSelection dataSelection)
dataChoice
- The data choice.descriptor
- Defines the control to create.properties
- Semi-colon delimited list of name=value properties to pass to the control.dataSelection
- Holds any user specified subsetting of data (e.g., times list).public DisplayControl doMakeControl(java.util.List dataChoices, ControlDescriptor descriptor, java.lang.String propertiesString, DataSelection dataSelection)
DisplayControl
, identified by the given
ControlDescriptor
for the given list of
DataChoice
sdataChoices
- List of data choices.descriptor
- Defines the control to create.propertiesString
- Semi-colon delimited list of
name=value properties to pass to the control.dataSelection
- Holds any user specified subsetting of data
(e.g., times list).public DisplayControl doMakeControl(java.util.List dataChoices, ControlDescriptor descriptor, java.util.Hashtable properties, DataSelection dataSelection)
DisplayControl
, identified by the given
ControlDescriptor
for the given list of
DataChoice
sdataChoices
- List of data choices.descriptor
- Defines the control to create.properties
- Hashtable of propertiesdataSelection
- Holds any user specified subsetting of data
(e.g., times list).public DisplayControl doMakeControl(java.util.List dataChoices, ControlDescriptor descriptor, java.lang.String propertiesString, DataSelection dataSelection, boolean initDisplayInThread)
DisplayControl
, identified by the given
ControlDescriptor
using the given list of
DataChoice
sdataChoices
- List of data choices.descriptor
- Defines the control to create.propertiesString
- Semi-colon delimited list of
name=value properties to pass to the control.dataSelection
- Holds any user specified subsetting of data
(e.g., times list).initDisplayInThread
- If true then do the display control
initialization in a thread.public DisplayControl doMakeControl(java.util.List dataChoices, ControlDescriptor descriptor, java.util.Hashtable properties, DataSelection dataSelection, boolean initDisplayInThread)
DisplayControl
, identified by
the given * ControlDescriptor
using the given list of
DataChoice
sdataChoices
- List of data choices.descriptor
- Defines the control to create.properties
- Hashtable of propertiesdataSelection
- Holds any user specified subsetting of data
(e.g., times list).initDisplayInThread
- If true then do the display control
initialization in a thread.public java.lang.String encodeObject(java.lang.Object object, boolean prettyPrint)
object
- The object to xmlizeprettyPrint
- Should the string xml be formattedpublic java.lang.String encodeObject(java.lang.Object object, boolean prettyPrint, boolean withHeader)
object
- The object to xmlizeprettyPrint
- Should the string xml be formattedwithHeader
- should we add the XML headerpublic java.lang.Object decodeObject(java.lang.String xml) throws java.lang.Exception
xml
- The xml representation of an objectjava.lang.Exception
public void clearHistoryList()
public java.util.List getHistory()
History
objects that that define the
files and data sources the user has loaded in the past.public void addToHistoryList(java.lang.String filename)
filename
- The file name to addpublic void writeHistoryList()
public void addToHistoryList(History newHistory)
History
object into the history list.
This also writes out the history list.newHistory
- The History object to add.public void doSaveAs()
public void doSave()
public void doSaveAsDefault()
public void doOpenDefault()
public void doOpen(java.lang.String filename, boolean checkUserPreference, boolean andRemove)
filename
- The filename to opencheckUserPreference
- Should we show, if needed, the Open dialogandRemove
- If true then first remove all data sources and displayspublic boolean getChangeDataPaths()
public javax.swing.JCheckBox getChangeDataPathCbx()
public void doOpen()
public void doOpen(java.lang.String bundleUri)
bundleUri
- The filename or url of the bundlepublic void doImport()
public void doClearDefaults()
public XmlEncoder getEncoderForRead()
XmlEncoder
for doing
unpersisting.public XmlEncoder getEncoderForWrite()
XmlEncoder
for doing
persisting.protected XmlEncoder getEncoder()
getEncoder
in class IdvBase
protected XmlEncoder getEncoder(boolean forRead)
XmlEncoder
and initialize it
with the VisADPersistence delegates.forRead
- If true then we initialize the encoder for reading the xmlprotected void initEncoder(XmlEncoder encoder, boolean forRead)
encoder
- The encoder to initializeforRead
- If true then we initialize the encoder for reading the xmlpublic boolean quit()
protected void exit(int exitCode)
exitCode
- System exit code to usepublic void showConsole()
public void logException(java.lang.String msg, java.lang.Throwable exc)
msg
- The error messageexc
- The exceptionpublic void showWaitCursor()
IdvUIManager.showWaitCursor()
showWaitCursor
in interface ControlContext
public void showNormalCursor()
IdvUIManager.showNormalCursor()
showNormalCursor
in interface ControlContext
public void clearWaitCursor()
IdvUIManager.clearWaitCursor()
public void closeCurrentWindow()
public void waitLabelClicked()
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- Command line arguments.java.lang.Exception
- When something bad happendspublic static void processScript(java.lang.String scriptFile) throws java.lang.Exception
scriptFile
- The path to the isl scriptjava.lang.Exception
- On badnesspublic void cleanup()
public void printCache()
protected byte[] getStaticImage(java.lang.String bundle) throws java.lang.Exception
bundle
- bundlejava.lang.Exception
- On badnesspublic void printCacheStats()
public void printDataCacheStats()
public void flushDataCache()
public void applyPreferences()
protected void runImageServer(int port, java.lang.String propertyFile)
port
- what port to listen onpropertyFile
- properties - may be nullpublic void addErrorButtons(javax.swing.JDialog dialog, java.util.List buttonList, java.lang.String msg, java.lang.Throwable exc)
addErrorButtons
in interface LogUtil.DialogManager
dialog
- The dialog to add to.buttonList
- The list of buttons to add my button into.msg
- The error messageexc
- The exception that had been thrown.public java.lang.String listApi(java.lang.Object o)
o
- object