edu.wisc.ssec.mcidasv.ui
Class UIManager

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

public class UIManager
extends IdvUIManager
implements ActionListener

Derive our own UI manager to do some specific things:


Nested Class Summary
protected static class UIManager.ActionAttribute
          Represents what McIDAS-V "knows" about IDV actions.
private  class UIManager.BundleTreeNode
          Represents a SavedBundle as a tree.
private static class UIManager.FormEntry
           A type of HttpFormEntry that supports line wrapping for text area entries.
static class UIManager.IdvAction
          Represents an individual IDV action.
static class UIManager.IdvActions
          Represents the set of known UIManager.IdvActions in an idiom that can be easily used by both the IDV and McIDAS-V.
private  class UIManager.NextDisplayAction
           
private  class UIManager.PopupListener
          Handle mouse clicks that occur within the toolbar.
private  class UIManager.PrevDisplayAction
           
private  class UIManager.ShowDisplayAction
           
static class UIManager.ToolbarStyle
          A ToolbarStyle is a representation of the way icons associated with current toolbar actions should be displayed.
 
Field Summary
private static String ACT_ICON_TYPE
          Action command for manipulating the size of the toolbar icons.
private static String ACT_REMOVE_DISPLAYS
          Action command for removing all displays
private static String ACT_SHOW_DASHBOARD
          Action command for showing the dashboard
private static String ACT_SHOW_DATASELECTOR
          Action command for showing the dashboard
private static String ACT_SHOW_DISPLAYCONTROLLER
          Action command for showing the dashboard
private static String ACT_SHOW_PREF
          Action command for displaying the toolbar preference tab.
private static String BAD_ACTION_MSG
          Message shown when an unknown action is in the toolbar.
private  List<String> cachedButtons
          The currently "displayed" actions.
private  int componentGroupCount
           
private  int componentHolderCount
           
private  UIManager.ToolbarStyle currentToolbarStyle
          Current representation of toolbar actions.
protected  IdvWindow dashboard
          Keep the dashboard around so we don't have to re-create it each time.
private  boolean didInitActions
          Whether or not the list of available actions has been initialized.
private  boolean didNewWindow
           
private  boolean didTabs
           
private  McvHelpTipDialog helpTipDialog
          THe help tip dialog
private  int holderCount
           
private  IntegratedDataViewer idv
          IDV instantiation--nice to keep around to reduce getIdv() calls.
private  UIManager.IdvActions idvActions
          Stores all available actions.
protected  boolean initDone
          False until initDone().
private static String LBL_TB_EDITOR
          Label for the "link" to the toolbar customization preference tab.
private static org.slf4j.Logger logger
           
static String MENU_NEWDISPLAY_TAB
          Id of the "New Display Tab" menu item for the file menu
static String MENU_NEWVIEWS
          Menu ID for the "Restore Saved Views" submenu.
private  Hashtable<String,JMenuItem> menuIds
          Maps menu IDs to JMenus.
private  UIManager.NextDisplayAction nextDisplayAction
          Key combo for moving to the next display relative to the current.
private  UIManager.PrevDisplayAction prevDisplayAction
          Key combo for moving to the previous display relative to the current.
private static String PROP_ICON_SIZE
          The IDV property that reflects the size of the icons.
private static String PROP_KB_DISPLAY_NEXT
          Key for moving to the next display.
private static String PROP_KB_DISPLAY_PREV
          Key for moving to the previous display.
private static String PROP_KB_MODIFIER
          Modifier key, like "control" or "shift".
private static String PROP_KB_SELECT_DISPLAY
          Key that pops up the list of displays.
private static String PROP_KB_SHOW_DASHBOARD
          Key for showing the dashboard.
static String PROP_WRAP_SUPPORT_DESC
          Property name for whether or not the description field of the support form should perform line wrapping.
static HashMap<String,ViewManager> savedViewManagers
          Used to keep track of ViewManagers inside a bundle.
private  UIManager.ShowDisplayAction showDisplayAction
          Key combo for the popup with list of displays.
private  Map<String,Integer> skinIds
          Map of skin ids to their skin resource index.
private  Map<Integer,String> skinToTitle
          Cache for the results of getWindowTitleFromSkin(int).
private  McvSplash splash
          The splash screen (minus easter egg).
private static String SUPPORT_REQ_URL
          The URL of the script that processes McIDAS-V support requests.
static String TAG_EXAMPLECHOOSER
          The tag in the xml ui for creating the special example chooser
protected static String TITLE_SEPARATOR
          Separator to use between window title components.
private  MouseListener toolbarMenu
          Keeping the reference to the toolbar menu mouse listener allows us to avoid constantly rebuilding the menu.
private  List<JToolBar> toolbars
          A list of the toolbars that the IDV is playing with.
private  Map<ViewManager,ComponentHolder> viewManagers
          An easy way to figure out who is holding a given ViewManager.
 
Fields inherited from class ucar.unidata.idv.ui.IdvUIManager
ATTR_ACTION, ATTR_DESCRIPTION, ATTR_GROUP, ATTR_ID, ATTR_IMAGE, ATTR_MAINWINDOW, COMP_CHOOSER, COMP_CHOOSERS, COMP_COMPONENT_CHOOSERS, COMP_COMPONENT_GROUP, COMP_COMPONENT_HTML, COMP_COMPONENT_SKIN, COMP_DATASELECTOR, COMP_DATATREE, COMP_FAVORITESBAR, COMP_GLOBEVIEW, COMP_HELP, COMP_MAPVIEW, COMP_MEMORYMONITOR, COMP_MENUBAR, COMP_MESSAGELABEL, COMP_MESSAGELOGGER, COMP_PROGRESSBAR, COMP_READINGLABEL, COMP_STATUSBAR, COMP_STREAMINGLABEL, COMP_TOOLBAR, COMP_TRANSECTVIEW, COMP_VIEW, COMP_VIEWPANEL, COMP_WAITLABEL, FIELDTYPE_AREA, FIELDTYPE_BOOLEAN, FIELDTYPE_CHOICE, FIELDTYPE_FILE, FIELDTYPE_LOCATION, FIELDTYPE_TEXT, ICON_LOCK, ICON_REMOVE, ICON_UNLOCK, lastActiveFrame, MENU_DATA, MENU_DELETEHISTORY, MENU_DELETEVIEWS, MENU_DISPLAYS, MENU_EDITFORMULAS, MENU_HELP, MENU_HISTORY, MENU_LOCATIONS, MENU_MAPS, MENU_NEWDISPLAY, MENU_PUBLISH, MENU_PUBLISH_CONFIG, MENU_SPECIAL, MENU_VIEW, MENU_WINDOWS, PREF_LightWeightPopupEnabled, PROP_HELP_EMAIL, PROP_HELP_NAME, PROP_HELP_ORG, PROP_SUPPORT_MESSAGE, PROP_SUPPORT_PACKAGE, startTime, TAG_ACTION, timeSinceLastWait
 
