public class IdvPreferenceManager extends IdvManager implements java.awt.event.ActionListener
PreferenceManager
-s are added
into the dialog. This class then constructs a tabbed pane
window, one pane for each PreferenceManager.
On the user's Ok or Apply the dialog will
have each PreferenceManager apply its preferences.Modifier and Type | Field and Description |
---|---|
protected java.util.Hashtable |
cbxToCdMap
mapping between checkbox and control descriptor
|
protected java.util.Hashtable |
choosersToShow
A mapping that holds the choosers that should be shown
|
protected java.util.Hashtable |
controlDescriptorsToShow
A mapping that holds the control descriptors that should be shown
|
static java.util.List<java.lang.String> |
DATE_FORMATS
Date formats
|
protected boolean |
haveInitedChoosersToShow
Have we initialized the what choosers should be shown facility
|
protected boolean |
haveInitedControlDescriptorsToShow
Have we initialized the what control descriptors should be shown facility
|
protected boolean |
showAllChoosers
Should all choosers be shown
|
protected boolean |
showAllControls
Should we show all of the display control descriptors
|
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 |
---|
IdvPreferenceManager(IntegratedDataViewer idv)
Create the dialog with the given idv
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Handle the CANCEL, HELP, OK and APPLY events
|
void |
add(java.lang.String tabLabel,
java.lang.String description,
PreferenceManager listener,
java.awt.Container panel,
java.lang.Object data)
Add in the given PreferenceManager with its associated
GUI Container and data Object.
|
protected void |
addBasicPreferences()
Adds the basic preference tab
|
protected void |
addChooserPreferences()
Add in the user preference tab for the choosers to show.
|
protected void |
addDisplayPreferences()
Add in the user preference tab for the controls to show
|
protected void |
addSystemPreferences()
Add in the user preference tab for the controls to show
|
boolean |
apply()
Apply the preferences
|
protected void |
applyEventPreferences(XmlObjectStore theStore)
Apply the mouse/scroll/keyboard preferences
|
void |
applyEventsToGui(java.util.List functions)
Apply event mappings
|
protected static void |
applyWidgets(java.util.Hashtable widgets,
XmlObjectStore store)
A utility that goes through the set of widgets (String preference name to
UI widget), finds their value and adds it into the given store.
|
void |
exportControlsToPlugin()
Export the selected control descriptors to the plugin manager
|
java.lang.String |
getDefaultDateFormat()
Get the default date format
|
visad.Unit |
getDefaultDistanceUnit()
Get the unit to be used to show distance
|
java.util.TimeZone |
getDefaultTimeZone()
Get the default time zone
|
boolean[] |
getDoRemoveBeforeOpening(java.lang.String name)
This determines whether the IDV should do a remove display and data before
a bundle is loaded.
|
int[][] |
getKeyboardMap()
Keyboard mappings
|
int[][][] |
getMouseMap()
Get the mouse mapping preference.
|
int[][] |
getWheelMap()
Get teh scroll wheel mappings
|
java.lang.String |
getWindowTitle()
Get the window title
|
protected void |
initPreferences()
Init the preference gui
|
protected javax.swing.JComponent |
makeEventPanel()
Make the mouse/scroll/key mapping panel
|
static javax.swing.JPanel |
makePrefPanel(java.lang.Object[][] objects,
java.util.Hashtable widgets,
XmlObjectStore store)
Make a checkbox preference panel
|
boolean |
shouldShowChooser(java.lang.String chooserName)
Check if the given chooser should be shown in the chooser gui.
|
protected boolean |
shouldShowChooser(java.lang.String chooserName,
boolean ignoreAllFlag)
Should the named chooser be shown
|
boolean |
shouldShowControl(ControlDescriptor cd)
Should the given control descriptor be shown
|
boolean |
shouldShowControl(ControlDescriptor cd,
boolean ignoreAllFlag)
Should the given control descriptor be shown.
|
void |
show()
Show the dialog
|
void |
showTab(java.lang.String tabNameToShow)
Show the tab whose title matches the given tabNameToShow.
|
protected void |
windowIsClosing()
Close the dialog
|
getArgsManager, getCollabManager, getColorTableManager, getDataManager, getIdv, getIdvChooserManager, getIdvClass, getIdvProjectionManager, getIdvUIManager, getImageGenerator, getInstallManager, getJythonManager, getPersistenceManager, getPreferenceManager, getProperty, getProperty, getProperty, getPublishManager, getResourceManager, getStateManager, getStationModelManager, getStore, getVMManager, logException, showNormalCursor, showWaitCursor, waitUntilDisplaysAreDone, waitUntilDisplaysAreDone
close, doMakeContents, getContents, getDialog, getFrame, getWindow, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, show, showModal, toFront
public static final java.util.List<java.lang.String> DATE_FORMATS
protected java.util.Hashtable choosersToShow
protected java.util.Hashtable controlDescriptorsToShow
protected boolean haveInitedControlDescriptorsToShow
protected boolean showAllControls
protected boolean showAllChoosers
protected boolean haveInitedChoosersToShow
protected java.util.Hashtable cbxToCdMap
public IdvPreferenceManager(IntegratedDataViewer idv)
idv
- The IDVpublic void add(java.lang.String tabLabel, java.lang.String description, PreferenceManager listener, java.awt.Container panel, java.lang.Object data)
tabLabel
- The tabbed pane labeldescription
- Text to make a JLabel fromlistener
- The handler for this set of preferencespanel
- The gui for the preferencesdata
- Associated data that is passed to the PreferenceManager when donepublic void showTab(java.lang.String tabNameToShow)
tabNameToShow
- Tab name to show.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class WindowHolder
event
- The eventprotected void windowIsClosing()
windowIsClosing
in class WindowHolder
public java.lang.String getWindowTitle()
getWindowTitle
in class WindowHolder
public void show()
show
in class WindowHolder
protected void initPreferences()
public boolean apply()
protected static void applyWidgets(java.util.Hashtable widgets, XmlObjectStore store)
widgets
- The preference name to GUI widget mapstore
- The store to put preferences in.protected void addDisplayPreferences()
protected void addSystemPreferences()
public void exportControlsToPlugin()
protected void addChooserPreferences()
public java.util.TimeZone getDefaultTimeZone()
public java.lang.String getDefaultDateFormat()
protected void addBasicPreferences()
public static javax.swing.JPanel makePrefPanel(java.lang.Object[][] objects, java.util.Hashtable widgets, XmlObjectStore store)
objects
- Holds (Label, preference id, Boolean default value).
If preference id is null then just show the label. If the entry is only length
2 (i.e., no value) then default to true.widgets
- The map to store the id to widgetstore
- Where toi look up the preference valuepublic boolean[] getDoRemoveBeforeOpening(java.lang.String name)
name
- The bundle name - may be null.public boolean shouldShowControl(ControlDescriptor cd)
cd
- The control descriptorpublic boolean shouldShowControl(ControlDescriptor cd, boolean ignoreAllFlag)
cd
- The control descriptorignoreAllFlag
- If true then don't pay attention to the show all flag. We have this
here so this can return the actual show value for the control descriptor when we are constructing
the preference gui buttons.public boolean shouldShowChooser(java.lang.String chooserName)
chooserName
- The name of the chooser.protected boolean shouldShowChooser(java.lang.String chooserName, boolean ignoreAllFlag)
chooserName
- The chooser nameignoreAllFlag
- If true then don't pay attention to the show all flag. We have this
here so this can return the actual show value for the chooser when we are constructing
the preference gui buttons.public visad.Unit getDefaultDistanceUnit()
public int[][][] getMouseMap()
public int[][] getWheelMap()
public int[][] getKeyboardMap()
protected void applyEventPreferences(XmlObjectStore theStore)
theStore
- The storepublic void applyEventsToGui(java.util.List functions)
functions
- functionsprotected javax.swing.JComponent makeEventPanel()