VistALink v1.5.0.026

gov.va.med.vistalink.security
Class DialogConfirm

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjavax.swing.JDialog
                      extended bygov.va.med.vistalink.security.DialogConfirm
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public final class DialogConfirm
extends javax.swing.JDialog

Swing Dialog to display an error, informational message, help, or post-sign-in text to user, and collect their response (OK or CANCEL, depending on type of message).

Version:
1.5.0.026
Author:
Application Modernization - Foundations Team
See Also:
VistaLoginModule, CallbackHandlerSwing, Serialized Form

Nested Class Summary
 class DialogConfirm.DialogConfirmFocusTraversalPolicy
          Provides a focus traversal policy for this dialog
 
Field Summary
static int CANCEL_OPTION
          return value if user pressed CANCEL to close dialog
static int MODE_ERROR_MESSAGE
          For error message confirmations (error icon; OK and CANCEL buttons)
static int MODE_HELP_MESSAGE
          For help message confirmations (information icon; OK button)
static int MODE_INFORMATION_MESSAGE
          For "success" message confirmations (success icon; OK button)
static int OK_OPTION
          return value if user pressed OK to close dialog
static int TIMEOUT_OPTION
          return value if user timed out to close dialog
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Method Summary
static int showDialogConfirm(java.awt.Frame parent, java.lang.String message, java.lang.String windowTitle, int messageMode, int timeoutInSeconds)
          Create a modal Swing dialog to present an error message to the user
 
Methods inherited from class javax.swing.JDialog
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update
 
Methods inherited from class java.awt.Dialog
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MODE_ERROR_MESSAGE

public static final int MODE_ERROR_MESSAGE
For error message confirmations (error icon; OK and CANCEL buttons)

See Also:
Constant Field Values

MODE_INFORMATION_MESSAGE

public static final int MODE_INFORMATION_MESSAGE
For "success" message confirmations (success icon; OK button)

See Also:
Constant Field Values

MODE_HELP_MESSAGE

public static final int MODE_HELP_MESSAGE
For help message confirmations (information icon; OK button)

See Also:
Constant Field Values

OK_OPTION

public static final int OK_OPTION
return value if user pressed OK to close dialog

See Also:
Constant Field Values

CANCEL_OPTION

public static final int CANCEL_OPTION
return value if user pressed CANCEL to close dialog

See Also:
Constant Field Values

TIMEOUT_OPTION

public static final int TIMEOUT_OPTION
return value if user timed out to close dialog

See Also:
Constant Field Values
Method Detail

showDialogConfirm

public static int showDialogConfirm(java.awt.Frame parent,
                                    java.lang.String message,
                                    java.lang.String windowTitle,
                                    int messageMode,
                                    int timeoutInSeconds)
Create a modal Swing dialog to present an error message to the user

Parameters:
parent - The parent window frame
message - The message to display
windowTitle - The title for the dialog window
messageMode - mode (determines what logo to display and whether to display a Cancel button)
timeoutInSeconds - the timeout value for the dialog
Returns:
what caused the dialog to close -- one of the OK_OPTION, CANCEL_OPTION or TIMEOUT_OPTION int values provided by this class.

VistALink v1.5.0.026

VistALink v1.5.0.026