Fields inherited from class ucar.unidata.ui.WindowHolder
contents, dialog, frame, window
 
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_DOCPATH, 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_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, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, 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 Summary
UIManager(IntegratedDataViewer idv)
          Hands off our IDV instantiation to IdvUiManager.
 
Method Summary
 void about()
           
private static Map<UIManager.ActionAttribute,String> actionElementToMap(Element element)
          Builds a Map of UIManager.ActionAttributes to values for a given Element.
 void actionPerformed(ActionEvent e)
          Handles all the ActionEvents that occur for widgets contained within this class.
private  void addBundle(JToolBar toolbar, UIManager.BundleTreeNode node)
          Given a reference to the current toolbar and a bundle tree node, build a button representation of the bundle and add it to the toolbar.
private  void addBundleTree(JToolBar toolbar, UIManager.BundleTreeNode node)
           Builds two things, given a toolbar and a tree node: a JButton that represents a "first-level" parent node and a JPopupMenu that appears upon clicking the JButton.
private  void append(StringBuffer sb, String name, Object value)
          Append a string and object to the buffer
 UIManager.BundleTreeNode buildBundleTree()
           Builds a tree out of the bundles that should appear within the McV toolbar.
 IdvWindow buildDefaultSkin()
          Create the display window described by McIDAS-V's default display skin
 IdvWindow buildEmptyWindow()
          Create a new IdvWindow for the given viewManager.
private  void buildPopupMenu(UIManager.BundleTreeNode node, JComponent comp)
          Recursively builds the contents of the (first call) JPopupMenu.
private  JButton buildToolbarButton(String action)
          Given a valid action and icon size, build a JButton for the toolbar.
 void closeHelpTips()
          If created, close the HelpTipDialog window.
private  MouseListener constructToolbarMenu()
          Builds the JPopupMenu that appears when a user right-clicks in the toolbar.
 void createNewTab(String skinId)
          Adds a skinned component holder to the active component group.
 IdvWindow createNewWindow(List viewManagers, boolean notifyCollab, String title, String skinPath, Element skinRoot, boolean show, WindowInfo windowInfo)
          Override the IDV method so that we hide component group button.
 void displayTemplatesChanged()
           
protected  IdvXmlUi doMakeIdvXmlUi(IdvWindow window, List viewManagers, Element skinRoot)
           
 JMenuBar doMakeMenuBar(IdvWindow idvWindow)
           
protected  JMenuItem doMakeNewDisplayMenu(JMenuItem newDisplayMenu, boolean inWindow)
          Populate a "new display" menu from the available skin list.
 RovingProgress doMakeRovingProgressBar()
          Make the roving progress bar
 JPanel doMakeStatusBar(IdvWindow window)
           
protected  JComponent doMakeToolbar()
          Return a McV-style toolbar to the IDV.
protected  ViewPanel doMakeViewPanel()
          Creates the McVViewPanel component that shows up in the dashboard.
static List<TwoFacedObject> filterVMMStatesWithVM(ViewManager vm, Collection<?> states)
          Returns a list of TwoFacedObjects that are known to be compatible with vm.
private  String fixSkinPath(String skinPath)
          A hack because Unidata moved the skins (taken from IdvPersistenceManager).
 String getActionAttr(String actionId, String attr)
          Searches for an action identified by a given actionId, and returns the value associated with its attr.
protected  Icon getActionIcon(String actionId, UIManager.ToolbarStyle style)
          Returns the icon associated with actionId.
 Element getActionNode(String actionId)
          Looks for the XML Element representation of the action associated with actionId.
 List<String> getActions()
          Returns the collection of action identifiers.
 UIManager.IdvActions getCachedActions()
          Returns the known UIManager.IdvActions in the form of UIManager.IdvActions.
 List<String> getCachedButtons()
          Returns the actions that currently make up the McIDAS-V toolbar.
 int getComponentGroupCount()
           
 int getComponentHolderCount()
           
 Set<ComponentHolder> getComponentHolders()
           
 JComponent getDisplaySelectorComponent()
           
protected  int getEstimatedMegabytes(DataControlDialog dcd)
          Estimate the number of megabytes that will be used by this data selection
 Hashtable getMenuIds()
           
private  UIManager.ToolbarStyle getToolbarStylePref(UIManager.ToolbarStyle defaultStyle)
          Queries the stored preferences to determine the preferred UIManager.ToolbarStyle.
 JComponent getToolbarUI()
           Overrides the IDV's getToolbarUI so that McV can return its own toolbar and not deal with the way the IDV handles toolbars.
 ComponentHolder getViewManagerHolder(ViewManager vm)
          Returns the ComponentHolder containing the given ViewManager.
private  String getWindowTitleFromSkin(int index)
          Get the window title from the skin
protected  void handleMenuDeSelected(String id, JMenu menu, IdvWindow idvWindow)
          DeInitialize the given menu before it is shown
protected  void handleMenuSelected(String id, JMenu menu, IdvWindow idvWindow)
          Initialize the given menu before it is shown
 void handleWindowActivated(IdvWindow window)
           
private  void initDisplayShortcuts(IdvWindow window)
          Add all the show window keyboard shortcuts.
 void initDone()
           
 void initHelpTips(boolean checkPrefs)
           
