|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
schmitzm.swing.StatusDialog
public class StatusDialog
Diese Klasse stellt einen modalen Status-Dialog dar. Diese besteht neben
einer Meldung aus einem Status-Balken der
standardmaessig auf 'indeterminate' eingestellt ist
(siehe JProgressBar.setIndeterminate(boolean)
). Darueberhinaus
kann der Dialog ueber einen Abbrechen-Button beendet werden. Wie auf den
Abbruch reagiert wird, ist durch die aufrufende Klasse zu behandeln.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JDialog |
---|
JDialog.AccessibleJDialog |
Nested classes/interfaces inherited from class java.awt.Dialog |
---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected JButton |
button
Button um den Dialog zu beenden. |
static int |
CANCEL_OPTION
Dialog-Option "Abbrechen". |
protected boolean |
canceled
Flag signalisiert, ob der Dialog ueber den Button abgebrochen wurde. |
protected int |
dialogOption
Typ des Dialogs (Stanard: CANCEL_OPTION ). |
protected JLabel |
messageLabel
Label in dem die Meldung angezeigt wird. |
static int |
OK_OPTION
Dialog-Option "Ok". |
protected JProgressBar |
progressBar
Status-Balken, der den Fortschritt anzeigt. |
Fields inherited from class javax.swing.JDialog |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Dialog |
---|
DEFAULT_MODALITY_TYPE |
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 |
Constructor Summary | |
---|---|
StatusDialog(Component parent,
String title,
String message)
Erzeugt einen neuen Status-Dialog. |
|
StatusDialog(Component parent,
String title,
String message,
double relX,
double relY)
Erzeugt einen neuen Status-Dialog. |
|
StatusDialog(Component parent,
String title,
String message,
Icon icon,
double relX,
double relY)
Erzeugt einen neuen Status-Dialog. |
Method Summary | |
---|---|
JProgressBar |
getProgressBar()
Liefert eine Referenz auf den Status-Balken, der im Dialog angezeigt wird. |
protected void |
insertInformationComponents(Vector<Component> list)
Fuegt die Informations-Komponenten des Dialogs (Label und Statusbalken) in eine Liste ein. |
boolean |
isCanceled()
Prueft, ob das Fenster durch den Button abgebrochen wurde. |
void |
setDialogOption(int option)
Setzt die Eigenschaft des Dialog-Buttons. |
void |
setVisible(boolean visible)
Zeigt oder verbirgt den Dialog. |
Methods inherited from class java.awt.Dialog |
---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, show, toBack |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int CANCEL_OPTION
public static final int OK_OPTION
protected JLabel messageLabel
protected JProgressBar progressBar
protected JButton button
protected boolean canceled
protected int dialogOption
CANCEL_OPTION
).
CANCEL_OPTION
,
OK_OPTION
,
setDialogOption(int)
Constructor Detail |
---|
public StatusDialog(Component parent, String title, String message)
parent
- uebergeordnetes Fenster (kann null
sein!)title
- Titel fuer das Fenstermessage
- Meldung, die zu dem Status-Balken angezeigt wirdpublic StatusDialog(Component parent, String title, String message, double relX, double relY)
parent
- uebergeordnetes Fenster (kann null
sein!)title
- Titel fuer das Fenstermessage
- Meldung, die zu dem Status-Balken angezeigt wirdrelX
- relative horizontale Position zum Parent-FensterrelY
- relative vertikale Position zum Parent-Fensterpublic StatusDialog(Component parent, String title, String message, Icon icon, double relX, double relY)
parent
- uebergeordnetes Fenster (kann null
sein!)title
- Titel fuer das Fenstermessage
- Meldung, die zu dem Status-Balken angezeigt wirdicon
- Icon fuer das Status-FensterrelX
- relative horizontale Position zum Parent-FensterrelY
- relative vertikale Position zum Parent-FensterMethod Detail |
---|
protected void insertInformationComponents(Vector<Component> list)
list
- Liste von Komponenten, die im Dialog angezeigt werdenpublic JProgressBar getProgressBar()
public void setDialogOption(int option)
option
- CANCEL_OPTION
oder OK_OPTION
IllegalArgumentException
- falls keine der Optionen
CANCEL_OPTION
oder OK_OPTION
angegeben wurdepublic void setVisible(boolean visible)
canceled
-Flag
mit false
initialisiert.
setVisible
in class Dialog
public boolean isCanceled()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |