public class FileList
extends java.lang.Object
FileList
manages a Swing JList
which it uses
to display the names of all files in a given directory, whose
identity may change from time to time.Modifier and Type | Class and Description |
---|---|
static interface |
FileList.SelectionReceiver
File selectedevent handler interface. |
Modifier and Type | Field and Description |
---|---|
static java.awt.RenderingHints |
AA_HINTS
Rendering hints to switch anti-aliasing on.
|
Constructor and Description |
---|
FileList(java.lang.String fpath)
Constructs a new file list, starting with the given directory
if it is not
null , otherwise uses the user's current
directory. |
Modifier and Type | Method and Description |
---|---|
javax.swing.JScrollPane |
getFilesScroller(int wpxls,
int nitms)
Returns this list's scroller having first configured its size to
match the given width (in pixels) and number of items.
|
void |
refresh()
Refreshes the display of this list.
|
void |
setFolder(java.io.File fldr)
Sets this list's directory to be the one given.
|
void |
setSelectionReceiver(FileList.SelectionReceiver srcvr)
Attaches the given selection receiver to this list.
|
public static final java.awt.RenderingHints AA_HINTS
public FileList(java.lang.String fpath)
null
, otherwise uses the user's current
directory.public javax.swing.JScrollPane getFilesScroller(int wpxls, int nitms)
public void setSelectionReceiver(FileList.SelectionReceiver srcvr)
public void setFolder(java.io.File fldr)
public void refresh()