|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaxodraw.gui.JaxoDialogs
public final class JaxoDialogs
A convenience class for user input dialogs. The common 'parent' Component argument is the Component whose Window to use as owner for the dialog. It may be 'null' (history, it was), but this should be avoided in future.
Method Summary | |
---|---|
static java.lang.String |
getDescription(java.awt.Component parent,
java.lang.String old)
Opens a dialog to choose a new description for a graph. |
static java.lang.String |
getNewTabName(java.awt.Component parent,
java.lang.String oldName)
Pops up a JOptionPane to allow the user to enter some text. |
static java.lang.String |
getText(java.awt.Component parent)
Opens a dialog to enter a text. |
static javax.swing.JDialog |
newDialog(java.awt.Component aparent,
java.lang.String title,
boolean modal)
A new JDialog with the first Dialog/Frame ancestor as owner and the given arguments. |
static javax.swing.JPanel |
newLineBoxLayoutPanel()
A new JPanel with LINE_AXIS BoxLayout. |
static javax.swing.JPanel |
newPageBoxLayoutPanel()
A new JPanel with PAGE_AXIS BoxLayout. |
static javax.swing.JPanel |
newTitledBorderLayoutPanel(java.lang.String key)
A new JPanel with BorderLayout and a titled (translated) border. |
static javax.swing.JPanel |
newTitledFlowLayoutPanel(java.lang.String key)
A new JPanel with FlowLayout and a titled (translated) border. |
static javax.swing.JPanel |
newTitledLayoutPanel(java.lang.String key,
java.awt.LayoutManager l)
A new JPanel with the given layout and a titled (translated) border. |
static javax.swing.JPanel |
newTitledLineBoxLayoutPanel(java.lang.String key)
A new JPanel with LINE_AXIS BoxLayout and a titled (translated) border. |
static javax.swing.JPanel |
newTitledPageBoxLayoutPanel(java.lang.String key)
A new JPanel with PAGE_AXIS BoxLayout and a titled (translated) border. |
static void |
showErrorDialog(java.awt.Component parent,
java.lang.String message)
Shows a simple MessageDialog to display an error message. |
static void |
showErrorDialog(java.awt.Component parent,
java.lang.String message,
java.lang.String title)
Shows a simple MessageDialog to display an error message. |
static void |
showI18NErrorDialog(java.awt.Component parent,
java.lang.String messageKey)
Shows a simple MessageDialog to display an error message. |
static void |
showInfoDialog(java.awt.Component parent,
java.lang.String message,
java.lang.String title)
Shows a simple MessageDialog to display an info message. |
static void |
showMiniDialog(java.awt.Component parent,
java.lang.String title,
java.lang.Object contents,
java.awt.event.ActionListener l)
Show 'contents' in a new modal dialog with title 'title' and owner determined by 'parent'; adding "OK" and "Cancel" buttons. |
static java.lang.String |
translatedWindowTitle(java.lang.String text)
Format a text that is already translated as a window title (usually, adding prefix). |
static java.lang.String |
windowTitle(JaxoDictionary d,
java.lang.String key)
Like JaxoDictionary.value(String) ,
but format as a window title (usually, adding prefix). |
java.lang.String |
windowTitle(JaxoDictionary d,
java.lang.String key,
java.lang.Object[] arguments)
Like JaxoDictionary.message(String,Object[]) ,
but format as a window title (usually, adding prefix). |
static java.lang.String |
windowTitle(java.lang.String key)
Like JaxoLanguage.translate(String) ,
but format as a window title (usually, adding prefix). |
static java.lang.String |
windowTitle(java.lang.String key,
java.lang.Object[] arguments)
Like JaxoLanguage.message(String,Object[]) ,
but format as a window title (usually, adding prefix). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String translatedWindowTitle(java.lang.String text)
text
- The title text.
public static java.lang.String windowTitle(java.lang.String key)
JaxoLanguage.translate(String)
,
but format as a window title (usually, adding prefix).
key
- The key of the title text.
public static java.lang.String windowTitle(java.lang.String key, java.lang.Object[] arguments)
JaxoLanguage.message(String,Object[])
,
but format as a window title (usually, adding prefix).
key
- The key of the title text.arguments
- An array of arguments.
public static java.lang.String windowTitle(JaxoDictionary d, java.lang.String key)
JaxoDictionary.value(String)
,
but format as a window title (usually, adding prefix).
d
- The dictionary for the title text.key
- The key of the title text.
public java.lang.String windowTitle(JaxoDictionary d, java.lang.String key, java.lang.Object[] arguments)
JaxoDictionary.message(String,Object[])
,
but format as a window title (usually, adding prefix).
key
- The key of the title text.d
- The dictionary for the title text.arguments
- An array of arguments.
public static javax.swing.JDialog newDialog(java.awt.Component aparent, java.lang.String title, boolean modal)
aparent
- The parent component.title
- The dialog title.modal
- True to make the dialog modal.
public static void showMiniDialog(java.awt.Component parent, java.lang.String title, java.lang.Object contents, java.awt.event.ActionListener l)
parent
- The parent component.title
- The title.contents
- The dialog contents.l
- The actionlistener to notify if the dialog is approved. If l is null,
this method returns without bringing up the dialog.public static void showErrorDialog(java.awt.Component parent, java.lang.String message, java.lang.String title)
parent
- The parent component.message
- The message to display.title
- The window title.public static void showErrorDialog(java.awt.Component parent, java.lang.String message)
parent
- The parent component.message
- The message to display.public static void showInfoDialog(java.awt.Component parent, java.lang.String message, java.lang.String title)
parent
- The parent component.message
- The message to display.title
- The window title.public static void showI18NErrorDialog(java.awt.Component parent, java.lang.String messageKey)
parent
- The parent component.messageKey
- The ResourceBundle key to look up the message.public static java.lang.String getNewTabName(java.awt.Component parent, java.lang.String oldName)
parent
- The parent component.oldName
- The old tab name.
public static java.lang.String getDescription(java.awt.Component parent, java.lang.String old)
parent
- The parent component.old
- The old description.
public static java.lang.String getText(java.awt.Component parent)
parent
- The parent component.
public static javax.swing.JPanel newLineBoxLayoutPanel()
public static javax.swing.JPanel newPageBoxLayoutPanel()
public static javax.swing.JPanel newTitledLineBoxLayoutPanel(java.lang.String key)
key
- The key of the title.
public static javax.swing.JPanel newTitledPageBoxLayoutPanel(java.lang.String key)
key
- The key of the title.
public static javax.swing.JPanel newTitledFlowLayoutPanel(java.lang.String key)
key
- The key of the title.
public static javax.swing.JPanel newTitledBorderLayoutPanel(java.lang.String key)
key
- The key of the title.
public static javax.swing.JPanel newTitledLayoutPanel(java.lang.String key, java.awt.LayoutManager l)
key
- The key of the title.l
- The LayoutManager to use.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |