AbstractIntelliHints
, AbstractListIntelliHints
, FileIntelliHints
, ListDataIntelliHints
public interface IntelliHints
IntelliHints
is an interface that defines all necessary methods to implement showing a hint popup
depending on a context and allows user to pick from a list of hints. createHintsComponent()
will create a
component that contains the hints. It will be shown in a popup window. After hint popup is created, updateHints(Object, boolean)
will update the content of hints based on the context. Once user picks a hint from the hint
popup, getSelectedHint()
will be called to find the hint that user selected and call acceptHint(Object)
to accept it.Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
CLIENT_PROPERTY_INTELLI_HINTS |
The key of a client property.
|
Modifier and Type | Method | Description |
---|---|---|
void |
acceptHint(java.lang.Object hint) |
Accepts the selected hint.
|
javax.swing.JComponent |
createHintsComponent() |
Creates the component which contains hints.
|
java.lang.Object |
getSelectedHint() |
Gets the selected value.
|
boolean |
updateHints(java.lang.Object context) |
Deprecated.
replaced it by {
updateHints(Object, boolean) } |
boolean |
updateHints(java.lang.Object context,
boolean autoPopup) |
Update hints depending on the context.
|
static final java.lang.String CLIENT_PROPERTY_INTELLI_HINTS
javax.swing.JComponent createHintsComponent()
updateHints(Object, boolean)
will update the content.@Deprecated boolean updateHints(java.lang.Object context)
updateHints(Object, boolean)
}context
- the current contextboolean updateHints(java.lang.Object context, boolean autoPopup)
context
- the current contextautoPopup
- true or false. If true, it means this method was called through the auto-popup feature because
of the show hint timer is triggered. If false, it means user pressed the show hint key stroke to
show the popup.java.lang.Object getSelectedHint()
void acceptHint(java.lang.Object hint)
hint
- the hint to be accepted.