Class AskDialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--AskDialog

public class AskDialog
extends java.awt.Dialog

Alexander Luedeke. Neuropraktikum 99. This is the AskDialog class. Die Klasse AsdDialog ist ein Dialog, welche in einem Label einen Text ausgibt. Der Anwender kann dann auf die Knoepfe Cancel, No und Yes druecken. Nach Druecken eines Knopfs wird das Fenster unsichtbar, aber ueber die Methode getResult() kann man das Ergebnis (CANCEL, NO oder YES) erfragen. Wer Objekte dieser Klasse erzeugt, der muss auch dispose zu den Objekten sagen! Objekte dieser Klasse dienen zur Nachfrage beim Anwender. Beispiel: "Text has changed! Save changes ?"

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
static int CANCEL
          moeglicher Ergebnis-Wert; symbolisiert Druecken des Cancel-Knopfs.
static int NO
          moeglicher Ergebnis-Wert; symbolisiert Druecken des No-Knopfs.
private  int result
          der Ergebnis-Wert.
static int UNDEFINED
          moeglicher Ergebnis-Wert; kann nur dann passieren, wenn getResult() vor der Eingabe eines Texts oder dem Druecken eines Knopfs aufgerufen wird.
static int YES
          moeglicher Ergebnis-Wert; symbolisiert Druecken des Yes-Knopfs.
 
Fields inherited from class java.awt.Dialog
base, modal, nameCounter, resizable, serialVersionUID, title
 
Fields inherited from class java.awt.Window
active, base, focusMgr, inputContext, nameCounter, OPENED, ownedWindowList, serialVersionUID, state, warningString, weakThis, windowListener, windowSerializedDataVersion
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, maxSize, ncomponents, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
AskDialog(java.awt.Frame parent, java.lang.String title, boolean modal, java.lang.String text)
          Erzeugt ein AskDialog-Objekt. parent the owner of the dialog title the title of the dialog modal if true, dialog blocks input to the parent window when shown text der Label-Text
 
Method Summary
 int getResult()
          liefert das Ergebnis des Dialogs.
 
Methods inherited from class java.awt.Dialog
, addNotify, constructComponentName, getTitle, initIDs, isModal, isResizable, paramString, setModal, setResizable, setTitle, show
 
Methods inherited from class java.awt.Window
addOwnedWindow, addWindowListener, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, finalize, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postProcessKeyEvent, postWindowEvent, preProcessKeyEvent, processEvent, processWindowEvent, readObject, removeOwnedWindow, removeWindowListener, setFocusOwner, setWarningString, toBack, toFront, transferFocus, writeObject
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, countComponents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, paint, paintComponents, postsOldMouseEvents, preferredSize, print, printComponents, printOneComponent, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, 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, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

YES

public static int YES
moeglicher Ergebnis-Wert; symbolisiert Druecken des Yes-Knopfs.

NO

public static int NO
moeglicher Ergebnis-Wert; symbolisiert Druecken des No-Knopfs.

CANCEL

public static int CANCEL
moeglicher Ergebnis-Wert; symbolisiert Druecken des Cancel-Knopfs.

UNDEFINED

public static int UNDEFINED
moeglicher Ergebnis-Wert; kann nur dann passieren, wenn getResult() vor der Eingabe eines Texts oder dem Druecken eines Knopfs aufgerufen wird.

result

private int result
der Ergebnis-Wert.
Constructor Detail

AskDialog

public AskDialog(java.awt.Frame parent,
                 java.lang.String title,
                 boolean modal,
                 java.lang.String text)
Erzeugt ein AskDialog-Objekt. parent the owner of the dialog title the title of the dialog modal if true, dialog blocks input to the parent window when shown text der Label-Text
Method Detail

getResult

public int getResult()
liefert das Ergebnis des Dialogs.