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 StyleaddStyle(String nm, Style parent)protected DocumentcreateDefaultDocument()Creates the default backing document when no delegate is passed to this document.ColorgetBackground(AttributeSet attr)ElementgetCharacterElement(int pos)FontgetFont(AttributeSet attr)ColorgetForeground(AttributeSet attr)StylegetLogicalStyle(int p)ElementgetParagraphElement(int pos)StylegetStyle(String nm)voidremoveStyle(String nm)voidsetCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)voidsetLogicalStyle(int pos, Style s)voidsetParagraphAttributes(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:
createDefaultDocumentin classAutoCompleteDocument- Returns:
- the default backing document
-
addStyle
public Style addStyle(String nm, Style parent)
- Specified by:
addStylein interfaceStyledDocument
-
getBackground
public Color getBackground(AttributeSet attr)
- Specified by:
getBackgroundin interfaceStyledDocument
-
getCharacterElement
public Element getCharacterElement(int pos)
- Specified by:
getCharacterElementin interfaceStyledDocument
-
getFont
public Font getFont(AttributeSet attr)
- Specified by:
getFontin interfaceStyledDocument
-
getForeground
public Color getForeground(AttributeSet attr)
- Specified by:
getForegroundin interfaceStyledDocument
-
getLogicalStyle
public Style getLogicalStyle(int p)
- Specified by:
getLogicalStylein interfaceStyledDocument
-
getParagraphElement
public Element getParagraphElement(int pos)
- Specified by:
getParagraphElementin interfaceStyledDocument
-
getStyle
public Style getStyle(String nm)
- Specified by:
getStylein interfaceStyledDocument
-
removeStyle
public void removeStyle(String nm)
- Specified by:
removeStylein interfaceStyledDocument
-
setCharacterAttributes
public void setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)- Specified by:
setCharacterAttributesin interfaceStyledDocument
-
setLogicalStyle
public void setLogicalStyle(int pos, Style s)- Specified by:
setLogicalStylein interfaceStyledDocument
-
setParagraphAttributes
public void setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace)- Specified by:
setParagraphAttributesin interfaceStyledDocument
-
-