Package adams.gui.tools
Class PreviewBrowserPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- adams.gui.core.BasePanel
-
- adams.gui.tools.PreviewBrowserPanel
-
- All Implemented Interfaces:
CleanUpHandler,MenuBarProvider,SendToActionSupporter,ImageObserver,MenuContainer,Serializable,Accessible
public class PreviewBrowserPanel extends BasePanel implements MenuBarProvider, SendToActionSupporter, CleanUpHandler
Allows the browsing of files and previewing the content. Also works for archives.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPreviewBrowserPanel.FileComparatorComparatorforFileobjects.static classPreviewBrowserPanel.LocalFilesListCellRendererRenderer for the local files, which indicates whether a note is present or not.-
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractArchiveHandlerm_ArchiveHandlerthe current archive handler.protected FileChangeMonitorm_ChangeMonitorthe file change monitor.protected BaseComboBoxm_ComboBoxArchiveHandlersthe combobox with the archive handlers (if more than one available).protected File[]m_CurrentFilesthe currently selected files.protected BaseFileChooserm_FileChooserthe file chooser for opening files.protected NotesFileChooserm_FileChooserNotesthe file chooser for the notes.protected booleanm_IgnoreArchiveHandlerChangeswhether to ignore selections of the archive handler combobox temporarily.protected SearchableBaseListm_ListArchiveFilesthe list with the archive files.protected SearchableBaseListm_ListLocalFilesthe list with the local files.protected ListCellRendererm_ListLocalFilesRendererthe renderer for the local files.protected List<AbstractLocalFilesAction>m_LocalFilesActionsthe actions for local files.protected JMenuBarm_MenuBarthe menu bar, if used.protected JMenum_MenuFileLoadRecentthe "load recent" submenu.protected JMenuItemm_MenuItemCacheViewsthe "cache views" menu item.protected JMenuItemm_MenuItemClearNotesAllthe "clear notes (global)" menu item.protected JMenuItemm_MenuItemClearNotesDirthe "clear notes (current dir)" menu item.protected JMenuItemm_MenuItemSaveNotesthe "save notes" menu item.protected JMenuItemm_MenuItemShowHiddenFilesthe "show hidden files" menu item.protected JMenuItemm_MenuItemShowTempFilesthe "show temp files" menu item.protected JMenuItemm_MenuItemUseFixedHandlerthe "use fixed handler" menu item.protected JMenuItemm_MenuItemViewNotesthe "show notes" menu item.protected DefaultListModelm_ModelArchiveFilesthe model for the archive files.protected DefaultComboBoxModel<String>m_ModelArchiveHandlersthe model of the combobox.protected DefaultListModel<String>m_ModelLocalFilesthe model for the local files.protected BaseSplitPanem_PaneBrowsingthe panel for browsing.protected BasePanelm_PanelArchiveFilesthe panel with the archive files.protected BasePanelm_PanelArchiveFilesBottomthe panel with the archive files (bottom).protected BasePanelm_PanelArchiveHandlersthe panel with the archive handlers.protected PreviewDisplaym_PanelContentthe panel for the content display.protected DirectoryChooserPanelm_PanelDirfor selecting the directory to browse.protected BasePanelm_PanelLocalFilesthe panel with the local files.protected RecentFilesHandler<JMenu>m_RecentFilesHandlerthe recent files handler.protected SearchPanelm_SearchArchiveFilesthe search panel for the archive files.protected SearchPanelm_SearchLocalFilesthe search panel for the local files.protected BaseSplitPanem_SplitPanethe split pane in use.protected TitleGeneratorm_TitleGeneratorfor generating the title of the dialog/frame.static StringSESSION_FILEthe file to store the recent directories.-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
-
Constructor Summary
Constructors Constructor Description PreviewBrowserPanel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()Cleans up data structures, frees up memory.voidclear()Clears the preview.protected voidclearNotes(String dir)Clears the notes for the dir or global if dir is null.protected voiddisplayArchiveContent()Displays an archive file.protected voiddisplayLocalFile()Displays a local file.protected File[]filterFiles(File[] files)Filters the files.protected voidfinishInit()Finishes the initialization.SearchableBaseListgetArchiveFilesList()Returns the list component for files in the archive.StringgetArchiveSearch()Returns the search term of the archive file search.PreviewDisplaygetContentPanel()Returns the content panel.File[]getCurrentFiles()Returns the currently selected files.DirectoryChooserPanelgetDirPanel()Returns the directory panel.SearchableBaseListgetLocalFilesList()Returns the list component for files in the archive.protected JPopupMenugetLocalFilesPopupMenu(MouseEvent e)Returns a popup menu for the local files.StringgetLocalSearch()Returns the search term of the local file search.JMenuBargetMenuBar()Creates a menu bar (singleton per panel object).protected StringgetNote(File file)Returns the note for the file.booleangetReusePreviews()Returns whether to reuse previews.Class[]getSendToClasses()Returns the classes that the supporter generates.ObjectgetSendToItem(Class[] cls)Returns the object to send.booleangetShowHiddenFiles()Returns whether to show hidden files or not.booleangetShowTempFiles()Returns whether to show temp files or not.TitleGeneratorgetTitleGenerator()Returns the title generator in use.booleangetUseFixedContentHandler()Returns whether to use a fixed content handler.protected booleanhasNote(File file)Checks whether a note is present for the file.booleanhasSendToItem(Class[] cls)Checks whether something to send is available.protected voidinitGUI()Initializes the widgets.protected voidinitialize()Initializes the members.booleanisArchiveFilesListVisible()Returns whether the archive files are visible.booleanisBrowsingEnabled()Returns whether the browsing panel is hidden or not.protected voidmonitorFile(boolean display)Monitors the selected file and triggers an updated if necessary.PreviewBrowserPanelnewWindow()Displays a new preview window/frame.voidopen(PlaceholderDirectory dir)Opens the specified directory.voidopen(PlaceholderFile file)Displays the specified file.voidopenFile()Lets the user select a file to preview.protected voidrefreshLocalFiles()Refreshes the local file list.voidreload()Reloads the directory and content.protected voidremoveNote(File file)Removes the note for the file.protected voidsaveNotes()Allows the user to save the current notes.voidsetArchiveSearch(String search)Sets the text for the archive file search.voidsetBrowsingEnabled(boolean value)Sets whether the browsing panel is hidden or not.voidsetLocalSearch(String search)Sets the search term for the local file search.protected voidsetNote(File file, String note)Sets the note for the file.voidsetReusePreviews(boolean value)Sets whether to reuse previews.voidsetShowHiddenFiles(boolean value)Sets whether to show hidden files or not.voidsetShowTempFiles(boolean value)Sets whether to show temp files or not.voidsetUseFixedContentHandler(boolean value)Sets whether to use a fixed content handler.protected voidupdate()Updates menu and title.protected voidupdateCacheViews()Based on check state of menu item, sets whether to reuse the views.protected voidupdateMenu()Updates the menu.protected voidupdatePreferredArchiveHandler()Updates the preferred handler.protected voidupdateShowHiddenFiles()Based on check state of menu item, sets whether to show/hide hidden files.protected voidupdateShowTempFiles()Based on check state of menu item, sets whether to show/hide temp files.protected voidupdateTitle()Updates the title.protected voidupdateUseFixedHandler()Based on check state of menu item, sets whether to use a fixed handler.protected voidviewNotes()Displays the notes.-
Methods inherited from class adams.gui.core.BasePanel
afterHide, afterShow, beforeHide, beforeShow, closeParent, getParentChild, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, initFileChooser, main, printErrorMessage, printException, saveComponent, setEnabledCascade, setEnabledCascade, setParentTitle, setVisible
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
SESSION_FILE
public static final String SESSION_FILE
the file to store the recent directories.- See Also:
- Constant Field Values
-
m_SplitPane
protected BaseSplitPane m_SplitPane
the split pane in use.
-
m_PanelDir
protected DirectoryChooserPanel m_PanelDir
for selecting the directory to browse.
-
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_ModelLocalFiles
protected DefaultListModel<String> m_ModelLocalFiles
the model for 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_ModelArchiveHandlers
protected DefaultComboBoxModel<String> m_ModelArchiveHandlers
the model of the combobox.
-
m_IgnoreArchiveHandlerChanges
protected boolean m_IgnoreArchiveHandlerChanges
whether to ignore selections of the archive handler combobox temporarily.
-
m_ArchiveHandler
protected AbstractArchiveHandler m_ArchiveHandler
the current archive handler.
-
m_CurrentFiles
protected File[] m_CurrentFiles
the currently selected files.
-
m_RecentFilesHandler
protected RecentFilesHandler<JMenu> m_RecentFilesHandler
the recent files handler.
-
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_LocalFilesActions
protected List<AbstractLocalFilesAction> m_LocalFilesActions
the actions for local files.
-
m_FileChooserNotes
protected NotesFileChooser m_FileChooserNotes
the file chooser for the notes.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classBasePanel
-
finishInit
protected void finishInit()
Finishes the initialization.- Overrides:
finishInitin classBasePanel
-
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:
getMenuBarin interfaceMenuBarProvider- 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
-
getSendToClasses
public Class[] getSendToClasses()
Returns the classes that the supporter generates.- Specified by:
getSendToClassesin interfaceSendToActionSupporter- Returns:
- the classes
-
hasSendToItem
public boolean hasSendToItem(Class[] cls)
Checks whether something to send is available.- Specified by:
hasSendToItemin interfaceSendToActionSupporter- 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:
getSendToItemin interfaceSendToActionSupporter- 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 fornote- 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:
cleanUpin interfaceCleanUpHandler
-
-