public class StateManager extends IdvManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREF_SunAwtDisableMixing
disable mixing
|
protected boolean |
showControlsInTree
Do we show the DisplayControl-s in the DataTree-s.
|
protected java.lang.String |
userName
The name of the user
|
contents, dialog, frame, window
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_APPEARANCEMODE, 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 |
---|
StateManager(IntegratedDataViewer idv)
Create this manager
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
applyMacros(java.lang.String s)
Apply macros
|
protected void |
applyPreferences()
_more_
|
protected IdvObjectStore |
doMakeObjectStore()
Factory method to create the
IdvObjectStore . |
static java.lang.String |
fixIds(java.lang.String id)
Change id from application.
|
java.lang.String |
getBuildDate()
Get the build date
|
java.awt.Color |
getColorProperty(java.lang.String name,
java.awt.Color dflt)
Utility method to retrieve a String property from the idv properties.
|
java.lang.String |
getDefaultHelpTarget()
Get the default help target.
|
java.lang.String |
getDefaultHelpUrl()
Get the default base help url.
|
java.lang.String |
getHelpRoot()
_more_
|
java.lang.String |
getJythonVersion()
Get the jython version
|
double |
getNumberVersion()
Get major-minor as a number
|
java.lang.Object |
getPreference(java.lang.String pref)
Helper method that wraps getStore().get (pref)
|
java.lang.Object |
getPreference(java.lang.String pref,
java.lang.Object dflt)
Helper method that wraps getStore().get (pref)
|
java.lang.Object |
getPreferenceOrProperty(java.lang.String pref)
Find either the preference with the given name
or, if not found, return the property value of the given name
|
boolean |
getPreferenceOrProperty(java.lang.String pref,
boolean dflt)
Find either the preference with the given name
or, if not found, return the property String value of the given name if found.
|
double |
getPreferenceOrProperty(java.lang.String pref,
double dflt)
Find either the preference with the given name
or, if not found, return the property String value of the given name if found.
|
java.lang.String |
getPreferenceOrProperty(java.lang.String pref,
java.lang.String dflt)
Find either the preference with the given name
or, if not found, return the property String value of the given name if found.
|
protected java.util.List |
getPreferencePaths()
Get the preference paths
|
java.util.Hashtable |
getProperties()
Get the hashtable of properties
|
java.lang.Object |
getProperty(java.lang.String name)
Get a property
|
boolean |
getProperty(java.lang.String name,
boolean dflt)
Utility method to retrieve a boolean property from the idv properties.
|
double |
getProperty(java.lang.String name,
double dflt)
Utility method to retrieve an int property from the idv properties.
|
int |
getProperty(java.lang.String name,
int dflt)
Utility method to retrieve an int property from the idv properties.
|
java.lang.String |
getProperty(java.lang.String name,
java.lang.String dflt)
Utility method to retrieve a String property from the idv properties.
|
boolean |
getRunningIsl()
Get the RunningIsl property.
|
boolean |
getShouldLoadBundlesSynchronously()
Get the flag for loading bundles synchronously
|
boolean |
getShowControlsInTree()
Helper method to determine whether to show
DisplayControl -s
in the data choosing guis. |
boolean |
getShowDashboardOnStart()
Lookup in the object store whether we should popup a DataSelector in a window
on start up.
|
IdvObjectStore |
getStore()
Create the
IdvObjectStore , if needed, and return it. |
java.lang.String |
getStoreName()
What is the store name.
|
java.lang.String |
getStoreSystemName()
Get the name of the top level users directory.
|
java.lang.String |
getTitle()
Return the title property
|
java.lang.String |
getUserName()
Return the user name
|
java.lang.String |
getVersion()
Read in and return the current version from the resources/VERSION file.
|
java.lang.String |
getVersionAbout()
Get the version about
|
java.lang.String |
getVersionMajor()
Get the major version
|
java.lang.String |
getVersionMinor()
Get the minor version
|
java.lang.String |
getVersionRevision()
Get the version revision
|
java.awt.Dimension |
getViewSize()
Get the ViewSize property.
|
protected void |
initNewUserDirectory(java.io.File dir)
This gets called when we first create the users local object store directory.
|
protected void |
initObjectStore(IdvObjectStore store)
Initialize the given object store.
|
protected void |
initState(boolean interactiveMode)
Initialize the store, properties and
IdvResourceManager |
protected void |
initUserDirectory(java.io.File dir)
This gets called when after we have created the IdvObjectStore object
For now this method just copies the default rbi file into the
directory.
|
boolean |
isLoadingXml()
Returns whether we are currently unpersisting application state from xml.
|
protected void |
loadProperties()
Initialize the list of property files and load them into the idvProperties.
|
protected static java.util.Hashtable |
processPropertyTable(java.util.Hashtable newTable)
Change property keys from application.
|
void |
putPreference(java.lang.String pref,
java.lang.Object value)
Helper method that wraps getStore().put (pref value).
|
void |
putProperty(java.lang.String name,
boolean value)
Converts the given value to a String and sets
the property name to the String value
|
void |
putProperty(java.lang.String name,
java.lang.String value)
Sets the property name to the given value
|
void |
setAlwaysLoadBundlesSynchronously(boolean value)
Set the flag to load bundles synchronously
|
void |
setRunningIsl(boolean value)
Set the RunningIsl property.
|
void |
setViewSize(java.awt.Dimension value)
Set the ViewSize property.
|
void |
writePreference(java.lang.String pref,
java.lang.Object value)
Puts the given value in the object store and writes out the store.
|
void |
writePreferences()
Writes out the store.
|
getArgsManager, getCollabManager, getColorTableManager, getDataManager, getIdv, getIdvChooserManager, getIdvClass, getIdvProjectionManager, getIdvUIManager, getImageGenerator, getInstallManager, getJythonManager, getPersistenceManager, getPreferenceManager, getPublishManager, getResourceManager, getStateManager, getStationModelManager, getVMManager, logException, showNormalCursor, showWaitCursor, waitUntilDisplaysAreDone, waitUntilDisplaysAreDone
actionPerformed, close, doMakeContents, getContents, getDialog, getFrame, getWindow, getWindowTitle, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, show, show, showModal, toFront, windowIsClosing
protected boolean showControlsInTree
protected java.lang.String userName
public static final java.lang.String PREF_SunAwtDisableMixing
public StateManager(IntegratedDataViewer idv)
idv
- The IDVpublic void setAlwaysLoadBundlesSynchronously(boolean value)
value
- true to load bundles synchronouslypublic boolean getShouldLoadBundlesSynchronously()
protected static java.util.Hashtable processPropertyTable(java.util.Hashtable newTable)
newTable
- The table to changepublic static java.lang.String fixIds(java.lang.String id)
id
- id to changeprotected void loadProperties()
Now, we look for an "idv.properties" property (which is a semi-colon delimited list of property file paths) in the currently processed property files. If there is one then we create the list of property files, expand any %SITEPATH%, %USERPATH%, etc., macros and process the properties.
Note: Expanding the SITEPATH/USERPATH macros ends up creating the IdvObjectStore (to find the value of SITEPATH/USERPATH/etc.). The tricky thing is that the creation of the object store requires some things that we get from the properties (like the store name). These have to come from the original set of system property files.
public java.lang.String getHelpRoot()
protected void initState(boolean interactiveMode)
IdvResourceManager
interactiveMode
- Is the idv in interactive mode (the default)protected void applyPreferences()
protected java.util.List getPreferencePaths()
public java.lang.String applyMacros(java.lang.String s)
s
- stringpublic java.util.Hashtable getProperties()
public java.lang.Object getProperty(java.lang.String name)
name
- name of the propertypublic boolean getProperty(java.lang.String name, boolean dflt)
getProperty
in class IdvManager
name
- Property namedflt
- The default value to return if name is not foundpublic int getProperty(java.lang.String name, int dflt)
getProperty
in class IdvManager
name
- Property namedflt
- The default value to return if name is not foundpublic double getProperty(java.lang.String name, double dflt)
name
- Property namedflt
- The default value to return if name is not foundpublic java.lang.String getProperty(java.lang.String name, java.lang.String dflt)
getProperty
in class IdvManager
name
- Property namedflt
- The default value to return if name is not foundpublic java.awt.Color getColorProperty(java.lang.String name, java.awt.Color dflt)
name
- Property namedflt
- The default value to return if name is not foundpublic void putProperty(java.lang.String name, java.lang.String value)
name
- Property namevalue
- The valuepublic void putProperty(java.lang.String name, boolean value)
name
- Property namevalue
- The valuepublic IdvObjectStore getStore()
IdvObjectStore
, if needed, and return it.getStore
in class IdvManager
public java.lang.String getDefaultHelpUrl()
public java.lang.String getDefaultHelpTarget()
public boolean isLoadingXml()
public boolean getShowControlsInTree()
DisplayControl
-s
in the data choosing guis.public java.lang.String getUserName()
public java.lang.String getTitle()
protected IdvObjectStore doMakeObjectStore()
IdvObjectStore
. This
will also call initObjectStore(IdvObjectStore)
protected void initObjectStore(IdvObjectStore store)
store
- The object store to initializepublic java.lang.String getStoreName()
public java.lang.String getStoreSystemName()
protected void initNewUserDirectory(java.io.File dir)
dir
- The new directoryprotected void initUserDirectory(java.io.File dir)
dir
- The store directorypublic void writePreference(java.lang.String pref, java.lang.Object value)
pref
- The namevalue
- The valuepublic void writePreferences()
public void putPreference(java.lang.String pref, java.lang.Object value)
pref
- The namevalue
- The valuepublic java.lang.Object getPreference(java.lang.String pref)
pref
- The name of the preferencepublic java.lang.Object getPreference(java.lang.String pref, java.lang.Object dflt)
pref
- The name of the preferencedflt
- The default value to use if pref is not found.public java.lang.Object getPreferenceOrProperty(java.lang.String pref)
pref
- The preference or property namepublic java.lang.String getPreferenceOrProperty(java.lang.String pref, java.lang.String dflt)
pref
- The preference or property namedflt
- defaultpublic double getPreferenceOrProperty(java.lang.String pref, double dflt)
pref
- The preference or property namedflt
- defaultpublic boolean getPreferenceOrProperty(java.lang.String pref, boolean dflt)
pref
- The preference or property namedflt
- defaultpublic boolean getShowDashboardOnStart()
public java.lang.String getJythonVersion()
public java.lang.String getVersionMajor()
public java.lang.String getVersionMinor()
public java.lang.String getVersionRevision()
public java.lang.String getVersionAbout()
public java.lang.String getVersion()
public java.lang.String getBuildDate()
public double getNumberVersion()
public void setViewSize(java.awt.Dimension value)
value
- The new value for ViewSizepublic java.awt.Dimension getViewSize()
public void setRunningIsl(boolean value)
value
- The new value for RunningIslpublic boolean getRunningIsl()