edu.wisc.ssec.mcidasv
Class McIdasPreferenceManager

java.lang.Object
  extended by ucar.unidata.ui.WindowHolder
      extended by ucar.unidata.idv.IdvManager
          extended by ucar.unidata.idv.IdvPreferenceManager
              extended by edu.wisc.ssec.mcidasv.McIdasPreferenceManager
All Implemented Interfaces:
Constants, ActionListener, EventListener, ListSelectionListener, IdvConstants

public class McIdasPreferenceManager
extends IdvPreferenceManager
implements ListSelectionListener, Constants

An extension of IdvPreferenceManager that uses a JList instead of tabs to lay out the various PreferenceManagers.

Author:
McIDAS-V Dev Team

Nested Class Summary
 class McIdasPreferenceManager.IconCellRenderer
           
 
Field Summary
private  JPanel buttonPane
          Holds the buttons at the bottom
private  Map<String,Object> dataMap
          Each PreferenceManager has associated data contained in this table.
private  Set<String> dateFormats
          Date formats
private static Set<String> defaultLatLonFormats
          Provide some default values for the lat-lon preference drop down.
private  String defaultPrefs
           
private static String DISPLAY_LIST_TEMPLATE_DATA
           
private  Map<String,ImageIcon> iconCache
          Maps the name of a panel to an icon.
private  boolean isUnixLike
          Is this a Unix-style platform?
private  boolean isWindows
          Is this a Windows platform?
private  JList labelList
          The list that'll contain all the names of the different PreferenceManagers
private  Set<String> labelSet
           
private static String LAST_PREF_PANEL
          Help McV remember the last preference panel the user selected.
private static DecimalFormat latlonFormat
          Decimal format
private static double latlonValue
          test value for formatting
private static String LEGEND_TEMPLATE_DATA
           
private  DefaultListModel listModel
          The "M" in the MVC for JLists.
private  JScrollPane listScrollPane
          Handle scrolling like a pro.
static String[] loadComboOptions
          Options for bundle loading
private static org.slf4j.Logger logger
          Logger object.
private  JPanel mainPane
          Holds the main preference pane
private  Map<String,PreferenceManager> managerMap
          A table of the different preference managers that'll wind up in the list.
private static String MCV_CHOOSERS
          Path to the McV choosers.xml
static String[][] PREF_PANELS
          Controls how the preference panel list is displayed.
private  Map<String,Container> prefMap
          Maps the "name" of a panel to the actual thing holding the PreferenceManager.
private static Set<String> probeFormatsList
           
static Object[][] RENDER_HINTS
          Desired rendering hints with their desired values.
private static Map<String,String> replaceMap
          Replacing the "incoming" IDV preference tab names with whatever's in this map.
private static String TEMPLATE_IMAGEDISPLAY
           
private static String TEMPLATE_NO_DATA
           
private  McvToolbarEditor toolbarEditor
          The toolbar editor
private  String userDirectory
           
private  String userPrefs
           
 
Fields inherited from class ucar.unidata.idv.IdvPreferenceManager
cbxToCdMap, choosersToShow, controlDescriptorsToShow, DATE_FORMATS, haveInitedChoosersToShow, haveInitedControlDescriptorsToShow, showAllChoosers, showAllControls
 
Fields inherited from class ucar.unidata.ui.WindowHolder
contents, dialog, frame, window
 
