ucar.unidata.idv.ui
Class IdvUIManager

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

public class IdvUIManager
extends IdvManager

Manages the user interface for the IDV

Author:
IDV development team

Field Summary
static String ATTR_ACTION
          Xml attribute name for the action in the actions resource
static String ATTR_DESCRIPTION
          Xml attribute name for the description in the actions resource
static String ATTR_GROUP
          Xml attribute name for the group in the actions resource
static String ATTR_ID
          Xml attribute name for the in the actions resource
static String ATTR_IMAGE
          Xml attribute name for the image in the actions resource
static String ATTR_MAINWINDOW
          Xml attribute name for skin mainwindow attribute
static String COMP_CHOOSER
          Xml tag name for the chooser tag.
static String COMP_CHOOSERS
          tag for xmlui to show choosers
static String COMP_COMPONENT_CHOOSERS
          The identifier of the choosers component
static String COMP_COMPONENT_GROUP
          The identifier of the group component
static String COMP_COMPONENT_HTML
          The identifier for html
static String COMP_COMPONENT_SKIN
          The identifier for skins
static String COMP_DATASELECTOR
          The identifier of the data selector component
static String COMP_DATATREE
          Xml tag name for datatree
static String COMP_FAVORITESBAR
          The identifier of the toolbar component
static String COMP_GLOBEVIEW
          Xml tag name for map view manager
static String COMP_HELP
          Help tag for xmlui
static String COMP_MAPVIEW
          Xml tag name for map view manager
static String COMP_MEMORYMONITOR
          The identifier of the toolbar component
static String COMP_MENUBAR
          The identifier of the menubar component
static String COMP_MESSAGELABEL
          Xml tag name for messagelabel
static String COMP_MESSAGELOGGER
          Xml tag name for messagelogger
static String COMP_PROGRESSBAR
          The identifier of the progress bar
static String COMP_READINGLABEL
          The identifier of the wait label
static String COMP_STATUSBAR
          Xml tag name for status label
static String COMP_STREAMINGLABEL
          The identifier of the streaming indicator
static String COMP_TOOLBAR
          The identifier of the toolbar component
static String COMP_TRANSECTVIEW
          Xml tag name for map view manager
static String COMP_VIEW
          Xml tag name for any view manager
static String COMP_VIEWPANEL
          Xml tag name for the panel that holds all of the views
static String COMP_WAITLABEL
          The identifier of the wait label
static String FIELDTYPE_AREA
          type names for user data choices gui creation
static String FIELDTYPE_BOOLEAN
          type names for user data choices gui creation
static String FIELDTYPE_CHOICE
          type names for user data choices gui creation
static String FIELDTYPE_FILE
          type names for user data choices gui creation
static String FIELDTYPE_LOCATION
          type names for user data choices gui creation
static String FIELDTYPE_TEXT
          type names for user data choices gui creation
static ImageIcon ICON_LOCK
          The icon used to show locked legend components
static ImageIcon ICON_REMOVE
          Icon used to remove displays
static ImageIcon ICON_UNLOCK
          The icon used to show unlocked legend components
protected  IdvWindow lastActiveFrame
          Keep track of the last window that the user has moused in We do this so when we are adding a DisplayControl into one of the main windows we add it into the last active window.
static String MENU_DATA
          The identifier of the "Data" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).
static String MENU_DELETEHISTORY
          The identifier of the "Deletehistory" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).
static String MENU_DELETEVIEWS
          Menu id in the menu xml for the delete views menu
static String MENU_DISPLAYS
          The identifier of the "Displays" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).
static String MENU_EDITFORMULAS
          the edit formulas menu
static String MENU_HELP
          Help menu
static String MENU_HISTORY
          The identifier of the "History" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).
static String MENU_LOCATIONS
          identifier for locations menu
static String MENU_MAPS
          identifier for maps menu
static String MENU_NEWDISPLAY
          Id of the "New Display" menu item for the file menu
static String MENU_NEWVIEWS
          The identifier of the "New views" menu item held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).
static String MENU_PUBLISH
          The identifier of the "Data" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).
static String MENU_PUBLISH_CONFIG
          Menu id in the menu xml for the publis/configure menu
static String MENU_SPECIAL
          identifier for special menu
static String MENU_VIEW
          ID for the View menu
static String MENU_WINDOWS
          id for the windows menu
static String PREF_LightWeightPopupEnabled
          light weight popup
static String PROP_HELP_EMAIL
          property for support form
static String PROP_HELP_NAME
          property for support form
static String PROP_HELP_ORG
          property for support form
static String PROP_SUPPORT_MESSAGE
          property for support form
static String PROP_SUPPORT_PACKAGE
          property for support form
static long startTime
          For timing debugs
static String TAG_ACTION
          Xml tag for the actions resource
static long timeSinceLastWait
          For timing debugs
 
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
IdvUIManager(IntegratedDataViewer idv)
          Create me with the IDV
 
Method Summary
 void about()
          Popup the about dialog.
 void addChoicesToMenu(DataSource dataSource, JMenu dataSourceMenu, JMenu dataMenu)
          Add the menu items for dealing with the DataChoices from the given dataSource into the given menu.
 void addDataHolderState(Hashtable data)
          Add any UI state concerning the data holders (e.g., window size) to the bundle.
 void addDataSource(DataSource dataSource)
          Tell the data source holders of the change.
 void addDataSourceHolder(DataSourceHolder holder)
          Add the given data source holder to the list of data source holders
 DataControlDialog addDCD(DataControlDialog dcd)
          Adds the given DataControlDialog to the dcdWindows list.
 void addDisplayControl(DisplayControl control)
          Notify the data source holders of a new display control.
 void addStateToBundle(Hashtable data)
          Add any UI state to the bundle.
 void addStationDisplay(NamedStationTable stationTable, ControlDescriptor cd)
          Create the station table display for the given station table
 void addToolbarPreferences(IdvPreferenceManager preferenceManager)
          Create the toolbar preference panel
 void addViewMenuItems(DisplayControl control, List items)
          Gets called by the display controls.
 void applyDataHolderState(Hashtable misc)
          misc contains state that was from a bundle.
 void captureImage(String filename)
          Deprecated. Use ImageGenerator.captureImage
 void captureMovie(String filename)
          Deprecated. Use ImageGenerator.captureMovie
 void changeState(DataSource dataSource)
          Notify the data source of a change in state
 boolean checkHaiku(String action)
          Just some haiku stuff
 void checkToolbarVisibility()
          Check and toggle the toolbar visibility
 void clearWaitCursor()
          Helper method to clear any outstanding wait cursor calls.
 void closeCurrentWindow()
          Close the currently active window.
 void closeHelpTips()
          If created, close the HelpTipDialog window.
 void createDataChoiceMenuItem(DataChoice choice, JMenu parentMenu, JMenu dataMenu)
          Create the menu items for dealing with the given data choice
 DataSelector createDataSelector()
          Create a DataSelector window.
 DataSelector createDataSelector(boolean inOwnWindow)
          Create a DataSelector window.
 DataSelector createDataSelector(boolean horizontalOrientation, boolean inOwnWindow)
          Create the data selector
 DataTree createDataTree()
          Create a DataTree object that is not in its own window
 DataTree createDataTree(boolean inOwnWindow)
          Create a DataTree object.
 DataTree createDataTreeWindow()
          Create a DataTree object that is in its own window
 void createInitialDataSelector()
          Deprecated. not used
 IdvWindow createNewWindow()
          Create a new window containing a new MapViewManager
 IdvWindow createNewWindow(List viewManagers)
          Create a new IdvWindow for the given viewManager.
 IdvWindow createNewWindow(List viewManagers, boolean notifyCollab)
          Create a new IdvWindow for the given viewManager.
 IdvWindow createNewWindow(List viewManagers, boolean notifyCollab, String skinPath, Element skinRoot)
          Create a new IdvWindow
 IdvWindow createNewWindow(List viewManagers, boolean notifyCollab, String title, String skinPath, Element root)
          Create a new window
 IdvWindow createNewWindow(List viewManagers, boolean notifyCollab, String title, String skinPath, Element skinRoot, boolean show, WindowInfo windowInfo)
          Create a new window
 IdvWindow createNewWindow(List viewManagers, String skinPath)
          Create a new IdvWindow with the lsit of ViewManager-s and the xml skin.
 IdvWindow createNewWindow(List viewManagers, String skinPath, String windowTitle, WindowInfo windowInfo)
          Create a new IdvWindow with the lsit of ViewManager-s and the xml skin.
 boolean dataSelectorToFront()
          If there is a data selector window around then show it.
 void dataSelectorToFrontIfOk()
          Deprecated. Moving away from hard-coded windows
 void dataSourceChanged(DataSource source)
          Tell the data source holders of the change.
 void dataSourceTimeChanged(DataSource source)
          Tell the data source holders of the change.
 void dataTreeClick(DataTree dataTree, MouseEvent event)
          The data tree was clicked.
 void deleteHistoryMenuSelected(JMenu fileMenu)
          Fill in the delete history menu
 void deleteKeyPressed(DataTree dataTree)
          Handle when the delete key is pressed in the data tree
 void displayControlChanged(DisplayControl displayControl)
          The display changed
 void displayControlsChanged()
          Called by the IDV when there has been a change to the display controls.
 void displayTemplatesChanged()
          Use this to notify when any of the display templates changed.
 void disposeAllWindows()
          Dispose of all Windows
 void doBasicInitialization()
          Do basic initialization
 void doMakeBasicWindows()
          Create the basic windows.
 JPanel doMakeControlButtons(boolean vertical)
          Creates the icon buttons for creating display controls
 JMenu doMakeDataChoiceMenu(DataChoice dataChoice)
          Make the menu for the given data choice
 List doMakeDataChoiceMenuItems(DataChoice dataChoice, boolean isUserFormula, boolean showAll)
          Make the menu items for the given data choice
 List doMakeDataChoiceMenus(DataChoice dataChoice)
          Make the menu items for the given data choice
 List doMakeDataSourceMenuItems(DataSource dataSource, Component src)
          Return the list of menu items to use when the user has clicked on a DataSource.
 JComponent doMakeDefaultContents(IdvWindow window, ViewManager viewManager)
          If we don't have a UI skin then this method is called to create the window contents
protected  IdvXmlUi doMakeIdvXmlUi(IdvWindow window, List viewManagers, Element skinRoot)
          Factory method to create an xmlui
 void doMakeInitialGui()
          Create the first display window
 JMenuBar doMakeMenuBar()
          Make the menu bar and menus for the given IdvWindow.
 JMenuBar doMakeMenuBar(IdvWindow idvWindow)
          Make the menu bar and menus for the given IdvWindow.
static JTextField doMakeParamField(String delimiter, boolean includeAliases)
          Make a JTextField that is for entering a parameter name.
 RovingProgress doMakeRovingProgressBar()
          Make the roving progress bar
 JPanel doMakeStatusBar(IdvWindow window)
          Make the status bar for the window.
protected  JComponent doMakeToolbar()
          Make the toolbar
protected  ViewPanel doMakeViewPanel()
          Factory method for making the ViewPanel
 void editDisplaySettings()
          Show the modal display settings dialog
 void editFormulasMenuSelected(JMenu menu)
          Add in the dynamic menu for editing formulas
 boolean embedDataChooserInDashboard()
          Should we embed the chooser in the dashboard
 boolean embedFieldSelectorInDashboard()
          Should we embed the selector in the dashboard
 boolean embedLegendInDashboard()
          Should we embed the legends in the dashboard
 boolean embedQuickLinksInDashboard()
          Should we embed the quick links in the dashboard
 void favoriteBundlesChanged()
          Use this to notify when any of the favorite bundles changed.
 Object findComponent(String id)
          Find the component that is in an IdvWindow with the id
protected  IdvWindow findWindowThatMatches(List currentWindows, WindowInfo windowInfo)
          Find the window that matches the window info
 String getAction(String id)
          Get the action action for the given action id
 String getActionAttr(String id, String attr)
          Get the given named attribute from the xml element that represents the action id
 String getActionDescription(String id)
          Get the description for the given action
 String getActionImage(String id)
          Get the image for the given action
 Element getActionNode(String id)
          Find the xml element for the given action
 List getActions()
          Get the list of (String) action ids.
 void getComponentGroupMenuItems(IdvComponentGroup group, List items)
          Get component group items
 List getComponentGroups()
          Get the component groups
 List getComponents()
          Get all components in all windows
 List getDataSourceHolders()
          Get the list of DataSource holders
 JFrame getFrame()
          If there is a lastActiveFrame then return that.
 List getMapLocations()
          Get the map locations
 Hashtable getMenuIds()
          Get the map of menu ids
static List getParamsMenuItems(JTextComponent fld, String delimiter, boolean includeAliases)
          A utility method to make a list of menu items of the current parameters and the aliases.
 GraphicsDevice getScreen(Point p)
          return the screen containing the point, null if none do
protected  boolean getShowControlsInTab()
          Do we do control tabs
 String getSkinHtml()
          Get the skin's HTML
 List getStandAloneControlDescriptors()
          Add the stand alone displays into the display menu
 Border getStatusBorder()
          Get the border used for the status bar
 StringBuffer getSystemInfo()
          Get the system info
 Element getToolbarRoot()
          Get the root of the toolbar xml
 JComponent getToolbarUI()
          Create a gui component of the toolbar
protected  String getViewManagerTabLabel(ViewManager viewManager, JTabbedPane tabs)
          Create the tab label for the embedded legend tabs
 ViewPanel getViewPanel()
          get the view panel, the one that holds the displays.
 int getWaitCursorCount()
          Return the number of open wait cursor calls
 List getWindowGroup(Object group)
          This gets all of the objects that are associated with the given group for all active windows.
 List getWindowsToPersist()
          Get the list of IdvWindows that should be saved in a bundle
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
 boolean handleSideLegend(ViewManager viewManager, JComponent sideLegend)
          noop
 void handleWindowActivated(IdvWindow window)
          Handle when the window is activated.
 boolean haveBasicWindow()
          Do we have a basic window
 void historyMenuSelected(JMenu fileMenu)
          User just clicked on the file-history menu.
 void init()
          Called by the IDV when its initialization is done.
 void initDataSourceHolder(DataSourceHolder holder, boolean inWindow)
          Add the set of data sources to the given holder.
 void initDataTree(DataTree dataTree)
          When a new DataTree is created this method is called.
 void initDone()
          Called by the IDV when its initialization is done.
 void initHelpTips(boolean checkPrefs)
          Create (if null) and show the HelpTipDialog.
protected  void initializeDisplayMenu(JMenu displayMenu)
          Add in the menu items for the given display menu
protected  void initializeViewMenu(JMenu viewMenu)
          Add in the menu items for the given view menu
 void initSplash()
          Create the splash screen if needed
 boolean isAction(String id)
          Is the given id an action.
 boolean isMac()
          Is this running on a Mac?
 void loadLookAndFeel()
          Load in the look and feel
 void loadSkinByIndex(int skinIndex)
          Load the skin by index
 List makeActionMenu(Object object, String method, boolean makeCall)
          Make the menu of actions
 List makeCenterMenus(ActionListener listener)
          Make menus for centering
 void makeDeleteViewsMenu(JMenu menu)
          This adds to the given menu a set of MenuItems, one for each saved ViewManager, for deleting the selected saved ViewManager.
 List makeSkinMenuItems(ActionListener listener, boolean onlyUI, boolean onlyEmbedded)
          Make the skin menu items
 void makeViewStateMenu(JMenu menu)
          This adds to the given menu a set of MenuItems, one for each saved viewmanager in the vmState list.
 void makeViewStateMenu(JMenu menu, ViewManager vm)
          This adds to the given menu a set of MenuItems, one for each saved viewmanager in the vmState list.
protected  void makeWindowMenu(IdvWindow window, JMenu menu)
          Make the window menu
 void makeWindowsMenu(JMenu menu, IdvWindow idvWindow)
          Make the windows menu.
 void popupCenterMenu(JComponent near, LatLonWidget latLonWidget)
          Popup a centering menu
 void processBundle(SavedBundle bundle)
          Pass through to the idv to load in the given bundle
protected  void processBundleMenu(JMenu displayMenu, int bundleType)
          Create the bundle menu for the given list of bundles
 void processDialog(DataControlDialog dcd)
          Handle (polymorphically) the DataControlDialog.
protected  void processInstanceMenu(JMenu displayMenu)
          Add the instances into the display menu
protected  void processMapMenu(JMenu displayMenu, boolean makeNew)
          Add the map menu into the display menu
protected  void processStandAloneMenu(JMenu displayMenu, boolean makeNew)
          Add the stand alone displays into the display menu
protected  void processStationMenu(JMenu displayMenu, boolean makeNew)
          Add the station menu into the display menu
 void reloadToolbarResources()
          Reload the toolbar xml resources
 void removeAllDataSources()
          Remove all data sources from the data source holders.
 void removeDataSource(DataSource dataSource)
          Remove the data source the data source holders.
 void removeDataSourceHolder(DataSourceHolder holder)
          Remove the given data tree from the list of data trees
 void removeDCD(DataControlDialog dcd)
          Removes the given DataControlDialog from the dcdWindows list.
 void removeDisplayControl(DisplayControl control)
          Notify the data source holders of a removed display control.
 void removeWindow(IdvWindow window)
          Remove the window from the list of windows
 void resetLastActiveViewManager()
          Update the last active view manager.
 DataChoice selectDataChoice(ControlDescriptor descriptor)
          Popup a DataTreeDialog to let the user select a DataChoice that the given control descriptor is applicable to.
 List selectDataChoices(List operands)
          Popup a dialog containing a DataTree for each operand in the given operands list Return a List of DataChoice's the user selects or null if they canceled.
 List selectUserChoices(String msg, List userOperands)
          Popup a JTextField containing dialog that allows the user to enter text values, one for each name in the userChoices List.
 void setAlias(DataSource dataSource)
          This prompts the user for the alias name for the given dataSource and sets the alias on the data source.
 void setDateFormat()
          Set the date format from the preferences
 void showAllWindows()
          Run through all windows and call show
 boolean showBasicWindow(boolean createThemIfNotThere)
          This tries to show one of the main gui windows
 void showBundleDialog()
          Popup the favorites manage dialog
 void showBundleDialog(int bundleType)
          Popup the dialog that edits the list of bundles
 void showControlDialog(DataTree dataTree, MouseEvent event)
          Create and show a DataControlDialog for the DataChoice in the DataTree at the given mouse x and y (if there is a data choice there).
 void showDashboard()
          This tries to show one of the main gui windows
 boolean showDataSelector()
          Show data selector.
 void showDataSourceDetails(DataSource dataSource)
          Show the html description of the given data source.
 void showDataTreeMenu(DataTree dataTree, MouseEvent event, boolean showFullMenu)
          Popup a menu for a datachoice object over the tree component at (x,y)
 void showHelp(String target)
          Show the help identified by the given target
 void showHelp(String url, String target)
          Show the javahelp with the given base url and help target
 void showHelpTips()
          Create (if null) and show the HelpTipDialog
 void showMenu(String s)
          This automatically pops up the menu identified by the colon delimited string of menu names
 void showMenuInThread(String s)
          This automatically pops up the menu identified by the colon delimited string of menu names
 void showNormalCursor()
          Helper method to show the "normal" cursor.
 void showOrCreateDataSelector()
          Deprecated. Moving away from hard-coded windows
static void showParamsPopup(JTextComponent fld, MouseEvent e, String delimiter, boolean includeAliases)
          A utility method to popup a menu listing the current parameters and the aliases.
 void showResults(DataSourceResults results)
          Display any errors that are contained in the given results.
 void showSupportForm()
          Show the support request form
 void showSupportForm(String description, String stackTrace)
          Show the support request form
 void showSupportForm(String description, String stackTrace, JDialog dialog)
          Show the support request form
 void showTimeSelection(DataSource dataSource, Component src)
          Deprecated. Don't use this anymore
 void showWaitCursor()
          Increment the waitCursorCount and set the wait cursor on the last active frame
 void showWindow(DisplayControl control, IdvWindow window)
          Implementation of the ControlContext method.
 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)
 void startReading(Object source)
          Start reading
 void stopReading(Object source)
          Stop reading
 String stripAction(String id)
          Strip any "action:& string from the beginning.
 void toFrontMainWindows()
          Run through all windows and call show
 void unpersistWindowInfo(List windows, List newViewManagers, boolean okToMerge, boolean fromCollab, boolean didRemoveAll)
          Handle the list of IdvWindow-s from the bundle
 void updateHistoryLinks()
          Update history links
 void updateIconBar()
          Update the icon toolbar in all windows
 void viewManagerActiveChanged(ViewManager viewManager)
          The active state of the view manager has changed
 void viewManagerAdded(ViewManager viewManager)
          Be notified of the addition of a VM
 void viewManagerChanged(ViewManager viewManager)
          Called when the ViewManager is changed.
 void viewManagerDestroyed(ViewManager viewManager)
          Called when the ViewManager is removed.
 
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
actionPerformed, 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

FIELDTYPE_TEXT

public static final String FIELDTYPE_TEXT
type names for user data choices gui creation

See Also:
Constant Field Values

FIELDTYPE_BOOLEAN

public static final String FIELDTYPE_BOOLEAN
type names for user data choices gui creation

See Also:
Constant Field Values

FIELDTYPE_CHOICE

public static final String FIELDTYPE_CHOICE
type names for user data choices gui creation

See Also:
Constant Field Values

FIELDTYPE_FILE

public static final String FIELDTYPE_FILE
type names for user data choices gui creation

See Also:
Constant Field Values

FIELDTYPE_LOCATION

public static final String FIELDTYPE_LOCATION
type names for user data choices gui creation

See Also:
Constant Field Values

FIELDTYPE_AREA

public static final String FIELDTYPE_AREA
type names for user data choices gui creation

See Also:
Constant Field Values

ICON_LOCK

public static ImageIcon ICON_LOCK
The icon used to show locked legend components


ICON_UNLOCK

public static ImageIcon ICON_UNLOCK
The icon used to show unlocked legend components


ICON_REMOVE

public static ImageIcon ICON_REMOVE
Icon used to remove displays


PROP_SUPPORT_PACKAGE

public static final String PROP_SUPPORT_PACKAGE
property for support form

See Also:
Constant Field Values

PROP_SUPPORT_MESSAGE

public static final String PROP_SUPPORT_MESSAGE
property for support form

See Also:
Constant Field Values

PROP_HELP_EMAIL

public static final String PROP_HELP_EMAIL
property for support form

See Also:
Constant Field Values

PROP_HELP_ORG

public static final String PROP_HELP_ORG
property for support form

See Also:
Constant Field Values

PROP_HELP_NAME

public static final String PROP_HELP_NAME
property for support form

See Also:
Constant Field Values

TAG_ACTION

public static final String TAG_ACTION
Xml tag for the actions resource

See Also:
Constant Field Values

ATTR_ID

public static final String ATTR_ID
Xml attribute name for the in the actions resource

See Also:
Constant Field Values

ATTR_MAINWINDOW

public static final String ATTR_MAINWINDOW
Xml attribute name for skin mainwindow attribute

See Also:
Constant Field Values

ATTR_DESCRIPTION

public static final String ATTR_DESCRIPTION
Xml attribute name for the description in the actions resource

See Also:
Constant Field Values

ATTR_GROUP

public static final String ATTR_GROUP
Xml attribute name for the group in the actions resource

See Also:
Constant Field Values

ATTR_ACTION

public static final String ATTR_ACTION
Xml attribute name for the action in the actions resource

See Also:
Constant Field Values

ATTR_IMAGE

public static final String ATTR_IMAGE
Xml attribute name for the image in the actions resource

See Also:
Constant Field Values

COMP_FAVORITESBAR

public static final String COMP_FAVORITESBAR
The identifier of the toolbar component

See Also:
Constant Field Values

COMP_HELP

public static final String COMP_HELP
Help tag for xmlui

See Also:
Constant Field Values

COMP_MENUBAR

public static final String COMP_MENUBAR
The identifier of the menubar component

See Also:
Constant Field Values

COMP_TOOLBAR

public static final String COMP_TOOLBAR
The identifier of the toolbar component

See Also:
Constant Field Values

COMP_DATASELECTOR

public static final String COMP_DATASELECTOR
The identifier of the data selector component

See Also:
Constant Field Values

COMP_COMPONENT_GROUP

public static final String COMP_COMPONENT_GROUP
The identifier of the group component

See Also:
Constant Field Values

COMP_COMPONENT_CHOOSERS

public static final String COMP_COMPONENT_CHOOSERS
The identifier of the choosers component

See Also:
Constant Field Values

COMP_COMPONENT_SKIN

public static final String COMP_COMPONENT_SKIN
The identifier for skins

See Also:
Constant Field Values

COMP_COMPONENT_HTML

public static final String COMP_COMPONENT_HTML
The identifier for html

See Also:
Constant Field Values

COMP_MEMORYMONITOR

public static final String COMP_MEMORYMONITOR
The identifier of the toolbar component

See Also:
Constant Field Values

COMP_WAITLABEL

public static final String COMP_WAITLABEL
The identifier of the wait label

See Also:
Constant Field Values

COMP_STREAMINGLABEL

public static final String COMP_STREAMINGLABEL
The identifier of the streaming indicator

See Also:
Constant Field Values

COMP_READINGLABEL

public static final String COMP_READINGLABEL
The identifier of the wait label

See Also:
Constant Field Values

COMP_PROGRESSBAR

public static final String COMP_PROGRESSBAR
The identifier of the progress bar

See Also:
Constant Field Values

COMP_DATATREE

public static final String COMP_DATATREE
Xml tag name for datatree

See Also:
Constant Field Values

COMP_VIEWPANEL

public static final String COMP_VIEWPANEL
Xml tag name for the panel that holds all of the views

See Also:
Constant Field Values

COMP_MESSAGELOGGER

public static final String COMP_MESSAGELOGGER
Xml tag name for messagelogger

See Also:
Constant Field Values

COMP_MESSAGELABEL

public static final String COMP_MESSAGELABEL
Xml tag name for messagelabel

See Also:
Constant Field Values

COMP_MAPVIEW

public static final String COMP_MAPVIEW
Xml tag name for map view manager

See Also:
Constant Field Values

COMP_GLOBEVIEW

public static final String COMP_GLOBEVIEW
Xml tag name for map view manager

See Also:
Constant Field Values

COMP_TRANSECTVIEW

public static final String COMP_TRANSECTVIEW
Xml tag name for map view manager

See Also:
Constant Field Values

COMP_VIEW

public static final String COMP_VIEW
Xml tag name for any view manager

See Also:
Constant Field Values

COMP_STATUSBAR

public static final String COMP_STATUSBAR
Xml tag name for status label

See Also:
Constant Field Values

COMP_CHOOSER

public static final String COMP_CHOOSER
Xml tag name for the chooser tag. We overwrite the XmlUi component factory method to handle these special tags

See Also:
Constant Field Values

COMP_CHOOSERS

public static final String COMP_CHOOSERS
tag for xmlui to show choosers

See Also:
Constant Field Values

MENU_DATA

public static final String MENU_DATA
The identifier of the "Data" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml). We use this identifier to find the actual JMenu that is created from the xml so we can dink with it.

See Also:
Constant Field Values

MENU_MAPS

public static final String MENU_MAPS
identifier for maps menu

See Also:
Constant Field Values

MENU_SPECIAL

public static final String MENU_SPECIAL
identifier for special menu

See Also:
Constant Field Values

MENU_LOCATIONS

public static final String MENU_LOCATIONS
identifier for locations menu

See Also:
Constant Field Values

MENU_HELP

public static final String MENU_HELP
Help menu

See Also:
Constant Field Values

MENU_VIEW

public static final String MENU_VIEW
ID for the View menu

See Also:
Constant Field Values

MENU_DELETEVIEWS

public static final String MENU_DELETEVIEWS
Menu id in the menu xml for the delete views menu

See Also:
Constant Field Values

MENU_EDITFORMULAS

public static final String MENU_EDITFORMULAS
the edit formulas menu

See Also:
Constant Field Values

MENU_NEWVIEWS

public static final String MENU_NEWVIEWS
The identifier of the "New views" menu item held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml). We use this identifier to find the actual JMenuItem that is created from the xml so we can dis/enable it.

See Also:
Constant Field Values

MENU_WINDOWS

public static final String MENU_WINDOWS
id for the windows menu

See Also:
Constant Field Values

MENU_PUBLISH

public static final String MENU_PUBLISH
The identifier of the "Data" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml). We use this identifier to find the actual JMenu that is created from the xml so we can dink with it.

See Also:
Constant Field Values

MENU_PUBLISH_CONFIG

public static final String MENU_PUBLISH_CONFIG
Menu id in the menu xml for the publis/configure menu

See Also:
Constant Field Values

MENU_HISTORY

public static final String MENU_HISTORY
The identifier of the "History" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).

See Also:
Constant Field Values

MENU_DELETEHISTORY

public static final String MENU_DELETEHISTORY
The identifier of the "Deletehistory" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).

See Also:
Constant Field Values

MENU_DISPLAYS

public static final String MENU_DISPLAYS
The identifier of the "Displays" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml). We use this identifier to find the actual JMenu that is created from the xml so we can dink with it.

See Also:
Constant Field Values

MENU_NEWDISPLAY

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

See Also:
Constant Field Values

lastActiveFrame

protected IdvWindow lastActiveFrame
Keep track of the last window that the user has moused in We do this so when we are adding a DisplayControl into one of the main windows we add it into the last active window.


PREF_LightWeightPopupEnabled

public static final String PREF_LightWeightPopupEnabled
light weight popup

See Also:
Constant Field Values

timeSinceLastWait

public static long timeSinceLastWait
For timing debugs


startTime

public static long startTime
For timing debugs

Constructor Detail

IdvUIManager

public IdvUIManager(IntegratedDataViewer idv)
Create me with the IDV

Parameters:
idv - The IDV
Method Detail

loadLookAndFeel

public void loadLookAndFeel()
Load in the look and feel


init

public void init()
Called by the IDV when its initialization is done. This method closes the splash window and opens any windows that need to be open,


doMakeInitialGui

public void doMakeInitialGui()
Create the first display window


doMakeBasicWindows

public void doMakeBasicWindows()
Create the basic windows. This gets called at start up and if the user presses "show dashboard" and there isn't any windows available


findComponent

public Object findComponent(String id)
Find the component that is in an IdvWindow with the id

Parameters:
id - id
Returns:
component

getWindowGroup

public List getWindowGroup(Object group)
This gets all of the objects that are associated with the given group for all active windows. We use this for finding the active choosers.

Parameters:
group - The group id
Returns:
List of objects in the given group

getComponents

public List getComponents()
Get all components in all windows

Returns:
components

getScreen

public GraphicsDevice getScreen(Point p)
return the screen containing the point, null if none do

Parameters:
p - point in the display
Returns:
the GraphicsDevice for that point

closeCurrentWindow

