Class OpenFileAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

    public abstract class OpenFileAction
    extends javax.swing.AbstractAction
    The class OpenFileAction.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
    • Constructor Summary

      Constructors 
      Constructor Description
      OpenFileAction​(java.lang.String name, java.awt.Component parent)
      Instantiates a new OpenFileAction object.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent actionEvent)
      protected abstract void onApproveOption​(java.io.File file, java.awt.event.ActionEvent actionEvent)
      Abstract callback method to interact on file choose approve option.
      protected abstract void onCancel​(java.awt.event.ActionEvent actionEvent)
      Abstract callback method to interact on cancel from file choose.
      protected void onFileChoose​(javax.swing.JFileChooser fileChooser, java.awt.event.ActionEvent actionEvent)
      Callback method to interact on file choose.
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
    • Constructor Detail

      • OpenFileAction

        public OpenFileAction​(java.lang.String name,
                              java.awt.Component parent)
        Instantiates a new OpenFileAction object.
        Parameters:
        name - the name
        parent - the parent
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent actionEvent)
      • onApproveOption

        protected abstract void onApproveOption​(java.io.File file,
                                                java.awt.event.ActionEvent actionEvent)
        Abstract callback method to interact on file choose approve option.
        Parameters:
        file - the file
        actionEvent - the action event
      • onCancel

        protected abstract void onCancel​(java.awt.event.ActionEvent actionEvent)
        Abstract callback method to interact on cancel from file choose.
        Parameters:
        actionEvent - the action event
      • onFileChoose

        protected void onFileChoose​(javax.swing.JFileChooser fileChooser,
                                    java.awt.event.ActionEvent actionEvent)
        Callback method to interact on file choose.
        Parameters:
        fileChooser - the file chooser
        actionEvent - the action event