Package org.openstreetmap.josm.gui
Class ExtendedDialog
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Dialog
-
- javax.swing.JDialog
-
- org.openstreetmap.josm.gui.ExtendedDialog
-
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,RootPaneContainer
,WindowConstants
,IExtendedDialog
- Direct Known Subclasses:
AbstractListEditor
,AddImageryDialog
,AddImageryLayerAction.SelectWmsLayersDialog
,AddTagsDialog
,AdjustTimezoneAndOffsetDialog
,AdvancedCorrelationSettingsDialog
,ConflictResolutionDialog
,CustomProjectionChoice.ParameterInfoDialog
,DeleteAction.ConfirmDeleteDialog
,ImageryAdjustAction.ConfirmOverwriteBookmarkDialog
,ImageryAdjustAction.ImageryOffsetDialog
,InspectPrimitiveDialog
,JumpToAction.JumpToPositionDialog
,LatLonDialog
,LogShowDialog
,MenuItemSearchDialog
,MergeGpxLayerDialog
,NoteInputDialog
,NoteSortDialog
,OpenLocationAction.WhichTasksToPerformDialog
,OsmIdSelectionDialog
,PropertiesMembershipChoiceDialog
,RelationEditor
,SearchDialog
,SelectAction.ConfirmMoveDialog
,SessionSaveAsAction.SessionSaveAsDialog
,SourceEditor.EditSourceEntryDialog
,SplitWayAction.SegmentToKeepSelectionDialog
,StringEditor
,SynchronizeTimeFromPhotoDialog
,TagEditHelper.AbstractTagsDialog
,TaggingPreset.PresetDialog
,TaggingPresetSearchDialog
,TaggingPresetSearchPrimitiveDialog
,UserQueryList.EditItemDialog
,ValidatorListManagementDialog
,WMTSTileSource.SelectLayerDialog
public class ExtendedDialog extends JDialog implements IExtendedDialog
General configurable dialog window. If dialog is modal, you can usegetValue()
to retrieve the button index. Note that the user can close the dialog by other means. This is usually equivalent to cancel action. For non-modal dialogs,buttonAction(int, ActionEvent)
can be overridden. There are various options, see below. Note: The button indices are counted from 1 and upwards. So forgetValue()
,setDefaultButton(int)
andsetCancelButton(java.lang.Integer...)
the first button has index 1. Simple example:ExtendedDialog ed = new ExtendedDialog( MainApplication.getMainFrame(), tr("Dialog Title"), new String[] {tr("Ok"), tr("Cancel")}); ed.setButtonIcons(new String[] {"ok", "cancel"}); // optional ed.setIcon(JOptionPane.WARNING_MESSAGE); // optional ed.setContent(tr("Really proceed? Interesting things may happen...")); ed.showDialog(); if (ed.getValue() == 1) { // user clicked first button "Ok" // proceed... }
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
ExtendedDialog.HelpAction
-
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, Window.Type
-
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 Modifier and Type Field Description private Icon[]
bIcons
private String[]
bTexts
private String[]
bToolTipTexts
protected List<JButton>
buttons
private Set<Integer>
cancelButtonIdx
private Component
content
protected Insets
contentInsets
protected JButton
defaultButton
private int
defaultButtonIdx
private WindowGeometry
defaultWindowGeometry
static int
DialogClosedOtherwise
private boolean
disposeOnClose
private boolean
focusOnDefaultButton
private String
helpTopic
the help topicprivate Icon
icon
private boolean
modal
private Component
parent
private boolean
placeContentInScrollPane
set to true if the content of the extended dialog should be placed in aJScrollPane
private String
rememberSizePref
private int
result
private boolean
setupDone
private boolean
showHelpButton
true, if the dialog should include a help buttonprivate boolean
toggleable
private ConditionalOptionPaneUtil.MessagePanel
togglePanel
private String
togglePref
private int
toggleValue
-
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
-
Constructor Summary
Constructors Constructor Description ExtendedDialog(Component parent, String title, String... buttonTexts)
This method sets up the most basic options for the dialog.ExtendedDialog(Component parent, String title, String[] buttonTexts, boolean modal)
Same as above but lets you define if the dialog should be modal.ExtendedDialog(Component parent, String title, String[] buttonTexts, boolean modal, boolean disposeOnClose)
Same as above but lets you define if the dialog should be disposed on close.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
buttonAction(int buttonIndex, ActionEvent evt)
This gets performed whenever a button is clicked or activatedExtendedDialog
configureContextsensitiveHelp(String helpTopic, boolean showHelpButton)
Configures how this dialog support for context sensitive help.protected Action
createButtonAction(int i)
protected Dimension
findMaxDialogSize()
Tries to find a good value of how large the dialog should beint
getValue()
Retrieve the user choice after the dialog has been closed.protected WindowGeometry
initWindowGeometry()
protected void
rememberWindowGeometry(WindowGeometry geometry)
private void
requestFocusToDefaultButton()
private static Frame
searchRealParent(Component parent)
ExtendedDialog
setButtonIcons(String... buttonIcons)
Convenience method to provide image names instead of images.ExtendedDialog
setButtonIcons(Icon... buttonIcons)
Allows decorating the buttons with icons.ExtendedDialog
setCancelButton(Integer... cancelButtonIdx)
Used in combination with toggle: If the user presses 'cancel' the toggle settings are ignored and not saved to the prefExtendedDialog
setContent(Component content)
Sets the content that will be displayed in the message dialog.ExtendedDialog
setContent(Component content, boolean placeContentInScrollPane)
Sets the content that will be displayed in the message dialog.ExtendedDialog
setContent(String message)
Sets the message that will be displayed.ExtendedDialog
setDefaultButton(int defaultButtonIdx)
Sets the button that will react to ENTER.void
setFocusOnDefaultButton(boolean focus)
Makes default button request initial focus or not.ExtendedDialog
setIcon(int messageType)
Convenience method to allow values that would be accepted byJOptionPane
as messageType.ExtendedDialog
setIcon(Icon icon)
Decorate the dialog with an icon that is shown on the left part of the window area.ExtendedDialog
setRememberWindowGeometry(String pref, WindowGeometry wg)
Call this if you want the dialog to remember the geometry (size and position) set by the user.ExtendedDialog
setToolTipTexts(String... toolTipTexts)
Allows decorating the buttons with tooltips.void
setupDialog()
This is called byIExtendedDialog.showDialog()
.private void
setupEscListener()
Makes the dialog listen to ESC keypressedvoid
setVisible(boolean visible)
Override setVisible to be able to save the window geometry if requiredExtendedDialog
showDialog()
Show the dialog to the user.private static JMultilineLabel
string2label(String msg)
Convenience function that converts a given string into a JMultilineLabelboolean
toggleCheckState()
This function returns true if the dialog has been set to "do not show again"ExtendedDialog
toggleEnable(String togglePref)
Calling this will offer the user a "Do not show again" checkbox for the dialog.protected void
toggleSaveState()
This function checks the state of the "Do not show again" checkbox and writes the corresponding pref.-
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
disposeOnClose
private final boolean disposeOnClose
-
result
private volatile int result
-
DialogClosedOtherwise
public static final int DialogClosedOtherwise
- See Also:
- Constant Field Values
-
toggleable
private boolean toggleable
-
rememberSizePref
private String rememberSizePref
-
defaultWindowGeometry
private transient WindowGeometry defaultWindowGeometry
-
togglePref
private String togglePref
-
toggleValue
private int toggleValue
-
togglePanel
private ConditionalOptionPaneUtil.MessagePanel togglePanel
-
bToolTipTexts
private String[] bToolTipTexts
-
cancelButtonIdx
private Set<Integer> cancelButtonIdx
-
defaultButtonIdx
private int defaultButtonIdx
-
defaultButton
protected JButton defaultButton
-
modal
private final boolean modal
-
focusOnDefaultButton
private boolean focusOnDefaultButton
-
showHelpButton
private boolean showHelpButton
true, if the dialog should include a help button
-
placeContentInScrollPane
private boolean placeContentInScrollPane
set to true if the content of the extended dialog should be placed in aJScrollPane
-
contentInsets
protected transient Insets contentInsets
-
setupDone
private boolean setupDone
-
-
Constructor Detail
-
ExtendedDialog
public ExtendedDialog(Component parent, String title, String... buttonTexts)
This method sets up the most basic options for the dialog. Add more advanced features with dedicated methods. Possible features:setButtonIcons
setContent
toggleEnable
toggleDisable
setToggleCheckboxText
setRememberWindowGeometry
showDialog
to display it. You can receive the user's choice usinggetValue
. Have a look at this function for possible return values.- Parameters:
parent
- The parent element that will be used for position and maximum sizetitle
- The text that will be shown in the window titlebarbuttonTexts
- String Array of the text that will appear on the buttons. The first button is the default one.
-
ExtendedDialog
public ExtendedDialog(Component parent, String title, String[] buttonTexts, boolean modal)
Same as above but lets you define if the dialog should be modal.- Parameters:
parent
- The parent element that will be used for position and maximum sizetitle
- The text that will be shown in the window titlebarbuttonTexts
- String Array of the text that will appear on the buttons. The first button is the default one.modal
- Set it totrue
if you want the dialog to be modal
-
ExtendedDialog
public ExtendedDialog(Component parent, String title, String[] buttonTexts, boolean modal, boolean disposeOnClose)
Same as above but lets you define if the dialog should be disposed on close.- Parameters:
parent
- The parent element that will be used for position and maximum sizetitle
- The text that will be shown in the window titlebarbuttonTexts
- String Array of the text that will appear on the buttons. The first button is the default one.modal
- Set it totrue
if you want the dialog to be modaldisposeOnClose
- whether to callWindow.dispose()
when closing the dialog
-
-
Method Detail
-
searchRealParent
private static Frame searchRealParent(Component parent)
-
setButtonIcons
public ExtendedDialog setButtonIcons(Icon... buttonIcons)
Description copied from interface:IExtendedDialog
Allows decorating the buttons with icons.- Specified by:
setButtonIcons
in interfaceIExtendedDialog
- Parameters:
buttonIcons
- The button icons- Returns:
this
-
setButtonIcons
public ExtendedDialog setButtonIcons(String... buttonIcons)
Description copied from interface:IExtendedDialog
Convenience method to provide image names instead of images.- Specified by:
setButtonIcons
in interfaceIExtendedDialog
- Parameters:
buttonIcons
- The button icon names- Returns:
this
-
setToolTipTexts
public ExtendedDialog setToolTipTexts(String... toolTipTexts)
Description copied from interface:IExtendedDialog
Allows decorating the buttons with tooltips. Expects a String array with translated tooltip texts.- Specified by:
setToolTipTexts
in interfaceIExtendedDialog
- Parameters:
toolTipTexts
- the tool tip texts. Ignored, if null.- Returns:
this
-
setContent
public ExtendedDialog setContent(Component content)
Description copied from interface:IExtendedDialog
Sets the content that will be displayed in the message dialog. Note that depending on your other settings more UI elements may appear. The content is played on top of the other elements though.- Specified by:
setContent
in interfaceIExtendedDialog
- Parameters:
content
- Any element that can be displayed in the message dialog- Returns:
this
-
setContent
public ExtendedDialog setContent(Component content, boolean placeContentInScrollPane)
Description copied from interface:IExtendedDialog
Sets the content that will be displayed in the message dialog. Note that depending on your other settings more UI elements may appear. The content is played on top of the other elements though.- Specified by:
setContent
in interfaceIExtendedDialog
- Parameters:
content
- Any element that can be displayed in the message dialogplaceContentInScrollPane
- if true, places the content in a JScrollPane- Returns:
this
-
setContent
public ExtendedDialog setContent(String message)
Description copied from interface:IExtendedDialog
Sets the message that will be displayed. The String will be automatically wrapped if it is too long. Note that depending on your other settings more UI elements may appear. The content is played on top of the other elements though.- Specified by:
setContent
in interfaceIExtendedDialog
- Parameters:
message
- The text that should be shown to the user- Returns:
this
-
setIcon
public ExtendedDialog setIcon(Icon icon)
Description copied from interface:IExtendedDialog
Decorate the dialog with an icon that is shown on the left part of the window area. (Similar to how it is done inJOptionPane
)- Specified by:
setIcon
in interfaceIExtendedDialog
- Parameters:
icon
- The icon to display- Returns:
this
-
setIcon
public ExtendedDialog setIcon(int messageType)
Description copied from interface:IExtendedDialog
Convenience method to allow values that would be accepted byJOptionPane
as messageType.- Specified by:
setIcon
in interfaceIExtendedDialog
- Parameters:
messageType
- TheJOptionPane
messageType- Returns:
this
-
showDialog
public ExtendedDialog showDialog()
Description copied from interface:IExtendedDialog
Show the dialog to the user. Call this after you have set all options for the dialog. You can retrieve the result usingIExtendedDialog.getValue()
.- Specified by:
showDialog
in interfaceIExtendedDialog
- Returns:
this
-
getValue
public int getValue()
Description copied from interface:IExtendedDialog
Retrieve the user choice after the dialog has been closed.- Specified by:
getValue
in interfaceIExtendedDialog
- Returns:
- The selected button. The count starts with 1.
- A return value of
DialogClosedOtherwise
means the dialog has been closed otherwise.
-
setupDialog
public void setupDialog()
Description copied from interface:IExtendedDialog
This is called byIExtendedDialog.showDialog()
. Only invoke from outside if you need to modify the contentPane- Specified by:
setupDialog
in interfaceIExtendedDialog
-
createButtonAction
protected Action createButtonAction(int i)
-
buttonAction
protected void buttonAction(int buttonIndex, ActionEvent evt)
This gets performed whenever a button is clicked or activated- Parameters:
buttonIndex
- the button index (first index is 0)evt
- the button event
-
findMaxDialogSize
protected Dimension findMaxDialogSize()
Tries to find a good value of how large the dialog should be- Returns:
- Dimension Size of the parent component if visible or 2/3 of screen size if not available or hidden
-
setupEscListener
private void setupEscListener()
Makes the dialog listen to ESC keypressed
-
rememberWindowGeometry
protected final void rememberWindowGeometry(WindowGeometry geometry)
-
initWindowGeometry
protected final WindowGeometry initWindowGeometry()
-
setVisible
public void setVisible(boolean visible)
Override setVisible to be able to save the window geometry if required- Overrides:
setVisible
in classDialog
-
setRememberWindowGeometry
public ExtendedDialog setRememberWindowGeometry(String pref, WindowGeometry wg)
Description copied from interface:IExtendedDialog
Call this if you want the dialog to remember the geometry (size and position) set by the user. Set the pref tonull
or to an empty string to disable again. By default, it's disabled. Note: If you want to set the width of this dialog directly use the usual setSize, setPreferredSize, setMaxSize, setMinSize- Specified by:
setRememberWindowGeometry
in interfaceIExtendedDialog
- Parameters:
pref
- The preference to save the dimension towg
- The default window geometry that should be used if no existing preference is found (only takes effect ifpref
is not null or empty- Returns:
this
-
toggleEnable
public ExtendedDialog toggleEnable(String togglePref)
Description copied from interface:IExtendedDialog
Calling this will offer the user a "Do not show again" checkbox for the dialog. Default is to not offer the choice; the dialog will be shown every time. Currently, this is not supported for non-modal dialogs.- Specified by:
toggleEnable
in interfaceIExtendedDialog
- Parameters:
togglePref
- The preference to save the checkbox state to- Returns:
this
-
setDefaultButton
public ExtendedDialog setDefaultButton(int defaultButtonIdx)
Description copied from interface:IExtendedDialog
Sets the button that will react to ENTER.- Specified by:
setDefaultButton
in interfaceIExtendedDialog
- Parameters:
defaultButtonIdx
- The button index (starts to 1)- Returns:
this
-
setCancelButton
public ExtendedDialog setCancelButton(Integer... cancelButtonIdx)
Description copied from interface:IExtendedDialog
Used in combination with toggle: If the user presses 'cancel' the toggle settings are ignored and not saved to the pref- Specified by:
setCancelButton
in interfaceIExtendedDialog
- Parameters:
cancelButtonIdx
- index of the button that stands for cancel, accepts multiple values- Returns:
this
-
setFocusOnDefaultButton
public void setFocusOnDefaultButton(boolean focus)
Description copied from interface:IExtendedDialog
Makes default button request initial focus or not.- Specified by:
setFocusOnDefaultButton
in interfaceIExtendedDialog
- Parameters:
focus
-true
to make default button request initial focus
-
requestFocusToDefaultButton
private void requestFocusToDefaultButton()
-
toggleCheckState
public final boolean toggleCheckState()
Description copied from interface:IExtendedDialog
This function returns true if the dialog has been set to "do not show again"- Specified by:
toggleCheckState
in interfaceIExtendedDialog
- Returns:
- true if dialog should not be shown again
-
toggleSaveState
protected void toggleSaveState()
This function checks the state of the "Do not show again" checkbox and writes the corresponding pref.
-
string2label
private static JMultilineLabel string2label(String msg)
Convenience function that converts a given string into a JMultilineLabel- Parameters:
msg
- the message to display- Returns:
- JMultilineLabel displaying
msg
-
configureContextsensitiveHelp
public ExtendedDialog configureContextsensitiveHelp(String helpTopic, boolean showHelpButton)
Description copied from interface:IExtendedDialog
Configures how this dialog support for context sensitive help.- if helpTopic is null, the dialog doesn't provide context sensitive help
- if helpTopic != null, the dialog redirect user to the help page for this helpTopic when the user clicks F1 in the dialog
- if showHelpButton is true, the dialog displays "Help" button (rightmost button in the button row)
- Specified by:
configureContextsensitiveHelp
in interfaceIExtendedDialog
- Parameters:
helpTopic
- the help topicshowHelpButton
- true, if the dialog displays a help button- Returns:
this
-
-