public void closeCurrentWindow()
Close the currently active window.


getViewPanel

public ViewPanel getViewPanel()
get the view panel, the one that holds the displays. If it doesn't exist then create it

Returns:
ViewPanel

doMakeViewPanel

protected ViewPanel doMakeViewPanel()
Factory method for making the ViewPanel

Returns:
The view panel

handleSideLegend

public boolean handleSideLegend(ViewManager viewManager,
                                JComponent sideLegend)
noop

Parameters:
viewManager - The view manager
sideLegend - The side legend
Returns:
true if this UIManager will embed the legend. False if the ViewManager should deal with the legend as usual.

viewManagerAdded

public void viewManagerAdded(ViewManager viewManager)
Be notified of the addition of a VM

Parameters:
viewManager - The VM

viewManagerDestroyed

public void viewManagerDestroyed(ViewManager viewManager)
Called when the ViewManager is removed. If we are showing legends in a window then we remove the tab

Parameters:
viewManager - The ViewManager that was destroyed

viewManagerActiveChanged

public void viewManagerActiveChanged(ViewManager viewManager)
The active state of the view manager has changed

Parameters:
viewManager - The view manager

viewManagerChanged

public void viewManagerChanged(ViewManager viewManager)
Called when the ViewManager is changed. If we are showing legends in a window then we update the tab label

Parameters:
viewManager - The ViewManager that was changed

getViewManagerTabLabel

protected String getViewManagerTabLabel(ViewManager viewManager,
                                        JTabbedPane tabs)
Create the tab label for the embedded legend tabs

Parameters:
viewManager - View manager in the tab
tabs - The tabs
Returns:
Label to use

initDone

public void initDone()
Called by the IDV when its initialization is done. This method closes the splash window and opens any windows that need to be open,


makeActionMenu

public List makeActionMenu(Object object,
                           String method,
                           boolean makeCall)
Make the menu of actions

Parameters:
object - object to call
method - method to call
makeCall - If true we call idv.handleAction
Returns:
List of menus

isAction

public boolean isAction(String id)
Is the given id an action. Does it start with action:

Parameters:
id - The id
Returns:
Is it an action

stripAction

public String stripAction(String id)
Strip any "action:& string from the beginning.

Parameters:
id - The action id
Returns:
The id stripped of any action:

getActionNode

public Element getActionNode(String id)
Find the xml element for the given action

Parameters:
id - The action id. May start with "action:"
Returns:
The xml element that describes the action

getActionAttr

public String getActionAttr(String id,
                            String attr)
Get the given named attribute from the xml element that represents the action id

Parameters:
id - The action
attr - The attr name
Returns:
The attr value or null if none found

getAction

public String getAction(String id)
Get the action action for the given action id

Parameters:
id - The action id
Returns:
The aciton to invoke_

getActionImage

public String getActionImage(String id)
Get the image for the given action

Parameters:
id - The action id
Returns:
The image

getActionDescription

public String getActionDescription(String id)
Get the description for the given action

Parameters:
id - The action id
Returns:
The description

getActions

public List getActions()
Get the list of (String) action ids.

Returns:
List of actions

showWindow

public void showWindow(DisplayControl control,
                       IdvWindow window)
Implementation of the ControlContext method. If the idv has been initialized then this simply shows the window. If not yet fully initialized then we place this window in a list of windows to be displayed after initialization is done.

Parameters:
control - The new DisplayControl
window - Its window

isMac

public boolean isMac()
Is this running on a Mac?

Returns:
true if running on Mac

initSplash

public void initSplash()
Create the splash screen if needed


getWaitCursorCount

public int getWaitCursorCount()
Return the number of open wait cursor calls

Returns:
number of wait cursor calls pending

showWaitCursor

public void showWaitCursor()
Increment the waitCursorCount and set the wait cursor on the last active frame

Overrides:
showWaitCursor in class IdvManager

showNormalCursor

public void showNormalCursor()
Helper method to show the "normal" cursor. Actually will decrement the waitCursorCount and only show the normal cursor when waitCursorCount <= 0. This enables a bunch of code to show the wait cursor and keep showing it until all is done.

Overrides:
showNormalCursor in class IdvManager

clearWaitCursor

public void clearWaitCursor()
Helper method to clear any outstanding wait cursor calls.


startReading

public void startReading(Object source)
Start reading

Parameters:
source - the object to read

stopReading

public void stopReading(Object source)
Stop reading

Parameters:
source - the object to stop reading

showAllWindows

public void showAllWindows()
Run through all windows and call show


toFrontMainWindows

public void toFrontMainWindows()
Run through all windows and call show


resetLastActiveViewManager

public void resetLastActiveViewManager()
Update the last active view manager.


handleWindowActivated

public void handleWindowActivated(IdvWindow window)
Handle when the window is activated. Set the last active view manager

Parameters:
window - The window

removeWindow

public void removeWindow(IdvWindow window)
Remove the window from the list of windows

Parameters:
window - The window to remove

updateHistoryLinks

public void updateHistoryLinks()
Update history links


addDCD

public DataControlDialog addDCD(DataControlDialog dcd)
Adds the given DataControlDialog to the dcdWindows list. We keep this list around so we can set the cursor on a showWaitCursor call.

Parameters:
dcd - The dialog
Returns:
The dcd argument

removeDCD

public void removeDCD(DataControlDialog dcd)
Removes the given DataControlDialog from the dcdWindows list. We keep this list around so we can set the cursor on a showWaitCursor call.

Parameters:
dcd - The dialog

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.

Parameters:
dcd - The dialog

handleMenuSelected

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

Parameters:
id - Id of the menu
menu - The menu
idvWindow - the IDV window

handleMenuDeSelected

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

Parameters:
id - Id of the menu
menu - The menu
idvWindow - the IDV window

getMenuIds

public Hashtable getMenuIds()
Get the map of menu ids

Returns:
menus

doMakeMenuBar

public JMenuBar doMakeMenuBar()
Make the menu bar and menus for the given IdvWindow. Use the set of xml menu files defined by the menubarResources member

Returns:
The menu bar we just created

doMakeMenuBar

public JMenuBar doMakeMenuBar(IdvWindow idvWindow)
Make the menu bar and menus for the given IdvWindow. Use the set of xml menu files defined by the menubarResources member

Parameters:
idvWindow - the IDV window
Returns:
The menu bar we just created

getComponentGroupMenuItems

public void getComponentGroupMenuItems(IdvComponentGroup group,
                                       List items)
Get component group items

Parameters:
group - the group
items - list of items

makeSkinMenuItems

public List makeSkinMenuItems(ActionListener listener,
                              boolean onlyUI,
                              boolean onlyEmbedded)
Make the skin menu items

Parameters:
listener - the listener for the menu
onlyUI - true if only in the UI
onlyEmbedded - true if only for embedded
Returns:
the list of menus

getSkinHtml

public String getSkinHtml()
Get the skin's HTML

Returns:
the skin's name

loadSkinByIndex

public void loadSkinByIndex(int skinIndex)
Load the skin by index

Parameters:
skinIndex - index for the skin

makeWindowsMenu

public void makeWindowsMenu(JMenu menu,
                            IdvWindow idvWindow)
Make the windows menu. This lists all of the current windows and allows the user to show them.

Parameters:
menu - windows menu
idvWindow - the IDV window

makeWindowMenu

protected void makeWindowMenu(IdvWindow window,
                              JMenu menu)
Make the window menu

Parameters:
window - the window
menu - the menu

makeViewStateMenu

public void makeViewStateMenu(JMenu menu)
This adds to the given menu a set of MenuItems, one for each saved viewmanager in the vmState list.

Parameters:
menu - The menu

makeViewStateMenu

public void makeViewStateMenu(JMenu menu,
                              ViewManager vm)
This adds to the given menu a set of MenuItems, one for each saved viewmanager in the vmState list. If the ViewManager parameter vm is non-null then the result of the selection will be to apply the selected ViewManager state to the given vm. Else a new window will be created with a new ViewManager.

