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:
java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,javax.accessibility.Accessible,javax.swing.RootPaneContainer,javax.swing.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,SessionSaveAction.SessionSaveAsDialog,SourceEditor.EditSourceEntryDialog,SplitWayAction.SegmentToKeepSelectionDialog,StringEditor,SynchronizeTimeFromPhotoDialog,TagEditHelper.AbstractTagsDialog,TaggingPreset.PresetDialog,TaggingPresetSearchDialog,TaggingPresetSearchPrimitiveDialog,UserQueryList.EditItemDialog,ValidatorListManagementDialog,WMTSTileSource.SelectLayerDialog
public class ExtendedDialog extends javax.swing.JDialog implements IExtendedDialog
General configurable dialog window.If dialog is modal, you can use
getValue()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 for
getValue(),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) classExtendedDialog.HelpAction-
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
-
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.Icon[]bIconsprivate java.lang.String[]bTextsprivate java.lang.String[]bToolTipTextsprotected java.util.List<javax.swing.JButton>buttonsprivate java.util.Set<java.lang.Integer>cancelButtonIdxprivate java.awt.Componentcontentprotected java.awt.InsetscontentInsetsprotected javax.swing.JButtondefaultButtonprivate intdefaultButtonIdxprivate WindowGeometrydefaultWindowGeometrystatic intDialogClosedOtherwiseprivate booleandisposeOnCloseprivate booleanfocusOnDefaultButtonprivate java.lang.StringhelpTopicthe help topicprivate javax.swing.Iconiconprivate booleanisModalprivate java.awt.ComponentparentComponentprivate booleanplaceContentInScrollPaneset to true if the content of the extended dialog should be placed in aJScrollPaneprivate java.lang.StringrememberSizePrefprivate intresultprivate booleansetupDoneprivate booleanshowHelpButtontrue, if the dialog should include a help buttonprivate booleantoggleableprivate ConditionalOptionPaneUtil.MessagePaneltogglePanelprivate java.lang.StringtogglePrefprivate inttoggleValue-
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description ExtendedDialog(java.awt.Component parent, java.lang.String title, java.lang.String... buttonTexts)This method sets up the most basic options for the dialog.ExtendedDialog(java.awt.Component parent, java.lang.String title, java.lang.String[] buttonTexts, boolean modal)Same as above but lets you define if the dialog should be modal.ExtendedDialog(java.awt.Component parent, java.lang.String title, java.lang.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 voidbuttonAction(int buttonIndex, java.awt.event.ActionEvent evt)This gets performed whenever a button is clicked or activatedExtendedDialogconfigureContextsensitiveHelp(java.lang.String helpTopic, boolean showHelpButton)Configures how this dialog support for context sensitive help.protected javax.swing.ActioncreateButtonAction(int i)protected java.awt.DimensionfindMaxDialogSize()Tries to find a good value of how large the dialog should beintgetValue()Retrieve the user choice after the dialog has been closed.protected WindowGeometryinitWindowGeometry()protected voidrememberWindowGeometry(WindowGeometry geometry)private voidrequestFocusToDefaultButton()private static java.awt.FramesearchRealParent(java.awt.Component parent)ExtendedDialogsetButtonIcons(java.lang.String... buttonIcons)Convenience method to provide image names instead of images.ExtendedDialogsetButtonIcons(javax.swing.Icon... buttonIcons)Allows decorating the buttons with icons.ExtendedDialogsetCancelButton(java.lang.Integer... cancelButtonIdx)Used in combination with toggle: If the user presses 'cancel' the toggle settings are ignored and not saved to the prefExtendedDialogsetContent(java.awt.Component content)Sets the content that will be displayed in the message dialog.ExtendedDialogsetContent(java.awt.Component content, boolean placeContentInScrollPane)Sets the content that will be displayed in the message dialog.ExtendedDialogsetContent(java.lang.String message)Sets the message that will be displayed.ExtendedDialogsetDefaultButton(int defaultButtonIdx)Sets the button that will react to ENTER.voidsetFocusOnDefaultButton(boolean focus)Makes default button request initial focus or not.ExtendedDialogsetIcon(int messageType)Convenience method to allow values that would be accepted byJOptionPaneas messageType.ExtendedDialogsetIcon(javax.swing.Icon icon)Decorate the dialog with an icon that is shown on the left part of the window area.ExtendedDialogsetRememberWindowGeometry(java.lang.String pref, WindowGeometry wg)Call this if you want the dialog to remember the geometry (size and position) set by the user.ExtendedDialogsetToolTipTexts(java.lang.String... toolTipTexts)Allows decorating the buttons with tooltips.voidsetupDialog()This is called byIExtendedDialog.showDialog().private voidsetupEscListener()Makes the dialog listen to ESC keypressedvoidsetVisible(boolean visible)Override setVisible to be able to save the window geometry if requiredExtendedDialogshowDialog()Show the dialog to the user.private static JMultilineLabelstring2label(java.lang.String msg)Convenience function that converts a given string into a JMultilineLabelbooleantoggleCheckState()This function returns true if the dialog has been set to "do not show again"ExtendedDialogtoggleEnable(java.lang.String togglePref)Calling this will offer the user a "Do not show again" checkbox for the dialog.protected voidtoggleSaveState()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 java.lang.String rememberSizePref
-
defaultWindowGeometry
private transient WindowGeometry defaultWindowGeometry
-
togglePref
private java.lang.String togglePref
-
toggleValue
private int toggleValue
-
togglePanel
private ConditionalOptionPaneUtil.MessagePanel togglePanel
-
parentComponent
private final java.awt.Component parentComponent
-
content
private java.awt.Component content
-
bTexts
private final java.lang.String[] bTexts
-
bToolTipTexts
private java.lang.String[] bToolTipTexts
-
bIcons
private transient javax.swing.Icon[] bIcons
-
cancelButtonIdx
private java.util.Set<java.lang.Integer> cancelButtonIdx
-
defaultButtonIdx
private int defaultButtonIdx
-
defaultButton
protected javax.swing.JButton defaultButton
-
icon
private transient javax.swing.Icon icon
-
isModal
private final boolean isModal
-
focusOnDefaultButton
private boolean focusOnDefaultButton
-
showHelpButton
private boolean showHelpButton
true, if the dialog should include a help button
-
helpTopic
private java.lang.String helpTopic
the help topic
-
placeContentInScrollPane
private boolean placeContentInScrollPane
set to true if the content of the extended dialog should be placed in aJScrollPane
-
contentInsets
protected transient java.awt.Insets contentInsets
-
buttons
protected transient java.util.List<javax.swing.JButton> buttons
-
setupDone
private boolean setupDone
-
-
Constructor Detail
-
ExtendedDialog
public ExtendedDialog(java.awt.Component parent, java.lang.String title, java.lang.String... buttonTexts)
This method sets up the most basic options for the dialog. Add more advanced features with dedicated methods. Possible features:setButtonIconssetContenttoggleEnabletoggleDisablesetToggleCheckboxTextsetRememberWindowGeometry
showDialogto 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(java.awt.Component parent, java.lang.String title, java.lang.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 totrueif you want the dialog to be modal
-
ExtendedDialog
public ExtendedDialog(java.awt.Component parent, java.lang.String title, java.lang.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 totrueif you want the dialog to be modaldisposeOnClose- whether to callWindow.dispose()when closing the dialog
-
-
Method Detail
-
searchRealParent
private static java.awt.Frame searchRealParent(java.awt.Component parent)
-
setButtonIcons
public ExtendedDialog setButtonIcons(javax.swing.Icon... buttonIcons)
Description copied from interface:IExtendedDialogAllows decorating the buttons with icons.- Specified by:
setButtonIconsin interfaceIExtendedDialog- Parameters:
buttonIcons- The button icons- Returns:
this
-
setButtonIcons
public ExtendedDialog setButtonIcons(java.lang.String... buttonIcons)
Description copied from interface:IExtendedDialogConvenience method to provide image names instead of images.- Specified by:
setButtonIconsin interfaceIExtendedDialog- Parameters:
buttonIcons- The button icon names- Returns:
this
-
setToolTipTexts
public ExtendedDialog setToolTipTexts(java.lang.String... toolTipTexts)
Description copied from interface:IExtendedDialogAllows decorating the buttons with tooltips. Expects a String array with translated tooltip texts.- Specified by:
setToolTipTextsin interfaceIExtendedDialog- Parameters:
toolTipTexts- the tool tip texts. Ignored, if null.- Returns:
this
-
setContent
public ExtendedDialog setContent(java.awt.Component content)
Description copied from interface:IExtendedDialogSets 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:
setContentin interfaceIExtendedDialog- Parameters:
content- Any element that can be displayed in the message dialog- Returns:
this
-
setContent
public ExtendedDialog setContent(java.awt.Component content, boolean placeContentInScrollPane)
Description copied from interface:IExtendedDialogSets 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:
setContentin 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(java.lang.String message)
Description copied from interface:IExtendedDialogSets 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:
setContentin interfaceIExtendedDialog- Parameters:
message- The text that should be shown to the user- Returns:
this
-
setIcon
public ExtendedDialog setIcon(javax.swing.Icon icon)
Description copied from interface:IExtendedDialogDecorate 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:
setIconin interfaceIExtendedDialog- Parameters:
icon- The icon to display- Returns:
this
-
setIcon
public ExtendedDialog setIcon(int messageType)
Description copied from interface:IExtendedDialogConvenience method to allow values that would be accepted byJOptionPaneas messageType.- Specified by:
setIconin interfaceIExtendedDialog- Parameters:
messageType- TheJOptionPanemessageType- Returns:
this
-
showDialog
public ExtendedDialog showDialog()
Description copied from interface:IExtendedDialogShow 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:
showDialogin interfaceIExtendedDialog- Returns:
this
-
getValue
public int getValue()
Description copied from interface:IExtendedDialogRetrieve the user choice after the dialog has been closed.- Specified by:
getValuein interfaceIExtendedDialog- Returns:
- The selected button. The count starts with 1.
- A return value of
DialogClosedOtherwisemeans the dialog has been closed otherwise.
-
setupDialog
public void setupDialog()
Description copied from interface:IExtendedDialogThis is called byIExtendedDialog.showDialog(). Only invoke from outside if you need to modify the contentPane- Specified by:
setupDialogin interfaceIExtendedDialog
-
createButtonAction
protected javax.swing.Action createButtonAction(int i)
-
buttonAction
protected void buttonAction(int buttonIndex, java.awt.event.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 java.awt.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:
setVisiblein classjava.awt.Dialog
-
setRememberWindowGeometry
public ExtendedDialog setRememberWindowGeometry(java.lang.String pref, WindowGeometry wg)
Description copied from interface:IExtendedDialogCall this if you want the dialog to remember the geometry (size and position) set by the user. Set the pref tonullor 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:
setRememberWindowGeometryin 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 ifprefis not null or empty- Returns:
this
-
toggleEnable
public ExtendedDialog toggleEnable(java.lang.String togglePref)
Description copied from interface:IExtendedDialogCalling 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:
toggleEnablein interfaceIExtendedDialog- Parameters:
togglePref- The preference to save the checkbox state to- Returns:
this
-
setDefaultButton
public ExtendedDialog setDefaultButton(int defaultButtonIdx)
Description copied from interface:IExtendedDialogSets the button that will react to ENTER.- Specified by:
setDefaultButtonin interfaceIExtendedDialog- Parameters:
defaultButtonIdx- The button index (starts to 1)- Returns:
this
-
setCancelButton
public ExtendedDialog setCancelButton(java.lang.Integer... cancelButtonIdx)
Description copied from interface:IExtendedDialogUsed in combination with toggle: If the user presses 'cancel' the toggle settings are ignored and not saved to the pref- Specified by:
setCancelButtonin 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:IExtendedDialogMakes default button request initial focus or not.- Specified by:
setFocusOnDefaultButtonin interfaceIExtendedDialog- Parameters:
focus-trueto make default button request initial focus
-
requestFocusToDefaultButton
private void requestFocusToDefaultButton()
-
toggleCheckState
public final boolean toggleCheckState()
Description copied from interface:IExtendedDialogThis function returns true if the dialog has been set to "do not show again"- Specified by:
toggleCheckStatein 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(java.lang.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(java.lang.String helpTopic, boolean showHelpButton)
Description copied from interface:IExtendedDialogConfigures 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:
configureContextsensitiveHelpin interfaceIExtendedDialog- Parameters:
helpTopic- the help topicshowHelpButton- true, if the dialog displays a help button- Returns:
this
-
-