All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.widgets.FileList

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----com.ibm.beans.widgets.FileList

public class FileList
extends Panel
implements ActionListener
A class that implements a Java List AWT Component that is tailored to the needs of adding files and directories to the list.


Constructor Index

 o FileList()
Creates a new FileList instance using a GridBagLayout.
 o FileList(String[])
Creates a new FileList instance with default file and directory buttons.
 o FileList(String[], boolean, String, String, boolean, String)
Creates a new FileList instance.

Method Index

 o actionPerformed(ActionEvent)
Informs the FileList instance that a user has performed some action.
 o addName(String)
Adds a file or directory name to the FileList instance.
 o addNames(String[])
Adds an array of file or directory names to the FileList instance.
 o getItems()
Gets the items of the file list.
 o getListBox()
Gets the List component of the file list.
 o getParentFrame()
Gets the parent Frame of the FileList instance.
 o getPreferredSize()
Gets the current preferred size of the file list.
 o getSelectedItems()
Gets the selected items of the file list.
 o removeNames()
Removes all the file and directory names from the FileList instance.
 o setSize(int, int)
Sets the file list size.

Constructors

 o FileList
 protected FileList()
Creates a new FileList instance using a GridBagLayout.

 o FileList
 public FileList(String fileNames[],
                 boolean addfileButton,
                 String filebuttonLabel,
                 String filter,
                 boolean adddirButton,
                 String dirbuttonLabel)
Creates a new FileList instance.

Parameters:
fileNames - The initial array of names to add to the list.
addfileButton - A boolean indicating whether the file button should be displayed.
filebuttonLabel - The String that represents the file button label, can be null.
filter -
The String that represents the file specification to be shown by the FileDialog. Providing a String with wildcard semantics will perform rudimentary filtering on some platforms. This wildcard support could change when JavaSoft supports the FilenameFilter class on all platforms.
adddirButton - A boolean indicating whether the directory button should be displayed.
dirbuttonLabel - The String that represents the directory button label, can be null.
 o FileList
 public FileList(String fileNames[])
Creates a new FileList instance with default file and directory buttons.

Parameters:
fileNames - The initial array of names to add to the list.

Methods

 o getPreferredSize
 public Dimension getPreferredSize()
Gets the current preferred size of the file list.

Returns:
The Dimension indicating the preferred size of the FileList instance.
Overrides:
getPreferredSize in class Container
See Also:
Dimension
 o setSize
 public void setSize(int width,
                     int height)
Sets the file list size.

Parameters:
width - The desired width of the FileList instance.
height - The desired height of the FileList instance.
Overrides:
setSize in class Component
See Also:
Dimension
 o getListBox
 public List getListBox()
Gets the List component of the file list.

Returns:
The List component owned by the FileList instance.
See Also:
List
 o getItems
 public String[] getItems()
Gets the items of the file list.

Returns:
An array of Strings holding the items.
 o getSelectedItems
 public String[] getSelectedItems()
Gets the selected items of the file list.

Returns:
An array of Strings holding the selected items.
 o addName
 public void addName(String name)
Adds a file or directory name to the FileList instance.

Parameters:
name - The file or directory name to be added.
 o addNames
 public void addNames(String names[])
Adds an array of file or directory names to the FileList instance.

Parameters:
names - The file or directory names to be added.
 o removeNames
 public void removeNames()
Removes all the file and directory names from the FileList instance.

 o getParentFrame
 public Frame getParentFrame()
Gets the parent Frame of the FileList instance.

Returns:
The parent Frame.
See Also:
Frame
 o actionPerformed
 public void actionPerformed(ActionEvent e)
Informs the FileList instance that a user has performed some action.

Parameters:
e - The event describing the action.
See Also:
ActionEvent

All Packages  Class Hierarchy  This Package  Previous  Next  Index