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 class
PreviewBrowserPanel.FileComparator
Comparator
forFile
objects.static class
PreviewBrowserPanel.LocalFilesListCellRenderer
Renderer 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 AbstractArchiveHandler
m_ArchiveHandler
the current archive handler.protected FileChangeMonitor
m_ChangeMonitor
the file change monitor.protected BaseComboBox
m_ComboBoxArchiveHandlers
the combobox with the archive handlers (if more than one available).protected File[]
m_CurrentFiles
the currently selected files.protected BaseFileChooser
m_FileChooser
the file chooser for opening files.protected NotesFileChooser
m_FileChooserNotes
the file chooser for the notes.protected boolean
m_IgnoreArchiveHandlerChanges
whether to ignore selections of the archive handler combobox temporarily.protected SearchableBaseList
m_ListArchiveFiles
the list with the archive files.protected SearchableBaseList
m_ListLocalFiles
the list with the local files.protected ListCellRenderer
m_ListLocalFilesRenderer
the renderer for the local files.protected List<AbstractLocalFilesAction>
m_LocalFilesActions
the actions for local files.protected JMenuBar
m_MenuBar
the menu bar, if used.protected JMenu
m_MenuFileLoadRecent
the "load recent" submenu.protected JMenuItem
m_MenuItemCacheViews
the "cache views" menu item.protected JMenuItem
m_MenuItemClearNotesAll
the "clear notes (global)" menu item.protected JMenuItem
m_MenuItemClearNotesDir
the "clear notes (current dir)" menu item.protected JMenuItem
m_MenuItemSaveNotes
the "save notes" menu item.protected JMenuItem
m_MenuItemShowHiddenFiles
the "show hidden files" menu item.protected JMenuItem
m_MenuItemShowTempFiles
the "show temp files" menu item.protected JMenuItem
m_MenuItemUseFixedHandler
the "use fixed handler" menu item.protected JMenuItem
m_MenuItemViewNotes
the "show notes" menu item.protected DefaultListModel
m_ModelArchiveFiles
the model for the archive files.protected DefaultComboBoxModel<String>
m_ModelArchiveHandlers
the model of the combobox.protected DefaultListModel<String>
m_ModelLocalFiles
the model for the local files.protected BaseSplitPane
m_PaneBrowsing
the panel for browsing.protected BasePanel
m_PanelArchiveFiles
the panel with the archive files.protected BasePanel
m_PanelArchiveFilesBottom
the panel with the archive files (bottom).protected BasePanel
m_PanelArchiveHandlers
the panel with the archive handlers.protected PreviewDisplay
m_PanelContent
the panel for the content display.protected DirectoryChooserPanel
m_PanelDir
for selecting the directory to browse.protected BasePanel
m_PanelLocalFiles
the panel with the local files.protected RecentFilesHandler<JMenu>
m_RecentFilesHandler
the recent files handler.protected SearchPanel
m_SearchArchiveFiles
the search panel for the archive files.protected SearchPanel
m_SearchLocalFiles
the search panel for the local files.protected BaseSplitPane
m_SplitPane
the split pane in use.protected TitleGenerator
m_TitleGenerator
for generating the title of the dialog/frame.static String
SESSION_FILE
the 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 void
cleanUp()
Cleans up data structures, frees up memory.void
clear()
Clears the preview.protected void
clearNotes(String dir)
Clears the notes for the dir or global if dir is null.protected void
displayArchiveContent()
Displays an archive file.protected void
displayLocalFile()
Displays a local file.protected File[]
filterFiles(File[] files)
Filters the files.protected void
finishInit()
Finishes the initialization.SearchableBaseList
getArchiveFilesList()
Returns the list component for files in the archive.String
getArchiveSearch()
Returns the search term of the archive file search.PreviewDisplay
getContentPanel()
Returns the content panel.File[]
getCurrentFiles()
Returns the currently selected files.DirectoryChooserPanel
getDirPanel()
Returns the directory panel.SearchableBaseList
getLocalFilesList()
Returns the list component for files in the archive.protected JPopupMenu
getLocalFilesPopupMenu(MouseEvent e)
Returns a popup menu for the local files.String
getLocalSearch()
Returns the search term of the local file search.JMenuBar
getMenuBar()
Creates a menu bar (singleton per panel object).protected String
getNote(File file)
Returns the note for the file.boolean
getReusePreviews()
Returns whether to reuse previews.Class[]
getSendToClasses()
Returns the classes that the supporter generates.Object
getSendToItem(Class[] cls)
Returns the object to send.boolean
getShowHiddenFiles()
Returns whether to show hidden files or not.boolean
getShowTempFiles()
Returns whether to show temp files or not.TitleGenerator
getTitleGenerator()
Returns the title generator in use.boolean
getUseFixedContentHandler()
Returns whether to use a fixed content handler.protected boolean
hasNote(File file)
Checks whether a note is present for the file.boolean
hasSendToItem(Class[] cls)
Checks whether something to send is available.protected void
initGUI()
Initializes the widgets.protected void
initialize()
Initializes the members.boolean
isArchiveFilesListVisible()
Returns whether the archive files are visible.boolean
isBrowsingEnabled()
Returns whether the browsing panel is hidden or not.protected void
monitorFile(boolean display)
Monitors the selected file and triggers an updated if necessary.PreviewBrowserPanel
newWindow()
Displays a new preview window/frame.void
open(PlaceholderDirectory dir)
Opens the specified directory.void
open(PlaceholderFile file)
Displays the specified file.void
openFile()
Lets the user select a file to preview.protected void
refreshLocalFiles()
Refreshes the local file list.void
reload()
Reloads the directory and content.protected void
removeNote(File file)
Removes the note for the file.protected void
saveNotes()
Allows the user to save the current notes.void
setArchiveSearch(String search)
Sets the text for the archive file search.void
setBrowsingEnabled(boolean value)
Sets whether the browsing panel is hidden or not.void
setLocalSearch(String search)
Sets the search term for the local file search.protected void
setNote(File file, String note)
Sets the note for the file.void
setReusePreviews(boolean value)
Sets whether to reuse previews.void
setShowHiddenFiles(boolean value)
Sets whether to show hidden files or not.void
setShowTempFiles(boolean value)
Sets whether to show temp files or not.void
setUseFixedContentHandler(boolean value)
Sets whether to use a fixed content handler.protected void
update()
Updates menu and title.protected void
updateCacheViews()
Based on check state of menu item, sets whether to reuse the views.protected void
updateMenu()
Updates the menu.protected void
updatePreferredArchiveHandler()
Updates the preferred handler.protected void
updateShowHiddenFiles()
Based on check state of menu item, sets whether to show/hide hidden files.protected void
updateShowTempFiles()
Based on check state of menu item, sets whether to show/hide temp files.protected void
updateTitle()
Updates the title.protected void
updateUseFixedHandler()
Based on check state of menu item, sets whether to use a fixed handler.protected void
viewNotes()
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:
initialize
in classBasePanel
-
finishInit
protected void finishInit()
Finishes the initialization.- Overrides:
finishInit
in 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:
getMenuBar
in 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:
getSendToClasses
in interfaceSendToActionSupporter
- Returns:
- the classes
-
hasSendToItem
public boolean hasSendToItem(Class[] cls)
Checks whether something to send is available.- Specified by:
hasSendToItem
in 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:
getSendToItem
in 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:
cleanUp
in interfaceCleanUpHandler
-
-