Class DarkFilePaneUIBridge

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible
    Direct Known Subclasses:
    DarkFilePane

    public abstract class DarkFilePaneUIBridge
    extends JPanel
    implements PropertyChangeListener
    WARNING: This class is an implementation detail and is only public so that it can be used by two packages. You should NOT consider this public API.

    This component is intended to be used in a subclass of javax.swing.plaf.basic.BasicFileChooserUI. It realies heavily on the implementation of BasicFileChooserUI, and is intended to be API compatible with earlier implementations of MetalFileChooserUI and WindowsFileChooserUI.

    See Also:
    Serialized Form
    • Method Detail

      • recursivelySetInheritsPopupMenu

        protected static void recursivelySetInheritsPopupMenu​(Container container,
                                                              boolean b)
      • addActionsToMap

        public static void addActionsToMap​(ActionMap map,
                                           Action[] actions)
      • usesShellFolder

        public static boolean usesShellFolder​(JFileChooser chooser)
        Returns true if specified FileChooser should use ShellFolder
        Parameters:
        chooser - the chooser
        Returns:
        the boolean
      • uninstallUI

        public void uninstallUI()
      • getViewType

        public int getViewType()
      • setViewType

        public void setViewType​(int viewType)
      • getViewTypeAction

        public Action getViewTypeAction​(int viewType)
      • installDefaults

        protected void installDefaults()
      • getActions

        public Action[] getActions()
        Fetches the command list for the FilePane. These commands are useful for binding to events, such as in a keymap.
        Returns:
        the command list
      • createActionMap

        protected void createActionMap()
      • updateListRowCount

        protected void updateListRowCount​(JList<?> list)
      • createList

        public abstract JPanel createList()
      • getDetailsTableModel

        protected com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge.DetailsTableModel getDetailsTableModel()
      • updateDetailsColumnModel

        protected void updateDetailsColumnModel​(JTable table)
      • getDetailsTableCellEditor

        protected abstract TableCellEditor getDetailsTableCellEditor()
      • createDetailsView

        public abstract JPanel createDetailsView()
      • fixNameColumnWidth

        protected void fixNameColumnWidth​(int viewWidth)
      • createListSelectionListener

        public ListSelectionListener createListSelectionListener()
        Creates a selection listener for the list of files and directories.
        Returns:
        a ListSelectionListener
      • getEditIndex

        protected int getEditIndex()
      • setEditIndex

        protected void setEditIndex​(int i)
      • resetEditIndex

        protected void resetEditIndex()
      • cancelEdit

        protected abstract void cancelEdit()
      • editFileName

        protected abstract void editFileName​(int index)
        Parameters:
        index - visual index of the file to be edited
      • applyEdit

        protected void applyEdit()
      • getNewFolderAction

        public Action getNewFolderAction()
      • doSelectFile

        protected void doSelectFile​(File fileToSelect)
      • doDeselectFile

        protected void doDeselectFile​(Object fileToDeselect)
      • doFileSelectionModeChanged

        protected void doFileSelectionModeChanged​(PropertyChangeEvent e)
      • ensureFileIsVisible

        public void ensureFileIsVisible​(JFileChooser fc,
                                        File f)
      • ensureIndexIsVisible

        protected void ensureIndexIsVisible​(int i)
      • rescanCurrentDirectory

        public void rescanCurrentDirectory()
      • clearSelection

        public void clearSelection()
      • getViewMenu

        public abstract JMenu getViewMenu()
      • updateViewMenu

        protected abstract void updateViewMenu()
      • isDirectorySelected

        protected boolean isDirectorySelected()
        Property to remember whether a directory is currently selected in the UI.
        Returns:
        true iff a directory is currently selected.
      • getDirectory

        protected File getDirectory()
        Property to remember the directory that is currently selected in the UI.
        Returns:
        the value of the directory property
      • findChildComponent

        protected <T> T findChildComponent​(Container container,
                                           Class<T> cls)