Package ucar.unidata.idv.ui
Class IdvUIManager
java.lang.Object
ucar.unidata.ui.WindowHolder
ucar.unidata.idv.IdvManager
ucar.unidata.idv.ui.IdvUIManager
- All Implemented Interfaces:
ActionListener
,EventListener
,IdvConstants
Manages the user interface for the IDV
- Author:
- IDV development team
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Xml attribute name for the action in the actions resourcestatic final String
Xml attribute name for the description in the actions resourcestatic final String
Xml attribute name for the group in the actions resourcestatic final String
Xml attribute name for the in the actions resourcestatic final String
Xml attribute name for the image in the actions resourcestatic final String
Xml attribute name for skin mainwindow attributestatic final String
Xml tag name for the chooser tag.static final String
tag for xmlui to show choosersstatic final String
The identifier of the choosers componentstatic final String
The identifier of the group componentstatic final String
The identifier for htmlstatic final String
The identifier for skinsstatic final String
The identifier of the data selector componentstatic final String
Xml tag name for datatreestatic final String
The identifier of the toolbar componentstatic final String
Xml tag name for map view managerstatic final String
Help tag for xmluistatic final String
Xml tag name for map view managerstatic final String
The identifier of the toolbar component on dashboardstatic final String
The identifier of the toolbar component on view windowstatic final String
The identifier of the menubar componentstatic final String
Xml tag name for messagelabelstatic final String
Xml tag name for messageloggerstatic final String
The identifier of the progress barstatic final String
The identifier of the wait labelstatic final String
Xml tag name for status labelstatic final String
The identifier of the streaming indicatorstatic final String
The identifier of the toolbar componentstatic final String
Xml tag name for map view managerstatic final String
Xml tag name for any view managerstatic final String
Xml tag name for the panel that holds all of the viewsstatic final String
The identifier of the wait labelstatic final String
type names for user data choices gui creationstatic final String
type names for user data choices gui creationstatic final String
type names for user data choices gui creationstatic final String
type names for user data choices gui creationstatic final String
type names for user data choices gui creationstatic final String
type names for user data choices gui creationstatic ImageIcon
The icon used to show locked legend componentsstatic ImageIcon
Icon used to remove displaysstatic ImageIcon
The icon used to show unlocked legend componentsprotected IdvWindow
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 final String
static final String
The identifier of the "Data" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).static final String
The identifier of the "Deletehistory" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).static final String
Menu id in the menu xml for the delete views menustatic final String
The identifier of the "Displays" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).static final String
the edit formulas menustatic final String
Help menustatic final String
The identifier of the "History" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).static final String
static final String
static final String
identifier for locations menustatic final String
identifier for maps menustatic final String
Id of the "New Display" menu item for the file menustatic final String
The identifier of the "New views" menu item held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).static final String
The identifier of the "Data" menu held in the xml file that defines the menu bar (e.g., resources/defaultmenu.xml).static final String
Menu id in the menu xml for the publis/configure menustatic final String
identifier for special menustatic final String
ID for the View menustatic final String
id for the windows menustatic final String
light weight popupstatic final String
property for support formstatic final String
property for support formstatic final String
property for support formstatic final String
property for support formstatic final String
property for support formstatic long
For timing debugsstatic final String
Xml tag for the actions resourcestatic long
For timing debugsFields 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_TIMEZONE, FILTER_CPT, FILTER_ISL, FILTER_JNLP, FILTER_XIDV, FILTER_XIDVZIDV, FILTER_XML, FILTER_ZIDV, ID_COMMANDSTORUN, ID_DATASOURCES, ID_DISPLAYCONTROLS, ID_IDV, ID_JYTHON, ID_MESSAGE, ID_MISCHASHTABLE, ID_NCIDV_VERSION, ID_VERSION, ID_VIEWMANAGERS, ID_WINDOWS, INITIAL_PROBE_EARTHLOCATION, NULL_DATA_SELECTION, NULL_STRING, PREF_APPEARANCEMODE, PREF_ARCHIVEDIR, PREF_ARCHIVENAME, PREF_AUTODISPLAYS_ENABLE, PREF_AUTODISPLAYS_SHOWGUI, PREF_AUTOSELECTDATA, PREF_CACHESIZE, PREF_CONTROLSINTABS, PREF_DATAPREFIX, PREF_DATE_FORMAT, PREF_DISTANCEUNIT, PREF_DOCACHE, PREF_EMBEDDATACHOOSERINDASHBOARD, PREF_EMBEDFIELDSELECTORINDASHBOARD, PREF_EMBEDLEGENDINDASHBOARD, PREF_EMBEDQUICKLINKSINDASHBOARD, PREF_EVENT_KEYBOARDMAP, PREF_EVENT_MOUSEMAP, PREF_EVENT_WHEELMAP, PREF_FAST_RENDER, PREF_FIELD_CACHETHRESHOLD, PREF_FILEREADDIR, PREF_FILEWRITEDIR, PREF_GEOMETRY_BY_REF, PREF_HISTORY, PREF_IMAGE_BY_REF, PREF_LARGE_REMOTE_DATA_WARN, PREF_LASTVERSION, PREF_LATLON_FORMAT, PREF_LEGEND_SHOWICONS, PREF_LOCALE, PREF_LOOKANDFEEL, PREF_MAXIMAGESIZE, PREF_MEMORY, PREF_NPOT_IMAGE, PREF_OPEN_ASK, PREF_OPEN_MERGE, PREF_OPEN_REMOVE, PREF_PROJ_LIST, PREF_SAMPLINGMODE, PREF_SHOWCONTROLWINDOW, PREF_SHOWDASHBOARD, PREF_SHOWDECODEDIALOG, PREF_SHOWHIDDENFILES, PREF_SHOWQUITCONFIRM, PREF_SITEPATH, PREF_THREADS_DATA, PREF_THREADS_RENDER, PREF_TIMEZONE, PREF_VERTICALCS, PREF_VERTICALUNIT, PREF_WINDOW_SHOWTOOLBAR, PREF_ZIDV_ASK, PREF_ZIDV_DIRECTORY, PREF_ZIDV_SAVETOTMP, PROP_3DMODE, PROP_ABOUTTEXT, PROP_APPRESOURCEPATH, PROP_CHOOSERS, PROP_CHOOSERS_ALL, PROP_CONTROLDESCRIPTORS, PROP_CONTROLDESCRIPTORS_ALL, PROP_DATAHOLDERBOUNDS, PROP_DEFAULTLOCATIONS, PROP_DISPLAYLIST_GROUP, PROP_FIXFILELOCKUP, PROP_JNLPCODEBASE, PROP_JNLPTEMPLATE, PROP_JNLPTITLE, PROP_LOADINGXML, PROP_MAP_GLOBE_LEVEL, PROP_MAP_MAP_LEVEL, PROP_MINIMUMFRAMECYCLETIME, PROP_MONITORPORT, PROP_OLDCONTROLDESCRIPTORS, PROP_ONEINSTANCEPORT, PROP_PREFERENCES, PROP_PROJ_NAME, PROP_RESOURCEFILES, PROP_SHOWCLOCK_DASH, PROP_SHOWCLOCK_VIEW, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, PROP_USE_DISPLAYAREA, PROP_USE_TIMEDRIVER, PROP_VERSIONFILE, PROP_WINDOW_SCREENSIZEOFFSET, PROP_WINDOW_SIZEHEIGHT, PROP_WINDOW_SIZEWIDTH, PROP_WINDOW_USESCREENSIZE, SUFFIX_BAT, SUFFIX_CPT, SUFFIX_ISL, SUFFIX_JNLP, SUFFIX_RBI, SUFFIX_SH, SUFFIX_XIDV, SUFFIX_XML, SUFFIX_ZIDV
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
about()
Popup the about dialog.void
addChoicesToMenu
(DataSource dataSource, JMenu dataSourceMenu, JMenu dataMenu) Add the menu items for dealing with theDataChoice
s 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 holdersaddDCD
(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 tablevoid
addToolbarPreferences
(IdvPreferenceManager preferenceManager) Create the toolbar preference panelvoid
addViewMenuItems
(DisplayControl control, List items) Gets called by the display controls.void
misc contains state that was from a bundle.void
captureImage
(String filename) Capture an image from the first active view managersvoid
captureMovie
(String filename) Capture a movie from the first view managervoid
changeState
(DataSource dataSource) Notify the data source of a change in stateboolean
checkHaiku
(String action) Just some haiku stuffvoid
Check and toggle the toolbar visibilityvoid
Helper method to clear any outstanding wait cursor calls.void
Close the currently active window.void
If created, close the HelpTipDialog window.void
createDataChoiceMenuItem
(DataChoice choice, JMenu parentMenu, JMenu dataMenu) Create the menu items for dealing with the given data choiceCreate aDataSelector
window.createDataSelector
(boolean inOwnWindow) Create aDataSelector
window.createDataSelector
(boolean horizontalOrientation, boolean inOwnWindow) Create the data selectorCreate aDataTree
object that is not in its own windowcreateDataTree
(boolean inOwnWindow) Create aDataTree
object.Create aDataTree
object that is in its own windowvoid
Create the first data selector.Create a new window containing a newMapViewManager
createNewWindow
(List viewManagers) Create a new IdvWindow for the given viewManager.createNewWindow
(List viewManagers, boolean notifyCollab) Create a new IdvWindow for the given viewManager.createNewWindow
(List viewManagers, boolean notifyCollab, String title, String skinPath, Element root) Create a new windowcreateNewWindow
(List viewManagers, boolean notifyCollab, String title, String skinPath, Element skinRoot, boolean show, WindowInfo windowInfo) Create a new windowcreateNewWindow
(List viewManagers, boolean notifyCollab, String skinPath, Element skinRoot) Create a new IdvWindowcreateNewWindow
(List viewManagers, String skinPath) Create a new IdvWindow with the lsit of ViewManager-s and the xml skin.createNewWindow
(List viewManagers, String skinPath, String windowTitle, WindowInfo windowInfo) Create a new IdvWindow with the lsit of ViewManager-s and the xml skin.boolean
If there is a data selector window around then show it.void
Show the data selector window if its ok with the user preference deprecated Moving away from hard-coded windowsvoid
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 menuvoid
deleteKeyPressed
(DataTree dataTree) Handle when the delete key is pressed in the data treevoid
displayControlChanged
(DisplayControl displayControl) The display changedvoid
Called by the IDV when there has been a change to the display controls.void
Use this to notify when any of the display templates changed.void
Dispose of all Windowsvoid
Do basic initializationvoid
Create the basic windows.doMakeControlButtons
(boolean vertical) Creates the icon buttons for creating display controlsdoMakeDataChoiceMenu
(DataChoice dataChoice) Make the menu for the given data choicedoMakeDataChoiceMenuItems
(DataChoice dataChoice, boolean isUserFormula, boolean showAll) Make the menu items for the given data choicedoMakeDataChoiceMenus
(DataChoice dataChoice) Make the menu items for the given data choicedoMakeDataSourceMenuItems
(DataSource dataSource, Component src) Return the list of menu items to use when the user has clicked on a DataSource.doMakeDefaultContents
(IdvWindow window, ViewManager viewManager) If we don't have a UI skin then this method is called to create the window contentsprotected IdvXmlUi
doMakeIdvXmlUi
(IdvWindow window, List viewManagers, Element skinRoot) Factory method to create an xmluivoid
Create the first display windowMake the menu bar and menus for the given IdvWindow.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.Make the roving progress bardoMakeStatusBar
(IdvWindow window) Make the status bar for the window.protected JComponent
Make the toolbarprotected ViewPanel
Factory method for making the ViewPanelvoid
Show the modal display settings dialogvoid
Add in the dynamic menu for editing formulasboolean
Should we embed the chooser in the dashboardboolean
Should we embed the selector in the dashboardboolean
Should we embed the legends in the dashboardboolean
Should we embed the quick links in the dashboardvoid
Use this to notify when any of the favorite bundles changed.findComponent
(String id) Find the component that is in an IdvWindow with the idprotected IdvWindow
findWindowThatMatches
(List currentWindows, WindowInfo windowInfo) Find the window that matches the window infoGet the action action for the given action idgetActionAttr
(String id, String attr) Get the given named attribute from the xml element that represents the action idGet the description for the given actiongetActionImage
(String id) Get the image for the given actiongetActionNode
(String id) Find the xml element for the given actionGet the list of (String) action ids.void
getComponentGroupMenuItems
(IdvComponentGroup group, List items) Get component group itemsGet the component groupsGet all components in all windowsGet the list of DataSource holdersgetFrame()
If there is a lastActiveFrame then return that.Get the map locationsGet the map of menu idsstatic 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.return the screen containing the point, null if none doprotected boolean
Do we do control tabsGet the skin's HTMLAdd the stand alone displays into the display menuGet the border used for the status barGet the system infoGet the root of the toolbar xmlCreate a gui component of the toolbarprotected String
getViewManagerTabLabel
(ViewManager viewManager, JTabbedPane tabs) Create the tab label for the embedded legend tabsget the view panel, the one that holds the displays.int
Return the number of open wait cursor callsgetWindowGroup
(Object group) This gets all of the objects that are associated with the given group for all active windows.Get the list of IdvWindows that should be saved in a bundleprotected void
handleMenuDeSelected
(String id, JMenu menu, IdvWindow idvWindow) DeInitialize the given menu before it is shownprotected void
handleMenuSelected
(String id, JMenu menu, IdvWindow idvWindow) Initialize the given menu before it is shownboolean
handleSideLegend
(ViewManager viewManager, JComponent sideLegend) noopvoid
handleWindowActivated
(IdvWindow window) Handle when the window is activated.boolean
Do we have a basic windowvoid
historyMenuSelected
(JMenu fileMenu) User just clicked on the file-history menu.void
historyMenuSelectedV
(JMenu fileMenu, String type) 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 newDataTree
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
initializeBundleMenu
(JMenu bundleMenu) Add in the menu items for the given display menuprotected void
initializeDisplayMenu
(JMenu displayMenu) Add in the menu items for the given display menuprotected void
initializeViewMenu
(JMenu viewMenu) Add in the menu items for the given view menuvoid
Create the splash screen if neededboolean
Is the given id an action.boolean
isMac()
Is this running on a Mac?void
Load in the look and feelvoid
loadSkinByIndex
(int skinIndex) Load the skin by indexmakeActionMenu
(Object object, String method, boolean makeCall) Make the menu of actionsmakeCenterMenus
(ActionListener listener) Make menus for centeringvoid
makeDeleteViewsMenu
(JMenu menu) This adds to the given menu a set of MenuItems, one for each saved ViewManager, for deleting the selected saved ViewManager.makeSkinMenuItems
(ActionListener listener, boolean onlyUI, boolean onlyEmbedded) Make the skin menu itemsvoid
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 menuvoid
makeWindowsMenu
(JMenu menu, IdvWindow idvWindow) Make the windows menu.void
popupCenterMenu
(JComponent near, LatLonWidget latLonWidget) Popup a centering menuvoid
processBundle
(SavedBundle bundle) Pass through to the idv to load in the given bundleprotected void
processBundleMenu
(JMenu displayMenu, int bundleType) Create the bundle menu for the given list of bundlesvoid
Handle (polymorphically) theDataControlDialog
.protected void
processInstanceMenu
(JMenu displayMenu) Add the instances into the display menuprotected void
processMapMenu
(JMenu displayMenu, boolean makeNew) Add the map menu into the display menuprotected void
processStandAloneMenu
(JMenu displayMenu, boolean makeNew) Add the stand alone displays into the display menuprotected void
processStationMenu
(JMenu displayMenu, boolean makeNew) Add the station menu into the display menuvoid
Reload the toolbar xml resourcesvoid
Remove all data sources from the data source holders.void
removeDataSource
(DataSource dataSource) Remove the data source the data source holders.void
Remove the given data tree from the list of data treesvoid
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 windowsvoid
Update the last active view manager.selectDataChoice
(ControlDescriptor descriptor) Popup aDataTreeDialog
to let the user select aDataChoice
that the given control descriptor is applicable to.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.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.static boolean
Sends an email to the predefined support address.static boolean
sendSupportEmail
(String username, String fromEmail, String subject, String htmlBody, List<IdvUIManager.EmailAttachment> attachments) Sends an email to the predefined support address.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
Set the date format from the preferencesvoid
Run through all windows and call showboolean
showBasicWindow
(boolean createThemIfNotThere) This tries to show one of the main gui windowsvoid
Popup the favorites manage dialogvoid
showBundleDialog
(int bundleType) Popup the dialog that edits the list of bundlesvoid
showControlDialog
(DataTree dataTree, MouseEvent event) Create and show aDataControlDialog
for theDataChoice
in the DataTree at the given mouse x and y (if there is a data choice there).void
This tries to show one of the main gui windowsboolean
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
Show the help identified by the given targetvoid
Show the javahelp with the given base url and help targetvoid
Create (if null) and show the HelpTipDialogvoid
This automatically pops up the menu identified by the colon delimited string of menu namesvoid
This automatically pops up the menu identified by the colon delimited string of menu namesvoid
Helper method to show the "normal" cursor.void
If there is a data selector window around then show it.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
Show the support request formvoid
showSupportForm
(String description, String stackTrace) Show the support request formvoid
showSupportForm
(String description, String stackTrace, JDialog dialog) Show the support request formvoid
showTimeSelection
(DataSource dataSource, Component src) Show theDataControlDialog
for selecting times for the given dataSourcevoid
Increment the waitCursorCount and set the wait cursor on the last active framevoid
showWindow
(DisplayControl control, IdvWindow window) Implementation of the ControlContext method.void
Close and dispose of the splash window (if it has been created).void
Show a message in the splash screen (if it exists)void
startReading
(Object source) Start readingvoid
stopReading
(Object source) Stop readingstripAction
(String id) Strip any "action:invalid input: '&' string from the beginning.void
Run through all windows and call showvoid
unpersistWindowInfo
(List windows, List newViewManagers, boolean okToMerge, boolean fromCollab, boolean didRemoveAll) Handle the list of IdvWindow-s from the bundlevoid
Update history linksvoid
Update the icon toolbar in all windowsvoid
viewManagerActiveChanged
(ViewManager viewManager) The active state of the view manager has changedvoid
viewManagerAdded
(ViewManager viewManager) Be notified of the addition of a VMvoid
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
-
Field Details
-
FIELDTYPE_TEXT
type names for user data choices gui creation- See Also:
-
FIELDTYPE_BOOLEAN
type names for user data choices gui creation- See Also:
-
FIELDTYPE_CHOICE
type names for user data choices gui creation- See Also:
-
FIELDTYPE_FILE
type names for user data choices gui creation- See Also:
-
FIELDTYPE_LOCATION
type names for user data choices gui creation- See Also:
-
FIELDTYPE_AREA
type names for user data choices gui creation- See Also:
-
ICON_LOCK
The icon used to show locked legend components -
ICON_UNLOCK
The icon used to show unlocked legend components -
ICON_REMOVE
Icon used to remove displays -
PROP_SUPPORT_PACKAGE
property for support form- See Also:
-
PROP_SUPPORT_MESSAGE
property for support form- See Also:
-
PROP_HELP_EMAIL
property for support form- See Also:
-
PROP_HELP_ORG
property for support form- See Also:
-
PROP_HELP_NAME
property for support form- See Also:
-
TAG_ACTION
Xml tag for the actions resource- See Also:
-
ATTR_ID
Xml attribute name for the in the actions resource- See Also:
-
ATTR_MAINWINDOW
Xml attribute name for skin mainwindow attribute- See Also:
-
ATTR_DESCRIPTION
Xml attribute name for the description in the actions resource- See Also:
-
ATTR_GROUP
Xml attribute name for the group in the actions resource- See Also:
-
ATTR_ACTION
Xml attribute name for the action in the actions resource- See Also:
-
ATTR_IMAGE
Xml attribute name for the image in the actions resource- See Also:
-
COMP_FAVORITESBAR
The identifier of the toolbar component- See Also:
-
COMP_HELP
Help tag for xmlui- See Also:
-
COMP_MENUBAR
The identifier of the menubar component- See Also:
-
COMP_TOOLBAR
The identifier of the toolbar component- See Also:
-
COMP_DATASELECTOR
The identifier of the data selector component- See Also:
-
COMP_COMPONENT_GROUP
The identifier of the group component- See Also:
-
COMP_COMPONENT_CHOOSERS
The identifier of the choosers component- See Also:
-
COMP_COMPONENT_SKIN
The identifier for skins- See Also:
-
COMP_COMPONENT_HTML
The identifier for html- See Also:
-
COMP_MEMORYMONITOR_VIEW
The identifier of the toolbar component on view window- See Also:
-
COMP_MEMORYMONITOR_DASH
The identifier of the toolbar component on dashboard- See Also:
-
COMP_WAITLABEL
The identifier of the wait label- See Also:
-
COMP_STREAMINGLABEL
The identifier of the streaming indicator- See Also:
-
COMP_READINGLABEL
The identifier of the wait label- See Also:
-
COMP_PROGRESSBAR
The identifier of the progress bar- See Also:
-
COMP_DATATREE
Xml tag name for datatree- See Also:
-
COMP_VIEWPANEL
Xml tag name for the panel that holds all of the views- See Also:
-
COMP_MESSAGELOGGER
Xml tag name for messagelogger- See Also:
-
COMP_MESSAGELABEL
Xml tag name for messagelabel- See Also:
-
COMP_MAPVIEW
Xml tag name for map view manager- See Also:
-
COMP_GLOBEVIEW
Xml tag name for map view manager- See Also:
-
COMP_TRANSECTVIEW
Xml tag name for map view manager- See Also:
-
COMP_VIEW
Xml tag name for any view manager- See Also:
-
COMP_STATUSBAR
Xml tag name for status label- See Also:
-
COMP_CHOOSER
Xml tag name for the chooser tag. We overwrite the XmlUi component factory method to handle these special tags- See Also:
-
COMP_CHOOSERS
tag for xmlui to show choosers- See Also:
-
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:
-
MENU_MAPS
identifier for maps menu- See Also:
-
MENU_SPECIAL
identifier for special menu- See Also:
-
MENU_LOCATIONS
identifier for locations menu- See Also:
-
MENU_HELP
Help menu- See Also:
-
MENU_VIEW
ID for the View menu- See Also:
-
MENU_DELETEVIEWS
Menu id in the menu xml for the delete views menu- See Also:
-
MENU_EDITFORMULAS
the edit formulas menu- See Also:
-
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:
-
MENU_WINDOWS
id for the windows menu- See Also:
-
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:
-
MENU_PUBLISH_CONFIG
Menu id in the menu xml for the publis/configure menu- See Also:
-
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:
-
MENU_HISTORY_FILE
- See Also:
-
MENU_HISTORY_BUNDLE
- See Also:
-
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:
-
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:
-
MENU_NEWDISPLAY
Id of the "New Display" menu item for the file menu- See Also:
-
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
light weight popup- See Also:
-
MENU_BUNDLES
- See Also:
-
timeSinceLastWait
public static long timeSinceLastWaitFor timing debugs -
startTime
public static long startTimeFor timing debugs
-
-
Constructor Details
-
IdvUIManager
Create me with the IDV- Parameters:
idv
- The IDV
-
-
Method Details
-
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
Find the component that is in an IdvWindow with the id- Parameters:
id
- id- Returns:
- component
-
getWindowGroup
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
Get all components in all windows- Returns:
- components
-
getScreen
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
get the view panel, the one that holds the displays. If it doesn't exist then create it- Returns:
- ViewPanel
-
doMakeViewPanel
Factory method for making the ViewPanel- Returns:
- The view panel
-
handleSideLegend
noop- Parameters:
viewManager
- The view managersideLegend
- The side legend- Returns:
- true if this UIManager will embed the legend. False if the ViewManager should deal with the legend as usual.
-
viewManagerAdded
Be notified of the addition of a VM- Parameters:
viewManager
- The VM
-
viewManagerDestroyed
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
The active state of the view manager has changed- Parameters:
viewManager
- The view manager
-
viewManagerChanged
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
Create the tab label for the embedded legend tabs- Parameters:
viewManager
- View manager in the tabtabs
- 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
Make the menu of actions- Parameters:
object
- object to callmethod
- method to callmakeCall
- If true we call idv.handleAction- Returns:
- List of menus
-
isAction
Is the given id an action. Does it start with action:- Parameters:
id
- The id- Returns:
- Is it an action
-
stripAction
Strip any "action:invalid input: '&' string from the beginning.- Parameters:
id
- The action id- Returns:
- The id stripped of any action:
-
getActionNode
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
Get the given named attribute from the xml element that represents the action id- Parameters:
id
- The actionattr
- The attr name- Returns:
- The attr value or null if none found
-
getAction
Get the action action for the given action id- Parameters:
id
- The action id- Returns:
- The aciton to invoke_
-
getActionImage
Get the image for the given action- Parameters:
id
- The action id- Returns:
- The image
-
getActionDescription
Get the description for the given action- Parameters:
id
- The action id- Returns:
- The description
-
getActions
Get the list of (String) action ids.- Returns:
- List of actions
-
showWindow
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 DisplayControlwindow
- 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 classIdvManager
-
showNormalCursor
public void showNormalCursor()Helper method to show the "normal" cursor. Actually will decrement the waitCursorCount and only show the normal cursor when waitCursorCount invalid input: '<'= 0. This enables a bunch of code to show the wait cursor and keep showing it until all is done.- Overrides:
showNormalCursor
in classIdvManager
-
clearWaitCursor
public void clearWaitCursor()Helper method to clear any outstanding wait cursor calls. -
startReading
Start reading- Parameters:
source
- the object to read
-
stopReading
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
Handle when the window is activated. Set the last active view manager- Parameters:
window
- The window
-
removeWindow
Remove the window from the list of windows- Parameters:
window
- The window to remove
-
updateHistoryLinks
public void updateHistoryLinks()Update history links -
addDCD
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
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
Handle (polymorphically) theDataControlDialog
. This dialog is used to either select a display control to create or is used to set the timers used for aDataSource
.- Parameters:
dcd
- The dialog
-
handleMenuSelected
Initialize the given menu before it is shown- Parameters:
id
- Id of the menumenu
- The menuidvWindow
- the IDV window
-
handleMenuDeSelected
DeInitialize the given menu before it is shown- Parameters:
id
- Id of the menumenu
- The menuidvWindow
- the IDV window
-
getMenuIds
Get the map of menu ids- Returns:
- menus
-
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
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
Get component group items- Parameters:
group
- the groupitems
- list of items
-
makeSkinMenuItems
Make the skin menu items- Parameters:
listener
- the listener for the menuonlyUI
- true if only in the UIonlyEmbedded
- true if only for embedded- Returns:
- the list of menus
-
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
Make the windows menu. This lists all of the current windows and allows the user to show them.- Parameters:
menu
- windows menuidvWindow
- the IDV window
-
makeWindowMenu
Make the window menu- Parameters:
window
- the windowmenu
- the menu
-
makeViewStateMenu
This adds to the given menu a set of MenuItems, one for each saved viewmanager in the vmState list.- Parameters:
menu
- The menu
-
makeViewStateMenu
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 menuvm
- The view manager
-
makeDeleteViewsMenu
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
Add in the dynamic menu for editing formulas- Parameters:
menu
- edit menu to add to
-
historyMenuSelected
User just clicked on the file-history menu. Add in the items- Parameters:
fileMenu
- The menu to fill
-
historyMenuSelectedV
User just clicked on the file-history menu. Add in the items- Parameters:
fileMenu
- The menu to fill
-
deleteHistoryMenuSelected
Fill in the delete history menu- Parameters:
fileMenu
- the menu to fill
-
addChoicesToMenu
Add the menu items for dealing with theDataChoice
s from the given dataSource into the given menu.- Parameters:
dataSource
- The data sourcedataSourceMenu
- Its menudataMenu
- The menu to hold the data choice items
-
createDataChoiceMenuItem
Create the menu items for dealing with the given data choice- Parameters:
choice
- The data choiceparentMenu
- The parent menudataMenu
- Where to put the items
-
processBundle
Pass through to the idv to load in the given bundle- Parameters:
bundle
- The bundle to create
-
processBundleMenu
Create the bundle menu for the given list of bundles- Parameters:
displayMenu
- The menu to add the bundle menu intobundleType
- Is this for the favorites or the display templates
-
processMapMenu
Add the map menu into the display menu- Parameters:
displayMenu
- The display menumakeNew
- if true, make a new menu
-
processStationMenu
Add the station menu into the display menu- Parameters:
displayMenu
- The display menumakeNew
- if true, make a new menu
-
getStandAloneControlDescriptors
Add the stand alone displays into the display menu- Returns:
- List of ControlDescriptor-s that can stand alone.
-
processStandAloneMenu
Add the stand alone displays into the display menu- Parameters:
displayMenu
- The display menumakeNew
- if true, make a new menu
-
processInstanceMenu
Add the instances into the display menu- Parameters:
displayMenu
- The display menu
-
initializeViewMenu
Add in the menu items for the given view menu- Parameters:
viewMenu
- The view menu
-
initializeDisplayMenu
Add in the menu items for the given display menu- Parameters:
displayMenu
- The display menu
-
initializeBundleMenu
Add in the menu items for the given display menu- Parameters:
bundleMenu
- 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
The display changed- Parameters:
displayControl
- display that changed
-
addStationDisplay
Create the station table display for the given station table- Parameters:
stationTable
- The station tablecd
- The display control descriptor for the station location display
-
doMakeDataSourceMenuItems
Return the list of menu items to use when the user has clicked on a DataSource.- Parameters:
dataSource
- The data sourcesrc
- Where this menu pops up- Returns:
- List of menu items for dealing with the given dataSource
-
changeState
Notify the data source of a change in state- Parameters:
dataSource
- the data source to notify
-
setAlias
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
Show the html description of the given data source.- Parameters:
dataSource
- The data source to show details for
-
showTimeSelection
Show theDataControlDialog
for selecting times for the given dataSource- Parameters:
dataSource
- The data sourcesrc
- Where to popup the dialog deprecated Don't use this anymore
-
doMakeDataChoiceMenu
Make the menu for the given data choice- Parameters:
dataChoice
- The data choice- Returns:
- The menu
-
doMakeDataChoiceMenus
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 choiceisUserFormula
- Is this data choice a user formulashowAll
- If true then add in the items for creating applicable displays- Returns:
- List of menu items
-
doMakeControlButtons
Creates the icon buttons for creating display controls- Parameters:
vertical
- Alignment is vertical- Returns:
- Panel holding the icon buttons
-
showDataTreeMenu
Popup a menu for a datachoice object over the tree component at (x,y)- Parameters:
dataTree
- The data tree to show a menu forevent
- The clickshowFullMenu
- 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
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
Handle when the delete key is pressed in the data tree- Parameters:
dataTree
- The data tree
-
dataTreeClick
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
- TheDataTree
that was clickedevent
- TheMouseEvent
-
showControlDialog
Create and show aDataControlDialog
for theDataChoice
in the DataTree at the given mouse x and y (if there is a data choice there).- Parameters:
dataTree
- The DataTreeevent
- TheMouseEvent
-
doMakeStatusBar
Make the status bar for the window. This contains aMemoryMonitor
and a message label. This does not add the status bar to the frame though.- Parameters:
window
- The window- Returns:
- The status bar
-
doMakeRovingProgressBar
Make the roving progress bar- Returns:
- Roving progress bar
-
getStatusBorder
Get the border used for the status bar- Returns:
- The border
-
getFrame
If there is a lastActiveFrame then return that. Else return the first window in the list of windows- Overrides:
getFrame
in classWindowHolder
- Returns:
- Some JFrame
-
doBasicInitialization
public void doBasicInitialization()Do basic initialization -
findWindowThatMatches
Find the window that matches the window info- Parameters:
currentWindows
- list of windowswindowInfo
- 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 initokToMerge
- true if okay to mergefromCollab
- From collaborationdidRemoveAll
- true if remove all was done
-
disposeAllWindows
public void disposeAllWindows()Dispose of all Windows -
createNewWindow
Create a new window containing a newMapViewManager
- Returns:
- The new window
-
createNewWindow
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
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
Create a new IdvWindow for the given viewManager. Put the contents of the viewManager into the window- Parameters:
viewManagers
- The view managersnotifyCollab
- Should theCollabManager
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 windownotifyCollab
- true if we should notify collaboratorstitle
- the window titleskinPath
- the path tot he skinroot
- 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 skinwindowTitle
- titlewindowInfo
- 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 facilityskinPath
- 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 facilitytitle
- The titleskinPath
- 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
Get the component groups- Returns:
- the List of groups
-
getWindowsToPersist
Get the list of IdvWindows that should be saved in a bundle- Returns:
- List of windows to persist
-
getToolbarUI
Create a gui component of the toolbar- Returns:
- the toolbar
-
doMakeIdvXmlUi
Factory method to create an xmlui- Parameters:
window
- The windowviewManagers
- The view managerskinRoot
- The skin xml- Returns:
- The xmlui
-
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
If we don't have a UI skin then this method is called to create the window contents- Parameters:
window
- The windowviewManager
- The ViewManager being shown in the window- Returns:
- The GUI contents
-
getToolbarRoot
Get the root of the toolbar xml- Returns:
- The toolbar xml root
-
showResults
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
Remove the given data tree from the list of data trees- Parameters:
holder
- The holder to remove
-
addDataSourceHolder
Add the given data source holder to the list of data source holders- Parameters:
holder
- The holder to initialize
-
initDataSourceHolder
Add the set of data sources to the given holder. Put it in a window if inWindow is true.- Parameters:
holder
- The holder to initializeinWindow
- Put the holder in a window?
-
addDisplayControl
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
Gets called by the display controls. We add the 'embed in tabs' menu items- Parameters:
control
- The controlitems
- List of menu items
-
getShowControlsInTab
protected boolean getShowControlsInTab()Do we do control tabs- Returns:
- Do we do control tabs
-
removeDisplayControl
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
Remove the data source the data source holders. Update the data menu in all menu bars.- Parameters:
dataSource
- The removed data source
-
dataSourceChanged
Tell the data source holders of the change. Update any menus.- Parameters:
source
- The data source that changed.
-
dataSourceTimeChanged
Tell the data source holders of the change. Update any menus.- Parameters:
source
- The data source that changed.
-
addDataSource
Tell the data source holders of the change. Update any menus.- Parameters:
dataSource
- The new data source
-
addStateToBundle
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
Add any UI state concerning the data holders (e.g., window size) to the bundle.- Parameters:
data
- Where to put the state.
-
applyDataHolderState
misc contains state that was from a bundle. Apply it to the data source holders.- Parameters:
misc
- The state
-
getDataSourceHolders
Get the list of DataSource holders- Returns:
- the list of holders
-
showMenu
This automatically pops up the menu identified by the colon delimited string of menu names- Parameters:
s
- colon delimited list of menu names
-
showMenuInThread
This automatically pops up the menu identified by the colon delimited string of menu names- Parameters:
s
- colon delimited list of menu names
-
showHelp
Show the help identified by the given target- Parameters:
target
- The target in the help system
-
showHelp
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 getDefaultHelpUrltarget
- The javahelp target. May be null, if so use the StateManager's getDefaultHelpTarget
-
createDataTree
Create aDataTree
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
Create aDataTree
object that is in its own window- Returns:
- The new
DataTree
-
createDataTree
Create aDataTree
object that is not in its own window- Returns:
- The new
DataTree
-
initDataTree
When a newDataTree
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
- TheDataTree
to initialize
-
createDataSelector
Create aDataSelector
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()If there is a data selector window around then show it. Else create a new one. deprecated Moving away from hard-coded windows -
dataSelectorToFrontIfOk
public void dataSelectorToFrontIfOk()Show the data selector window if its ok with the user preference deprecated Moving away from hard-coded windows -
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()Create the first data selector. deprecated not used -
createDataSelector
Create aDataSelector
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
Create the data selector- Parameters:
horizontalOrientation
- Do we have all 4 components horizontal or do we stack the 'Displays' and 'Times' componentinOwnWindow
- Should we popup a window- Returns:
- The selector
-
selectDataChoice
Popup aDataTreeDialog
to let the user select aDataChoice
that the given control descriptor is applicable to.- Parameters:
descriptor
- The control descriptor- Returns:
- The selected data choice
-
selectDataChoices
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
DataChoice
s
-
selectUserChoices
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 GUIuserOperands
- List of DataOperand-s, one for each value- Returns:
- List of Strings the user entered or null if they cancelled
-
checkHaiku
Just some haiku stuff- Parameters:
action
- some haiku stuff- Returns:
- some haiku stuff
-
captureImage
Capture an image from the first active view managers- Parameters:
filename
- The image filename deprecated Use ImageGenerator.captureImage
-
captureMovie
Capture a movie from the first view manager- Parameters:
filename
- The movie filename deprecated Use ImageGenerator.captureMovie
-
showSupportForm
public void showSupportForm()Show the support request form -
showSupportForm
Show the support request form- Parameters:
description
- Default value for the description form entrystackTrace
- The stack trace that caused this error.
-
showSupportForm
Show the support request form- Parameters:
description
- Default value for the description form entrystackTrace
- The stack trace that caused this error.dialog
- The dialog to put the gui in, if non-null.
-
getSystemInfo
Get the system info- Returns:
- the system info
-
addToolbarPreferences
Create the toolbar preference panel- Parameters:
preferenceManager
- The preference manager
-
setDateFormat
public void setDateFormat()Set the date format from the preferences -
getParamsMenuItems
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 setdelimiter
- delimiter to use. If null then do fld.setTextincludeAliases
- 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 sete
- mouse eventdelimiter
- delimiter to use. If null then do fld.setTextincludeAliases
- Do we include the list of aliases
-
doMakeParamField
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
Popup a centering menu- Parameters:
near
- component to popup nearlatLonWidget
- the lat/lon widget
-
makeCenterMenus
Make menus for centering- Parameters:
listener
- a listener for the actions- Returns:
- a list of menus showing the center points of the displays
-
getMapLocations
Get the map locations- Returns:
- the map locations
-
sendEmail
public static boolean sendEmail(String username, String fromEmail, String subject, String htmlBody) throws javax.mail.MessagingException Sends an email to the predefined support address.- Parameters:
username
- The user's name or identifier for the "From" field.fromEmail
- The actual "reply-to" or sender email address.subject
- The subject line of the email.htmlBody
- The body of the email, formatted as HTML.- Returns:
true
if the email was sent successfully,false
otherwise.- Throws:
javax.mail.MessagingException
-
sendSupportEmail
public static boolean sendSupportEmail(String username, String fromEmail, String subject, String htmlBody, List<IdvUIManager.EmailAttachment> attachments) throws javax.mail.MessagingException, UnsupportedEncodingException Sends an email to the predefined support address.- Parameters:
username
- The user's name or identifier for the "From" field.fromEmail
- The actual "reply-to" or sender email address.subject
- The subject line of the email.htmlBody
- The body of the email, formatted as HTML.- Returns:
true
if the email was sent successfully,false
otherwise.- Throws:
javax.mail.MessagingException
UnsupportedEncodingException
-