FileListComponent Class Reference

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

Inherits ListBox, DirectoryContentsDisplayComponent, ListBoxModel, and ChangeListener.

List of all members.

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)
ComponentrefreshComponentForRow (int rowNumber, bool isRowSelected, Component *existingComponentToUpdate)
void selectedRowsChanged (int lastRowSelected)
void deleteKeyPressed (int currentSelectedRow)
void returnKeyPressed (int currentSelectedRow)

Detailed Description

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.

See also:
DirectoryContentsList, FileTreeComponent

Constructor & Destructor Documentation

FileListComponent::FileListComponent ( DirectoryContentsList listToShow  ) 

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

FileListComponent::~FileListComponent (  ) 

Destructor.


Member Function Documentation

int FileListComponent::getNumSelectedFiles (  )  const [virtual]

Returns the number of files the user has got selected.

See also:
getSelectedFile

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

See also:
getNumSelectedFiles

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.


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