Package adams.gui.core
Class FilePanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- adams.gui.core.BasePanel
-
- adams.gui.core.FilePanel
-
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ListSelectionListener
public class FilePanel extends BasePanel implements ListSelectionListener
Displays files and directories.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFilePanel.FileDoubleClickEventEvent for double clicks on files.static interfaceFilePanel.FileDoubleClickListenerInterface for classes that listen to double clicks on files.-
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 FileObjectComparatorm_Comparatorthe comparator.protected Set<ChangeListener>m_DirectoryChangeListenersthe listeners for when the directory gets updated.protected Set<FilePanel.FileDoubleClickListener>m_FileDoubleClickListenersthe double click listener for a file.protected List<FileObject>m_Filesthe currently listed files.protected Set<ChangeListener>m_FilesChangeListenersthe listeners for when the files get updated.protected FocusAdapterm_FocusAdapterthe focus adapter.protected booleanm_IgnoreChangeswhether to ignore changes.protected KeyAdapterm_KeyAdapterthe key adapter.protected SearchableBaseListm_Listthe List for the non-detailed view.protected DirectoryListerm_Listerfor listing the content of the directory.protected MouseAdapterm_MouseAdapterthe mouse adapter.protected booleanm_MultiSelectionwhether to allow multiple files to be selected.protected SearchPanelm_PanelSearchthe search panel.protected Set<ChangeListener>m_SelectionChangeListenersthe listeners for when the selection changes.protected Booleanm_ShowDetailswhether to show details on the files.protected booleanm_ShowHiddenwhether to show hidden files.protected SortableAndSearchableTablem_Tablethe table for the detailed view.protected SwingWorkerm_Workerthe currently running swingworker.-
Fields inherited from class adams.gui.core.BasePanel
m_FileChooser
-
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 FilePanel(boolean showDetails)Initializes the panel.FilePanel(boolean showDetails, DirectoryLister lister)Initializes the panel.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDirectoryChangeListener(ChangeListener l)Adds the listener to the list of listeners that get notified when the directory changes.voidaddFileDoubleClickListener(FilePanel.FileDoubleClickListener l)Adds the listener to the list of listeners that get notified when a file gets double-clicked.voidaddFilesChangeListener(ChangeListener l)Adds the listener to the list of listeners that get notified when the files change.voidaddSearchListener(SearchListener l)Adds the specified search listener.voidaddSelectionChangeListener(ChangeListener l)Adds the listener to the list of listeners that get notified when the selection changes.voidaddTableKeyListener(KeyListener l)Adds the specified key listener to the table.voidclearSelection()Clears the selection.protected voidfinishInit()Finalizes the initialization.voidfinishUpdate()Triggers an update after updating several parameters.protected FileObjectfixDir(FileObject dir)Fixes .. paths.StringgetCurrentDir()Returns the current directory.PlaceholderDirectorygetCurrentDirAsFile()Returns the current directory as dir object.DirectoryListergetDirectoryLister()Returns the current directory lister.BaseRegExpgetFilter()Return the filter in use.booleangetListDirs()Returns whether directories are listed.booleangetListFiles()Returns whether files are listed.FilegetSelectedFile()Returns the currently selected file, if any.protected FilegetSelectedFile(boolean skipDotDot)Returns the currently selected file, if any.FileObjectgetSelectedFileObject()Returns the currently selected file object, if any.protected FileObjectgetSelectedFileObject(boolean skipDotDot)Returns the currently selected file wrapper, if any.FileObject[]getSelectedFileObjects()Returns the currently selected file objects, if any.File[]getSelectedFiles()Returns the currently selected files, if any.protected voidinitGUI()Initializes the widgets.protected voidinitialize()Initializes the members.booleanisBusy()Checks whether we're currently busy.booleanisCaseSensitive()Returns whether comparison is case-sensitive.booleanisIncludeParentDirs()Returns whether to include parent directories in the comparison.booleanisListDirsFirst()Returns whether to list directories first.booleanisLocal()Returns whether the files are local or remote.booleanisMultiSelection()Returns whether multi-selection is enabled.booleanisSearchVisible()Returns whether the search box is visible.booleanisShowHidden()Returns whether to show hidden files or not.List<FileObject>listDir()Lists the files/dirs in the current directory.List<FileObject>listDir(String dir)Lists the files/dirs in the specified directory.static voidmain(String[] args)Just for testing.protected voidnotifyDirectoryChangeListeners()Notifies the listeners when the directory has changed.protected voidnotifyFileDoubleClickListeners(FilePanel.FileDoubleClickEvent e)Notifies the listeners when a file got double-clicked.protected voidnotifyFilesChangeListeners()Notifies the listeners when the files have changed.protected voidnotifySelectionChangeListeners()Notifies the listeners when the selection has changed.voidreload()Updates the files (if not busy).voidreload(Runnable action)Updates the files (if not busy).voidremoveDirectoryChangeListener(ChangeListener l)Removes the listener from the list of listeners that get notified when the directory changes.voidremoveFileDoubleClickListener(FilePanel.FileDoubleClickListener l)Removes the listener from the list of listeners that get notified when a file gets double-clicked.voidremoveFilesChangeListener(ChangeListener l)Removes the listener from the list of listeners that get notified when the files change.voidremoveSearchListener(SearchListener l)Removes the specified search listener.voidremoveSelectionChangeListener(ChangeListener l)Removes the listener from the list of listeners that get notified when the selection changes.voidremoveTableKeyListener(KeyListener l)Removes the specified key listener from the table.voidsetCaseSensitive(boolean value)Sets whether to use case-sensitive comparison.voidsetCurrentDir(File value)Sets the directory to list.voidsetCurrentDir(String value)Sets the directory to list.voidsetDirectoryLister(DirectoryLister value)Sets the directory lister to use.voidsetFilter(BaseRegExp value)Sets the filter to use.voidsetIncludeParentDirs(boolean value)Sets whether to use include the parent directories in the comparison.voidsetListDirs(boolean value)Sets whether to list directories.voidsetListDirsFirst(boolean value)Sets whether to list directories first.voidsetListFiles(boolean value)Sets whether to list files.voidsetMultiSelection(boolean value)Sets whether to allow multi-selection.voidsetSearchVisible(boolean value)Sets the visibility state of the search box.voidsetSelectedFile(FileObject file)Selects the specified file.voidsetSelectedFiles(FileObject[] files)Selects the specified files.voidsetSelectedName(String name)Selects the specified file name.voidsetShowHidden(boolean value)Sets whether to show hidden files or not.voidstartUpdate()Allows the update of several parameters without triggering an update each time.protected voidupdate()Updates the view.protected voidupdate(Runnable action)Updates the view.protected voidupdateGUI()Updates the GUI.voidvalueChanged(ListSelectionEvent e)Gets called when the list selection changes.-
Methods inherited from class adams.gui.core.BasePanel
afterHide, afterShow, beforeHide, beforeShow, closeParent, getParentChild, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, initFileChooser, 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
-
m_ShowDetails
protected Boolean m_ShowDetails
whether to show details on the files.
-
m_MultiSelection
protected boolean m_MultiSelection
whether to allow multiple files to be selected.
-
m_ShowHidden
protected boolean m_ShowHidden
whether to show hidden files.
-
m_Lister
protected DirectoryLister m_Lister
for listing the content of the directory.
-
m_Comparator
protected FileObjectComparator m_Comparator
the comparator.
-
m_Files
protected List<FileObject> m_Files
the currently listed files.
-
m_Worker
protected SwingWorker m_Worker
the currently running swingworker.
-
m_IgnoreChanges
protected boolean m_IgnoreChanges
whether to ignore changes.
-
m_List
protected SearchableBaseList m_List
the List for the non-detailed view.
-
m_Table
protected SortableAndSearchableTable m_Table
the table for the detailed view.
-
m_PanelSearch
protected SearchPanel m_PanelSearch
the search panel.
-
m_DirectoryChangeListeners
protected Set<ChangeListener> m_DirectoryChangeListeners
the listeners for when the directory gets updated.
-
m_FilesChangeListeners
protected Set<ChangeListener> m_FilesChangeListeners
the listeners for when the files get updated.
-
m_SelectionChangeListeners
protected Set<ChangeListener> m_SelectionChangeListeners
the listeners for when the selection changes.
-
m_FileDoubleClickListeners
protected Set<FilePanel.FileDoubleClickListener> m_FileDoubleClickListeners
the double click listener for a file.
-
m_FocusAdapter
protected FocusAdapter m_FocusAdapter
the focus adapter.
-
m_KeyAdapter
protected KeyAdapter m_KeyAdapter
the key adapter.
-
m_MouseAdapter
protected MouseAdapter m_MouseAdapter
the mouse adapter.
-
-
Constructor Detail
-
FilePanel
public FilePanel(boolean showDetails)
Initializes the panel.- Parameters:
showDetails- whether to show details like DIR and size
-
FilePanel
public FilePanel(boolean showDetails, DirectoryLister lister)Initializes the panel.- Parameters:
showDetails- whether to show details like DIR and size
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classBasePanel
-
finishInit
protected void finishInit()
Finalizes the initialization.- Overrides:
finishInitin classBasePanel
-
fixDir
protected FileObject fixDir(FileObject dir)
Fixes .. paths.- Parameters:
dir- the path to check- Returns:
- the potentially fixed path
-
isLocal
public boolean isLocal()
Returns whether the files are local or remote.- Returns:
- true if local
-
setDirectoryLister
public void setDirectoryLister(DirectoryLister value)
Sets the directory lister to use.- Parameters:
value- the lister
-
getDirectoryLister
public DirectoryLister getDirectoryLister()
Returns the current directory lister.- Returns:
- the lister
-
setCurrentDir
public void setCurrentDir(String value)
Sets the directory to list.- Parameters:
value- the directory
-
setCurrentDir
public void setCurrentDir(File value)
Sets the directory to list.- Parameters:
value- the directory
-
getCurrentDir
public String getCurrentDir()
Returns the current directory.- Returns:
- the directory
-
getCurrentDirAsFile
public PlaceholderDirectory getCurrentDirAsFile()
Returns the current directory as dir object.- Returns:
- the directory
-
setListDirs
public void setListDirs(boolean value)
Sets whether to list directories.- Parameters:
value- true if to list directories
-
getListDirs
public boolean getListDirs()
Returns whether directories are listed.- Returns:
- true if to list directories
-
setListFiles
public void setListFiles(boolean value)
Sets whether to list files.- Parameters:
value- true if to list files
-
getListFiles
public boolean getListFiles()
Returns whether files are listed.- Returns:
- true if to list files
-
setFilter
public void setFilter(BaseRegExp value)
Sets the filter to use.- Parameters:
value- the filter
-
getFilter
public BaseRegExp getFilter()
Return the filter in use.- Returns:
- the filter
-
setCaseSensitive
public void setCaseSensitive(boolean value)
Sets whether to use case-sensitive comparison.- Parameters:
value- true if case-sensitive
-
isCaseSensitive
public boolean isCaseSensitive()
Returns whether comparison is case-sensitive.- Returns:
- true if case-sensitive
-
setListDirsFirst
public void setListDirsFirst(boolean value)
Sets whether to list directories first.- Parameters:
value- true if to list directories first
-
isListDirsFirst
public boolean isListDirsFirst()
Returns whether to list directories first.- Returns:
- true if to list dirs first
-
setIncludeParentDirs
public void setIncludeParentDirs(boolean value)
Sets whether to use include the parent directories in the comparison.- Parameters:
value- true if to include parent directories
-
isIncludeParentDirs
public boolean isIncludeParentDirs()
Returns whether to include parent directories in the comparison.- Returns:
- true if included
-
setShowHidden
public void setShowHidden(boolean value)
Sets whether to show hidden files or not.- Parameters:
value- true if to show
-
isShowHidden
public boolean isShowHidden()
Returns whether to show hidden files or not.- Returns:
- true if to show
-
setMultiSelection
public void setMultiSelection(boolean value)
Sets whether to allow multi-selection.- Parameters:
value- true if to allow
-
isMultiSelection
public boolean isMultiSelection()
Returns whether multi-selection is enabled.- Returns:
- true if enabled
-
getSelectedFileObject
protected FileObject getSelectedFileObject(boolean skipDotDot)
Returns the currently selected file wrapper, if any.- Parameters:
skipDotDot- whether to skip the dot dot file- Returns:
- the file wrapper, null if none selected
-
getSelectedFile
protected File getSelectedFile(boolean skipDotDot)
Returns the currently selected file, if any.- Parameters:
skipDotDot- whether to skip the dot dot file- Returns:
- the file, null if none selected
-
getSelectedFileObject
public FileObject getSelectedFileObject()
Returns the currently selected file object, if any.- Returns:
- the file object, null if none selected
-
getSelectedFile
public File getSelectedFile()
Returns the currently selected file, if any.- Returns:
- the file, null if none selected
-
getSelectedFileObjects
public FileObject[] getSelectedFileObjects()
Returns the currently selected file objects, if any.- Returns:
- the file objects
-
getSelectedFiles
public File[] getSelectedFiles()
Returns the currently selected files, if any.- Returns:
- the files
-
clearSelection
public void clearSelection()
Clears the selection.
-
startUpdate
public void startUpdate()
Allows the update of several parameters without triggering an update each time.
-
finishUpdate
public void finishUpdate()
Triggers an update after updating several parameters.
-
listDir
public List<FileObject> listDir()
Lists the files/dirs in the current directory.- Returns:
- the files/dirs
-
listDir
public List<FileObject> listDir(String dir)
Lists the files/dirs in the specified directory.- Parameters:
dir- the directory to list- Returns:
- the files/dirs
-
update
protected void update()
Updates the view.
-
update
protected void update(Runnable action)
Updates the view.- Parameters:
action- the action to execute after the reload, ignored if null
-
updateGUI
protected void updateGUI()
Updates the GUI.
-
reload
public void reload()
Updates the files (if not busy).
-
reload
public void reload(Runnable action)
Updates the files (if not busy).- Parameters:
action- the action to perform after the reload
-
setSearchVisible
public void setSearchVisible(boolean value)
Sets the visibility state of the search box. NB: only available when details are shown using a table.- Parameters:
value- true if visible
-
isSearchVisible
public boolean isSearchVisible()
Returns whether the search box is visible.- Returns:
- true of visible
-
isBusy
public boolean isBusy()
Checks whether we're currently busy.- Returns:
- true if busy
-
setSelectedFile
public void setSelectedFile(FileObject file)
Selects the specified file.- Parameters:
file- the file to select
-
setSelectedName
public void setSelectedName(String name)
Selects the specified file name.- Parameters:
name- the file name to select, no path
-
setSelectedFiles
public void setSelectedFiles(FileObject[] files)
Selects the specified files.- Parameters:
files- the files to select
-
addDirectoryChangeListener
public void addDirectoryChangeListener(ChangeListener l)
Adds the listener to the list of listeners that get notified when the directory changes.- Parameters:
l- the listener to add
-
removeDirectoryChangeListener
public void removeDirectoryChangeListener(ChangeListener l)
Removes the listener from the list of listeners that get notified when the directory changes.- Parameters:
l- the listener to add
-
notifyDirectoryChangeListeners
protected void notifyDirectoryChangeListeners()
Notifies the listeners when the directory has changed.
-
addFilesChangeListener
public void addFilesChangeListener(ChangeListener l)
Adds the listener to the list of listeners that get notified when the files change.- Parameters:
l- the listener to add
-
removeFilesChangeListener
public void removeFilesChangeListener(ChangeListener l)
Removes the listener from the list of listeners that get notified when the files change.- Parameters:
l- the listener to add
-
notifyFilesChangeListeners
protected void notifyFilesChangeListeners()
Notifies the listeners when the files have changed.
-
addSelectionChangeListener
public void addSelectionChangeListener(ChangeListener l)
Adds the listener to the list of listeners that get notified when the selection changes.- Parameters:
l- the listener to add
-
removeSelectionChangeListener
public void removeSelectionChangeListener(ChangeListener l)
Removes the listener from the list of listeners that get notified when the selection changes.- Parameters:
l- the listener to add
-
notifySelectionChangeListeners
protected void notifySelectionChangeListeners()
Notifies the listeners when the selection has changed.
-
valueChanged
public void valueChanged(ListSelectionEvent e)
Gets called when the list selection changes.- Specified by:
valueChangedin interfaceListSelectionListener- Parameters:
e- the event
-
addFileDoubleClickListener
public void addFileDoubleClickListener(FilePanel.FileDoubleClickListener l)
Adds the listener to the list of listeners that get notified when a file gets double-clicked.- Parameters:
l- the listener to add
-
removeFileDoubleClickListener
public void removeFileDoubleClickListener(FilePanel.FileDoubleClickListener l)
Removes the listener from the list of listeners that get notified when a file gets double-clicked.- Parameters:
l- the listener to add
-
notifyFileDoubleClickListeners
protected void notifyFileDoubleClickListeners(FilePanel.FileDoubleClickEvent e)
Notifies the listeners when a file got double-clicked.
-
addSearchListener
public void addSearchListener(SearchListener l)
Adds the specified search listener.- Parameters:
l- the listener to add
-
removeSearchListener
public void removeSearchListener(SearchListener l)
Removes the specified search listener.- Parameters:
l- the listener to remove
-
addTableKeyListener
public void addTableKeyListener(KeyListener l)
Adds the specified key listener to the table.- Parameters:
l- the listener to add
-
removeTableKeyListener
public void removeTableKeyListener(KeyListener l)
Removes the specified key listener from the table.- Parameters:
l- the listener to remove
-
main
public static void main(String[] args)
Just for testing.- Parameters:
args- the initial directory
-
-