Package noaa.coastwatch.gui.open
Class AbstractDirectoryLister
java.lang.Object
noaa.coastwatch.gui.open.AbstractDirectoryLister
- All Implemented Interfaces:
Cloneable
,DirectoryLister
- Direct Known Subclasses:
HTTPDirectoryLister
,LocalDirectoryLister
The
AbstractDirectoryLister
is an abstract helper that
implements most of the DirectoryLister
methods. Child
classes need only implement:
- Since:
- 3.2.0
- Author:
- Peter Hollemans
-
Nested Class Summary
Nested classes/interfaces inherited from interface noaa.coastwatch.gui.open.DirectoryLister
DirectoryLister.Entry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract List
buildEntryList
(String name) Builds the list of directory entries.void
clear()
Clears the directory name and entry list.clone()
Gets a copy of this object.Gets the directory name.Gets the list of directory entries.void
refresh()
Refreshes the entry list based on the current directory name.void
setDirectory
(String name) Sets the directory name.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface noaa.coastwatch.gui.open.DirectoryLister
getChild, getParent
-
Constructor Details
-
AbstractDirectoryLister
public AbstractDirectoryLister()Creates a new lister with empty directory name.
-
-
Method Details
-
getDirectory
Gets the directory name.- Specified by:
getDirectory
in interfaceDirectoryLister
- Returns:
- name the directory name or null if no directory is set.
-
clone
Gets a copy of this object.- Specified by:
clone
in interfaceDirectoryLister
- Overrides:
clone
in classObject
-
setDirectory
Sets the directory name.- Specified by:
setDirectory
in interfaceDirectoryLister
- Parameters:
name
- the new directory name.- Throws:
IOException
- if an error occurred getting the entries for the new directory.
-
buildEntryList
Builds the list of directory entries.- Throws:
IOException
- if an error occurred getting the entries for the new directory.
-
refresh
Refreshes the entry list based on the current directory name.- Specified by:
refresh
in interfaceDirectoryLister
- Throws:
IOException
- if an error occurred getting the entries for the new directory.
-
clear
public void clear()Clears the directory name and entry list.- Specified by:
clear
in interfaceDirectoryLister
-
getEntries
Gets the list of directory entries.- Specified by:
getEntries
in interfaceDirectoryLister
-