HTMLDocument.BlockElement (Java Platform SE 8 ) (original) (raw)
- javax.swing.text.AbstractDocument.AbstractElement
- javax.swing.text.AbstractDocument.BranchElement
- javax.swing.text.html.HTMLDocument.BlockElement
- javax.swing.text.AbstractDocument.BranchElement
All Implemented Interfaces:
Serializable, AttributeSet, Element, MutableAttributeSet, TreeNode
Enclosing class:
HTMLDocument
public class HTMLDocument.BlockElement
extends AbstractDocument.BranchElement
An element that represents a structural block of HTML.
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 BlockElement(Element parent,AttributeSet a) Constructs a composite element that initially contains 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.BranchElement](../../../../javax/swing/text/AbstractDocument.BranchElement.html "class in javax.swing.text") `[children](../../../../javax/swing/text/AbstractDocument.BranchElement.html#children--), [getAllowsChildren](../../../../javax/swing/text/AbstractDocument.BranchElement.html#getAllowsChildren--), [getElement](../../../../javax/swing/text/AbstractDocument.BranchElement.html#getElement-int-), [getElementCount](../../../../javax/swing/text/AbstractDocument.BranchElement.html#getElementCount--), [getElementIndex](../../../../javax/swing/text/AbstractDocument.BranchElement.html#getElementIndex-int-), [getEndOffset](../../../../javax/swing/text/AbstractDocument.BranchElement.html#getEndOffset--), [getStartOffset](../../../../javax/swing/text/AbstractDocument.BranchElement.html#getStartOffset--), [isLeaf](../../../../javax/swing/text/AbstractDocument.BranchElement.html#isLeaf--), [positionToElement](../../../../javax/swing/text/AbstractDocument.BranchElement.html#positionToElement-int-), [replace](../../../../javax/swing/text/AbstractDocument.BranchElement.html#replace-int-int-javax.swing.text.Element:A-), [toString](../../../../javax/swing/text/AbstractDocument.BranchElement.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
* #### BlockElement public BlockElement([Element](../../../../javax/swing/text/Element.html "interface in javax.swing.text") parent, [AttributeSet](../../../../javax/swing/text/AttributeSet.html "interface in javax.swing.text") a) Constructs a composite element that initially contains no children. Parameters: `parent` \- the parent element `a` \- the attributes for the element 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.BranchElement.html#getName--)` in class `[AbstractDocument.BranchElement](../../../../javax/swing/text/AbstractDocument.BranchElement.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.