Parameters:
menu - The menu
vm - The view manager

makeDeleteViewsMenu

public void makeDeleteViewsMenu(JMenu menu)
This adds to the given menu a set of MenuItems, one for each saved ViewManager, for deleting the selected saved ViewManager.

Parameters:
menu - The menu

editDisplaySettings

public void editDisplaySettings()
Show the modal display settings dialog


editFormulasMenuSelected

public void editFormulasMenuSelected(JMenu menu)
Add in the dynamic menu for editing formulas

Parameters:
menu - edit menu to add to

historyMenuSelected

public void historyMenuSelected(JMenu fileMenu)
User just clicked on the file-history menu. Add in the items

Parameters:
fileMenu - The menu to fill

deleteHistoryMenuSelected

public void deleteHistoryMenuSelected(JMenu fileMenu)
Fill in the delete history menu

Parameters:
fileMenu - the menu to fill

addChoicesToMenu

public void addChoicesToMenu(DataSource dataSource,
                             JMenu dataSourceMenu,
                             JMenu dataMenu)
Add the menu items for dealing with the DataChoices from the given dataSource into the given menu.

Parameters:
dataSource - The data source
dataSourceMenu - Its menu
dataMenu - The menu to hold the data choice items

createDataChoiceMenuItem

public void createDataChoiceMenuItem(DataChoice choice,
                                     JMenu parentMenu,
                                     JMenu dataMenu)
Create the menu items for dealing with the given data choice

Parameters:
choice - The data choice
parentMenu - The parent menu
dataMenu - Where to put the items

processBundle

public void processBundle(SavedBundle bundle)
Pass through to the idv to load in the given bundle

Parameters:
bundle - The bundle to create

processBundleMenu

protected void processBundleMenu(JMenu displayMenu,
                                 int bundleType)
Create the bundle menu for the given list of bundles

Parameters:
displayMenu - The menu to add the bundle menu into
bundleType - Is this for the favorites or the display templates

processMapMenu

protected void processMapMenu(JMenu displayMenu,
                              boolean makeNew)
Add the map menu into the display menu

Parameters:
displayMenu - The display menu
makeNew - if true, make a new menu

processStationMenu

protected void processStationMenu(JMenu displayMenu,
                                  boolean makeNew)
Add the station menu into the display menu

Parameters:
displayMenu - The display menu
makeNew - if true, make a new menu

getStandAloneControlDescriptors

public List getStandAloneControlDescriptors()
Add the stand alone displays into the display menu

Returns:
List of ControlDescriptor-s that can stand alone.

processStandAloneMenu

protected void processStandAloneMenu(JMenu displayMenu,
                                     boolean makeNew)
Add the stand alone displays into the display menu

Parameters:
displayMenu - The display menu
makeNew - if true, make a new menu

processInstanceMenu

protected void processInstanceMenu(JMenu displayMenu)
Add the instances into the display menu

Parameters:
displayMenu - The display menu

initializeViewMenu

protected void initializeViewMenu(JMenu viewMenu)
Add in the menu items for the given view menu

Parameters:
viewMenu - The view menu

initializeDisplayMenu

protected void initializeDisplayMenu(JMenu displayMenu)
Add in the menu items for the given display menu

Parameters:
displayMenu - The display menu

showBundleDialog

public void showBundleDialog()
Popup the favorites manage dialog


showBundleDialog

public void showBundleDialog(int bundleType)
Popup the dialog that edits the list of bundles

Parameters:
bundleType - What is the type of the bundle we are showing an edit dialog for

displayTemplatesChanged

public void displayTemplatesChanged()
Use this to notify when any of the display templates changed. This passes through the calls to the data source holders and recreates the display menus


favoriteBundlesChanged

public void favoriteBundlesChanged()
Use this to notify when any of the favorite bundles changed. This updates the toolbars and bundle trees


displayControlsChanged

public void displayControlsChanged()
Called by the IDV when there has been a change to the display controls.


displayControlChanged

public void displayControlChanged(DisplayControl displayControl)
The display changed

Parameters:
displayControl - display that changed

addStationDisplay

public void addStationDisplay(NamedStationTable stationTable,
                              ControlDescriptor cd)
Create the station table display for the given station table

Parameters:
stationTable - The station table
cd - The display control descriptor for the station location display

doMakeDataSourceMenuItems

public List doMakeDataSourceMenuItems(DataSource dataSource,
                                      Component src)
Return the list of menu items to use when the user has clicked on a DataSource.

Parameters:
dataSource - The data source
src - Where this menu pops up
Returns:
List of menu items for dealing with the given dataSource

changeState

public void changeState(DataSource dataSource)
Notify the data source of a change in state

Parameters:
dataSource - the data source to notify

setAlias

public void setAlias(DataSource dataSource)
This prompts the user for the alias name for the given dataSource and sets the alias on the data source.

Parameters:
dataSource - The data source to set an alias on

showDataSourceDetails

public void showDataSourceDetails(DataSource dataSource)
Show the html description of the given data source.

Parameters:
dataSource - The data source to show details for

showTimeSelection

public void showTimeSelection(DataSource dataSource,
                              Component src)
Deprecated. Don't use this anymore

Show the DataControlDialog for selecting times for the given dataSource

Parameters:
dataSource - The data source
src - Where to popup the dialog

doMakeDataChoiceMenu

public JMenu doMakeDataChoiceMenu(DataChoice dataChoice)
Make the menu for the given data choice

Parameters:
dataChoice - The data choice
Returns:
The menu

doMakeDataChoiceMenus

public List doMakeDataChoiceMenus(DataChoice dataChoice)
Make the menu items for the given data choice

Parameters:
dataChoice - The data choice
Returns:
A list of menu items

doMakeDataChoiceMenuItems

public List doMakeDataChoiceMenuItems(DataChoice dataChoice,
                                      boolean isUserFormula,
                                      boolean showAll)
Make the menu items for the given data choice

Parameters:
dataChoice - The data choice
isUserFormula - Is this data choice a user formula
showAll - If true then add in the items for creating applicable displays
Returns:
List of menu items

doMakeControlButtons

public JPanel doMakeControlButtons(boolean vertical)
Creates the icon buttons for creating display controls

Parameters:
vertical - Alignment is vertical
Returns:
Panel holding the icon buttons

showDataTreeMenu

public void showDataTreeMenu(DataTree dataTree,
                             MouseEvent event,
                             boolean showFullMenu)
Popup a menu for a datachoice object over the tree component at (x,y)

Parameters:
dataTree - The data tree to show a menu for
event - The click
showFullMenu - Should show the full menu

initHelpTips

public void initHelpTips(boolean checkPrefs)
Create (if null) and show the HelpTipDialog. If checkPrefs is true then only create the dialog if the PREF_HELPTIPSHOW preference is true.

Parameters:
checkPrefs - Should the user preferences be checked

closeHelpTips

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


showHelpTips

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


splashMsg

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

Parameters:
m - The message to show

splashClose

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


about

public void about()
Popup the about dialog. Show the title and the version.


deleteKeyPressed

public void deleteKeyPressed(DataTree dataTree)
Handle when the delete key is pressed in the data tree

Parameters:
dataTree - The data tree

dataTreeClick

public void dataTreeClick(DataTree dataTree,
                          MouseEvent event)
The data tree was clicked. Either show the data tree menu or popup the control dialog, depending on whether it was right click or a double click

Parameters:
dataTree - The DataTree that was clicked
event - The MouseEvent

showControlDialog

public void showControlDialog(DataTree dataTree,
                              MouseEvent event)
Create and show a DataControlDialog for the DataChoice in the DataTree at the given mouse x and y (if there is a data choice there).

Parameters:
dataTree - The DataTree
event - The MouseEvent

doMakeStatusBar

