Package org.jdesktop.swingx.autocomplete
Class AutoCompleteStyledDocument
- java.lang.Object
-
- org.jdesktop.swingx.autocomplete.AutoCompleteDocument
-
- org.jdesktop.swingx.autocomplete.AutoCompleteStyledDocument
-
- All Implemented Interfaces:
javax.swing.text.Document,javax.swing.text.StyledDocument
public class AutoCompleteStyledDocument extends AutoCompleteDocument implements javax.swing.text.StyledDocument
-
-
Field Summary
-
Fields inherited from class org.jdesktop.swingx.autocomplete.AutoCompleteDocument
adaptor, delegate, selecting, strictMatching, stringConverter
-
-
Constructor Summary
Constructors Constructor Description AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor, boolean strictMatching)AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor, boolean strictMatching, ObjectToStringConverter stringConverter)AutoCompleteStyledDocument(AbstractAutoCompleteAdaptor adaptor, boolean strictMatching, ObjectToStringConverter stringConverter, javax.swing.text.StyledDocument delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.text.StyleaddStyle(java.lang.String nm, javax.swing.text.Style parent)protected javax.swing.text.DocumentcreateDefaultDocument()Creates the default backing document when no delegate is passed to this document.java.awt.ColorgetBackground(javax.swing.text.AttributeSet attr)javax.swing.text.ElementgetCharacterElement(int pos)java.awt.FontgetFont(javax.swing.text.AttributeSet attr)java.awt.ColorgetForeground(javax.swing.text.AttributeSet attr)javax.swing.text.StylegetLogicalStyle(int p)javax.swing.text.ElementgetParagraphElement(int pos)javax.swing.text.StylegetStyle(java.lang.String nm)voidremoveStyle(java.lang.String nm)voidsetCharacterAttributes(int offset, int length, javax.swing.text.AttributeSet s, boolean replace)voidsetLogicalStyle(int pos, javax.swing.text.Style s)voidsetParagraphAttributes(int offset, int length, javax.swing.text.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, javax.swing.text.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 javax.swing.text.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 javax.swing.text.Style addStyle(java.lang.String nm, javax.swing.text.Style parent)- Specified by:
addStylein interfacejavax.swing.text.StyledDocument
-
getBackground
public java.awt.Color getBackground(javax.swing.text.AttributeSet attr)
- Specified by:
getBackgroundin interfacejavax.swing.text.StyledDocument
-
getCharacterElement
public javax.swing.text.Element getCharacterElement(int pos)
- Specified by:
getCharacterElementin interfacejavax.swing.text.StyledDocument
-
getFont
public java.awt.Font getFont(javax.swing.text.AttributeSet attr)
- Specified by:
getFontin interfacejavax.swing.text.StyledDocument
-
getForeground
public java.awt.Color getForeground(javax.swing.text.AttributeSet attr)
- Specified by:
getForegroundin interfacejavax.swing.text.StyledDocument
-
getLogicalStyle
public javax.swing.text.Style getLogicalStyle(int p)
- Specified by:
getLogicalStylein interfacejavax.swing.text.StyledDocument
-
getParagraphElement
public javax.swing.text.Element getParagraphElement(int pos)
- Specified by:
getParagraphElementin interfacejavax.swing.text.StyledDocument
-
getStyle
public javax.swing.text.Style getStyle(java.lang.String nm)
- Specified by:
getStylein interfacejavax.swing.text.StyledDocument
-
removeStyle
public void removeStyle(java.lang.String nm)
- Specified by:
removeStylein interfacejavax.swing.text.StyledDocument
-
setCharacterAttributes
public void setCharacterAttributes(int offset, int length, javax.swing.text.AttributeSet s, boolean replace)- Specified by:
setCharacterAttributesin interfacejavax.swing.text.StyledDocument
-
setLogicalStyle
public void setLogicalStyle(int pos, javax.swing.text.Style s)- Specified by:
setLogicalStylein interfacejavax.swing.text.StyledDocument
-
setParagraphAttributes
public void setParagraphAttributes(int offset, int length, javax.swing.text.AttributeSet s, boolean replace)- Specified by:
setParagraphAttributesin interfacejavax.swing.text.StyledDocument
-
-