public abstract class Dialogs
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
Constructor and Description |
---|
Dialogs() |
Modifier and Type | Method and Description |
---|---|
static javax.swing.JPanel |
createTextPanel(java.lang.String content) |
private static java.lang.String |
fmtMsg(java.lang.String message) |
static java.lang.Double |
getInput(NumberField.DoubleField field)
Show an input dialog that gets a double within a certain range.
|
static java.lang.Integer |
getInput(NumberField.IntegerField field)
Show an input dialog that gets an integer within a certain range.
|
static java.lang.String |
getInput(java.lang.String title,
java.lang.String message,
java.lang.Object defaultValue)
Show an input dialog that gets a string.
|
static java.lang.String |
htmlCenter(java.lang.String msg)
Converts a simple text message to an html-formatted message
by prepending
<html><center> and escaping all html
special characters within the message. |
static java.lang.String |
nl2br(java.lang.String s) |
static java.lang.String |
nohtml(java.lang.String msg) |
static boolean |
showConfirm(java.lang.Object message)
Show a dialog that gives the user one of two choices to make.
|
static boolean |
showConfirm(java.lang.String msg)
Show a dialog that gives the user one of two choices to make.
|
static void |
showError(java.lang.String message)
Show an error dialog.
|
static void |
showError(java.lang.String message,
java.lang.String title) |
static void |
showMessage(java.lang.String msg)
Show a message dialog using String.format to create the message.
|
static void |
showMessage(java.lang.String format,
java.lang.Object... args)
Show a message dialog using String.format to create the message.
|
static void |
showWarning(java.awt.Component message)
Show a warning dialog.
|
static void |
showWarning(java.lang.String message)
Show a warning dialog.
|
static void |
showWarning(java.lang.String message,
boolean scrollable)
Show a warning dialog.
|
static java.lang.String |
showYesNoCancel(java.lang.Object message)
Show a dialog that gives the user one of three choices to make.
|
static java.lang.String |
showYesNoCancel(java.lang.String msg)
Show a dialog that gives the user one of three choices to make.
|
private static final long serialVersionUID
public static javax.swing.JPanel createTextPanel(java.lang.String content)
private static java.lang.String fmtMsg(java.lang.String message)
public static java.lang.Double getInput(NumberField.DoubleField field)
field
- The double input field.public static java.lang.Integer getInput(NumberField.IntegerField field)
field
- The integer input field.public static java.lang.String getInput(java.lang.String title, java.lang.String message, java.lang.Object defaultValue)
title
- The title (caption) on the dialog window.public static java.lang.String htmlCenter(java.lang.String msg)
<html><center>
and escaping all html
special characters within the message. However if the message
already starts with <html>
, it is returned as-is.msg
- The message to convert to HTMLpublic static java.lang.String nl2br(java.lang.String s)
public static java.lang.String nohtml(java.lang.String msg)
public static boolean showConfirm(java.lang.Object message)
message
- The message on the dialog.public static boolean showConfirm(java.lang.String msg)
msg
- The message on the dialog.public static void showError(java.lang.String message)
message
- The message on the dialog.public static void showError(java.lang.String message, java.lang.String title)
public static void showMessage(java.lang.String msg)
msg
- The message on the dialog.public static void showMessage(java.lang.String format, java.lang.Object... args)
format
- The message on the dialog.args
- Arguments to String.formatpublic static void showWarning(java.awt.Component message)
message
- The message on the dialog.public static void showWarning(java.lang.String message)
message
- The message on the dialog.public static void showWarning(java.lang.String message, boolean scrollable)
message
- The message on the dialog.public static java.lang.String showYesNoCancel(java.lang.Object message)
message
- The message on the dialog.public static java.lang.String showYesNoCancel(java.lang.String msg)
msg
- The message on the dialog.