public class HelpAwareOptionPane
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
HelpAwareOptionPane.ButtonSpec |
Constructor and Description |
---|
HelpAwareOptionPane() |
Modifier and Type | Method and Description |
---|---|
static void |
showMessageDialogInEDT(java.awt.Component parentComponent,
java.lang.Object msg,
java.lang.String title,
int messageType,
java.lang.String helpTopic)
Run it in Event Dispatch Thread.
|
static int |
showOptionDialog(java.awt.Component parentComponent,
java.lang.Object msg,
java.lang.String title,
int messageType,
javax.swing.Icon icon,
HelpAwareOptionPane.ButtonSpec[] options,
HelpAwareOptionPane.ButtonSpec defaultOption,
java.lang.String helpTopic)
Displays an option dialog which is aware of a help context.
|
static int |
showOptionDialog(java.awt.Component parentComponent,
java.lang.Object msg,
java.lang.String title,
int messageType,
java.lang.String helpTopic) |
public static int showOptionDialog(java.awt.Component parentComponent, java.lang.Object msg, java.lang.String title, int messageType, javax.swing.Icon icon, HelpAwareOptionPane.ButtonSpec[] options, HelpAwareOptionPane.ButtonSpec defaultOption, java.lang.String helpTopic)
helpTopic
isn't null,
the dialog includes a "Help" button and launches the help browser if the user presses F1. If the
user clicks on the "Help" button the option dialog remains open and JOSM launches the help
browser.
helpTopic
is the trailing part of a JOSM online help URL, i.e. the part after the leading
http://josm.openstreetmap.de/wiki/Help
. It should start with a leading '/' and it
may include an anchor after a '#'.
Examples
parentComponent
- the parent componentmsg
- the messagetitle
- the titlemessageType
- the message type (see JOptionPane
)icon
- the icon to display. Can be null.options
- the list of options to display. Can be null.defaultOption
- the default option. Can be null.helpTopic
- the help topic. Can be null.JOptionPane.CLOSED_OPTION
public static int showOptionDialog(java.awt.Component parentComponent, java.lang.Object msg, java.lang.String title, int messageType, java.lang.String helpTopic)
parentComponent
- msg
- title
- messageType
- helpTopic
- showOptionDialog(Component, Object, String, int, Icon, ButtonSpec[], ButtonSpec, String)
public static void showMessageDialogInEDT(java.awt.Component parentComponent, java.lang.Object msg, java.lang.String title, int messageType, java.lang.String helpTopic)