Class BasicFolderChooserUI

  • All Implemented Interfaces:
    FolderChooserUI

    public class BasicFolderChooserUI
    extends javax.swing.plaf.basic.BasicFileChooserUI
    implements FolderChooserUI
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  BasicFolderChooserUI.NavigationTextFieldListener  
      • Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicFileChooserUI

        javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter, javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView, javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction, javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction, javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener, javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction, javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction, javax.swing.plaf.basic.BasicFileChooserUI.SelectionListener, javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.swing.JButton _approveButton  
      protected javax.swing.JPanel _buttonPanel  
      protected javax.swing.JButton _cancelButton  
      protected javax.swing.JTree _fileSystemTree  
      protected javax.swing.JPanel _navigationPanel  
      protected javax.swing.JTextField _navigationTextField  
      com.jidesoft.plaf.basic.BasicFolderChooserUI.FolderChooserSelectionListener _selectionListener  
      protected FolderToolBar _toolbar  
      protected javax.swing.JScrollPane _treeScrollPane  
      • Fields inherited from class javax.swing.plaf.basic.BasicFileChooserUI

        cancelButtonMnemonic, cancelButtonText, cancelButtonToolTipText, computerIcon, detailsViewIcon, directoryIcon, directoryOpenButtonMnemonic, directoryOpenButtonText, directoryOpenButtonToolTipText, fileIcon, floppyDriveIcon, hardDriveIcon, helpButtonMnemonic, helpButtonText, helpButtonToolTipText, homeFolderIcon, listViewIcon, newFolderIcon, openButtonMnemonic, openButtonText, openButtonToolTipText, saveButtonMnemonic, saveButtonText, saveButtonToolTipText, updateButtonMnemonic, updateButtonText, updateButtonToolTipText, upFolderIcon, viewMenuIcon
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected javax.swing.JPanel createButtonPanel()  
      protected javax.swing.JPanel createNavigationPanel()  
      java.beans.PropertyChangeListener createPropertyChangeListener​(javax.swing.JFileChooser fc)  
      protected javax.swing.JComponent createToolbar()  
      static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent c)  
      void ensureFileIsVisible​(javax.swing.JFileChooser fc, java.io.File f)  
      javax.swing.Action getApproveSelectionAction()  
      java.awt.Component getDefaultFocusComponent()
      Return the default focus component inside the FolderChooser.
      void installComponents​(javax.swing.JFileChooser chooser)  
      protected void installListeners​(javax.swing.JFileChooser fc)  
      static boolean isFileSystem​(java.io.File f)
      Checks if f represents a real directory or file as opposed to a special folder such as "Desktop".
      void rescanCurrentDirectory​(javax.swing.JFileChooser fc)  
      void setNavigationFieldVisible​(boolean navigationFieldVisible)  
      void uninstallComponents​(javax.swing.JFileChooser chooser)  
      protected void uninstallListeners​(javax.swing.JFileChooser fc)  
      protected void updateToolbarButtons()
      Updates toolbar button status depending on current selection status
      • Methods inherited from class javax.swing.plaf.basic.BasicFileChooserUI

        clearIconCache, createDoubleClickListener, createListSelectionListener, createModel, getAcceptAllFileFilter, getAccessoryPanel, getApproveButton, getApproveButtonMnemonic, getApproveButtonText, getApproveButtonToolTipText, getCancelSelectionAction, getChangeToParentDirectoryAction, getDefaultButton, getDialogTitle, getDirectory, getDirectoryName, getFileChooser, getFileName, getFileView, getGoHomeAction, getModel, getNewFolderAction, getUpdateAction, installDefaults, installIcons, installStrings, installUI, isDirectorySelected, setDirectory, setDirectoryName, setDirectorySelected, setFileName, uninstallDefaults, uninstallIcons, uninstallStrings, uninstallUI
      • Methods inherited from class javax.swing.plaf.ComponentUI

        contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
      • Methods inherited from class java.lang.Object

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

      • _fileSystemTree

        protected javax.swing.JTree _fileSystemTree
      • _treeScrollPane

        protected javax.swing.JScrollPane _treeScrollPane
      • _approveButton

        protected javax.swing.JButton _approveButton
      • _cancelButton

        protected javax.swing.JButton _cancelButton
      • _navigationTextField

        protected javax.swing.JTextField _navigationTextField
      • _buttonPanel

        protected javax.swing.JPanel _buttonPanel
      • _navigationPanel

        protected javax.swing.JPanel _navigationPanel
      • _selectionListener

        public com.jidesoft.plaf.basic.BasicFolderChooserUI.FolderChooserSelectionListener _selectionListener
    • Constructor Detail

      • BasicFolderChooserUI

        public BasicFolderChooserUI​(FolderChooser chooser)
    • Method Detail

      • createUI

        public static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent c)
      • installComponents

        public void installComponents​(javax.swing.JFileChooser chooser)
        Overrides:
        installComponents in class javax.swing.plaf.basic.BasicFileChooserUI
      • getDefaultFocusComponent

        public java.awt.Component getDefaultFocusComponent()
        Return the default focus component inside the FolderChooser.

        By default, it is the file system tree.

        Returns:
        the default focus component.
      • createButtonPanel

        protected javax.swing.JPanel createButtonPanel()
      • createNavigationPanel

        protected javax.swing.JPanel createNavigationPanel()
      • setNavigationFieldVisible

        public void setNavigationFieldVisible​(boolean navigationFieldVisible)
      • rescanCurrentDirectory

        public void rescanCurrentDirectory​(javax.swing.JFileChooser fc)
        Overrides:
        rescanCurrentDirectory in class javax.swing.plaf.basic.BasicFileChooserUI
      • ensureFileIsVisible

        public void ensureFileIsVisible​(javax.swing.JFileChooser fc,
                                        java.io.File f)
        Overrides:
        ensureFileIsVisible in class javax.swing.plaf.basic.BasicFileChooserUI
      • createToolbar

        protected javax.swing.JComponent createToolbar()
      • updateToolbarButtons

        protected void updateToolbarButtons()
        Updates toolbar button status depending on current selection status
      • uninstallComponents

        public void uninstallComponents​(javax.swing.JFileChooser chooser)
        Overrides:
        uninstallComponents in class javax.swing.plaf.basic.BasicFileChooserUI
      • installListeners

        protected void installListeners​(javax.swing.JFileChooser fc)
        Overrides:
        installListeners in class javax.swing.plaf.basic.BasicFileChooserUI
      • uninstallListeners

        protected void uninstallListeners​(javax.swing.JFileChooser fc)
        Overrides:
        uninstallListeners in class javax.swing.plaf.basic.BasicFileChooserUI
      • createPropertyChangeListener

        public java.beans.PropertyChangeListener createPropertyChangeListener​(javax.swing.JFileChooser fc)
        Overrides:
        createPropertyChangeListener in class javax.swing.plaf.basic.BasicFileChooserUI
      • isFileSystem

        public static boolean isFileSystem​(java.io.File f)
        Checks if f represents a real directory or file as opposed to a special folder such as "Desktop". Used by UI classes to decide if a folder is selectable when doing directory choosing.
        Parameters:
        f - a File object
        Returns:
        true if f is a real file or directory.
      • getApproveSelectionAction

        public javax.swing.Action getApproveSelectionAction()
        Overrides:
        getApproveSelectionAction in class javax.swing.plaf.basic.BasicFileChooserUI