## org.das2.util.WindowManager

Keep track of window positions. Windows should be passed by this class before they are realized, and the name property of the dialog will be used to look up the last size and position. When the window has a parent, the position is stored relative to the parent. Finally when a window is dismissed, this class should be called again so that the position is kept.

## WindowManager( )

## getInstance

getInstance( ) → org.das2.util.WindowManager

### Returns:

org.das2.util.WindowManager
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## recallWindowSizePosition

recallWindowSizePosition( java.awt.Window window ) → void

call this before the window.

### Parameters

window - the window.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## recordWindowSizePosition

recordWindowSizePosition( java.awt.Window window ) → void

record the final position of the dialog. This will store the position in the Java prefs manager for this class.

### Parameters

window - the window

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## showConfirmDialog

showConfirmDialog( java.awt.Component parent, javax.swing.JPanel omessage, String title, int optionType, int messageType, javax.swing.Icon icon ) → int

TODO: this will show the icon.

### Parameters

parent - a Component
omessage - a JPanel
title - a String
optionType - an int
messageType - an int
icon - an Icon

### Returns:

an int
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## showConfirmDialog

showConfirmDialog( java.awt.Component parent, Object omessage, String title, int optionType ) → int

new okay/cancel dialog that is resizable and is made with a simple dialog.

### Parameters

parent - the parent window or dialog.
omessage - String or Component.
title - the dialog title.
optionType - an int

### Returns:

JOptionPane.OK_OPTION, JOptionPane.CANCEL_OPTION.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## showModalDialog

showModalDialog( java.awt.Dialog dia ) → void

convenient method for showing dialog which is modal.

### Parameters

dia - the dialog that is set to be modal.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]