public class FileIntelliHints extends AbstractListIntelliHints<java.lang.String>
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.autoPopupProperty, showHintsDelayPropertyPROPERTY_INTELLI_HINTS| Constructor and Description |
|---|
FileIntelliHints(javafx.scene.control.TextInputControl comp) |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptHint(java.lang.String selected)
After user has selected a item in the hints popup, this method will update TextInputControl 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.
|
createHintsNode, createListView, getDelegateKeyCombination, getDelegateNode, getListView, getSelectedHint, setAvailableHintsaddShowHintsKeyCombination, autoPopupProperty, createPopup, getAllShowHintsKeyStrokes, getContext, getIntelliHints, getShowHintsDelay, getShowHintsKeyCombination, getTextInputControl, hideHintsPopup, isAutoPopup, isHintsPopupVisible, isMultiline, removeShowHintKeyCombination, setAutoPopup, setHintsEnabled, setShowHintsDelay, showHints, showHintsDelayProperty, showHintsPopuppublic FileIntelliHints(javafx.scene.control.TextInputControl comp)
public 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)
IntelliHintsAbstractListIntelliHints.setAvailableHints(javafx.collections.ObservableList) to set it and returns true after
that.value - the current contextpublic void acceptHint(java.lang.String selected)
AbstractIntelliHints
For TextArea, the default implementation will insert the hint into current caret position. For TextField, by
default it will replace the whole content with the item user selected. Subclass can always choose to override it
to accept the hint in a different way. For example, FileIntelliHints will
append the selected item at the end of the existing text in order to complete a full file path.
acceptHint in interface IntelliHints<java.lang.String>acceptHint in class AbstractIntelliHints<java.lang.String>selected - the selected hintpublic java.io.FilenameFilter getFilter()
By default, it returns null. You could set this field to let the IntelliHints only show the files meet your criteria.
public void setFilter(java.io.FilenameFilter filter)
filter - the FilenameFilter in use.getFilter()