sam.ui.awt
Class Dialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--sam.ui.awt.Dialog
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
EditBox, InfoBox

public class Dialog
extends java.awt.Dialog

General-purpose dialog box.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int ALWAYS
          Alias of the "ALWAYS" button
static int CANCEL
          Alias of the "CANCEL" button
static int CLOSE
          Alias of the "CLOSE" button
static int EDITABLE
          Flag specifying that the content of this dialog should be editable by the user
static int GO
          Alias of the "GO" button
static int IGNORE
          Alias of the "IGNORE" button
static int INPUT
          Combined mode of for input dialog This is the combination of EDITABLE, OK and CANCEL buttons
static int KILLED
          Result state specifying that the dialog was killed (window closed)
static int NEVER
          Alias of the "NEVER" button
static int NO
          Alias of the "NO" button
static long NO_TIME_LIMIT
          Special time duration specifying no time limit at all
static int NOTHING
          Result state specifying that no button has been choosen
static int OK
          Alias of the "OK" button
static int OPEN
          Alias of the "OPEN" button
static int QUESTION
          Combined mode of for question dialog This is the combination of YES and NO buttons
static int SPAWN
          Marker of non-blocking (non-modal) dialogs
static int TIME_OUT
          Result state specifying that the dialog timed out
static int YES
          Alias of the "YES" button
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
protected Dialog(java.lang.String title, java.awt.Component content, int mode)
          Pop-ups a new information box.
protected Dialog(java.lang.String title, java.awt.Component content, int mode, long lifeTime)
          Pop-ups a new information box.
 
Method Summary
protected  void finalize()
           
 int getChoice()
          Returns user selected button.
protected  java.awt.Component getContent()
          Returns current text.
 void kill()
          Kills this dialog.
 
Methods inherited from class java.awt.Dialog
addNotify, dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, paramString, 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, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, 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
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_TIME_LIMIT

public static final long NO_TIME_LIMIT
Special time duration specifying no time limit at all

See Also:
Constant Field Values

SPAWN

public static final int SPAWN
Marker of non-blocking (non-modal) dialogs

See Also:
Constant Field Values

NOTHING

public static final int NOTHING
Result state specifying that no button has been choosen

See Also:
Constant Field Values

TIME_OUT

public static final int TIME_OUT
Result state specifying that the dialog timed out

See Also:
Constant Field Values

KILLED

public static final int KILLED
Result state specifying that the dialog was killed (window closed)

See Also:
Constant Field Values

EDITABLE

public static final int EDITABLE
Flag specifying that the content of this dialog should be editable by the user

See Also:
Constant Field Values

OK

public static final int OK
Alias of the "OK" button

See Also:
Constant Field Values

CANCEL

public static final int CANCEL
Alias of the "CANCEL" button

See Also:
Constant Field Values

YES

public static final int YES
Alias of the "YES" button

See Also:
Constant Field Values

NO

public static final int NO
Alias of the "NO" button

See Also:
Constant Field Values

ALWAYS

public static final int ALWAYS
Alias of the "ALWAYS" button

See Also:
Constant Field Values

NEVER

public static final int NEVER
Alias of the "NEVER" button

See Also:
Constant Field Values

OPEN

public static final int OPEN
Alias of the "OPEN" button

See Also:
Constant Field Values

CLOSE

public static final int CLOSE
Alias of the "CLOSE" button

See Also:
Constant Field Values

GO

public static final int GO
Alias of the "GO" button

See Also:
Constant Field Values

IGNORE

public static final int IGNORE
Alias of the "IGNORE" button

See Also:
Constant Field Values

INPUT

public static final int INPUT
Combined mode of for input dialog This is the combination of EDITABLE, OK and CANCEL buttons

See Also:
Constant Field Values

QUESTION

public static final int QUESTION
Combined mode of for question dialog This is the combination of YES and NO buttons

See Also:
Constant Field Values
Constructor Detail

Dialog

protected Dialog(java.lang.String title,
                 java.awt.Component content,
                 int mode)
Pop-ups a new information box.

The text can be multi-lined.

Parameters:
title - the title of the dialog.
content - the content to be displayed in this dialog
mode - a combination of options for this dialog, e.g. Dialog.OK | Dialog.CANCEL
See Also:
EDITABLE

Dialog

protected Dialog(java.lang.String title,
                 java.awt.Component content,
                 int mode,
                 long lifeTime)
Pop-ups a new information box.

The text can be multi-lined.

Parameters:
title - the title of the dialog.
content - the content to be displayed in this dialog
mode - a combination of options for this dialog, e.g. Dialog.OK | Dialog.CANCEL
lifeTime - time in seconds after which this box automatically gets dismissed.
Method Detail

finalize

protected void finalize()
Overrides:
finalize in class java.awt.Window

getContent

protected java.awt.Component getContent()
Returns current text.

Useful only if this infobox is editable !


getChoice

public int getChoice()
Returns user selected button. Note that the choice might contain several states combined in addition to the chosen button.

See Also:
NOTHING, KILLED

kill

public void kill()
Kills this dialog.