com.mucommander.ui.autocomplete.completers.services
Class FilesService

java.lang.Object
  extended by com.mucommander.ui.autocomplete.completers.services.FilesService
All Implemented Interfaces:
CompletionService
Direct Known Subclasses:
AllFilesService, FilteredFilesService

public abstract class FilesService
extends java.lang.Object
implements CompletionService

This CompletionService handles file paths completion.

Author:
Arik Hadas

Constructor Summary
FilesService()
           
 
Method Summary
 java.lang.String complete(java.lang.String selectedCompletion)
          If the given completion match one of my suggested completions, return a corresponding path, null otherwise.
protected abstract  AbstractFile[] getFiles(AbstractFile directory)
          This abstract function gets a directory and should return it's children files that match a certain criteria.
 java.util.Vector getPossibleCompletions(java.lang.String path)
          Return a group of suggested completions corresponding to the given path, according to this service's criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilesService

public FilesService()
Method Detail

getFiles

protected abstract AbstractFile[] getFiles(AbstractFile directory)
                                    throws java.io.IOException
This abstract function gets a directory and should return it's children files that match a certain criteria.

Parameters:
directory - - a directory.
Returns:
subgroup of the given directory's children files.
Throws:
java.io.IOException

getPossibleCompletions

public java.util.Vector getPossibleCompletions(java.lang.String path)
Description copied from interface: CompletionService
Return a group of suggested completions corresponding to the given path, according to this service's criteria.

Specified by:
getPossibleCompletions in interface CompletionService
Parameters:
path - - a path.
Returns:
Vector of possible completions.

complete

public java.lang.String complete(java.lang.String selectedCompletion)
Description copied from interface: CompletionService
If the given completion match one of my suggested completions, return a corresponding path, null otherwise.

Specified by:
complete in interface CompletionService
Parameters:
selectedCompletion - - string that represent a completion.
Returns:
a path if the given completion was suggested by this service, null otherwise.


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard