IntelliHintsFileIntelliHints, ListDataIntelliHintspublic abstract class AbstractListIntelliHints extends AbstractIntelliHints
AbstractListIntelliHints extends AbstractIntelliHints and further implement most of the methods in
interface IntelliHints. In this class, it assumes the hints can be represented as a JList,
so it used JList in the hints popup.| Modifier and Type | Field | Description |
|---|---|---|
protected javax.swing.KeyStroke[] |
_keyStrokes |
CLIENT_PROPERTY_INTELLI_HINTS| Constructor | Description |
|---|---|
AbstractListIntelliHints(javax.swing.text.JTextComponent textComponent) |
Creates a Completion for JTextComponent
|
| Modifier and Type | Method | Description |
|---|---|---|
javax.swing.JComponent |
createHintsComponent() |
Creates the component which contains hints.
|
protected javax.swing.JList |
createList() |
Creates the list to display the hints.
|
javax.swing.JComponent |
getDelegateComponent() |
Gets the delegate component in the hint popup.
|
javax.swing.KeyStroke[] |
getDelegateKeyStrokes() |
Gets the delegate keystrokes.
|
protected javax.swing.JList |
getList() |
Gets the list.
|
java.lang.Object |
getSelectedHint() |
Gets the selected value.
|
protected void |
setListData(java.lang.Object[] objects) |
Sets the list data.
|
protected void |
setListData(java.util.Vector<?> objects) |
Sets the list data.
|
acceptHint, addShowHintsKeyStroke, createPopup, getAllShowHintsKeyStrokes, getCaretPositionForPopup, getCaretRectangleForPopup, getContext, getIntelliHints, getShowHintsDelay, getShowHintsKeyStroke, getTextComponent, hideHintsPopup, isAutoPopup, isFollowCaret, isHintsPopupVisible, isMultilineTextComponent, removeShowHintsKeyStroke, setAutoPopup, setFollowCaret, setHintsEnabled, setShowHintsDelay, showHints, showHintsPopup, updateHints, updateHintspublic AbstractListIntelliHints(javax.swing.text.JTextComponent textComponent)
textComponent - public javax.swing.JComponent createHintsComponent()
IntelliHintsIntelliHints.updateHints(Object, boolean) will update the content.protected javax.swing.JList createList()
return new JList() {
public int getVisibleRowCount() {
int size = getModel().getSize();
return size < super.getVisibleRowCount() ? size : super.getVisibleRowCount();
}
public Dimension getPreferredScrollableViewportSize() {
if (getModel().getSize() == 0) {
return new Dimension(0, 0);
}
else {
return super.getPreferredScrollableViewportSize();
}
}
};
protected javax.swing.JList getList()
protected void setListData(java.lang.Object[] objects)
objects - protected void setListData(java.util.Vector<?> objects)
objects - public java.lang.Object getSelectedHint()
IntelliHintspublic javax.swing.JComponent getDelegateComponent()
AbstractIntelliHintsgetDelegateComponent in class AbstractIntelliHintspublic javax.swing.KeyStroke[] getDelegateKeyStrokes()
getDelegateKeyStrokes in class AbstractIntelliHints