protected  void initializeDisplayMenu(JMenu displayMenu)
          Overridden to build a custom Display menu.
 void initSplash()
          Create the splash screen if needed
private  void initTabNavActions()
           
 boolean isMac()
          Deprecated. Use McIDASV.isMac() instead.
private static boolean isValidIdvAction(Element element)
          Attempts to verify that element represents a "valid" IDV action.
 void killOldDisplays(List<IdvComponentHolder> oldHolders, List<IdvWindow> oldWindows, boolean merge)
           Removes data and displays that existed prior to loading a bundle.
 void loadLookAndFeel()
          Override IdvUIManager's loadLookAndFeel so that we can force the IDV to load the Aqua look and feel if requested from the command line.
 List<JMenu> makeActionMenu(Object obj, String method, boolean makeCall)
          Make the menu of actions.
 void makeBundledDisplays(WindowInfo info, boolean merge, boolean mergeLayers, boolean fromCollab)
           Uses the contents of info to rebuild a display that has been bundled.
 void makeBundleMenu(JMenu inBundleMenu)
          Populate a menu with bundles known to the PersistenceManager.
private  JMenuItem makeControlDescriptorItem(ControlDescriptor cd)
           
 void makeDefaultLayoutMenu(JMenu menu)
           
 void makeFormulasMenu(JMenu menu)
          Add in the dynamic menu for displaying formulas
static JMenu makeMenu(String name, List menuItems)
           
private  ActionListener makeMenuBarActionListener()
           
private  MenuListener makeMenuBarListener(String id, JMenu menu, IdvWindow idvWindow)
           
static JMenuItem makeMenuItem(String label, Object obj, String method, Object arg)
           
private  void makeTabNavigationMenu(JMenu menu)
           
protected static String makeTitle(String win, String doc)
          Make a window title.
protected static String makeTitle(String window, String document, String other)
          Make a window title.
 void makeViewStateMenu(JMenu menu, ViewManager vm)
          Bundles any compatible ViewManager states into JMenuItems and adds said JMenuItems to menu.
 void makeWindowsMenu(JMenu windowMenu, IdvWindow idvWindow)
          Overridden to build a custom Window menu.
private  void mergeLayers(WindowInfo info, IdvWindow window, boolean fromCollab)
           
private  void populateToolbar(JToolBar toolbar)
          Uses the cached XML to create a toolbar.
 void processDialog(DataControlDialog dcd)
          Handle (polymorphically) the DataControlDialog.
private  Map<String,Integer> readSkinIds()
           
 List<String> readToolbar()
          Read the contents of the toolbar XML into a List.
 ComponentHolder removeViewManagerHolder(ViewManager vm)
          Disassociate a given ViewManager from its ComponentHolder.
 void setCurrentToolbars(McvToolbarEditor tbe)
           Uses a given toolbar editor to repopulate all toolbars so that they correspond to the user's choice of actions.
private  void setDashboard(IdvWindow window)
          Sets dashboard to window.
 void setViewManagerHolder(ViewManager vm, ComponentHolder holder)
          Associates a given ViewManager with a given ComponentHolder.
 void showDashboard()
          Overridden to keep the dashboard around after it's initially created.
 void showDashboard(String tabName)
          Method to do the work of showing the Data Explorer (nee Dashboard)
 boolean showDashboardComponent(String id)
          Attempts to locate and display a dashboard component using an ID.
protected  void showDisplaySelector()
          Show Bruce's display selector widget.
 void showHelpTips()
          Create (if null) and show the HelpTipDialog
 void showSupportForm(String description, String stackTrace, JDialog dialog)
          Show the support request form
private  void showSupportFormInThread(String description, String stackTrace, JDialog dialog)
          Show the support request form in a non-swing thread.
 void splashClose()
          Close and dispose of the splash window (if it has been created).
 void splashMsg(String m)
          Show a message in the splash screen (if it exists)
protected static String[] splitTitle(String title)
          Split window title using TITLE_SEPARATOR.
 boolean unpersistComponentGroups(WindowInfo info, McvComponentGroup group)
           Attempts to add all component holders in info to group.
 void unpersistWindowInfo(List windows, List newViewManagers, boolean okToMerge, boolean fromCollab, boolean didRemoveAll)
           Handles the windowing portions of bundle loading: wraps things in component groups (if needed), merges things into existing windows or creates new windows, and removes displays and data if asked nicely.
 void writeToolbar()
          Writes the currently displayed toolbar buttons to the toolbar XML.
 
Methods inherited from class ucar.unidata.idv.ui.IdvUIManager
addChoicesToMenu, addDataHolderState, addDataSource, addDataSourceHolder, addDCD, addDisplayControl, addStateToBundle, addStationDisplay, addToolbarPreferences, addViewMenuItems, applyDataHolderState, captureImage, captureMovie, changeState, checkHaiku, checkToolbarVisibility, clearWaitCursor, closeCurrentWindow, createDataChoiceMenuItem, createDataSelector, createDataSelector, createDataSelector, createDataTree, createDataTree, createDataTreeWindow, createInitialDataSelector, createNewWindow, createNewWindow, createNewWindow, createNewWindow, createNewWindow, createNewWindow, createNewWindow, dataSelectorToFront, dataSelectorToFrontIfOk, dataSourceChanged, dataSourceTimeChanged, dataTreeClick, deleteHistoryMenuSelected, deleteKeyPressed, displayControlChanged, displayControlsChanged, disposeAllWindows, doBasicInitialization, doMakeBasicWindows, doMakeControlButtons, doMakeDataChoiceMenu, doMakeDataChoiceMenuItems, doMakeDataChoiceMenus, doMakeDataSourceMenuItems, doMakeDefaultContents, doMakeInitialGui, doMakeMenuBar, doMakeParamField, editDisplaySettings, editFormulasMenuSelected, embedDataChooserInDashboard, embedFieldSelectorInDashboard, embedLegendInDashboard, embedQuickLinksInDashboard, favoriteBundlesChanged, findComponent, findWindowThatMatches, getAction, getActionDescription, getActionImage, getComponentGroupMenuItems, getComponentGroups, getComponents, getDataSourceHolders, getFrame, getMapLocations, getParamsMenuItems, getScreen, getShowControlsInTab, getSkinHtml, getStandAloneControlDescriptors, getStatusBorder, getSystemInfo, getToolbarRoot, getViewManagerTabLabel, getViewPanel, getWaitCursorCount, getWindowGroup, getWindowsToPersist, handleSideLegend, haveBasicWindow, historyMenuSelected, init, initDataSourceHolder, initDataTree, initializeViewMenu, isAction, loadSkinByIndex, makeCenterMenus, makeDeleteViewsMenu, makeSkinMenuItems, makeViewStateMenu, makeWindowMenu, popupCenterMenu, processBundle, processBundleMenu, processInstanceMenu, processMapMenu, processStandAloneMenu, processStationMenu, reloadToolbarResources, removeAllDataSources, removeDataSource, removeDataSourceHolder, removeDCD, removeDisplayControl, removeWindow, resetLastActiveViewManager, selectDataChoice, selectDataChoices, selectUserChoices, setAlias, setDateFormat, showAllWindows, showBasicWindow, showBundleDialog, showBundleDialog, showControlDialog, showDataSelector, showDataSourceDetails, showDataTreeMenu, showHelp, showHelp, showMenu, showMenuInThread, showNormalCursor, showOrCreateDataSelector, showParamsPopup, showResults, showSupportForm, showSupportForm, showTimeSelection, showWaitCursor, showWindow, startReading, stopReading, stripAction, toFrontMainWindows, updateHistoryLinks, updateIconBar, viewManagerActiveChanged, viewManagerAdded, viewManagerChanged, viewManagerDestroyed
 
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, waitUntilDisplaysAreDone, waitUntilDisplaysAreDone
 