Fields inherited from interface edu.wisc.ssec.mcidasv.Constants
BLANK_COMP_GROUP, COMP_MONITORPANEL, DATASELECTOR_NAME, DEFAULT_DOCPATH, DEFAULT_SERVERSTATE, DISPLAY_NAME, DISPLAYCONTROLLER_NAME, ELEMENT_DOUBLE_WIDTH, ELEMENT_DOUBLEDOUBLE_WIDTH, ELEMENT_HALF_WIDTH, ELEMENT_ONEHALF_WIDTH, ELEMENT_WIDTH, FILTER_MCV, FILTER_MCVMCVZ, FILTER_MCVZ, GAP_RELATED, GAP_UNRELATED, HOMEPAGE_URL, ICON_ACCEPT_SMALL, ICON_ADD_SMALL, ICON_APPLY_SMALL, ICON_BACKGROUND_SMALL, ICON_CANCEL, ICON_CANCEL_SMALL, ICON_CHECKVERSION_SMALL, ICON_COLORTABLE_SMALL, ICON_CONNECT_SMALL, ICON_CONSOLE_SMALL, ICON_DATAEXPLORER_SMALL, ICON_DEFAULTLAYOUT_SMALL, ICON_DEFAULTLAYOUTADD_SMALL, ICON_DEFAULTLAYOUTDELETE_SMALL, ICON_DELETE_SMALL, ICON_DISCONNECT_SMALL, ICON_ERROR_SMALL, ICON_EXCLAMATION_SMALL, ICON_FAVORITE_SMALL, ICON_FAVORITEMANAGE_SMALL, ICON_FAVORITESAVE_SMALL, ICON_FORUMS_SMALL, ICON_GETTINGSTARTED_SMALL, ICON_HELP, ICON_HELP_SMALL, ICON_HELPTIPS_SMALL, ICON_INFORMATION_SMALL, ICON_LAYOUTEDIT_SMALL, ICON_LOCALDATA_SMALL, ICON_LOCATION_SMALL, ICON_MCIDASV_SMALL, ICON_NEWTAB_SMALL, ICON_NEWWINDOW_SMALL, ICON_NEXT_SMALL, ICON_NOTE_SMALL, ICON_OPEN, ICON_OPEN_SMALL, ICON_PREFERENCES_SMALL, ICON_PREVIOUS_SMALL, ICON_RANDOM_SMALL, ICON_RANGEANDBEARING_SMALL, ICON_REDO_SMALL, ICON_REFRESH, ICON_REFRESH_SMALL, ICON_REMOVE_SMALL, ICON_REMOVEDATA_SMALL, ICON_REMOVELAYERS_SMALL, ICON_REMOVELAYERSDATA_SMALL, ICON_SAVE, ICON_SAVE_SMALL, ICON_SAVEAS_SMALL, ICON_SUPPORT_SMALL, ICON_UNDO_SMALL, ICON_UPDATE, ICON_USERSGUIDE_SMALL, LOCAL_ADDE_PORT, MACRO_BUILDDATE, MACRO_COPYRIGHT_YEAR, MACRO_IDV_VERSION, MACRO_VERSION, MACRO_VISAD_VERSION, MAX_MEMORY_32BIT, MCV_BLUE, MCV_BLUE_DARK, NOTICE_URL, OS_OSX, PANEL_NAME, PREF_AUTO_SAVE_DEFAULT_LAYOUT, PREF_CONFIRM_REMOVE_BOTH, PREF_CONFIRM_REMOVE_DATA, PREF_CONFIRM_REMOVE_LAYERS, PREF_IMAGE_PREVIEW, PREF_LIST_ADDE_SERVERS, PREF_LIST_ADVANCED, PREF_LIST_AVAILABLE_DISPLAYS, PREF_LIST_DATA_CHOOSERS, PREF_LIST_FORMATS_DATA, PREF_LIST_GENERAL, PREF_LIST_LOCAL_ADDE, PREF_LIST_NAV_CONTROLS, PREF_LIST_TOOLBAR, PREF_LIST_VIEW, PREF_OPEN_LIMIT_WIN, PREF_PRERELEASE_CHECK, PREF_SAVE_DASHBOARD_VIZ, PREF_SERVERSTATE, PREF_SYSTEMSERVERSIMG, PREF_TBM_SIZE, PREF_VERSION_CHECK, PRERELEASE_URL, PROP_ABOUTTEXT, PROP_APP_ICON, PROP_BUILD_DATE, PROP_CHAN, PROP_COPYRIGHT_YEAR, PROP_DASHBOARD_BOUNDS, PROP_HOMEPAGE, PROP_SERVERS, PROP_SERVERS_ALL, PROP_SYSMEM, PROP_TABBED_UI, PROP_VERSION_MAJOR, PROP_VERSION_MINOR, PROP_VERSION_RELEASE, PROP_VERSIONFILE, PROP_VISAD_DATE, PROP_VISAD_ORIGINAL, PROP_VISAD_PARSE_FAIL, PROP_VISAD_REVISION, PROP_VP_CATOPEN, PROP_VP_SHOWCATS, PROP_VP_SHOWPOPUP, PROPERTIES_FILE, SCRUB_STRINGS_FILE, SUFFIX_MCV, SUFFIX_MCVZ, USER_DIRECTORY_NAME, VERSION_HANDLER_URL, VERSION_URL
 
Fields inherited from interface ucar.unidata.idv.IdvConstants
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_MAX_PERMGENSIZE, 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_MAX_PERMGENSIZE, 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_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, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, PROP_USE_TIMEDRIVER, 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 Summary
McIdasPreferenceManager(IntegratedDataViewer idv)
          Prep as much as possible for displaying the preference window: load up icons and create some of the window features.
 
Method Summary
 void actionPerformed(ActionEvent event)
          Overridden so McIDAS-V can direct users to specific help sections for each preference panel.
 void add(String tabLabel, String description, PreferenceManager listener, Container panel, Object data)
          Add a PreferenceManager to the list of things that should be shown in the preference dialog.
 void addAdvancedPreferences()
           
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 addDisplayWindowPreferences()
           
protected  void addFormatDataPreferences()
          Creates and adds the formats and data preference panel.
protected  void addMcVPreferences()
          Creates and adds the basic preference panel.
 void addNavigationPreferences()
          Create the navigation preference panel
 void addServerPreferences()
          Build a AddePreferences panel "around" the server manager EntryStore.
 void addToolbarPreferences()
          Create the toolbar preference panel
 boolean apply()
          Apply the preferences (taken straight from IDV).
private  void fixDisplayListFont()
           
private  String getChooserCategory(String chooserName)
          Parse the full chooser name for a category.
private  List<String[]> getChooserData()
          Return a list that contains a bunch of arrays of two strings.
private  String getChooserShortName(String chooserName)
          Parse the full chooser name for a short name.
 boolean[] getDoRemoveBeforeOpening(String name)
          This determines whether the IDV should do a remove display and data before a bundle is loaded.
static RenderingHints getRenderingHints()
           
private  String getSelectedName()
          Returns the container the corresponds to the currently selected label in the JList.
private  Container getSelectedPanel()
          Returns the container the corresponds to the currently selected label in the JList.
private  Container getSelectedPanel(String name)
           
 void init()
          Perform the GUI initialization for the preference dialog.
protected  void initPreferences()
          Initialize the preference dialog.
static JPanel makePrefPanel(Object[][] objects, Hashtable widgets, XmlObjectStore store)
          Make a checkbox preference panel
 void replaceServerPreferences(EntryStore.Event evt)
           
 void replaceServerPrefPanel(JPanel panel)
           
 void selectListItem(String labelName)
          Select a list item and its corresponding panel that both live within the preference window JList.
private  boolean setEmptyPref(String id, String val)
           
 void showTab(String tabNameToShow)
          Wrapper so that IDV code can still select which preference pane to show.
 void valueChanged(ListSelectionEvent e)
          Handle the user clicking around.
 
Methods inherited from class ucar.unidata.idv.IdvPreferenceManager
addBasicPreferences, addSystemPreferences, applyEventPreferences, applyEventsToGui, applyWidgets, exportControlsToPlugin, getDefaultDateFormat, getDefaultDistanceUnit, getDefaultTimeZone, getKeyboardMap, getMouseMap, getWheelMap, getWindowTitle, makeEventPanel, shouldShowChooser, shouldShowChooser, shouldShowControl, shouldShowControl, show, windowIsClosing
 
Methods inherited from class ucar.unidata.idv.IdvManager
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
 
Methods inherited from class ucar.unidata.ui.WindowHolder
close, doMakeContents, getContents, getDialog, getFrame, getWindow, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, show, showModal, toFront
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.slf4j.Logger logger
Logger object.


PREF_PANELS

public static final String[][] PREF_PANELS

Controls how the preference panel list is displayed. Want to modify the preferences UI in some way? PREF_PANELS is your friend. Think of it like a really brain-dead SQLite.

Each row is a panel, and must consist of three columns:

  1. Name of the panel.
  2. Path to the icon associated with the panel.
  3. The panel's "help ID."
The JList in the preferences window will order the panels based upon PREF_PANELS.


RENDER_HINTS

public static final Object[][] RENDER_HINTS
Desired rendering hints with their desired values.


