standup.utils
Class AutoCompletion
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
standup.utils.AutoCompletion
- All Implemented Interfaces:
- Serializable, Document
public class AutoCompletion
- extends PlainDocument
- See Also:
- Serialized Form
Methods inherited from class javax.swing.text.AbstractDocument |
addDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
comboBox
JComboBox comboBox
model
ComboBoxModel model
editor
JTextComponent editor
selecting
boolean selecting
hidePopupOnFocusLoss
boolean hidePopupOnFocusLoss
hitBackspace
boolean hitBackspace
hitBackspaceOnSelection
boolean hitBackspaceOnSelection
editorKeyListener
KeyListener editorKeyListener
editorFocusListener
FocusListener editorFocusListener
AutoCompletion
public AutoCompletion(JComboBox comboBox)
enable
public static void enable(JComboBox comboBox)
configureEditor
void configureEditor(ComboBoxEditor newEditor)
remove
public void remove(int offs,
int len)
throws BadLocationException
- Specified by:
remove
in interface Document
- Overrides:
remove
in class AbstractDocument
- Throws:
BadLocationException
insertString
public void insertString(int offs,
String str,
AttributeSet a)
throws BadLocationException
- Specified by:
insertString
in interface Document
- Overrides:
insertString
in class PlainDocument
- Throws:
BadLocationException
setText
private void setText(String text)
highlightCompletedText
private void highlightCompletedText(int start)
setSelectedItem
private void setSelectedItem(Object item)
lookupItem
private Object lookupItem(String pattern)
startsWithIgnoreCase
private boolean startsWithIgnoreCase(String str1,
String str2)
createAndShowGUI
private static void createAndShowGUI()
main
public static void main(String[] args)