Methods inherited from class ucar.unidata.ui.WindowHolder
close, doMakeContents, getContents, getDialog, getWindow, getWindowTitle, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, show, show, showModal, toFront, windowIsClosing
 
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

MENU_NEWDISPLAY_TAB

public static final String MENU_NEWDISPLAY_TAB
Id of the "New Display Tab" menu item for the file menu

See Also:
Constant Field Values

TAG_EXAMPLECHOOSER

public static final String TAG_EXAMPLECHOOSER
The tag in the xml ui for creating the special example chooser

See Also:
Constant Field Values

savedViewManagers

public static final HashMap<String,ViewManager> savedViewManagers
Used to keep track of ViewManagers inside a bundle.


PROP_WRAP_SUPPORT_DESC

public static final String PROP_WRAP_SUPPORT_DESC
Property name for whether or not the description field of the support form should perform line wrapping.

See Also:
Constant Field Values

ACT_ICON_TYPE

private static final String ACT_ICON_TYPE
Action command for manipulating the size of the toolbar icons.

See Also:
Constant Field Values

ACT_REMOVE_DISPLAYS

private static final String ACT_REMOVE_DISPLAYS
Action command for removing all displays

See Also:
Constant Field Values

ACT_SHOW_DASHBOARD

private static final String ACT_SHOW_DASHBOARD
Action command for showing the dashboard

See Also:
Constant Field Values

ACT_SHOW_DATASELECTOR

private static final String ACT_SHOW_DATASELECTOR
Action command for showing the dashboard

See Also:
Constant Field Values

ACT_SHOW_DISPLAYCONTROLLER

private static final String ACT_SHOW_DISPLAYCONTROLLER
Action command for showing the dashboard

See Also:
Constant Field Values

ACT_SHOW_PREF

private static final String ACT_SHOW_PREF
Action command for displaying the toolbar preference tab.

See Also:
Constant Field Values

BAD_ACTION_MSG

private static final String BAD_ACTION_MSG
Message shown when an unknown action is in the toolbar.

See Also:
Constant Field Values

MENU_NEWVIEWS

public static final String MENU_NEWVIEWS
Menu ID for the "Restore Saved Views" submenu.

See Also:
Constant Field Values

LBL_TB_EDITOR

private static final String LBL_TB_EDITOR
Label for the "link" to the toolbar customization preference tab.

See Also:
Constant Field Values

currentToolbarStyle

private UIManager.ToolbarStyle currentToolbarStyle
Current representation of toolbar actions.


PROP_ICON_SIZE

private static final String PROP_ICON_SIZE
The IDV property that reflects the size of the icons.

See Also:
Constant Field Values

SUPPORT_REQ_URL

private static final String SUPPORT_REQ_URL
The URL of the script that processes McIDAS-V support requests.

See Also:
Constant Field Values

TITLE_SEPARATOR

protected static final String TITLE_SEPARATOR
Separator to use between window title components.

See Also:
Constant Field Values

cachedButtons

private List<String> cachedButtons

The currently "displayed" actions. Keeping this List allows us to get away with only reading the XML files upon starting the application and only writing the XML files upon exiting the application. This will avoid those redrawing delays.


idvActions

private final UIManager.IdvActions idvActions
Stores all available actions.


skinIds

private Map<String,Integer> skinIds
Map of skin ids to their skin resource index.


viewManagers

private Map<ViewManager,ComponentHolder> viewManagers
An easy way to figure out who is holding a given ViewManager.


componentHolderCount

private int componentHolderCount

componentGroupCount

private int componentGroupCount

skinToTitle

private final Map<Integer,String> skinToTitle
Cache for the results of getWindowTitleFromSkin(int).


menuIds

private Hashtable<String,JMenuItem> menuIds
Maps menu IDs to JMenus.


splash

private McvSplash splash
The splash screen (minus easter egg).


toolbars

private List<JToolBar> toolbars
A list of the toolbars that the IDV is playing with. Used to apply changes to *all* the toolbars in the application.


toolbarMenu

private MouseListener toolbarMenu
Keeping the reference to the toolbar menu mouse listener allows us to avoid constantly rebuilding the menu.


dashboard

protected IdvWindow dashboard
Keep the dashboard around so we don't have to re-create it each time.


initDone

protected boolean initDone
False until initDone().


idv

private IntegratedDataViewer idv
IDV instantiation--nice to keep around to reduce getIdv() calls.


helpTipDialog

private McvHelpTipDialog helpTipDialog
THe help tip dialog


didInitActions

private boolean didInitActions
Whether or not the list of available actions has been initialized.


showDisplayAction

private UIManager.ShowDisplayAction showDisplayAction
Key combo for the popup with list of displays.


prevDisplayAction

private UIManager.PrevDisplayAction prevDisplayAction
Key combo for moving to the previous display relative to the current. For key combos the lists of displays in the current window is circular.


nextDisplayAction

private UIManager.NextDisplayAction nextDisplayAction
Key combo for moving to the next display relative to the current. For key combos the lists of displays in the current window is circular.


PROP_KB_MODIFIER

private static final String PROP_KB_MODIFIER
Modifier key, like "control" or "shift".

See Also:
Constant Field Values

PROP_KB_SELECT_DISPLAY

private static final String PROP_KB_SELECT_DISPLAY
Key that pops up the list of displays. Used in conjunction with PROP_KB_MODIFIER.

See Also:
Constant Field Values

PROP_KB_DISPLAY_PREV

private static final String PROP_KB_DISPLAY_PREV
Key for moving to the previous display. Used in conjunction with PROP_KB_MODIFIER.

See Also:
Constant Field Values

PROP_KB_DISPLAY_NEXT

private static final String PROP_KB_DISPLAY_NEXT
Key for moving to the next display. Used in conjunction with PROP_KB_MODIFIER.

See Also:
Constant Field Values

PROP_KB_SHOW_DASHBOARD

private static final String PROP_KB_SHOW_DASHBOARD
Key for showing the dashboard. Used in conjunction with PROP_KB_MODIFIER.

See Also:
Constant Field Values

holderCount

private int holderCount

didTabs

private boolean didTabs

didNewWindow

private boolean didNewWindow
Constructor Detail

UIManager

public UIManager(IntegratedDataViewer idv)
Hands off our IDV instantiation to IdvUiManager.

Parameters:
idv - The idv
Method Detail

createNewWindow

public IdvWindow createNewWindow(List viewManagers,
                                 boolean notifyCollab,
                                 String title,
                                 String skinPath,
                                 Element skinRoot,
                                 boolean show,
                                 WindowInfo windowInfo)
Override the IDV method so that we hide component group button.

Overrides:
createNewWindow in class IdvUIManager

buildDefaultSkin

public IdvWindow buildDefaultSkin()
Create the display window described by McIDAS-V's default display skin

Returns:
IdvWindow that was created.

buildEmptyWindow

public IdvWindow buildEmptyWindow()
Create a new IdvWindow for the given viewManager. Put the contents of the viewManager into the window

Returns:
The new window

setDashboard

private void setDashboard(IdvWindow window)
Sets dashboard to window. This method also adds some listeners to window so that the state of the dashboard is automatically saved.

Parameters:
window - The dashboard. Nothing happens if dashboard has already been set, or this parameter is null.

unpersistComponentGroups

public boolean unpersistComponentGroups(WindowInfo info,
                                        McvComponentGroup group)

Attempts to add all component holders in info to group. Especially useful when unpersisting a bundle and attempting to deal with its component groups.

Parameters:
info - The window we want to process.
group - Receives the holders in info.
Returns:
True if there were component groups in info.

loadLookAndFeel

public void loadLookAndFeel()
Override IdvUIManager's loadLookAndFeel so that we can force the IDV to load the Aqua look and feel if requested from the command line.

Overrides:
loadLookAndFeel in class IdvUIManager

handleWindowActivated

public void handleWindowActivated(IdvWindow window)
Overrides:
handleWindowActivated in class IdvUIManager

unpersistWindowInfo

public void unpersistWindowInfo(List windows,
                                List newViewManagers,
                                boolean okToMerge,
                                boolean fromCollab,
                                boolean didRemoveAll)

Handles the windowing portions of bundle loading: wraps things in component groups (if needed), merges things into existing windows or creates new windows, and removes displays and data if asked nicely.

Overrides:
unpersistWindowInfo in class IdvUIManager
Parameters:
windows - WindowInfos from the bundle.
newViewManagers - ViewManagers stored in the bundle.
okToMerge - Put bundled things into an existing window?
fromCollab - Did this come from the collab stuff?
didRemoveAll - Remove all data and displays?
See Also:
IdvUIManager.unpersistWindowInfo(List, List, boolean, boolean, boolean)

killOldDisplays

public void killOldDisplays(List<IdvComponentHolder> oldHolders,
                            List<IdvWindow> oldWindows,
                            boolean merge)

Removes data and displays that existed prior to loading a bundle.

Parameters:
oldHolders - Component holders around before loading.
oldWindows - Windows around before loading.
merge - Were the bundle contents merged into an existing window?

fixSkinPath

private String fixSkinPath(String skinPath)
A hack because Unidata moved the skins (taken from IdvPersistenceManager).

Parameters:
skinPath - original path
Returns:
fixed path

makeBundledDisplays

public void makeBundledDisplays(WindowInfo info,
                                boolean merge,
                                boolean mergeLayers,
                                boolean fromCollab)

Uses the contents of info to rebuild a display that has been bundled. If merge is true, the displayable parts of the bundle will be put into the current window. Otherwise a new window is created and the relevant parts of the bundle will occupy that new window.

Parameters:
info - WindowInfo to use with creating the new window.
merge - Merge created things into an existing window?

mergeLayers

private void mergeLayers(WindowInfo info,
                         IdvWindow window,
                         boolean fromCollab)

makeTitle

protected static String makeTitle(String win,
                                  String doc)
Make a window title. The format for window titles is: <window>TITLE_SEPARATOR<document>

Parameters:
win - Window title.
doc - Document or window sub-content.
Returns:
Formatted window title.

makeTitle

protected static String makeTitle(String window,
                                  String document,
                                  String other)
Make a window title. The format for window titles is:
 <window>TITLE_SEPARATOR<document>TITLE_SEPARATOR<other>
 

Parameters:
window - Window title.
document - Document or window sub content.
other - Other content to include.
Returns:
Formatted window title.

splitTitle

protected static String[] splitTitle(String title)
Split window title using TITLE_SEPARATOR.

Parameters:
title - The window title to split
Returns:
Parts of the title with the white space trimmed.

isMac

public boolean isMac()
Deprecated. Use McIDASV.isMac() instead.

Overridden to prevent the IDV's StateManager instantiation of MacBridge. McIDAS-V uses different approaches for OS X compatibility.

Overrides:
isMac in class IdvUIManager
Returns:
Always returns false.

about

public void about()
Overrides:
about in class IdvUIManager

actionPerformed

public void actionPerformed(ActionEvent e)
Handles all the ActionEvents that occur for widgets contained within this class. It's not so pretty, but it isolates the event handling in one place (and reduces the number of action listeners to one).

Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class WindowHolder
Parameters:
e - The event that triggered the call to this method.

getDisplaySelectorComponent

public JComponent getDisplaySelectorComponent()

constructToolbarMenu

private MouseListener constructToolbarMenu()
Builds the JPopupMenu that appears when a user right-clicks in the toolbar.

Returns:
MouseListener that listens for right-clicks in the toolbar.

getToolbarStylePref

private UIManager.ToolbarStyle getToolbarStylePref(UIManager.ToolbarStyle defaultStyle)
Queries the stored preferences to determine the preferred UIManager.ToolbarStyle. If there was no preference, defaultStyle is used.

Parameters:
defaultStyle - ToolbarStyle to use if there was no value associated with the toolbar style preference.
Returns:
The preferred ToolbarStyle or defaultStyle.
Throws:
AssertionError - if PROP_ICON_SIZE had returned an integer value that did not correspond to a valid ToolbarStyle.

buildToolbarButton

private JButton buildToolbarButton(String action)
Given a valid action and icon size, build a JButton for the toolbar.

Parameters:
action - The action whose corresponding icon we want.
Returns:
A JButton for the given action with an appropriate-sized icon.

doMakeStatusBar

public JPanel doMakeStatusBar(IdvWindow window)
Overrides:
doMakeStatusBar in class IdvUIManager

doMakeRovingProgressBar

public RovingProgress doMakeRovingProgressBar()
Make the roving progress bar

Overrides:
doMakeRovingProgressBar in class IdvUIManager
Returns:
Roving progress bar

getToolbarUI

public JComponent getToolbarUI()

Overrides the IDV's getToolbarUI so that McV can return its own toolbar and not deal with the way the IDV handles toolbars. This method also updates the toolbar data member so that other methods can fool around with whatever the IDV thinks is a toolbar (without having to rely on the IDV window manager code).

Not that the IDV code is bad of course--I just can't handle that pause while the toolbar is rebuilt!

Overrides:
getToolbarUI in class IdvUIManager
Returns:
A new toolbar based on the contents of toolbar.xml.

doMakeToolbar

protected JComponent doMakeToolbar()
Return a McV-style toolbar to the IDV.

Overrides:
doMakeToolbar in class IdvUIManager
Returns:
A fancy-pants toolbar.

populateToolbar

private void populateToolbar(JToolBar toolbar)
Uses the cached XML to create a toolbar. Any updates to the toolbar happen almost instantly using this approach. Do note that if there are any components in the given toolbar they will be removed.

Parameters:
toolbar - A reference to the toolbar that needs buttons and stuff.

addBundle

private void addBundle(JToolBar toolbar,
                       UIManager.BundleTreeNode node)
Given a reference to the current toolbar and a bundle tree node, build a button representation of the bundle and add it to the toolbar.

Parameters:
toolbar - The toolbar to which we add the bundle.
node - The node within the bundle tree that contains our bundle.

addBundleTree

private void addBundleTree(JToolBar toolbar,
                           UIManager.BundleTreeNode node)

Builds two things, given a toolbar and a tree node: a JButton that represents a "first-level" parent node and a JPopupMenu that appears upon clicking the JButton. The button is then added to the given toolbar.

"First-level" means the given node is a child of the root node.

Parameters:
toolbar - The toolbar to which we add the bundle tree.
node - The node we want to add! OMG like duh!

writeToolbar

