swingx
Version 2009-07-31

org.jdesktop.swingx.autocomplete
Class AutoCompleteStyledDocument

java.lang.Object
  extended by org.jdesktop.swingx.autocomplete.AutoCompleteDocument
      extended by org.jdesktop.swingx.autocomplete.AutoCompleteStyledDocument
All Implemented Interfaces:
Document, StyledDocument

public class AutoCompleteStyledDocument
extends AutoCompleteDocument
implements StyledDocument


Field Summary
 
Fields inherited from class org.jdesktop.swingx.autocomplete.AutoCompleteDocument
delegate, strictMatching
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor, boolean strictMatching)
           
AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor, boolean strictMatching, ObjectToStringConverter stringConverter)
           
AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor, boolean strictMatching, ObjectToStringConverter stringConverter, StyledDocument delegate)
           
 
Method Summary
 Style addStyle(String nm, Style parent)
          
protected  Document createDefaultDocument()
          Creates the default backing document when no delegate is passed to this document.
 Color getBackground(AttributeSet attr)
          
 Element getCharacterElement(int pos)
          
 Font getFont(AttributeSet attr)
          
 Color getForeground(AttributeSet attr)
          
 Style getLogicalStyle(int p)
          
 Element getParagraphElement(int pos)
          
 Style getStyle(String nm)
          
 void removeStyle(String nm)
          
 void setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)
          
 void setLogicalStyle(int pos, Style s)
          
 void setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace)
          
 
Methods inherited from class org.jdesktop.swingx.autocomplete.AutoCompleteDocument
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, isStrictMatching, putProperty, remove, removeDocumentListener, removeUndoableEditListener, render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.text.Document
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeDocumentListener, removeUndoableEditListener, render
 

Constructor Detail

AutoCompleteStyledDocument

public AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor,
                                  boolean strictMatching,
                                  ObjectToStringConverter stringConverter,
                                  StyledDocument delegate)
Parameters:
adaptor -
strictMatching -
stringConverter -
delegate -

AutoCompleteStyledDocument

public AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor,
                                  boolean strictMatching,
                                  ObjectToStringConverter stringConverter)
Parameters:
adaptor -
strictMatching -
stringConverter -

AutoCompleteStyledDocument

public AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor,
                                  boolean strictMatching)
Parameters:
adaptor -
strictMatching -
Method Detail

createDefaultDocument

protected Document createDefaultDocument()
Creates the default backing document when no delegate is passed to this document.

Overrides:
createDefaultDocument in class AutoCompleteDocument
Returns:
the default backing document

addStyle

public Style addStyle(String nm,
                      Style parent)

Specified by:
addStyle in interface StyledDocument

getBackground

public Color getBackground(AttributeSet attr)

Specified by:
getBackground in interface StyledDocument

getCharacterElement

public Element getCharacterElement(int pos)

Specified by:
getCharacterElement in interface StyledDocument

getFont

public Font getFont(AttributeSet attr)

Specified by:
getFont in interface StyledDocument

getForeground

public Color getForeground(AttributeSet attr)

Specified by:
getForeground in interface StyledDocument

getLogicalStyle

public Style getLogicalStyle(int p)

Specified by:
getLogicalStyle in interface StyledDocument

getParagraphElement

public Element getParagraphElement(int pos)

Specified by:
getParagraphElement in interface StyledDocument

getStyle

public Style getStyle(String nm)

Specified by:
getStyle in interface StyledDocument

removeStyle

public void removeStyle(String nm)

Specified by:
removeStyle in interface StyledDocument

setCharacterAttributes

public void setCharacterAttributes(int offset,
                                   int length,
                                   AttributeSet s,
                                   boolean replace)

Specified by:
setCharacterAttributes in interface StyledDocument

setLogicalStyle

public void setLogicalStyle(int pos,
                            Style s)

Specified by:
setLogicalStyle in interface StyledDocument

setParagraphAttributes

public void setParagraphAttributes(int offset,
                                   int length,
                                   AttributeSet s,
                                   boolean replace)

Specified by:
setParagraphAttributes in interface StyledDocument

swingx
Version 2009-07-31