public JPanel doMakeStatusBar(IdvWindow window)
Make the status bar for the window. This contains a MemoryMonitor and a message label. This does not add the status bar to the frame though.

Parameters:
window - The window
Returns:
The status bar

doMakeRovingProgressBar

public RovingProgress doMakeRovingProgressBar()
Make the roving progress bar

Returns:
Roving progress bar

getStatusBorder

public Border getStatusBorder()
Get the border used for the status bar

Returns:
The border

getFrame

public JFrame getFrame()
If there is a lastActiveFrame then return that. Else return the first window in the list of windows

Overrides:
getFrame in class WindowHolder
Returns:
Some JFrame

doBasicInitialization

public void doBasicInitialization()
Do basic initialization


findWindowThatMatches

protected IdvWindow findWindowThatMatches(List currentWindows,
                                          WindowInfo windowInfo)
Find the window that matches the window info

Parameters:
currentWindows - list of windows
windowInfo - the info to search for
Returns:
the matching window or null

unpersistWindowInfo

public void unpersistWindowInfo(List windows,
                                List newViewManagers,
                                boolean okToMerge,
                                boolean fromCollab,
                                boolean didRemoveAll)
Handle the list of IdvWindow-s from the bundle

Parameters:
windows - The windows form the bundle.
newViewManagers - List of the new view managers. We remove any ones we init
okToMerge - true if okay to merge
fromCollab - From collaboration
didRemoveAll - true if remove all was done

disposeAllWindows

public void disposeAllWindows()
Dispose of all Windows


createNewWindow

public IdvWindow createNewWindow()
Create a new window containing a new MapViewManager

Returns:
The new window

createNewWindow

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

Parameters:
viewManagers - The view managers
Returns:
The new window

createNewWindow

public IdvWindow createNewWindow(List viewManagers,
                                 String skinPath)
Create a new IdvWindow with the lsit of ViewManager-s and the xml skin.

Parameters:
viewManagers - The view managers to put in the window.
skinPath - The skin
Returns:
The window

createNewWindow

public IdvWindow createNewWindow(List viewManagers,
                                 boolean notifyCollab)
Create a new IdvWindow for the given viewManager. Put the contents of the viewManager into the window

Parameters:
viewManagers - The view managers
notifyCollab - Should the CollabManager be notified
Returns:
The new window

createNewWindow

public IdvWindow createNewWindow(List viewManagers,
                                 boolean notifyCollab,
                                 String title,
                                 String skinPath,
                                 Element root)
Create a new window

Parameters:
viewManagers - the ViewManagers for the window
notifyCollab - true if we should notify collaborators
title - the window title
skinPath - the path tot he skin
root - the skin root element
Returns:
the window

createNewWindow

public IdvWindow createNewWindow(List viewManagers,
                                 String skinPath,
                                 String windowTitle,
                                 WindowInfo windowInfo)
Create a new IdvWindow with the lsit of ViewManager-s and the xml skin.

Parameters:
viewManagers - The view managers to put in the window.
skinPath - The skin
windowTitle - title
windowInfo - the WindowInfo
Returns:
The window

createNewWindow

public IdvWindow createNewWindow(List viewManagers,
                                 boolean notifyCollab,
                                 String skinPath,
                                 Element skinRoot)
Create a new IdvWindow

Parameters:
viewManagers - The view managers to put in the window.
notifyCollab - Should we tell the collab facility
skinPath - The skin. May be null.
skinRoot - Root of the skin xml. May be null.
Returns:
The window.

createNewWindow

public IdvWindow createNewWindow(List viewManagers,
                                 boolean notifyCollab,
                                 String title,
                                 String skinPath,
                                 Element skinRoot,
                                 boolean show,
                                 WindowInfo windowInfo)
Create a new window

Parameters:
viewManagers - The view managers to put in the window.
notifyCollab - Should we tell the collab facility
title - The title
skinPath - The skin. May be null.
skinRoot - Root of the skin xml. May be null.
show - If true show the window once created, otherwise leave it to the caller.
Returns:
The window.

getComponentGroups

public List getComponentGroups()
Get the component groups

Returns:
the List of groups

getWindowsToPersist

public List getWindowsToPersist()
Get the list of IdvWindows that should be saved in a bundle

Returns:
List of windows to persist

getToolbarUI

public JComponent getToolbarUI()
Create a gui component of the toolbar

Returns:
the toolbar

doMakeIdvXmlUi

protected IdvXmlUi doMakeIdvXmlUi(IdvWindow window,
                                  List viewManagers,
                                  Element skinRoot)
Factory method to create an xmlui

Parameters:
window - The window
viewManagers - The view manager
skinRoot - The skin xml
Returns:
The xmlui

doMakeToolbar

protected JComponent doMakeToolbar()
Make the toolbar

Returns:
toolbar

reloadToolbarResources

public void reloadToolbarResources()
Reload the toolbar xml resources


updateIconBar

public void updateIconBar()
Update the icon toolbar in all windows


checkToolbarVisibility

public void checkToolbarVisibility()
Check and toggle the toolbar visibility


doMakeDefaultContents

public JComponent doMakeDefaultContents(IdvWindow window,
                                        ViewManager viewManager)
If we don't have a UI skin then this method is called to create the window contents

Parameters:
window - The window
viewManager - The ViewManager being shown in the window
Returns:
The GUI contents

getToolbarRoot

public Element getToolbarRoot()
Get the root of the toolbar xml

Returns:
The toolbar xml root

showResults

public void showResults(DataSourceResults results)
Display any errors that are contained in the given results. The results are from one or more data source create calls.

Parameters:
results - The results to show

removeDataSourceHolder

public void removeDataSourceHolder(DataSourceHolder holder)
Remove the given data tree from the list of data trees

Parameters:
holder - The holder to remove

addDataSourceHolder

public void addDataSourceHolder(DataSourceHolder holder)
Add the given data source holder to the list of data source holders

Parameters:
holder - The holder to initialize

initDataSourceHolder

public void initDataSourceHolder(DataSourceHolder holder,
                                 boolean inWindow)
Add the set of data sources to the given holder. Put it in a window if inWindow is true.

Parameters:
holder - The holder to initialize
inWindow - Put the holder in a window?

addDisplayControl

public void addDisplayControl(DisplayControl control)
Notify the data source holders of a new display control. Redo any menus

Parameters:
control - The new control

showDashboard

public void showDashboard()
This tries to show one of the main gui windows


haveBasicWindow

public boolean haveBasicWindow()
Do we have a basic window

Returns:
true if the window is a basic window

showBasicWindow

public boolean showBasicWindow(boolean createThemIfNotThere)
This tries to show one of the main gui windows

Parameters:
createThemIfNotThere - If true then, if there isn't any non view containing windows then call doMakeBasicWindows()
Returns:
Were there any found

addViewMenuItems

public void addViewMenuItems(DisplayControl control,
                             List items)
Gets called by the display controls. We add the 'embed in tabs' menu items

Parameters:
control - The control
items - List of menu items

getShowControlsInTab

protected boolean getShowControlsInTab()
Do we do control tabs

Returns:
Do we do control tabs

removeDisplayControl

public void removeDisplayControl(DisplayControl control)
Notify the data source holders of a removed display control. Redo any menus

Parameters:
control - The removed control

removeAllDataSources

public void removeAllDataSources()
Remove all data sources from the data source holders. Update any menus.


removeDataSource

public void removeDataSource(DataSource dataSource)
Remove the data source the data source holders. Update the data menu in all menu bars.

Parameters:
dataSource - The removed data source

dataSourceChanged

public void dataSourceChanged(DataSource source)
Tell the data source holders of the change. Update any menus.

Parameters:
source - The data source that changed.

dataSourceTimeChanged

public void dataSourceTimeChanged(DataSource source)
Tell the data source holders of the change. Update any menus.

Parameters:
source - The data source that changed.

addDataSource

public void addDataSource(DataSource dataSource)
Tell the data source holders of the change. Update any menus.

