FileTreeComponent Class Reference

A component that displays the files in a directory as a treeview. More...

Inherits TreeView, and DirectoryContentsDisplayComponent.

List of all members.

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 StringgetDragAndDropDescription () const throw ()
 Returns the last value that was set by setDragAndDropDescription().

Detailed Description

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.

See also:
DirectoryContentsList, FileListComponent

Constructor & Destructor Documentation

FileTreeComponent::FileTreeComponent ( DirectoryContentsList listToShow  ) 

Creates a listbox to show the contents of a specified directory.

FileTreeComponent::~FileTreeComponent (  ) 

Destructor.


Member Function Documentation

int FileTreeComponent::getNumSelectedFiles (  )  const [virtual]

Returns the number of files the user has got selected.

See also:
getSelectedFile

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).

See also:
getNumSelectedFiles

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().


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Apr 26 11:42:12 2010 for JUCE by  doxygen 1.6.3