|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JOptionPane
org.foray.render.awt.viewer.MessagesDialog
public class MessagesDialog
Die Klasse MessagesDialog
dient der Anzeige von Meldungen.
Die Klasse erweitert JOptionPane
um die Möglichkeit, auf
Knopfdruck
eine Detailanzeige einzublenden, in der z.B. bei Fehlern der StackTrace
ausgegeben
werden kann.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JOptionPane |
---|
JOptionPane.AccessibleJOptionPane |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
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 |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
---|---|
MessagesDialog(Object message,
int messageType,
int optionType,
Icon icon,
Object[] options,
Object initialValue)
Constructor. |
Method Summary | |
---|---|
protected void |
displayDetails(JDialog dialog)
Die Methode fügt in den übergebenen Dialog eine scrollbare Textkomponente ein, in der die Detailinformation angezeigt wird. |
static void |
setTranslator(Translator aRes)
Statically sets the translator that should be used to create messages. |
void |
setValue(Object aValue)
|
static int |
showConfirmDialog(Component parentComponent,
Object message,
String title,
int optionType,
int messageType)
Shows a confirmation dialog. |
static int |
showDetailDialog(Component parentComponent,
Object message,
String title,
int optionType,
int messageType,
Icon icon,
String newDetailInformation)
Shows a detail dialog. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MessagesDialog(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue)
message
- The Object
to display.messageType
- The type of message to be displayed: one of
JOptionPane.ERROR_MESSAGE
,
JOptionPane.INFORMATION_MESSAGE
,
JOptionPane.WARNING_MESSAGE
,
JOptionPane.QUESTION_MESSAGE
, or
JOptionPane.PLAIN_MESSAGE
.optionType
- The options to display in the pane: one of
JOptionPane.DEFAULT_OPTION
,
JOptionPane.YES_NO_OPTION
,
JOptionPane.YES_NO_CANCEL_OPTION
, or
JOptionPane.OK_CANCEL_OPTION
.icon
- The Icon image to display.options
- The choices the user can select.initialValue
- The choice that is initially selected; if
null
, then nothing will be initially selected;
only meaningful if options
is usedMethod Detail |
---|
public static void setTranslator(Translator aRes)
aRes
- the Translator resource.public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)
parentComponent
- The parent component.message
- The message to display.title
- The title for the dialog.optionType
- The options to display in the pane: one of
JOptionPane.DEFAULT_OPTION
,
JOptionPane.YES_NO_OPTION
,
JOptionPane.YES_NO_CANCEL_OPTION
, or
JOptionPane.OK_CANCEL_OPTION
.messageType
- The type of message to be displayed: one of
JOptionPane.ERROR_MESSAGE
,
JOptionPane.INFORMATION_MESSAGE
,
JOptionPane.WARNING_MESSAGE
,
JOptionPane.QUESTION_MESSAGE
, or
JOptionPane.PLAIN_MESSAGE
.
JOptionPane.YES_OPTION
,
JOptionPane.NO_OPTION
,
JOptionPane.CANCEL_OPTION
,
JOptionPane.OK_OPTION
, or
JOptionPane.CLOSED_OPTION
.public static int showDetailDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, String newDetailInformation)
parentComponent
- The parent component.message
- The message to display.title
- The title for the dialog.optionType
- The options to display in the pane: one of
JOptionPane.DEFAULT_OPTION
,
JOptionPane.YES_NO_OPTION
,
JOptionPane.YES_NO_CANCEL_OPTION
, or
JOptionPane.OK_CANCEL_OPTION
.messageType
- The type of message to be displayed: one of
JOptionPane.ERROR_MESSAGE
,
JOptionPane.INFORMATION_MESSAGE
,
JOptionPane.WARNING_MESSAGE
,
JOptionPane.QUESTION_MESSAGE
, or
JOptionPane.PLAIN_MESSAGE
.icon
- The icon to display.newDetailInformation
- The detail information to be displayed.
JOptionPane.YES_OPTION
,
JOptionPane.NO_OPTION
,
JOptionPane.CANCEL_OPTION
,
JOptionPane.OK_OPTION
, or
JOptionPane.CLOSED_OPTION
.protected void displayDetails(JDialog dialog)
dialog
- Der Dialog, in den die Textkomponente eingefügt werden
sollpublic void setValue(Object aValue)
setValue
in class JOptionPane
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |