Package org.jdesktop.swingx.autocomplete
Class AutoCompleteStyledDocument
- java.lang.Object
-
- org.jdesktop.swingx.autocomplete.AutoCompleteDocument
-
- org.jdesktop.swingx.autocomplete.AutoCompleteStyledDocument
-
- All Implemented Interfaces:
Document
,StyledDocument
public class AutoCompleteStyledDocument extends AutoCompleteDocument implements StyledDocument
- Author:
- Karl George Schaefer
-
-
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
Constructors Constructor Description AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor, boolean strictMatching)
AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor, boolean strictMatching, ObjectToStringConverter stringConverter)
AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor, boolean strictMatching, ObjectToStringConverter stringConverter, StyledDocument delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 classAutoCompleteDocument
- Returns:
- the default backing document
-
addStyle
public Style addStyle(String nm, Style parent)
- Specified by:
addStyle
in interfaceStyledDocument
-
getBackground
public Color getBackground(AttributeSet attr)
- Specified by:
getBackground
in interfaceStyledDocument
-
getCharacterElement
public Element getCharacterElement(int pos)
- Specified by:
getCharacterElement
in interfaceStyledDocument
-
getFont
public Font getFont(AttributeSet attr)
- Specified by:
getFont
in interfaceStyledDocument
-
getForeground
public Color getForeground(AttributeSet attr)
- Specified by:
getForeground
in interfaceStyledDocument
-
getLogicalStyle
public Style getLogicalStyle(int p)
- Specified by:
getLogicalStyle
in interfaceStyledDocument
-
getParagraphElement
public Element getParagraphElement(int pos)
- Specified by:
getParagraphElement
in interfaceStyledDocument
-
getStyle
public Style getStyle(String nm)
- Specified by:
getStyle
in interfaceStyledDocument
-
removeStyle
public void removeStyle(String nm)
- Specified by:
removeStyle
in interfaceStyledDocument
-
setCharacterAttributes
public void setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)
- Specified by:
setCharacterAttributes
in interfaceStyledDocument
-
setLogicalStyle
public void setLogicalStyle(int pos, Style s)
- Specified by:
setLogicalStyle
in interfaceStyledDocument
-
setParagraphAttributes
public void setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace)
- Specified by:
setParagraphAttributes
in interfaceStyledDocument
-
-