|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractListModel javax.swing.DefaultComboBoxModel org.xnap.commons.gui.completion.FileCompletionModel
public class FileCompletionModel
This class provides completion for path prefixes on the local file system.
Field Summary |
---|
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
FileCompletionModel()
Constructs a new file completion model. |
|
FileCompletionModel(boolean completeOnlyDirectories)
Constructs a new file completion model. |
Method Summary | |
---|---|
boolean |
complete(String prefix)
Returns true if there are files in the local file system having the given prefix. |
String |
completeUniquePrefix(String prefix)
This method's behaviour is a matter of taste. |
void |
setCompleteDirectoriesOnly(boolean complete)
Set whether only directories should be suggested as possible completions. |
void |
setCompleteHiddenFiles(boolean complete)
Set whether hidden files should be suggested as possible completions. |
Methods inherited from class javax.swing.DefaultComboBoxModel |
---|
addElement, getElementAt, getIndexOf, getSelectedItem, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt, setSelectedItem |
Methods inherited from class javax.swing.AbstractListModel |
---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.MutableComboBoxModel |
---|
addElement, insertElementAt, removeElement, removeElementAt |
Methods inherited from interface javax.swing.ComboBoxModel |
---|
getSelectedItem, setSelectedItem |
Methods inherited from interface javax.swing.ListModel |
---|
addListDataListener, getElementAt, getSize, removeListDataListener |
Constructor Detail |
---|
public FileCompletionModel(boolean completeOnlyDirectories)
completeOnlyDirectories
- if true only subdirectories are
suggested as possible completions, otherwise files are taken into
account toopublic FileCompletionModel()
Method Detail |
---|
public void setCompleteHiddenFiles(boolean complete)
The default behavior is they are not suggested.
public void setCompleteDirectoriesOnly(boolean complete)
The default behavior is files and directories are suggested.
public boolean complete(String prefix)
complete
in interface CompletionModel
prefix
- the prefix being matched
public String completeUniquePrefix(String prefix)
completeUniquePrefix
in interface CompletionModel
prefix
- the prefix being matched
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |