Class PreviewBrowserPanel

    • Field Detail

      • m_SplitPane

        protected BaseSplitPane m_SplitPane
        the split pane in use.
      • m_PaneBrowsing

        protected BaseSplitPane m_PaneBrowsing
        the panel for browsing.
      • m_PanelLocalFiles

        protected BasePanel m_PanelLocalFiles
        the panel with the local files.
      • m_ListLocalFilesRenderer

        protected ListCellRenderer m_ListLocalFilesRenderer
        the renderer for the local files.
      • m_ListLocalFiles

        protected SearchableBaseList m_ListLocalFiles
        the list with the local files.
      • m_SearchLocalFiles

        protected SearchPanel m_SearchLocalFiles
        the search panel for the local files.
      • m_PanelArchiveFiles

        protected BasePanel m_PanelArchiveFiles
        the panel with the archive files.
      • m_PanelArchiveFilesBottom

        protected BasePanel m_PanelArchiveFilesBottom
        the panel with the archive files (bottom).
      • m_ListArchiveFiles

        protected SearchableBaseList m_ListArchiveFiles
        the list with the archive files.
      • m_ModelArchiveFiles

        protected DefaultListModel m_ModelArchiveFiles
        the model for the archive files.
      • m_SearchArchiveFiles

        protected SearchPanel m_SearchArchiveFiles
        the search panel for the archive files.
      • m_PanelContent

        protected PreviewDisplay m_PanelContent
        the panel for the content display.
      • m_PanelArchiveHandlers

        protected BasePanel m_PanelArchiveHandlers
        the panel with the archive handlers.
      • m_ComboBoxArchiveHandlers

        protected BaseComboBox m_ComboBoxArchiveHandlers
        the combobox with the archive handlers (if more than one available).
      • m_IgnoreArchiveHandlerChanges

        protected boolean m_IgnoreArchiveHandlerChanges
        whether to ignore selections of the archive handler combobox temporarily.
      • m_CurrentFiles

        protected File[] m_CurrentFiles
        the currently selected files.
      • m_MenuBar

        protected JMenuBar m_MenuBar
        the menu bar, if used.
      • m_MenuFileLoadRecent

        protected JMenu m_MenuFileLoadRecent
        the "load recent" submenu.
      • m_MenuItemCacheViews

        protected JMenuItem m_MenuItemCacheViews
        the "cache views" menu item.
      • m_MenuItemUseFixedHandler

        protected JMenuItem m_MenuItemUseFixedHandler
        the "use fixed handler" menu item.
      • m_MenuItemShowHiddenFiles

        protected JMenuItem m_MenuItemShowHiddenFiles
        the "show hidden files" menu item.
      • m_MenuItemShowTempFiles

        protected JMenuItem m_MenuItemShowTempFiles
        the "show temp files" menu item.
      • m_MenuItemClearNotesAll

        protected JMenuItem m_MenuItemClearNotesAll
        the "clear notes (global)" menu item.
      • m_MenuItemClearNotesDir

        protected JMenuItem m_MenuItemClearNotesDir
        the "clear notes (current dir)" menu item.
      • m_MenuItemViewNotes

        protected JMenuItem m_MenuItemViewNotes
        the "show notes" menu item.
      • m_MenuItemSaveNotes

        protected JMenuItem m_MenuItemSaveNotes
        the "save notes" menu item.
      • m_TitleGenerator

        protected TitleGenerator m_TitleGenerator
        for generating the title of the dialog/frame.
      • m_FileChooser

        protected BaseFileChooser m_FileChooser
        the file chooser for opening files.
      • m_ChangeMonitor

        protected FileChangeMonitor m_ChangeMonitor
        the file change monitor.
      • m_FileChooserNotes

        protected NotesFileChooser m_FileChooserNotes
        the file chooser for the notes.
    • Constructor Detail

      • PreviewBrowserPanel

        public PreviewBrowserPanel()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class BasePanel
      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • finishInit

        protected void finishInit()
        Finishes the initialization.
        Overrides:
        finishInit in class BasePanel
      • monitorFile

        protected void monitorFile​(boolean display)
        Monitors the selected file and triggers an updated if necessary.
        Parameters:
        display - whether to trigger a display update or not
      • filterFiles

        protected File[] filterFiles​(File[] files)
        Filters the files. Hidden/temp files may get removed.
        Parameters:
        files - the files to filter
        Returns:
        the filtered files
      • setReusePreviews

        public void setReusePreviews​(boolean value)
        Sets whether to reuse previews.
        Parameters:
        value - true if to reuse
      • getReusePreviews

        public boolean getReusePreviews()
        Returns whether to reuse previews.
        Returns:
        true if to reuse
      • updateCacheViews

        protected void updateCacheViews()
        Based on check state of menu item, sets whether to reuse the views.
      • updateUseFixedHandler

        protected void updateUseFixedHandler()
        Based on check state of menu item, sets whether to use a fixed handler.
      • setUseFixedContentHandler

        public void setUseFixedContentHandler​(boolean value)
        Sets whether to use a fixed content handler.
        Parameters:
        value - true if to use fixed handler
      • getUseFixedContentHandler

        public boolean getUseFixedContentHandler()
        Returns whether to use a fixed content handler.
        Returns:
        true if to use fixed handler
      • updateShowHiddenFiles

        protected void updateShowHiddenFiles()
        Based on check state of menu item, sets whether to show/hide hidden files.
      • setShowHiddenFiles

        public void setShowHiddenFiles​(boolean value)
        Sets whether to show hidden files or not.
        Parameters:
        value - true if to show
      • getShowHiddenFiles

        public boolean getShowHiddenFiles()
        Returns whether to show hidden files or not.
        Returns:
        true if to show
      • updateShowTempFiles

        protected void updateShowTempFiles()
        Based on check state of menu item, sets whether to show/hide temp files.
      • setShowTempFiles

        public void setShowTempFiles​(boolean value)
        Sets whether to show temp files or not.
        Parameters:
        value - true if to show
      • getShowTempFiles

        public boolean getShowTempFiles()
        Returns whether to show temp files or not.
        Returns:
        true if to show
      • refreshLocalFiles

        protected void refreshLocalFiles()
        Refreshes the local file list.
      • displayLocalFile

        protected void displayLocalFile()
        Displays a local file.
      • displayArchiveContent

        protected void displayArchiveContent()
        Displays an archive file.
      • updatePreferredArchiveHandler

        protected void updatePreferredArchiveHandler()
        Updates the preferred handler.
      • update

        protected void update()
        Updates menu and title.
      • getTitleGenerator

        public TitleGenerator getTitleGenerator()
        Returns the title generator in use.
        Returns:
        the generator
      • updateTitle

        protected void updateTitle()
        Updates the title.
      • updateMenu

        protected void updateMenu()
        Updates the menu.
      • getMenuBar

        public JMenuBar getMenuBar()
        Creates a menu bar (singleton per panel object). Can be used in frames.
        Specified by:
        getMenuBar in interface MenuBarProvider
        Returns:
        the menu bar
      • getLocalFilesPopupMenu

        protected JPopupMenu getLocalFilesPopupMenu​(MouseEvent e)
        Returns a popup menu for the local files.
        Parameters:
        e - the event that triggered the popup menu
        Returns:
        the menu
      • open

        public void open​(PlaceholderDirectory dir)
        Opens the specified directory.
        Parameters:
        dir - the directory to display
      • openFile

        public void openFile()
        Lets the user select a file to preview.
      • open

        public void open​(PlaceholderFile file)
        Displays the specified file.
        Parameters:
        file - the file to display
      • reload

        public void reload()
        Reloads the directory and content.
      • clear

        public void clear()
        Clears the preview.
      • newWindow

        public PreviewBrowserPanel newWindow()
        Displays a new preview window/frame.
        Returns:
        the new panel
      • getCurrentFiles

        public File[] getCurrentFiles()
        Returns the currently selected files.
        Returns:
        the files, can be null
      • getDirPanel

        public DirectoryChooserPanel getDirPanel()
        Returns the directory panel.
        Returns:
        the panel
      • getLocalFilesList

        public SearchableBaseList getLocalFilesList()
        Returns the list component for files in the archive.
        Returns:
        the list component
      • isArchiveFilesListVisible

        public boolean isArchiveFilesListVisible()
        Returns whether the archive files are visible.
        Returns:
        true if visible
      • getArchiveFilesList

        public SearchableBaseList getArchiveFilesList()
        Returns the list component for files in the archive.
        Returns:
        the list component
      • hasSendToItem

        public boolean hasSendToItem​(Class[] cls)
        Checks whether something to send is available.
        Specified by:
        hasSendToItem in interface SendToActionSupporter
        Parameters:
        cls - the classes to retrieve an item for
        Returns:
        true if an object is available for sending
      • getSendToItem

        public Object getSendToItem​(Class[] cls)
        Returns the object to send.
        Specified by:
        getSendToItem in interface SendToActionSupporter
        Parameters:
        cls - the classes to retrieve the item for
        Returns:
        the item to send
      • setBrowsingEnabled

        public void setBrowsingEnabled​(boolean value)
        Sets whether the browsing panel is hidden or not.
        Parameters:
        value - true to enabled browsing, false to hide panel
      • isBrowsingEnabled

        public boolean isBrowsingEnabled()
        Returns whether the browsing panel is hidden or not.
        Returns:
        true if browsing enabled
      • getLocalSearch

        public String getLocalSearch()
        Returns the search term of the local file search.
        Returns:
        the search term
      • setLocalSearch

        public void setLocalSearch​(String search)
        Sets the search term for the local file search.
        Parameters:
        search - the search term
      • setArchiveSearch

        public void setArchiveSearch​(String search)
        Sets the text for the archive file search.
        Parameters:
        search - the search term
      • getArchiveSearch

        public String getArchiveSearch()
        Returns the search term of the archive file search.
        Returns:
        the search term
      • getContentPanel

        public PreviewDisplay getContentPanel()
        Returns the content panel.
        Returns:
        the content panel
      • setNote

        protected void setNote​(File file,
                               String note)
        Sets the note for the file.
        Parameters:
        file - the file to set the note for
        note - the note to set
      • getNote

        protected String getNote​(File file)
        Returns the note for the file.
        Parameters:
        file - the file to set the note for
        Returns:
        the note, null if none available
      • removeNote

        protected void removeNote​(File file)
        Removes the note for the file.
        Parameters:
        file - the file to remove the note for
      • hasNote

        protected boolean hasNote​(File file)
        Checks whether a note is present for the file.
        Parameters:
        file - the file to check
        Returns:
        true if note present
      • clearNotes

        protected void clearNotes​(String dir)
        Clears the notes for the dir or global if dir is null.
        Parameters:
        dir - the dir to clear the notes for, null for global
      • viewNotes

        protected void viewNotes()
        Displays the notes.
      • saveNotes

        protected void saveNotes()
        Allows the user to save the current notes.
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface CleanUpHandler