Parameters:
dataSource - The new data source

addStateToBundle

public void addStateToBundle(Hashtable data)
Add any UI state to the bundle. Example: commands to show color table editor, station model editor, etc.

Parameters:
data - Where to put the state.

addDataHolderState

public void addDataHolderState(Hashtable data)
Add any UI state concerning the data holders (e.g., window size) to the bundle.

Parameters:
data - Where to put the state.

applyDataHolderState

public void applyDataHolderState(Hashtable misc)
misc contains state that was from a bundle. Apply it to the data source holders.

Parameters:
misc - The state

getDataSourceHolders

public List getDataSourceHolders()
Get the list of DataSource holders

Returns:
the list of holders

showMenu

public void showMenu(String s)
This automatically pops up the menu identified by the colon delimited string of menu names

Parameters:
s - colon delimited list of menu names

showMenuInThread

public void showMenuInThread(String s)
This automatically pops up the menu identified by the colon delimited string of menu names

Parameters:
s - colon delimited list of menu names

showHelp

public void showHelp(String target)
Show the help identified by the given target

Parameters:
target - The target in the help system

showHelp

public void showHelp(String url,
                     String target)
Show the javahelp with the given base url and help target

Parameters:
url - The base url. May be null, if so use the StateManager's getDefaultHelpUrl
target - The javahelp target. May be null, if so use the StateManager's getDefaultHelpTarget

createDataTree

public DataTree createDataTree(boolean inOwnWindow)
Create a DataTree object. Put it in its own window if the parameter inOwnWindow is true.

Parameters:
inOwnWindow - Put it in its own window
Returns:
The new DataTree

createDataTreeWindow

public DataTree createDataTreeWindow()
Create a DataTree object that is in its own window

Returns:
The new DataTree

createDataTree

public DataTree createDataTree()
Create a DataTree object that is not in its own window

Returns:
The new DataTree

initDataTree

public void initDataTree(DataTree dataTree)
When a new DataTree is created this method is called. It adds a mouseListener on the tree to listen for mouseClick events which it then calls the dataTreeClick method.

Parameters:
dataTree - The DataTree to initialize

createDataSelector

public DataSelector createDataSelector()
Create a DataSelector window. Put it in its own window if the parameter inOwnWindow is true.

Returns:
The new DataSelector

embedFieldSelectorInDashboard

public boolean embedFieldSelectorInDashboard()
Should we embed the selector in the dashboard

Returns:
embed the selector in the dashboard

embedQuickLinksInDashboard

public boolean embedQuickLinksInDashboard()
Should we embed the quick links in the dashboard

Returns:
embed the quick links in the dashboard

embedDataChooserInDashboard

public boolean embedDataChooserInDashboard()
Should we embed the chooser in the dashboard

Returns:
embed the chooser in the dashboard

embedLegendInDashboard

public boolean embedLegendInDashboard()
Should we embed the legends in the dashboard

Returns:
embed legends in the dashboard

showOrCreateDataSelector

public void showOrCreateDataSelector()
Deprecated. Moving away from hard-coded windows

If there is a data selector window around then show it. Else create a new one.


dataSelectorToFrontIfOk

public void dataSelectorToFrontIfOk()
Deprecated. Moving away from hard-coded windows

Show the data selector window if its ok with the user preference


showDataSelector

public boolean showDataSelector()
Show data selector. Called by reflection, public by implementation. Do not call directly

Returns:
Was there a data selector shown

dataSelectorToFront

public boolean dataSelectorToFront()
If there is a data selector window around then show it.

Returns:
true if successful

createInitialDataSelector

public void createInitialDataSelector()
Deprecated. not used

Create the first data selector.


createDataSelector

public DataSelector createDataSelector(boolean inOwnWindow)
Create a DataSelector window. Put it in its own window if the parameter inOwnWindow is true.

Parameters:
inOwnWindow - Should the data selector be in its own window.
Returns:
The new DataSelector

createDataSelector

public DataSelector createDataSelector(boolean horizontalOrientation,
                                       boolean inOwnWindow)
Create the data selector

Parameters:
horizontalOrientation - Do we have all 4 components horizontal or do we stack the 'Displays' and 'Times' component
inOwnWindow - Should we popup a window
Returns:
The selector

selectDataChoice

public DataChoice selectDataChoice(ControlDescriptor descriptor)
Popup a DataTreeDialog to let the user select a DataChoice that the given control descriptor is applicable to.

Parameters:
descriptor - The control descriptor
Returns:
The selected data choice

selectDataChoices

public List selectDataChoices(List operands)
Popup a dialog containing a DataTree for each operand in the given operands list Return a List of DataChoice's the user selects or null if they canceled.

Parameters:
operands - List of param names
Returns:
List of DataChoices

selectUserChoices

public List selectUserChoices(String msg,
                              List userOperands)
Popup a JTextField containing dialog that allows the user to enter text values, one for each name in the userChoices List. This strips off any leading "user_" and converts any underscores into spaces in the userChoices list.

Parameters:
msg - The message to display in the GUI
userOperands - List of DataOperand-s, one for each value
Returns:
List of Strings the user entered or null if they cancelled

checkHaiku

public boolean checkHaiku(String action)
Just some haiku stuff

Parameters:
action - some haiku stuff
Returns:
some haiku stuff

captureImage

public void captureImage(String filename)
Deprecated. Use ImageGenerator.captureImage

Capture an image from the first active view managers

Parameters:
filename - The image filename

captureMovie

public void captureMovie(String filename)
Deprecated. Use ImageGenerator.captureMovie

Capture a movie from the first view manager

Parameters:
filename - The movie filename

showSupportForm

public void showSupportForm()
Show the support request form


showSupportForm

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

Parameters:
description - Default value for the description form entry
stackTrace - The stack trace that caused this error.

showSupportForm

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

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.

getSystemInfo

public StringBuffer getSystemInfo()
Get the system info

Returns:
the system info

addToolbarPreferences

public void addToolbarPreferences(IdvPreferenceManager preferenceManager)
Create the toolbar preference panel

Parameters:
preferenceManager - The preference manager

setDateFormat

public void setDateFormat()
Set the date format from the preferences


getParamsMenuItems

public static List getParamsMenuItems(JTextComponent fld,
                                      String delimiter,
                                      boolean includeAliases)
A utility method to make a list of menu items of the current parameters and the aliases. This sets the text of the given JTextComponent if delimiter is null. Else it appends the param name to the component with the delimiter

Parameters:
fld - fld to set
delimiter - delimiter to use. If null then do fld.setText
includeAliases - Do we include the list of aliases
Returns:
List of menu items

showParamsPopup

public static void showParamsPopup(JTextComponent fld,
                                   MouseEvent e,
                                   String delimiter,
                                   boolean includeAliases)
A utility method to popup a menu listing the current parameters and the aliases. This sets the text of the given JTextComponent if delimiter is null. Else it appends the param name to the component with the delimiter

Parameters:
fld - fld to set
e - mouse event
delimiter - delimiter to use. If null then do fld.setText
includeAliases - Do we include the list of aliases

doMakeParamField

public static JTextField doMakeParamField(String delimiter,
                                          boolean includeAliases)
Make a JTextField that is for entering a parameter name. This adds a mouselistener to popup the params menu above.

Parameters:
delimiter - If non-null then we append the name from the popup menu, else we set the text on the field.
includeAliases - Include the list of aliases in the popup
Returns:
The field

popupCenterMenu

public void popupCenterMenu(JComponent near,
                            LatLonWidget latLonWidget)
Popup a centering menu

Parameters:
near - component to popup near
latLonWidget - the lat/lon widget

makeCenterMenus

public List makeCenterMenus(ActionListener listener)
Make menus for centering

Parameters:
listener - a listener for the actions
Returns:
a list of menus showing the center points of the displays

getMapLocations

public List getMapLocations()
Get the map locations

Returns:
the map locations