Class SystemFileChooser.ApproveContext

java.lang.Object
com.formdev.flatlaf.util.SystemFileChooser.ApproveContext
Enclosing class:
SystemFileChooser

public abstract static class SystemFileChooser.ApproveContext extends Object
Since:
3.7
  • Constructor Details

    • ApproveContext

      public ApproveContext()
  • Method Details

    • showMessageDialog

      public abstract int showMessageDialog(int messageType, String primaryText, String secondaryText, int defaultButton, String... buttons)
      Shows a modal (operating system) message dialog as child of the system file dialog.

      Use this instead of JOptionPane in approve callbacks.

      Parameters:
      messageType - type of message being displayed: JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE, JOptionPane.WARNING_MESSAGE, JOptionPane.QUESTION_MESSAGE or JOptionPane.PLAIN_MESSAGE
      primaryText - primary text
      secondaryText - secondary text; shown below of primary text; or null
      defaultButton - index of the default button, which can be pressed using ENTER key
      buttons - texts of the buttons; if no buttons given the a default "OK" button is shown. Use '_' for mnemonics (e.g. "_Choose") Use '__' for '_' character (e.g. "Choose__and__Quit").
      Returns:
      index of pressed button; or -1 for ESC key