A component that displays the files in a directory as a treeview. More...
Inherits TreeView, and DirectoryContentsDisplayComponent.
Public Member Functions | |
| FileTreeComponent (DirectoryContentsList &listToShow) | |
| Creates a listbox to show the contents of a specified directory. | |
| ~FileTreeComponent () | |
| 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 the list to the top. | |
| void | setDragAndDropDescription (const String &description) |
| Setting a name for this allows tree items to be dragged. | |
| const String & | getDragAndDropDescription () const throw () |
| Returns the last value that was set by setDragAndDropDescription(). | |
A component that displays the files in a directory as a treeview.
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.
| FileTreeComponent::FileTreeComponent | ( | DirectoryContentsList & | listToShow | ) |
Creates a listbox to show the contents of a specified directory.
| FileTreeComponent::~FileTreeComponent | ( | ) |
Destructor.
| int FileTreeComponent::getNumSelectedFiles | ( | ) | const [virtual] |
Returns the number of files the user has got selected.
Implements DirectoryContentsDisplayComponent.
References TreeView::getNumSelectedItems().
| const File FileTreeComponent::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 FileTreeComponent::scrollToTop | ( | ) | [virtual] |
Scrolls the list to the top.
Implements DirectoryContentsDisplayComponent.
| void FileTreeComponent::setDragAndDropDescription | ( | const String & | description | ) |
Setting a name for this allows tree items to be dragged.
The string that you pass in here will be returned by the getDragSourceDescription() of the items in the tree. For more info, see TreeViewItem::getDragSourceDescription().
| const String& FileTreeComponent::getDragAndDropDescription | ( | ) | const throw () |
Returns the last value that was set by setDragAndDropDescription().
1.6.3