loadComboOptions

public static final String[] loadComboOptions
Options for bundle loading


LAST_PREF_PANEL

private static final String LAST_PREF_PANEL
Help McV remember the last preference panel the user selected.

See Also:
Constant Field Values

LEGEND_TEMPLATE_DATA

private static final String LEGEND_TEMPLATE_DATA
See Also:
Constant Field Values

DISPLAY_LIST_TEMPLATE_DATA

private static final String DISPLAY_LIST_TEMPLATE_DATA
See Also:
Constant Field Values

TEMPLATE_IMAGEDISPLAY

private static final String TEMPLATE_IMAGEDISPLAY
See Also:
Constant Field Values

TEMPLATE_NO_DATA

private static final String TEMPLATE_NO_DATA
See Also:
Constant Field Values

latlonValue

private static double latlonValue
test value for formatting


latlonFormat

private static DecimalFormat latlonFormat
Decimal format


defaultLatLonFormats

private static final Set<String> defaultLatLonFormats
Provide some default values for the lat-lon preference drop down.


probeFormatsList

private static final Set<String> probeFormatsList

replaceMap

private static final Map<String,String> replaceMap
Replacing the "incoming" IDV preference tab names with whatever's in this map.


MCV_CHOOSERS

private static final String MCV_CHOOSERS
Path to the McV choosers.xml

See Also:
Constant Field Values

prefMap

private final Map<String,Container> prefMap
Maps the "name" of a panel to the actual thing holding the PreferenceManager.


iconCache

private final Map<String,ImageIcon> iconCache
Maps the name of a panel to an icon.


managerMap

private final Map<String,PreferenceManager> managerMap
A table of the different preference managers that'll wind up in the list.


dataMap

private final Map<String,Object> dataMap
Each PreferenceManager has associated data contained in this table. TODO: bug Unidata about getting IdvPreferenceManager's dataList protected


labelSet

private final Set<String> labelSet

labelList

private JList labelList
The list that'll contain all the names of the different PreferenceManagers


listModel

private DefaultListModel listModel
The "M" in the MVC for JLists. Contains all the list data.


listScrollPane

private JScrollPane listScrollPane
Handle scrolling like a pro.


mainPane

private JPanel mainPane
Holds the main preference pane


buttonPane

private JPanel buttonPane
Holds the buttons at the bottom


dateFormats

private final Set<String> dateFormats
Date formats


isUnixLike

private boolean isUnixLike
Is this a Unix-style platform?


isWindows

private boolean isWindows
Is this a Windows platform?


toolbarEditor

private McvToolbarEditor toolbarEditor
The toolbar editor


userDirectory

private String userDirectory

userPrefs

private String userPrefs

defaultPrefs

private String defaultPrefs
Constructor Detail

McIdasPreferenceManager

public McIdasPreferenceManager(IntegratedDataViewer idv)
Prep as much as possible for displaying the preference window: load up icons and create some of the window features.

Parameters:
idv - Reference to the supreme IDV object.
Method Detail

getRenderingHints

public static RenderingHints getRenderingHints()
Returns:
The rendering hints to use, as determined by RENDER_HINTS.

setEmptyPref

private boolean setEmptyPref(String id,
                             String val)

actionPerformed

public void actionPerformed(ActionEvent event)
Overridden so McIDAS-V can direct users to specific help sections for each preference panel.

Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class IdvPreferenceManager

replaceServerPrefPanel

public void replaceServerPrefPanel(JPanel panel)

replaceServerPreferences

public void replaceServerPreferences(EntryStore.Event evt)

add

public void add(String tabLabel,
                String description,
                PreferenceManager listener,
                Container panel,
                Object data)
Add a PreferenceManager to the list of things that should be shown in the preference dialog.

Overrides:
add in class IdvPreferenceManager
Parameters:
tabLabel - The label (or name) of the PreferenceManager.
description - Not used.
listener - The actual PreferenceManager.
panel - The container holding all of the PreferenceManager stuff.
data - Data passed to the preference manager.

apply

public boolean apply()
Apply the preferences (taken straight from IDV). TODO: bug Unidata about making managers and dataList protected instead of private

Overrides:
apply in class IdvPreferenceManager
Returns:
Whether or not each of the preference managers applied properly.

