info.rolandkrueger.roklib.ui.swing.rapidsuggest
Class SuggestionComboBox.SuggestionEditorComponent.AutoCompletionDocument

java.lang.Object
  extended by javax.swing.text.AbstractDocument
      extended by javax.swing.text.PlainDocument
          extended by info.rolandkrueger.roklib.ui.swing.rapidsuggest.SuggestionComboBox.SuggestionEditorComponent.AutoCompletionDocument
All Implemented Interfaces:
ItemListener, Serializable, EventListener, Document
Enclosing class:
SuggestionComboBox.SuggestionEditorComponent

private class SuggestionComboBox.SuggestionEditorComponent.AutoCompletionDocument
extends PlainDocument
implements ItemListener


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
 
Field Summary
private  SuggestionComboBox.SuggestionEditorComponent component
           
private  Object highlight
           
private  Color highlighterColor
           
private  SuggestionComboBoxModel model
           
private  SuggestionComboBox mother
           
private  int selectionStartIndex
           
private static long serialVersionUID
           
 
Fields inherited from class javax.swing.text.PlainDocument
lineLimitAttribute, tabSizeAttribute
 
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
SuggestionComboBox.SuggestionEditorComponent.AutoCompletionDocument(SuggestionComboBox mother, SuggestionComboBox.SuggestionEditorComponent component)
           
SuggestionComboBox.SuggestionEditorComponent.AutoCompletionDocument(SuggestionComboBox mother, SuggestionComboBox.SuggestionEditorComponent component, Color highlighterColor)
           
 
Method Summary
private  void fetchSuggestion(String prefix, AttributeSet a, int caretPos)
           
 void insertString(int offs, String str, AttributeSet a)
           
 void itemStateChanged(ItemEvent e)
           
 void remove(int offs, int len)
           
 void removeAllHighlights()
           
 void removeSuggestionHighlight()
           
 
Methods inherited from class javax.swing.text.PlainDocument
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdate
 
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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

mother

private SuggestionComboBox mother

model

private SuggestionComboBoxModel model

component

private SuggestionComboBox.SuggestionEditorComponent component

selectionStartIndex

private int selectionStartIndex

highlight

private Object highlight

highlighterColor

private Color highlighterColor
Constructor Detail

SuggestionComboBox.SuggestionEditorComponent.AutoCompletionDocument

public SuggestionComboBox.SuggestionEditorComponent.AutoCompletionDocument(SuggestionComboBox mother,
                                                                           SuggestionComboBox.SuggestionEditorComponent component)

SuggestionComboBox.SuggestionEditorComponent.AutoCompletionDocument

public SuggestionComboBox.SuggestionEditorComponent.AutoCompletionDocument(SuggestionComboBox mother,
                                                                           SuggestionComboBox.SuggestionEditorComponent component,
                                                                           Color highlighterColor)
Method Detail

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

remove

public void remove(int offs,
                   int len)
            throws BadLocationException
Specified by:
remove in interface Document
Overrides:
remove in class AbstractDocument
Throws:
BadLocationException

fetchSuggestion

private void fetchSuggestion(String prefix,
                             AttributeSet a,
                             int caretPos)
                      throws BadLocationException
Throws:
BadLocationException

itemStateChanged

public void itemStateChanged(ItemEvent e)
Specified by:
itemStateChanged in interface ItemListener

removeAllHighlights

public void removeAllHighlights()

removeSuggestionHighlight

public void removeSuggestionHighlight()


Copyright © 2007-2011. All Rights Reserved.