public void writeToolbar()
Writes the currently displayed toolbar buttons to the toolbar XML. This has mostly been ripped off from ToolbarEditor. :(


readToolbar

public List<String> readToolbar()
Read the contents of the toolbar XML into a List. We're essentially just throwing actions into the list.

Returns:
The actions/buttons that live in the toolbar xml. Note that if an element is null, this element represents a "space" that should appear in both the Toolbar and the Toolbar Preferences.

getActionIcon

protected Icon getActionIcon(String actionId,
                             UIManager.ToolbarStyle style)
Returns the icon associated with actionId. Note that associating the "missing icon" icon with an action is allowable.

Parameters:
actionId - Action ID whose associated icon is to be returned.
style - Returned icon's size will be the size associated with the specified ToolbarStyle.
Returns:
Either the icon corresponding to actionId or the default "missing icon" icon.
Throws:
NullPointerException - if actionId is null.

getCachedActions

public UIManager.IdvActions getCachedActions()
Returns the known UIManager.IdvActions in the form of UIManager.IdvActions.

Returns:
idvActions

getCachedButtons

public List<String> getCachedButtons()
Returns the actions that currently make up the McIDAS-V toolbar.

Returns:
List of UIManager.ActionAttribute.IDs that make up the current toolbar buttons.

makeActionMenu

public List<JMenu> makeActionMenu(Object obj,
                                  String method,
                                  boolean makeCall)
Make the menu of actions.

Overridden in McIDAS-V so that we can fool the IDV into working with our icons that allow for multiple "styles".

Overrides:
makeActionMenu in class IdvUIManager
Parameters:
obj - Object to call.
method - Method to call.
makeCall - if true, call IntegratedDataViewer.handleAction(String).
Returns:
List of JMenus that represent our action menus.

makeMenuItem

public static JMenuItem makeMenuItem(String label,
                                     Object obj,
                                     String method,
                                     Object arg)
See Also:
MenuUtil.makeMenuItem(String, Object, String, Object)

makeMenu

public static JMenu makeMenu(String name,
                             List menuItems)
See Also:
MenuUtil.makeMenu(String, List)

getActions

public List<String> getActions()
Returns the collection of action identifiers.

Overridden in McIDAS-V so that we can fool the IDV into working with our icons that allow for multiple "styles".

Overrides:
getActions in class IdvUIManager

getActionNode

public Element getActionNode(String actionId)
Looks for the XML Element representation of the action associated with actionId.

Overridden in McIDAS-V so that we can fool the IDV into working with our icons that allow for multiple "styles".

Overrides:
getActionNode in class IdvUIManager
Parameters:
actionId - ID of the action whose "action node" is desired. Cannot be null.
Returns:
"action node" associated with actionId.
Throws:
NullPointerException - if actionId is null.

getActionAttr

public String getActionAttr(String actionId,
                            String attr)
Searches for an action identified by a given actionId, and returns the value associated with its attr.

Overridden in McIDAS-V so that we can fool the IDV into working with our icons that allow for multiple "styles".

Overrides:
getActionAttr in class IdvUIManager
Parameters:
actionId - ID of the action whose attribute value is desired. Cannot be null.
attr - The attribute whose value is desired. Cannot be null.
Returns:
Value associated with the given action and given attribute.
Throws:
NullPointerException - if actionId or attr is null.

isValidIdvAction

private static boolean isValidIdvAction(Element element)
Attempts to verify that element represents a "valid" IDV action.

Parameters:
element - Element to check. null values permitted, but they return false.
Returns:
true if element had all required UIManager.ActionAttributes. false otherwise, or if element is null.

actionElementToMap

private static Map<UIManager.ActionAttribute,String> actionElementToMap(Element element)
Builds a Map of UIManager.ActionAttributes to values for a given Element. If element does not contain an optional attribute, use the attribute's default value.

Parameters:
element - "Action node" of interest. null permitted, but results in an empty Map.
Returns:
Mapping of ActionAttributes to values, or an empty Map if element is null.

buildBundleTree

public UIManager.BundleTreeNode buildBundleTree()

Builds a tree out of the bundles that should appear within the McV toolbar. A tree is a nice way to store this data, as the default IDV behavior is to act kinda like a file explorer when it displays these bundles.

The tree makes it REALLY easy to replicate the default IDV functionality.

Returns:
The root BundleTreeNode for the tree containing toolbar bundles.

buildPopupMenu

private void buildPopupMenu(UIManager.BundleTreeNode node,
                            JComponent comp)
Recursively builds the contents of the (first call) JPopupMenu. This is where that tree annoyance stuff comes in handy. This is basically a simple tree traversal situation.

Parameters:
node - The node that we're trying to use to build the contents.
comp - The component to which we add node contents.

initDone

public void initDone()
Overrides:
initDone in class IdvUIManager

initSplash

public void initSplash()
Create the splash screen if needed

Overrides:
initSplash in class IdvUIManager

initHelpTips

public void initHelpTips(boolean checkPrefs)
Overrides:
initHelpTips in class IdvUIManager

closeHelpTips

public void closeHelpTips()
If created, close the HelpTipDialog window.

Overrides:
closeHelpTips in class IdvUIManager

showHelpTips

public void showHelpTips()
Create (if null) and show the HelpTipDialog

Overrides:
showHelpTips in class IdvUIManager

makeBundleMenu

public void makeBundleMenu(JMenu inBundleMenu)
Populate a menu with bundles known to the PersistenceManager.

Parameters:
inBundleMenu - The menu to populate

makeWindowsMenu

public void makeWindowsMenu(JMenu windowMenu,
                            IdvWindow idvWindow)
Overridden to build a custom Window menu.

Overrides:
makeWindowsMenu in class IdvUIManager
See Also:
IdvUIManager.makeWindowsMenu(JMenu, IdvWindow)

makeTabNavigationMenu

private void makeTabNavigationMenu(JMenu menu)
Parameters:
menu -

makeFormulasMenu

public void makeFormulasMenu(JMenu menu)
Add in the dynamic menu for displaying formulas

Parameters:
menu - edit menu to add to

initTabNavActions

private void initTabNavActions()

initDisplayShortcuts

private void initDisplayShortcuts(IdvWindow window)
Add all the show window keyboard shortcuts. To make keyboard shortcuts global, i.e., available no matter what window is active, the appropriate actions have to be added the the window contents action and input maps. FIXME: This can't be the right way to do this!

Parameters:
window - IdvWindow that requires keyboard shortcut capability.

showDisplaySelector

protected void showDisplaySelector()
Show Bruce's display selector widget.


doMakeNewDisplayMenu

protected JMenuItem doMakeNewDisplayMenu(JMenuItem newDisplayMenu,
                                         boolean inWindow)
Populate a "new display" menu from the available skin list. Many thanks to Bruce for doing this in the venerable TabbedUIManager.

Parameters:
newDisplayMenu - menu to populate.
inWindow - Is the skinned display to be created in a window?
Returns:
Menu item populated with display skins
See Also:
IdvResourceManager.RSC_SKIN

setViewManagerHolder

public void setViewManagerHolder(ViewManager vm,
                                 ComponentHolder holder)
Associates a given ViewManager with a given ComponentHolder.

Parameters:
vm - The ViewManager that is inside holder.
holder - The ComponentHolder that contains vm.

getComponentHolders

public Set<ComponentHolder> getComponentHolders()

getComponentHolderCount

public int getComponentHolderCount()

getComponentGroupCount

public int getComponentGroupCount()

getViewManagerHolder

public ComponentHolder getViewManagerHolder(ViewManager vm)
Returns the ComponentHolder containing the given ViewManager.

Parameters:
vm - The ViewManager whose ComponentHolder is needed.
Returns:
Either null or the ComponentHolder.

removeViewManagerHolder

public ComponentHolder removeViewManagerHolder(ViewManager vm)
Disassociate a given ViewManager from its ComponentHolder.

Returns:
The associated ComponentHolder.

showDashboard

public void showDashboard()
Overridden to keep the dashboard around after it's initially created. Also give the user the ability to show a particular tab.

Overrides:
showDashboard in class IdvUIManager
See Also:
IdvUIManager.showDashboard()

doMakeViewPanel

protected ViewPanel doMakeViewPanel()
Creates the McVViewPanel component that shows up in the dashboard.

Overrides:
doMakeViewPanel in class IdvUIManager

readSkinIds

private Map<String,Integer> readSkinIds()
Returns:
A map of skin ids to their index within the skin resource.

createNewTab

public void createNewTab(String skinId)
Adds a skinned component holder to the active component group.

Parameters:
skinId - The value of the skin's skinid attribute.

showDashboard

public void showDashboard(String tabName)
Method to do the work of showing the Data Explorer (nee Dashboard)


showSupportForm

public void showSupportForm(String description,
                            String stackTrace,
                            JDialog dialog)
Show the support request form

Overrides:
showSupportForm in class IdvUIManager
Parameters:
description - Default value for the description form entry
stackTrace - The stack trace that caused this error.
dialog - The dialog to put the gui in, if non-null.

showDashboardComponent

public boolean showDashboardComponent(String id)
Attempts to locate and display a dashboard component using an ID.

Parameters:
id - ID of the desired component.
Returns:
True if id corresponds to a component. False otherwise.

splashClose

public void splashClose()
Close and dispose of the splash window (if it has been created).

Overrides:
splashClose in class IdvUIManager

splashMsg

public void splashMsg(String m)
Show a message in the splash screen (if it exists)

Overrides:
splashMsg in class IdvUIManager
Parameters:
m - The message to show

setCurrentToolbars

public void setCurrentToolbars(McvToolbarEditor tbe)

Uses a given toolbar editor to repopulate all toolbars so that they correspond to the user's choice of actions.

Parameters:
tbe - The toolbar editor that contains the actions the user wants.

append

private void append(StringBuffer sb,
                    String name,
                    Object value)
Append a string and object to the buffer

Parameters:
sb - StringBuffer to append to
name - Name of the object
value - the object value

makeControlDescriptorItem

private JMenuItem makeControlDescriptorItem(ControlDescriptor cd)

displayTemplatesChanged

public void displayTemplatesChanged()
Overrides:
displayTemplatesChanged in class IdvUIManager

showSupportFormInThread

private void showSupportFormInThread(String description,
                                     String stackTrace,
                                     JDialog dialog)
Show the support request form in a non-swing thread. We do this because we cannot call the HttpFormEntry.showUI from a swing thread

Parameters:
description - Default value for the description form entry
stackTrace - The stack trace that caused this error.
dialog - The dialog to put the gui in, if non-null.

doMakeIdvXmlUi

protected IdvXmlUi doMakeIdvXmlUi(IdvWindow window,
                                  List viewManagers,
                                  Element skinRoot)
Overrides:
doMakeIdvXmlUi in class IdvUIManager

handleMenuDeSelected

protected void handleMenuDeSelected(String id,
                                    JMenu menu,
                                    IdvWindow idvWindow)
DeInitialize the given menu before it is shown

Overrides:
handleMenuDeSelected in class IdvUIManager
See Also:
IdvUIManager.historyMenuSelected(JMenu)

handleMenuSelected

protected void handleMenuSelected(String id,
                                  JMenu menu,
                                  IdvWindow idvWindow)
Initialize the given menu before it is shown

Overrides:
handleMenuSelected in class IdvUIManager
See Also:
IdvUIManager.historyMenuSelected(JMenu)

makeDefaultLayoutMenu

public void makeDefaultLayoutMenu(JMenu menu)

makeViewStateMenu

public void makeViewStateMenu(JMenu menu,
                              ViewManager vm)
Bundles any compatible ViewManager states into JMenuItems and adds said JMenuItems to menu. Incompatible states are ignored.

Each JMenuItem (except those under the "Delete" menu--apologies) associates a "view state" and an ObjectListener. The ObjectListener uses this associated view state to attempt reinitialization of vm.

Override reasoning:

Overrides:
makeViewStateMenu in class IdvUIManager
Parameters:
menu - Menu to populate. Should not be null.
vm - ViewManager that might get reinitialized. Should not be null.
See Also:
ViewManager.initWith(ViewManager, boolean), ViewManager.initWith(ViewState), IdvUIManager.makeViewStateMenu(JMenu, ViewManager)

filterVMMStatesWithVM

public static List<TwoFacedObject> filterVMMStatesWithVM(ViewManager vm,
                                                         Collection<?> states)
Returns a list of TwoFacedObjects that are known to be compatible with vm.

This method is currently capable of dealing with TwoFacedObjects and ViewStates within states. Any other types are ignored.

Parameters:
vm - ViewManager to use for compatibility tests. null is allowed.
states - Collection of objects to test against vm. null is allowed.
Returns:
Either a List of compatible "view states" or an empty List.
See Also:
ViewManager.isCompatibleWith(ViewManager), ViewManager.isCompatibleWith(ViewState), makeViewStateMenu(JMenu, ViewManager)

initializeDisplayMenu

protected void initializeDisplayMenu(JMenu displayMenu)
Overridden to build a custom Display menu.

Overrides:
initializeDisplayMenu in class IdvUIManager
See Also:
IdvUIManager.initializeDisplayMenu(JMenu)

getWindowTitleFromSkin

private String getWindowTitleFromSkin(int index)
Get the window title from the skin

Parameters:
index - the skin index
Returns:
the title

getMenuIds

public Hashtable getMenuIds()
Overrides:
getMenuIds in class IdvUIManager

doMakeMenuBar

public JMenuBar doMakeMenuBar(IdvWindow idvWindow)
Overrides:
doMakeMenuBar in class IdvUIManager

makeMenuBarActionListener

private final ActionListener makeMenuBarActionListener()

makeMenuBarListener

private final MenuListener makeMenuBarListener(String id,
                                               JMenu menu,
                                               IdvWindow idvWindow)

processDialog

public void processDialog(DataControlDialog dcd)
Handle (polymorphically) the DataControlDialog. This dialog is used to either select a display control to create or is used to set the timers used for a DataSource.

Overrides:
processDialog in class IdvUIManager
Parameters:
dcd - The dialog

getEstimatedMegabytes

protected int getEstimatedMegabytes(DataControlDialog dcd)
Estimate the number of megabytes that will be used by this data selection