fixDisplayListFont

private void fixDisplayListFont()

selectListItem

public void selectListItem(String labelName)
Select a list item and its corresponding panel that both live within the preference window JList.

Parameters:
labelName - The "name" of the JLabel within the JList.

showTab

public void showTab(String tabNameToShow)
Wrapper so that IDV code can still select which preference pane to show.

Overrides:
showTab in class IdvPreferenceManager
Parameters:
tabNameToShow - The name of the pane to be shown. Regular expressions are supported.

valueChanged

public void valueChanged(ListSelectionEvent e)
Handle the user clicking around.

Specified by:
valueChanged in interface ListSelectionListener
Parameters:
e - The event to be handled! Use your imagination!

getSelectedPanel

private Container getSelectedPanel()
Returns the container the corresponds to the currently selected label in the JList. Also stores the selected panel so that the next time a user tries to open the preferences they will start off in the panel they last selected.

Returns:
The current container.

getSelectedPanel

private Container getSelectedPanel(String name)

getSelectedName

private String getSelectedName()
Returns the container the corresponds to the currently selected label in the JList. Also stores the selected panel so that the next time a user tries to open the preferences they will start off in the panel they last selected.

Returns:
The current container.

init

public void init()
Perform the GUI initialization for the preference dialog.


initPreferences

protected void initPreferences()
Initialize the preference dialog. Leave most of the heavy lifting to the IDV, except for creating the server manager.

Overrides:
initPreferences in class IdvPreferenceManager

addServerPreferences

public void addServerPreferences()
Build a AddePreferences panel "around" the server manager EntryStore.

See Also:
McIDASV.getServerManager()

addNavigationPreferences

public void addNavigationPreferences()
Create the navigation preference panel


addToolbarPreferences

public void addToolbarPreferences()
Create the toolbar preference panel


makePrefPanel

public static JPanel makePrefPanel(Object[][] objects,
                                   Hashtable widgets,
                                   XmlObjectStore store)
Make a checkbox preference panel

Parameters:
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 widget
store - Where to look up the preference value
Returns:
The created panel

addAdvancedPreferences

public void addAdvancedPreferences()

addDisplayPreferences

protected void addDisplayPreferences()
Add in the user preference tab for the controls to show

Overrides:
addDisplayPreferences in class IdvPreferenceManager

addDisplayWindowPreferences

protected void addDisplayWindowPreferences()

addMcVPreferences

protected void addMcVPreferences()
Creates and adds the basic preference panel.


getDoRemoveBeforeOpening

public boolean[] getDoRemoveBeforeOpening(String name)

This determines whether the IDV should do a remove display and data before a bundle is loaded. It returns a 2 element boolean array. The first element is whether the open should take place at all. The second element determines whether displays and data should be removed before the load.

Overridden by McIDAS-V so that we can ask the user whether or not we should limit the number of new windows a bundle can create.

Overrides:
getDoRemoveBeforeOpening in class IdvPreferenceManager
Parameters:
name - Bundle name - may be null.
Returns:
Element 0: did user hit cancel; Element 1: Should remove data and displays; Element 2: limit new windows.
See Also:
IdvPreferenceManager.getDoRemoveBeforeOpening(String)

addFormatDataPreferences

protected void addFormatDataPreferences()
Creates and adds the formats and data preference panel.


addChooserPreferences

protected void addChooserPreferences()
Add in the user preference tab for the choosers to show.

Overrides:
addChooserPreferences in class IdvPreferenceManager

getChooserData

private final List<String[]> getChooserData()

Return a list that contains a bunch of arrays of two strings.

The first item in one of the arrays is the chooser id, and the second item is the "name" of the chooser. The name is formed by working through choosers.xml and concatenating each panel's category and title.

Returns:
A list of chooser ids and names.

getChooserCategory

private String getChooserCategory(String chooserName)
Parse the full chooser name for a category.

Parameters:
chooserName - Name of a chooser. Cannot be null.
Returns:
"Category" associated with chooserName or "Other" if no category is available.

getChooserShortName

private String getChooserShortName(String chooserName)
Parse the full chooser name for a short name.

Parameters:
chooserName - Name of a chooser. Cannot be null.
Returns:
The "short name" of chooserName.