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.
-
FileList()
- Creates a new FileList instance using a GridBagLayout.
-
FileList(String[])
- Creates a new FileList instance with default file and directory buttons.
-
FileList(String[], boolean, String, String, boolean, String)
- Creates a new FileList instance.
-
actionPerformed(ActionEvent)
-
Informs the FileList instance that a user has performed some action.
-
addName(String)
-
Adds a file or directory name to the FileList instance.
-
addNames(String[])
-
Adds an array of file or directory names to the FileList instance.
-
getItems()
- Gets the items of the file list.
-
getListBox()
- Gets the List component of the file list.
-
getParentFrame()
- Gets the parent Frame of the FileList instance.
-
getPreferredSize()
- Gets the current preferred size of the file list.
-
getSelectedItems()
- Gets the selected items of the file list.
-
removeNames()
-
Removes all the file and directory names from the FileList instance.
-
setSize(int, int)
-
Sets the file list size.
FileList
protected FileList()
- Creates a new FileList instance using a GridBagLayout.
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.
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.
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
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
getListBox
public List getListBox()
- Gets the List component of the file list.
- Returns:
- The List component owned by the FileList instance.
- See Also:
- List
getItems
public String[] getItems()
- Gets the items of the file list.
- Returns:
- An array of Strings holding the items.
getSelectedItems
public String[] getSelectedItems()
- Gets the selected items of the file list.
- Returns:
- An array of Strings holding the selected items.
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.
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.
removeNames
public void removeNames()
- Removes all the file and directory names from the FileList instance.
getParentFrame
public Frame getParentFrame()
- Gets the parent Frame of the FileList instance.
- Returns:
- The parent Frame.
- See Also:
- Frame
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