Class StyleDefinitionUtilities


  • public class StyleDefinitionUtilities
    extends Object
    • Method Detail

      • promptReportFilename

        public static File promptReportFilename​(Component parent,
                                                File defaultFile)
        Prompts the user for the name of the report file which should be created
        Parameters:
        parent - the parent component of which the file chooser dialog will be a child
        defaultFile - the initially selected file.
        Returns:
        The File which the report should be saved into, or null if the user does not want to continue with the save operation
      • validateFileExtension

        public static File validateFileExtension​(File proposedFile,
                                                 Component parent)
        Validates that the extension of the filename is prpt, and prompts the user if it is not.
        Parameters:
        proposedFile - the target file to validate
        parent - the parent component in case we need to display a dialog
        Returns:
        the filename based on the validation and optional prompting, or null if the user decided to cancel the operaion