Interface IExtendedDialog

All Known Subinterfaces:
TagEditHelper.IEditTagDialog
All Known Implementing Classes:
AbstractListEditor, AbstractTableListEditor, AddImageryDialog, AddImageryLayerAction.SelectWmsLayersDialog, AddTagsDialog, AdjustTimezoneAndOffsetDialog, AdvancedCorrelationSettingsDialog, ConflictResolutionDialog, CustomProjectionChoice.ParameterInfoDialog, DeleteAction.ConfirmDeleteDialog, DownloadObjectDialog, ExtendedDialog, GenericRelationEditor, HistoryInfoAction.HistoryObjectIDDialog, ImageryAdjustAction.ConfirmOverwriteBookmarkDialog, ImageryAdjustAction.ImageryOffsetDialog, InspectPrimitiveDialog, JumpToAction.JumpToPositionDialog, LatLonDialog, ListEditor, ListListEditor, LogShowDialog, MapListEditor, MenuItemSearchDialog, MergeGpxLayerDialog, NoteInputDialog, NoteSortDialog, OpenLocationAction.WhichTasksToPerformDialog, OsmIdSelectionDialog, OverpassQueryWizardDialog, PropertiesMembershipChoiceDialog, RelationEditor, SearchDialog, SelectAction.ConfirmMoveDialog, SessionSaveAction.SessionSaveAsDialog, SourceEditor.EditSourceEntryDialog, SplitWayAction.SegmentToKeepSelectionDialog, StringEditor, SynchronizeTimeFromPhotoDialog, TagEditHelper.AbstractTagsDialog, TagEditHelper.AddTagsDialog, TagEditHelper.EditTagDialog, TaggingPreset.PresetDialog, TaggingPresetSearchDialog, TaggingPresetSearchPrimitiveDialog, UserQueryList.EditItemDialog, ValidatorListManagementDialog, WMTSTileSource.SelectLayerDialog

public interface IExtendedDialog
Extracted interface of ExtendedDialog class.
Since:
11945
  • Method Details

    • setButtonIcons

      Allows decorating the buttons with icons.
      Parameters:
      buttonIcons - The button icons
      Returns:
      this
    • setButtonIcons

      Convenience method to provide image names instead of images.
      Parameters:
      buttonIcons - The button icon names
      Returns:
      this
    • setToolTipTexts

      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

      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(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

      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

      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

      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

      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

      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(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(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