HTMLDocument.RunElement (Java Platform SE 8 ) (original) (raw)
- javax.swing.text.AbstractDocument.AbstractElement
- javax.swing.text.AbstractDocument.LeafElement
- javax.swing.text.html.HTMLDocument.RunElement
- javax.swing.text.AbstractDocument.LeafElement
All Implemented Interfaces:
Serializable, AttributeSet, Element, MutableAttributeSet, TreeNode
Enclosing class:
HTMLDocument
public class HTMLDocument.RunElement
extends AbstractDocument.LeafElement
An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.
Nested Class Summary
* ### Nested classes/interfaces inherited from interface javax.swing.text.[AttributeSet](../../../../javax/swing/text/AttributeSet.html "interface in javax.swing.text") `[AttributeSet.CharacterAttribute](../../../../javax/swing/text/AttributeSet.CharacterAttribute.html "interface in javax.swing.text"), [AttributeSet.ColorAttribute](../../../../javax/swing/text/AttributeSet.ColorAttribute.html "interface in javax.swing.text"), [AttributeSet.FontAttribute](../../../../javax/swing/text/AttributeSet.FontAttribute.html "interface in javax.swing.text"), [AttributeSet.ParagraphAttribute](../../../../javax/swing/text/AttributeSet.ParagraphAttribute.html "interface in javax.swing.text")`
Field Summary
* ### Fields inherited from interface javax.swing.text.[AttributeSet](../../../../javax/swing/text/AttributeSet.html "interface in javax.swing.text") `[NameAttribute](../../../../javax/swing/text/AttributeSet.html#NameAttribute), [ResolveAttribute](../../../../javax/swing/text/AttributeSet.html#ResolveAttribute)`
Constructor Summary
Constructors
Constructor Description RunElement(Element parent,AttributeSet a, int offs0, int offs1) Constructs an element that represents content within the document (has no children). Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type Method Description String getName() Gets the name of the element. AttributeSet getResolveParent() Gets the resolving parent. * ### Methods inherited from class javax.swing.text.[AbstractDocument.LeafElement](../../../../javax/swing/text/AbstractDocument.LeafElement.html "class in javax.swing.text") `[children](../../../../javax/swing/text/AbstractDocument.LeafElement.html#children--), [getAllowsChildren](../../../../javax/swing/text/AbstractDocument.LeafElement.html#getAllowsChildren--), [getElement](../../../../javax/swing/text/AbstractDocument.LeafElement.html#getElement-int-), [getElementCount](../../../../javax/swing/text/AbstractDocument.LeafElement.html#getElementCount--), [getElementIndex](../../../../javax/swing/text/AbstractDocument.LeafElement.html#getElementIndex-int-), [getEndOffset](../../../../javax/swing/text/AbstractDocument.LeafElement.html#getEndOffset--), [getStartOffset](../../../../javax/swing/text/AbstractDocument.LeafElement.html#getStartOffset--), [isLeaf](../../../../javax/swing/text/AbstractDocument.LeafElement.html#isLeaf--), [toString](../../../../javax/swing/text/AbstractDocument.LeafElement.html#toString--)` * ### Methods inherited from class javax.swing.text.[AbstractDocument.AbstractElement](../../../../javax/swing/text/AbstractDocument.AbstractElement.html "class in javax.swing.text") `[addAttribute](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#addAttribute-java.lang.Object-java.lang.Object-), [addAttributes](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#addAttributes-javax.swing.text.AttributeSet-), [containsAttribute](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#containsAttribute-java.lang.Object-java.lang.Object-), [containsAttributes](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#containsAttributes-javax.swing.text.AttributeSet-), [copyAttributes](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#copyAttributes--), [dump](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#dump-java.io.PrintStream-int-), [getAttribute](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#getAttribute-java.lang.Object-), [getAttributeCount](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#getAttributeCount--), [getAttributeNames](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#getAttributeNames--), [getAttributes](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#getAttributes--), [getChildAt](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#getChildAt-int-), [getChildCount](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#getChildCount--), [getDocument](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#getDocument--), [getIndex](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#getIndex-javax.swing.tree.TreeNode-), [getParent](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#getParent--), [getParentElement](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#getParentElement--), [isDefined](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#isDefined-java.lang.Object-), [isEqual](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#isEqual-javax.swing.text.AttributeSet-), [removeAttribute](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#removeAttribute-java.lang.Object-), [removeAttributes](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#removeAttributes-javax.swing.text.AttributeSet-), [removeAttributes](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#removeAttributes-java.util.Enumeration-), [setResolveParent](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#setResolveParent-javax.swing.text.AttributeSet-)` * ### Methods inherited from class java.lang.[Object](../../../../java/lang/Object.html "class in java.lang") `[clone](../../../../java/lang/Object.html#clone--), [equals](../../../../java/lang/Object.html#equals-java.lang.Object-), [finalize](../../../../java/lang/Object.html#finalize--), [getClass](../../../../java/lang/Object.html#getClass--), [hashCode](../../../../java/lang/Object.html#hashCode--), [notify](../../../../java/lang/Object.html#notify--), [notifyAll](../../../../java/lang/Object.html#notifyAll--), [wait](../../../../java/lang/Object.html#wait--), [wait](../../../../java/lang/Object.html#wait-long-), [wait](../../../../java/lang/Object.html#wait-long-int-)`
Constructor Detail
* #### RunElement public RunElement([Element](../../../../javax/swing/text/Element.html "interface in javax.swing.text") parent, [AttributeSet](../../../../javax/swing/text/AttributeSet.html "interface in javax.swing.text") a, int offs0, int offs1) Constructs an element that represents content within the document (has no children). Parameters: `parent` \- the parent element `a` \- the element attributes `offs0` \- the start offset (must be at least 0) `offs1` \- the end offset (must be at least offs0) Since: 1.4
Method Detail
* #### getName public [String](../../../../java/lang/String.html "class in java.lang") getName() Gets the name of the element. Specified by: `[getName](../../../../javax/swing/text/Element.html#getName--)` in interface `[Element](../../../../javax/swing/text/Element.html "interface in javax.swing.text")` Overrides: `[getName](../../../../javax/swing/text/AbstractDocument.LeafElement.html#getName--)` in class `[AbstractDocument.LeafElement](../../../../javax/swing/text/AbstractDocument.LeafElement.html "class in javax.swing.text")` Returns: the name, null if none * #### getResolveParent public [AttributeSet](../../../../javax/swing/text/AttributeSet.html "interface in javax.swing.text") getResolveParent() Gets the resolving parent. HTML attributes are not inherited at the model level so we override this to return null. Specified by: `[getResolveParent](../../../../javax/swing/text/AttributeSet.html#getResolveParent--)` in interface `[AttributeSet](../../../../javax/swing/text/AttributeSet.html "interface in javax.swing.text")` Overrides: `[getResolveParent](../../../../javax/swing/text/AbstractDocument.AbstractElement.html#getResolveParent--)` in class `[AbstractDocument.AbstractElement](../../../../javax/swing/text/AbstractDocument.AbstractElement.html "class in javax.swing.text")` Returns: null, there are none See Also: [AttributeSet.getResolveParent()](../../../../javax/swing/text/AttributeSet.html#getResolveParent--)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.