A component that displays the files in a directory as a listbox. More...
Inherits ListBox, DirectoryContentsDisplayComponent, ListBoxModel, and ChangeListener.
Public Member Functions | |
| FileListComponent (DirectoryContentsList &listToShow) | |
| Creates a listbox to show the contents of a specified directory. | |
| ~FileListComponent () | |
| Destructor. | |
| int | getNumSelectedFiles () const |
| Returns the number of files the user has got selected. | |
| const File | getSelectedFile (int index=0) const |
| Returns one of the files that the user has currently selected. | |
| void | scrollToTop () |
| Scrolls to the top of the list. | |
| void | changeListenerCallback (void *) |
| int | getNumRows () |
| void | paintListBoxItem (int, Graphics &, int, int, bool) |
| Component * | refreshComponentForRow (int rowNumber, bool isRowSelected, Component *existingComponentToUpdate) |
| void | selectedRowsChanged (int lastRowSelected) |
| void | deleteKeyPressed (int currentSelectedRow) |
| void | returnKeyPressed (int currentSelectedRow) |
A component that displays the files in a directory as a listbox.
This implements the DirectoryContentsDisplayComponent base class so that it can be used in a FileBrowserComponent.
To attach a listener to it, use its DirectoryContentsDisplayComponent base class and the FileBrowserListener class.
| FileListComponent::FileListComponent | ( | DirectoryContentsList & | listToShow | ) |
Creates a listbox to show the contents of a specified directory.
| FileListComponent::~FileListComponent | ( | ) |
Destructor.
| int FileListComponent::getNumSelectedFiles | ( | ) | const [virtual] |
Returns the number of files the user has got selected.
Implements DirectoryContentsDisplayComponent.
| const File FileListComponent::getSelectedFile | ( | int | index = 0 |
) | const [virtual] |
Returns one of the files that the user has currently selected.
The index should be in the range 0 to (getNumSelectedFiles() - 1).
Implements DirectoryContentsDisplayComponent.
| void FileListComponent::scrollToTop | ( | ) | [virtual] |
Scrolls to the top of the list.
Implements DirectoryContentsDisplayComponent.
| void FileListComponent::changeListenerCallback | ( | void * | ) | [virtual] |
For internal use only.
Implements ChangeListener.
| int FileListComponent::getNumRows | ( | ) | [virtual] |
For internal use only.
Implements ListBoxModel.
| void FileListComponent::paintListBoxItem | ( | int | , | |
| Graphics & | , | |||
| int | , | |||
| int | , | |||
| bool | ||||
| ) | [virtual] |
For internal use only.
Implements ListBoxModel.
| Component* FileListComponent::refreshComponentForRow | ( | int | rowNumber, | |
| bool | isRowSelected, | |||
| Component * | existingComponentToUpdate | |||
| ) | [virtual] |
For internal use only.
Reimplemented from ListBoxModel.
| void FileListComponent::selectedRowsChanged | ( | int | lastRowSelected | ) | [virtual] |
For internal use only.
Reimplemented from ListBoxModel.
| void FileListComponent::deleteKeyPressed | ( | int | currentSelectedRow | ) | [virtual] |
For internal use only.
Reimplemented from ListBoxModel.
| void FileListComponent::returnKeyPressed | ( | int | currentSelectedRow | ) | [virtual] |
For internal use only.
Reimplemented from ListBoxModel.
1.6.3