public class FileCompletionProvider extends java.lang.Object implements CompletionProvider<java.io.File>
| Constructor and Description |
|---|
FileCompletionProvider() |
FileCompletionProvider(boolean onlyDirectories) |
| Modifier and Type | Method and Description |
|---|---|
void |
completeInsight(javax.swing.text.Document doc,
int pos,
java.io.File f)
Complete insight for the specified position in the specified document,
using the specified insight object.
|
javax.swing.ListCellRenderer |
getCellRenderer()
Get the cell renderer used for the completion list this provider handles.
|
java.io.File[] |
getInsightData(javax.swing.text.Document doc,
int pos)
Get insight data for the specified position in the specified document.
|
boolean |
handlesInsight(javax.swing.text.Document doc,
int pos)
Does this provider handle insight for the specified document? This method
is normally called when an insight trigger of some kind happens (e.g.
|
boolean |
isAutoPopupChar(char c)
Should the specified character trigger an automatic popup completion
list that might be handled by this insight provider?
|
boolean |
isOnlyDirectories() |
protected boolean |
isValid(java.io.File f)
Is the specified file valid for inclusion in the list? Subclasses can
override this to filter out certain files.
|
void |
setOnlyDirectories(boolean onlyDirectories) |
public FileCompletionProvider(boolean onlyDirectories)
public FileCompletionProvider()
public void setOnlyDirectories(boolean onlyDirectories)
public boolean isOnlyDirectories()
protected boolean isValid(java.io.File f)
public javax.swing.ListCellRenderer getCellRenderer()
CompletionProvidergetCellRenderer in interface CompletionProvider<java.io.File>public boolean handlesInsight(javax.swing.text.Document doc,
int pos)
CompletionProviderhandlesInsight in interface CompletionProvider<java.io.File>doc - the document of the component to provide insight forpos - the current caret position within the documentpublic java.io.File[] getInsightData(javax.swing.text.Document doc,
int pos)
CompletionProvidergetInsightData in interface CompletionProvider<java.io.File>doc - the document to provide insight forpos - the current caret position within the documentpublic void completeInsight(javax.swing.text.Document doc,
int pos,
java.io.File f)
CompletionProvidercompleteInsight in interface CompletionProvider<java.io.File>doc - the document to completepos - the position to complete atf - the insight object to complete withpublic boolean isAutoPopupChar(char c)
CompletionProviderisAutoPopupChar in interface CompletionProvider<java.io.File>c - the character before the caret position.