Package ucar.unidata.idv.ui
Class IdvWindow
java.lang.Object
ucar.unidata.ui.MultiFrame
ucar.unidata.idv.ui.IdvWindow
The window class used for the IDV. Really need to break this out into
a window manager. This listens for window close operations and manages
the bottom message bar/memory monitor/spinning wait icon.
- Author:
- IDV development team
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIdvWindow(String title, IntegratedDataViewer theIdv) Create the windowIdvWindow(String title, IntegratedDataViewer theIdv, boolean isAMainWindow) Create the window -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRemovable(Removable removable) _more_voidaddToGroup(Object groupKey, Object comp) An IdvWindow can hold a group of objects, identified by the groupKey.voidaddViewManager(ViewManager viewManager) _more_voiddestroy()Destroy this window.voiddispose()Dispose of this window.protected booleandoClose()Close this window.static voidenableFullScreenMode(Window window) Enable full screen mode in the context of mac osx (>=10.7) Special thanks to http://saipullabhotla.blogspot.com/2012/05/enabling-full-screen-mode-for-java.htmlvoidendWait()Stop spinningstatic IdvWindowfindWindow(Component contents) Find the IdvWindow that contains the window contentsstatic IdvWindowGet the current active windowgetComponent(String componentName) The IdvWindow can hold a number of named components._more_Get the list of components held by the xmluiGet the contentsGet the list of objects that are in the group.boolean_more_booleanGet the IsAMainWindow property.static ListReturn the list of main windows currently in use.Get the JLabel message label.static ImageIconGet the icon used to show normal state_more_Get the PersistentComponents property.Get the path to the xml skin.getType()Get the Type property.Get the UniqueId property.Get the ViewManagers property.static ImageIconGet the icon used to show wait state (the spinning globe)Get the label that we spinstatic ImageIconGet the icon used when mousing over the label in wait state (the beer bottles)static booleanGet the global wait statestatic ListGet all of the current windows.getXmlUI()Get the xmlui object that created the gui in this window.booleanDoes this window contain any view managersvoidputPersistentComponent(Object key, Object object) _more_voidsetComponent(String componentName, Object component) The IdvWindow can hold a number of named components.voidsetContents(JComponent contents) Set the contents.voidsetIsAMainWindow(boolean value) Set the IsAMainWindow property.static ImageIconsetNormalIcon(String path) Get the icon used to show normal statevoidsetPersistentComponents(Hashtable value) Set the PersistenceComponents property.voidSet the path to the xml skin.voidsetTheViewManagers(List value) Set the ViewManagers property.voidSet the Type property.voidsetUniqueId(String value) Set the UniqueId property.static ImageIconsetWaitIcon(String path) Get the icon used to show wait state (the spinning globe)voidsetWaitIcon(Icon icon) Set the icon for the wait label.static ImageIconsetWaitOverIcon(String path) Get the icon used when mousing over the label in wait state (the beer bottles)static voidsetWaitState(boolean waiting) Set the global waitState flagvoidset the bounds of the windowvoidSet the xmlui skin objectvoidshow()Show the window if its ok.voidShow the normal cursorvoidShow the wait cursorvoidStart spinningtoString()Override toStringMethods inherited from class ucar.unidata.ui.MultiFrame
addWindowListener, getBounds, getComponent, getContainer, getContentPane, getFrame, getInternalFrame, getLocation, getSize, getState, getTitle, getWindow, isShowing, isVisible, pack, removeWindowListener, setBounds, setCursor, setDefaultCloseOperation, setIconImage, setJMenuBar, setLocation, setSize, setState, setTitle, setVisible, toFront, useDesktopPane
-
Field Details
-
GROUP_CHOOSERS
The chooser components in this window- See Also:
-
GROUP_TOOLBARS
The toolbar components in this window- See Also:
-
-
Constructor Details
-
IdvWindow
Create the window- Parameters:
title- The window titletheIdv- The IDV
-
IdvWindow
Create the window- Parameters:
title- The window titletheIdv- The IDVisAMainWindow- Is this a main window
-
-
Method Details
-
getActiveWindow
Get the current active window- Returns:
- active window
-
setWaitState
public static void setWaitState(boolean waiting) Set the global waitState flag- Parameters:
waiting- waiting value
-
getWaitState
public static boolean getWaitState()Get the global wait state- Returns:
- waiting value
-
getContents
Get the contents- Returns:
- window contents
-
setContents
Set the contents. Add the contents into the content pane and pack.- Parameters:
contents- window contents
-
setWindowBounds
set the bounds of the window- Parameters:
r- window bounds
-
findWindow
Find the IdvWindow that contains the window contents- Parameters:
contents- Contents to look for- Returns:
- The IdvWindow that holds the contents
-
setXmlUI
Set the xmlui skin object- Parameters:
xmlUI- The xmlui skin object
-
getXmlUI
Get the xmlui object that created the gui in this window. May be null.- Returns:
- The xmlui.
-
getSkinPath
Get the path to the xml skin.- Returns:
- The xml skin.
-
setSkinPath
Set the path to the xml skin.- Parameters:
b- The skin path
-
toString
Override toString -
getWaitIcon
Get the icon used to show wait state (the spinning globe)- Returns:
- The wait icon.
-
setWaitIcon
Get the icon used to show wait state (the spinning globe)- Parameters:
path- Set the wait icon to use- Returns:
- The wait icon.
-
show
public void show()Show the window if its ok.- Overrides:
showin classMultiFrame
-
getNormalIcon
Get the icon used to show normal state- Returns:
- The normal icon.
-
setNormalIcon
Get the icon used to show normal state- Parameters:
path- The path to the normal icon to use- Returns:
- The normal icon.
-
getWaitOverIcon
Get the icon used when mousing over the label in wait state (the beer bottles)- Returns:
- The mouse over wait icon.
-
setWaitOverIcon
Get the icon used when mousing over the label in wait state (the beer bottles)- Parameters:
path- The path to the wait over icon to use- Returns:
- The mouse over wait icon.
-
getMsgLabel
Get the JLabel message label.- Returns:
- The JLabel for messages
-
startWait
public void startWait()Start spinning -
endWait
public void endWait()Stop spinning -
setWaitIcon
Set the icon for the wait label.- Parameters:
icon- The wait icon.
-
getWaitLabel
Get the label that we spin- Returns:
- The wait label
-
doClose
protected boolean doClose()Close this window. If it is the last main window then ask to exit- Returns:
- Was closed
-
getHasBeenDisposed
public boolean getHasBeenDisposed()_more_- Returns:
- _more_
-
dispose
public void dispose()Dispose of this window.- Overrides:
disposein classMultiFrame
-
destroy
public void destroy()Destroy this window. This just empties out the contents. -
getMainWindows
Return the list of main windows currently in use.- Returns:
- List of main windows
-
setComponent
The IdvWindow can hold a number of named components. e.g., This could be a toolbar, etc.- Parameters:
componentName- The name or idcomponent- The component
-
addRemovable
_more_- Parameters:
removable- _more_
-
putPersistentComponent
_more_- Parameters:
key- _more_object- _more_
-
getPersistentComponent
_more_- Parameters:
key- _more_- Returns:
- _more_
-
getComponentGroups
_more_- Returns:
- _more_
-
addToGroup
An IdvWindow can hold a group of objects, identified by the groupKey. We use this to store the choosers that are in an window- Parameters:
groupKey- The group key. Usually a String namecomp- The object (ususally a Component) to add to the group
-
getGroup
Get the list of objects that are in the group. If none found return null- Parameters:
groupKey- The group key- Returns:
- List of objects in group or null
-
getComponents
Get the list of components held by the xmlui- Returns:
- components
-
getComponent
The IdvWindow can hold a number of named components. e.g., This could be a toolbar, etc.- Parameters:
componentName- The name or id- Returns:
- The component
-
getWindows
Get all of the current windows.- Returns:
- List of IdvWindow objects
-
hasViewManagers
public boolean hasViewManagers()Does this window contain any view managers- Returns:
- Contains view managers
-
setTheViewManagers
Set the ViewManagers property.- Parameters:
value- The new value for ViewManagers
-
addViewManager
_more_- Parameters:
viewManager- _more_
-
getViewManagers
Get the ViewManagers property.- Returns:
- The ViewManagers
-
setUniqueId
Set the UniqueId property.- Parameters:
value- The new value for UniqueId
-
getUniqueId
Get the UniqueId property.- Returns:
- The UniqueId
-
setIsAMainWindow
public void setIsAMainWindow(boolean value) Set the IsAMainWindow property.- Parameters:
value- The new value for IsAMainWindow
-
getIsAMainWindow
public boolean getIsAMainWindow()Get the IsAMainWindow property.- Returns:
- The IsAMainWindow
-
showWaitCursor
public void showWaitCursor()Show the wait cursor -
showNormalCursor
public void showNormalCursor()Show the normal cursor -
setType
Set the Type property.- Parameters:
value- The new value for Type
-
getType
Get the Type property.- Returns:
- The Type
-
setPersistentComponents
Set the PersistenceComponents property.- Parameters:
value- The new value for PersistenceComponents
-
getPersistentComponents
Get the PersistentComponents property.- Returns:
- The PersistentComponents
-
enableFullScreenMode
Enable full screen mode in the context of mac osx (>=10.7) Special thanks to http://saipullabhotla.blogspot.com/2012/05/enabling-full-screen-mode-for-java.html- Parameters:
window- The window to which you wish to add the full screen option
-