|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.hints.AbstractIntelliHints com.jidesoft.hints.AbstractListIntelliHints
public abstract class AbstractListIntelliHints
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.
Field Summary | |
---|---|
protected KeyStroke[] |
_keyStrokes
|
Fields inherited from interface com.jidesoft.hints.IntelliHints |
---|
CLIENT_PROPERTY_INTELLI_HINTS |
Constructor Summary | |
---|---|
AbstractListIntelliHints(JTextComponent textComponent)
Creates a Completion for JTextComponent |
Method Summary | |
---|---|
JComponent |
createHintsComponent()
Creates the component which contains hints. |
protected JList |
createList()
Creates the list to display the hints. |
JComponent |
getDelegateComponent()
Gets the delegate component in the hint popup. |
KeyStroke[] |
getDelegateKeyStrokes()
Gets the delegate keystrokes. |
protected JList |
getList()
Gets the list. |
Object |
getSelectedHint()
Gets the selected value. |
protected void |
setListData(Object[] objects)
Sets the list data. |
protected void |
setListData(Vector<?> objects)
Sets the list data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jidesoft.hints.IntelliHints |
---|
updateHints |
Field Detail |
---|
protected KeyStroke[] _keyStrokes
Constructor Detail |
---|
public AbstractListIntelliHints(JTextComponent textComponent)
textComponent
- Method Detail |
---|
public JComponent createHintsComponent()
IntelliHints
IntelliHints.updateHints(Object)
will update the content.
protected 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 JList getList()
protected void setListData(Object[] objects)
objects
- protected void setListData(Vector<?> objects)
objects
- public Object getSelectedHint()
IntelliHints
public JComponent getDelegateComponent()
AbstractIntelliHints
getDelegateComponent
in class AbstractIntelliHints
public KeyStroke[] getDelegateKeyStrokes()
getDelegateKeyStrokes
in class AbstractIntelliHints
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |