Class DirectoryDialogBuilder

    • Field Detail

      • actionLabel

        private java.lang.String actionLabel
      • selectedDir

        private java.io.File selectedDir
      • showHiddenDirectories

        private boolean showHiddenDirectories
    • Constructor Detail

      • DirectoryDialogBuilder

        public DirectoryDialogBuilder()
        Default constructor
    • Method Detail

      • setActionLabel

        public DirectoryDialogBuilder setActionLabel​(java.lang.String actionLabel)
        Defines the label to be but on the confirmation button (default: "ok"). You probably want to set this to LocalizedString.Save.toString() or LocalizedString.Open.toString()
        Parameters:
        actionLabel - Label to put on the confirmation button
        Returns:
        Itself
      • getActionLabel

        public java.lang.String getActionLabel()
        Returns the label on the confirmation button
        Returns:
        Label on the confirmation button
      • setSuggestedSize

        public DirectoryDialogBuilder setSuggestedSize​(TerminalSize suggestedSize)
        Sets the suggested size for the file dialog, it won't have exactly this size but roughly. Default suggested size is 45x10.
        Parameters:
        suggestedSize - Suggested size for the file dialog
        Returns:
        Itself
      • getSuggestedSize

        public TerminalSize getSuggestedSize()
        Returns the suggested size for the file dialog
        Returns:
        Suggested size for the file dialog
      • setSelectedDirectory

        public DirectoryDialogBuilder setSelectedDirectory​(java.io.File selectedDir)
        Sets the directory that is initially selected in the dialog
        Parameters:
        selectedDir - Directory that is initially selected in the dialog
        Returns:
        Itself
      • getSelectedDirectory

        public java.io.File getSelectedDirectory()
        Returns the directory that is initially selected in the dialog
        Returns:
        Directory that is initially selected in the dialog
      • setShowHiddenDirectories

        public void setShowHiddenDirectories​(boolean showHiddenDirectories)
        Sets if hidden directories should be visible in the dialog (default: false
        Parameters:
        showHiddenDirectories - If true then hidden directories will be visible
      • isShowHiddenDirectories

        public boolean isShowHiddenDirectories()
        Checks if hidden directories will be visible in the dialog
        Returns:
        If true then hidden directories will be visible