Interface IExtendedDialog

    • Method Detail

      • setButtonIcons

        ExtendedDialog setButtonIcons​(javax.swing.Icon... buttonIcons)
        Allows decorating the buttons with icons.
        Parameters:
        buttonIcons - The button icons
        Returns:
        this
      • setButtonIcons

        ExtendedDialog setButtonIcons​(java.lang.String... buttonIcons)
        Convenience method to provide image names instead of images.
        Parameters:
        buttonIcons - The button icon names
        Returns:
        this
      • setToolTipTexts

        ExtendedDialog setToolTipTexts​(java.lang.String... toolTipTexts)
        Allows decorating the buttons with tooltips. Expects a String array with translated tooltip texts.
        Parameters:
        toolTipTexts - the tool tip texts. Ignored, if null.
        Returns:
        this
      • setContent

        ExtendedDialog setContent​(java.awt.Component content)
        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.
        Parameters:
        content - Any element that can be displayed in the message dialog
        Returns:
        this
      • setContent

        ExtendedDialog setContent​(java.awt.Component content,
                                  boolean placeContentInScrollPane)
        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.
        Parameters:
        content - Any element that can be displayed in the message dialog
        placeContentInScrollPane - if true, places the content in a JScrollPane
        Returns:
        this
      • setContent

        ExtendedDialog setContent​(java.lang.String message)
        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.
        Parameters:
        message - The text that should be shown to the user
        Returns:
        this
      • setIcon

        ExtendedDialog setIcon​(javax.swing.Icon icon)
        Decorate the dialog with an icon that is shown on the left part of the window area. (Similar to how it is done in JOptionPane)
        Parameters:
        icon - The icon to display
        Returns:
        this
      • setIcon

        ExtendedDialog setIcon​(int messageType)
        Convenience method to allow values that would be accepted by JOptionPane as messageType.
        Parameters:
        messageType - The JOptionPane messageType
        Returns:
        this
      • showDialog

        ExtendedDialog showDialog()
        Show the dialog to the user. Call this after you have set all options for the dialog. You can retrieve the result using getValue().
        Returns:
        this
      • getValue

        int getValue()
        Retrieve the user choice after the dialog has been closed.
        Returns:
      • setupDialog

        void setupDialog()
        This is called by showDialog(). Only invoke from outside if you need to modify the contentPane
      • setRememberWindowGeometry

        ExtendedDialog setRememberWindowGeometry​(java.lang.String pref,
                                                 WindowGeometry wg)
        Call this if you want the dialog to remember the geometry (size and position) set by the user. Set the pref to null 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
        Parameters:
        pref - The preference to save the dimension to
        wg - The default window geometry that should be used if no existing preference is found (only takes effect if pref is not null or empty
        Returns:
        this
      • toggleEnable

        ExtendedDialog toggleEnable​(java.lang.String togglePref)
        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.
        Parameters:
        togglePref - The preference to save the checkbox state to
        Returns:
        this
      • setDefaultButton

        ExtendedDialog setDefaultButton​(int defaultButtonIdx)
        Sets the button that will react to ENTER.
        Parameters:
        defaultButtonIdx - The button index (starts to 1)
        Returns:
        this
      • setCancelButton

        ExtendedDialog setCancelButton​(java.lang.Integer... cancelButtonIdx)
        Used in combination with toggle: If the user presses 'cancel' the toggle settings are ignored and not saved to the pref
        Parameters:
        cancelButtonIdx - index of the button that stands for cancel, accepts multiple values
        Returns:
        this
      • setFocusOnDefaultButton

        void setFocusOnDefaultButton​(boolean focus)
        Makes default button request initial focus or not.
        Parameters:
        focus - true to make default button request initial focus
        Since:
        7407
      • toggleCheckState

        boolean toggleCheckState()
        This function returns true if the dialog has been set to "do not show again"
        Returns:
        true if dialog should not be shown again
      • configureContextsensitiveHelp

        ExtendedDialog configureContextsensitiveHelp​(java.lang.String helpTopic,
                                                     boolean showHelpButton)
        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)
        Parameters:
        helpTopic - the help topic
        showHelpButton - true, if the dialog displays a help button
        Returns:
        this