public class FileIntelliHints extends AbstractListIntelliHints
FileIntelliHints is a concrete implementation of IntelliHints.
It allows user to type in a file patch quickly by providing them the hints based on what
is existed on file system. You can use setFolderOnly(boolean) to control if
the hints contain only the folders, or folders and files._keyStrokesCLIENT_PROPERTY_INTELLI_HINTS| Constructor and Description |
|---|
FileIntelliHints(javax.swing.text.JTextComponent comp) |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptHint(java.lang.Object selected)
After user has selected a item in the hints popup, this method will update JTextComponent accordingly to accept
the hint.
|
java.io.FilenameFilter |
getFilter()
Get FilenameFilter configured to this hints.
|
boolean |
isFolderOnly()
If the hints contain the folder names only.
|
boolean |
isShowFullPath()
If the hints contain the full path.
|
void |
setFilter(java.io.FilenameFilter filter)
Set FilenameFilter to this hints.
|
void |
setFolderOnly(boolean folderOnly)
Sets the property of folder only.
|
void |
setShowFullPath(boolean showFullPath)
Sets the property of showing full path.
|
boolean |
updateHints(java.lang.Object value)
Update hints depending on the context.
|
createHintsComponent, createList, getDelegateComponent, getDelegateKeyStrokes, getList, getSelectedHint, setListData, setListDataaddShowHintsKeyStroke, createPopup, getAllShowHintsKeyStrokes, getCaretPositionForPopup, getCaretRectangleForPopup, getContext, getIntelliHints, getShowHintsDelay, getShowHintsKeyStroke, getTextComponent, hideHintsPopup, isAutoPopup, isFollowCaret, isHintsPopupVisible, isMultilineTextComponent, removeShowHintsKeyStroke, setAutoPopup, setFollowCaret, setHintsEnabled, setShowHintsDelay, showHints, showHintsPopup, updateHintspublic boolean isFolderOnly()
public void setFolderOnly(boolean folderOnly)
folderOnly - only provide hints for the folders.public boolean isShowFullPath()
public void setShowFullPath(boolean showFullPath)
showFullPath - whether show the full path.public boolean updateHints(java.lang.Object value)
IntelliHintsupdateHints in interface IntelliHintsupdateHints in class AbstractIntelliHintsvalue - the current contextpublic void acceptHint(java.lang.Object selected)
AbstractIntelliHintsFileIntelliHints will append the
selected item at the end of the existing text in order to complete a full file path.acceptHint in interface IntelliHintsacceptHint in class AbstractIntelliHintsselected - the hint to be accepted.public java.io.FilenameFilter getFilter()
public void setFilter(java.io.FilenameFilter filter)
filter - the FilenameFilter in use.getFilter()