Class FileArgument

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.util.EventListener

    public class FileArgument
    extends AbstractArgument
    FileArgument class if the argument is a java.io.File.
    Since:
    2.1.1 (imported from itexttoolbox project)
    • Field Detail

      • filter

        protected javax.swing.filechooser.FileFilter filter
        a filter to put on the FileChooser.
      • newFile

        protected boolean newFile
        indicates if the argument has to point to a new or an existing file.
    • Constructor Detail

      • FileArgument

        public FileArgument()
      • FileArgument

        public FileArgument​(AbstractTool tool,
                            java.lang.String name,
                            java.lang.String description,
                            boolean newFile,
                            javax.swing.filechooser.FileFilter filter)
        Constructs a FileArgument.
        Parameters:
        tool - the tool that needs this argument
        name - the name of the argument
        description - the description of the argument
        newFile - makes the difference between an Open or Save dialog
        filter - FileFilter
      • FileArgument

        public FileArgument​(AbstractTool tool,
                            java.lang.String name,
                            java.lang.String description,
                            boolean newFile)
        Constructs a FileArgument.
        Parameters:
        tool - the tool that needs this argument
        name - the name of the argument
        description - the description of the argument
        newFile - makes the difference between an Open or Save dialog
    • Method Detail

      • getArgument

        public java.lang.Object getArgument()
                                     throws java.lang.InstantiationException
        Gets the argument as an object.
        Overrides:
        getArgument in class AbstractArgument
        Returns:
        an object
        Throws:
        java.lang.InstantiationException - if the specified key cannot be compared with the keys currently in the map
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Specified by:
        actionPerformed in class AbstractArgument
        Parameters:
        e - ActionEvent
        See Also:
        ActionListener.actionPerformed(java.awt.event.ActionEvent)
      • getFilter

        public javax.swing.filechooser.FileFilter getFilter()
        Returns:
        Returns the filter.
      • setFilter

        public void setFilter​(javax.swing.filechooser.FileFilter filter)
        Parameters:
        filter - The filter to set.
      • setLabel

        public void setLabel​(PdfInformationPanel label)
        Parameters:
        label - The label to set.