JTextPane (Java Platform SE 8 ) (original) (raw)
Modifier and Type
Method
Description
[Style](../../javax/swing/text/Style.html "interface in javax.swing.text")
[addStyle](../../javax/swing/JTextPane.html#addStyle-java.lang.String-javax.swing.text.Style-)([String](../../java/lang/String.html "class in java.lang") nm,[Style](../../javax/swing/text/Style.html "interface in javax.swing.text") parent)
Adds a new style into the logical style hierarchy.
protected [EditorKit](../../javax/swing/text/EditorKit.html "class in javax.swing.text")
[createDefaultEditorKit](../../javax/swing/JTextPane.html#createDefaultEditorKit--)()
Creates the EditorKit
to use by default.
[AttributeSet](../../javax/swing/text/AttributeSet.html "interface in javax.swing.text")
[getCharacterAttributes](../../javax/swing/JTextPane.html#getCharacterAttributes--)()
Fetches the character attributes in effect at the current location of the caret, or null
.
[MutableAttributeSet](../../javax/swing/text/MutableAttributeSet.html "interface in javax.swing.text")
[getInputAttributes](../../javax/swing/JTextPane.html#getInputAttributes--)()
Gets the input attributes for the pane.
[Style](../../javax/swing/text/Style.html "interface in javax.swing.text")
[getLogicalStyle](../../javax/swing/JTextPane.html#getLogicalStyle--)()
Fetches the logical style assigned to the paragraph represented by the current position of the caret, or null
.
[AttributeSet](../../javax/swing/text/AttributeSet.html "interface in javax.swing.text")
[getParagraphAttributes](../../javax/swing/JTextPane.html#getParagraphAttributes--)()
Fetches the current paragraph attributes in effect at the location of the caret, or null
if none.
[Style](../../javax/swing/text/Style.html "interface in javax.swing.text")
[getStyle](../../javax/swing/JTextPane.html#getStyle-java.lang.String-)([String](../../java/lang/String.html "class in java.lang") nm)
Fetches a named non-null
style previously added.
[StyledDocument](../../javax/swing/text/StyledDocument.html "interface in javax.swing.text")
[getStyledDocument](../../javax/swing/JTextPane.html#getStyledDocument--)()
Fetches the model associated with the editor.
protected [StyledEditorKit](../../javax/swing/text/StyledEditorKit.html "class in javax.swing.text")
[getStyledEditorKit](../../javax/swing/JTextPane.html#getStyledEditorKit--)()
Gets the editor kit.
[String](../../java/lang/String.html "class in java.lang")
[getUIClassID](../../javax/swing/JTextPane.html#getUIClassID--)()
Returns the class ID for the UI.
void
[insertComponent](../../javax/swing/JTextPane.html#insertComponent-java.awt.Component-)([Component](../../java/awt/Component.html "class in java.awt") c)
Inserts a component into the document as a replacement for the currently selected content.
void
[insertIcon](../../javax/swing/JTextPane.html#insertIcon-javax.swing.Icon-)([Icon](../../javax/swing/Icon.html "interface in javax.swing") g)
Inserts an icon into the document as a replacement for the currently selected content.
protected [String](../../java/lang/String.html "class in java.lang")
[paramString](../../javax/swing/JTextPane.html#paramString--)()
Returns a string representation of this JTextPane
.
void
[removeStyle](../../javax/swing/JTextPane.html#removeStyle-java.lang.String-)([String](../../java/lang/String.html "class in java.lang") nm)
Removes a named non-null
style previously added to the document.
void
[replaceSelection](../../javax/swing/JTextPane.html#replaceSelection-java.lang.String-)([String](../../java/lang/String.html "class in java.lang") content)
Replaces the currently selected content with new content represented by the given string.
void
[setCharacterAttributes](../../javax/swing/JTextPane.html#setCharacterAttributes-javax.swing.text.AttributeSet-boolean-)([AttributeSet](../../javax/swing/text/AttributeSet.html "interface in javax.swing.text") attr, boolean replace)
Applies the given attributes to character content.
void
[setDocument](../../javax/swing/JTextPane.html#setDocument-javax.swing.text.Document-)([Document](../../javax/swing/text/Document.html "interface in javax.swing.text") doc)
Associates the editor with a text document.
void
[setEditorKit](../../javax/swing/JTextPane.html#setEditorKit-javax.swing.text.EditorKit-)([EditorKit](../../javax/swing/text/EditorKit.html "class in javax.swing.text") kit)
Sets the currently installed kit for handling content.
void
[setLogicalStyle](../../javax/swing/JTextPane.html#setLogicalStyle-javax.swing.text.Style-)([Style](../../javax/swing/text/Style.html "interface in javax.swing.text") s)
Sets the logical style to use for the paragraph at the current caret position.
void
[setParagraphAttributes](../../javax/swing/JTextPane.html#setParagraphAttributes-javax.swing.text.AttributeSet-boolean-)([AttributeSet](../../javax/swing/text/AttributeSet.html "interface in javax.swing.text") attr, boolean replace)
Applies the given attributes to paragraphs.
void
[setStyledDocument](../../javax/swing/JTextPane.html#setStyledDocument-javax.swing.text.StyledDocument-)([StyledDocument](../../javax/swing/text/StyledDocument.html "interface in javax.swing.text") doc)
Associates the editor with a text document.