Class ViewFileChooserBase

  • Direct Known Subclasses:
    ViewOpenFileUI

    public class ViewFileChooserBase
    extends java.lang.Object
    Encapsulates a JFileChooser with MIPAV related components.
    • Constructor Summary

      Constructors 
      Constructor Description
      ViewFileChooserBase​(boolean openDialog, boolean isSaveAs)
      Creates a new ViewFileChooserBase object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void addListeners()
      Adds all listeners required by this accessory.
      private javax.swing.DefaultListModel createModel()
      Creates a DefaultListModel and populates it with shortcuts read from a file in user's home directory.
      java.lang.String getDirectory()
      DOCUMENT ME!
      javax.swing.JFileChooser getFileChooser()
      Get the active file chooser.
      java.awt.FileDialog getFileDialog()
      DOCUMENT ME!
      java.lang.String getFileName()
      DOCUMENT ME!
      java.io.File getOpenedFile()
      Return the file being opened.
      private void insertShortcut​(ShortCutted newShortcut)
      Inserts a new shortcut into the list so that list's alphabetical order is preserved.
      boolean isMulti()
      DOCUMENT ME!
      private void saveShortcuts()
      Saves the shortcuts list to a file in user's home directory.
      private void setAlias()
      Creates/edits/deletes an alias for a shortcut.
      private void setGUI()
      Creates GUI for this accessory.
      void setMulti​(boolean doMulti)
      DOCUMENT ME!
      void setSaveAs()
      DOCUMENT ME!
      private void updateTitle()
      Displays the current directory path in the title bar of JFileChooser.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TOOLTIP_DISMISS_DELAY

        private static final int TOOLTIP_DISMISS_DELAY
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • TOOLTIP_INITIAL_DELAY

        private static final int TOOLTIP_INITIAL_DELAY
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • chooser

        protected javax.swing.JFileChooser chooser
        DOCUMENT ME!
      • dialog

        protected java.awt.FileDialog dialog
        DOCUMENT ME!
      • directory

        protected java.lang.String directory
        String locations
      • fileName

        protected java.lang.String fileName
        String locations
      • openedFile

        protected java.io.File openedFile
        DOCUMENT ME!
      • accessoryPanel

        private javax.swing.JPanel accessoryPanel
        DOCUMENT ME!
      • addButton

        private javax.swing.JButton addButton
        Selection buttons
      • aliasButton

        private javax.swing.JButton aliasButton
        Selection buttons
      • aliasField

        private javax.swing.JTextField aliasField
        DOCUMENT ME!
      • applicationName

        private java.lang.String applicationName
        DOCUMENT ME!
      • deleteButton

        private javax.swing.JButton deleteButton
        DOCUMENT ME!
      • initialTitle

        private java.lang.String initialTitle
        DOCUMENT ME!
      • list

        private javax.swing.JList list
        DOCUMENT ME!
      • listScrollPane

        private javax.swing.JScrollPane listScrollPane
        DOCUMENT ME!
      • model

        private javax.swing.DefaultListModel model
        DOCUMENT ME!
      • multiBox

        private javax.swing.JCheckBox multiBox
        DOCUMENT ME!
      • originalDismissDelay

        private int originalDismissDelay
        Delay types
      • originalInitialDelay

        private int originalInitialDelay
        Delay types
      • panel

        private javax.swing.JPanel panel
        DOCUMENT ME!
      • saveAs

        private boolean saveAs
        DOCUMENT ME!
      • shortcutsChanged

        private boolean shortcutsChanged
        DOCUMENT ME!
    • Constructor Detail

      • ViewFileChooserBase

        public ViewFileChooserBase​(boolean openDialog,
                                   boolean isSaveAs)
        Creates a new ViewFileChooserBase object.
        Parameters:
        UI - DOCUMENT ME!
        openDialog - DOCUMENT ME!
        isSaveAs - DOCUMENT ME!
    • Method Detail

      • getDirectory

        public java.lang.String getDirectory()
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • getFileChooser

        public javax.swing.JFileChooser getFileChooser()
        Get the active file chooser.
        Returns:
        chooser file chooser.
      • getFileDialog

        public java.awt.FileDialog getFileDialog()
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • getFileName

        public java.lang.String getFileName()
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • getOpenedFile

        public java.io.File getOpenedFile()
        Return the file being opened.
        Returns:
        openedFile opened file.
      • isMulti

        public boolean isMulti()
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • setMulti

        public void setMulti​(boolean doMulti)
        DOCUMENT ME!
        Parameters:
        doMulti - DOCUMENT ME!
      • setSaveAs

        public void setSaveAs()
        DOCUMENT ME!
      • addListeners

        private void addListeners()
        Adds all listeners required by this accessory.
      • createModel

        private javax.swing.DefaultListModel createModel()
        Creates a DefaultListModel and populates it with shortcuts read from a file in user's home directory.
        Returns:
        DOCUMENT ME!
      • insertShortcut

        private void insertShortcut​(ShortCutted newShortcut)
        Inserts a new shortcut into the list so that list's alphabetical order is preserved.
        Parameters:
        newShortcut - DOCUMENT ME!
      • saveShortcuts

        private void saveShortcuts()
        Saves the shortcuts list to a file in user's home directory.
      • setAlias

        private void setAlias()
        Creates/edits/deletes an alias for a shortcut.
      • setGUI

        private void setGUI()
        Creates GUI for this accessory.
      • updateTitle

        private void updateTitle()
        Displays the current directory path in the title bar of JFileChooser.