Class DoNotAskAgainConfirmDialog

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.everdro1d.libs.swing.dialogs.DoNotAskAgainConfirmDialog
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class DoNotAskAgainConfirmDialog extends JPanel
A confirmation dialog with a "Do not ask again" checkbox.

This class extends JPanel and provides a static method to show a confirmation dialog with a message, title, options, and a "Do not ask again" checkbox. The state of the checkbox is saved in user preferences.

See Also:
  • Method Details

    • isDoNotAskAgainSelected

      public boolean isDoNotAskAgainSelected()
      Returns the state of the "Do not ask again" checkbox.
      Returns:
      true if the checkbox is selected, false otherwise
    • showConfirmDialog

      public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Preferences prefs, String prefsKey, LocaleManager localeManager)
      Shows a confirmation dialog with the selected options.
      Parameters:
      parentComponent - Parent
      message - Message to show in the dialog <html> format
      title - Dialog title
      optionType - JOptionPane.[OPTIONS]
      messageType - JOptionPane.[MESSAGE_TYPE]
      prefs - user preferences to save do not ask again
      prefsKey - key for do not ask again
      localeManager - LocaleManager for localization
      Returns:
      int selected option