Class PreviewDisplay

    • Field Detail

      • DISPLAY_FAVORITE

        public static final String DISPLAY_FAVORITE
        placeholder string when a favorite was selected.
        See Also:
        Constant Field Values
      • DISPLAY_NO_FAVORITES

        public static final String DISPLAY_NO_FAVORITES
        placeholder string when no favorites are available.
        See Also:
        Constant Field Values
      • m_PanelView

        protected BasePanel m_PanelView
        the panel for the view.
      • m_PanelContentHandlers

        protected BasePanel m_PanelContentHandlers
        the panel with the content handlers.
      • m_ComboBoxContentHandlers

        protected BaseComboBox m_ComboBoxContentHandlers
        the combobox with the content handlers (if more than one available).
      • m_ListContentHandlers

        protected List<ContentHandler> m_ListContentHandlers
        the list of content handler objects (aligned with combobox).
      • m_ButtonContentHandler

        protected BaseButton m_ButtonContentHandler
        the button for displaying the options for the content handler.
      • m_IgnoreContentHandlerChanges

        protected boolean m_IgnoreContentHandlerChanges
        whether to ignore selections of the content handler combobox temporarily.
      • m_CurrentFiles

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

        protected String m_CurrentExtension
        the current extension.
      • m_LastSearch

        protected SearchPanel m_LastSearch
        the last search panel that was encountered.
      • m_DisplayInProgress

        protected boolean m_DisplayInProgress
        whether a display is currently in progress.
      • m_ReusePreviews

        protected boolean m_ReusePreviews
        whether to reuse previews.
      • m_UseFixedContentHandler

        protected boolean m_UseFixedContentHandler
        whether to fix the handler.
      • m_LastContentHandler

        protected ContentHandler m_LastContentHandler
        the last content handler.
    • Constructor Detail

      • PreviewDisplay

        public PreviewDisplay()
    • 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
      • getActualContentHandler

        public ContentHandler getActualContentHandler()
        Returns the actual content handler in use.
        Returns:
        the handler in use
      • getContentHandler

        public ContentHandler getContentHandler()
        Returns the current handler.
        Returns:
        the handler, null if a favorite was selected
      • editContentHandler

        protected void editContentHandler()
        Displays GOE for current content handler.
      • displayView

        public void displayView​(JPanel panel)
        Displays the given view in the content panel.
        Parameters:
        panel - the view to display
      • displayCreatingView

        public void displayCreatingView()
        Displays "Creating view...".
      • createPreview

        protected JPanel createPreview​(File[] localFiles)
        Creates a preview for the files.
        Parameters:
        localFiles - the files to create the preview for
        Returns:
        the preview
      • getCurrentExtension

        public String getCurrentExtension()
        Returns the current extension.
        Returns:
        the extension, null if none determined
      • determineExtension

        protected String determineExtension​(File[] localFiles)
        Determines the extension from the file(s) for the favorites.
        Parameters:
        localFiles - the files to inspect
        Returns:
        the extension, null if failed to determine
      • display

        public void display​(File[] localFiles,
                            boolean wait)
        Displays the content from the specified files.
        Parameters:
        localFiles - the files to display
        wait - wait for worker thread to finish
      • updatePreferredContentHandler

        protected void updatePreferredContentHandler()
        Updates the preferred handler.
      • getComponent

        public JComponent getComponent()
        Returns the component for sendto.
        Returns:
        the component
      • 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
      • setPreviewCacheSize

        public void setPreviewCacheSize​(int value)
        Sets the size of the preview cache.
        Parameters:
        value - the size of the cache
      • getPreviewCacheSize

        public int getPreviewCacheSize()
        Returns the size of the preview cache.
        Returns:
        the size of the cache
      • 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
      • clear

        public void clear()
        Clears the view.
      • cleanUp

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