de.matthiasmann.twl.model
Class FileSystemAutoCompletionDataSource

java.lang.Object
  extended by de.matthiasmann.twl.model.FileSystemAutoCompletionDataSource
All Implemented Interfaces:
AutoCompletionDataSource

public class FileSystemAutoCompletionDataSource
extends java.lang.Object
implements AutoCompletionDataSource

Provides auto completion on a FileSystemModel


Constructor Summary
FileSystemAutoCompletionDataSource(FileSystemModel fsm, FileSystemModel.FileFilter fileFilter)
           
 
Method Summary
 AutoCompletionResult collectSuggestions(java.lang.String text, int cursorPos, AutoCompletionResult prev)
          Collects auto completion results
 FileSystemModel.FileFilter getFileFilter()
           
 FileSystemModel getFileSystemModel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemAutoCompletionDataSource

public FileSystemAutoCompletionDataSource(FileSystemModel fsm,
                                          FileSystemModel.FileFilter fileFilter)
Method Detail

getFileSystemModel

public FileSystemModel getFileSystemModel()

getFileFilter

public FileSystemModel.FileFilter getFileFilter()

collectSuggestions

public AutoCompletionResult collectSuggestions(java.lang.String text,
                                               int cursorPos,
                                               AutoCompletionResult prev)
Description copied from interface: AutoCompletionDataSource
Collects auto completion results

Specified by:
collectSuggestions in interface AutoCompletionDataSource
Parameters:
text - The new text for which to compute auto completion
cursorPos - The cursor position for which to compute the auto completion
prev - The previous AutoCompletionResult - can be used to speed up the computation
Returns:
The AutoCompletionResult object or null if no reults could be found