JavaTM Platform
Standard Ed. 6

javax.swing.text.html
类 HTMLDocument.RunElement

java.lang.Object
  继承者 javax.swing.text.AbstractDocument.AbstractElement
      继承者 javax.swing.text.AbstractDocument.LeafElement
          继承者 javax.swing.text.html.HTMLDocument.RunElement
所有已实现的接口:
Serializable, AttributeSet, Element, MutableAttributeSet, TreeNode
正在封闭类:
HTMLDocument

public class HTMLDocument.RunElement
extends AbstractDocument.LeafElement

表示文本块的元素,该文本块具有一个分配给它的 HTML 字符级的属性集。


嵌套类摘要
 
从接口 javax.swing.text.AttributeSet 继承的嵌套类/接口
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
 
字段摘要
 
从接口 javax.swing.text.AttributeSet 继承的字段
NameAttribute, ResolveAttribute
 
构造方法摘要
HTMLDocument.RunElement(Element parent, AttributeSet a, int offs0, int offs1)
          构造表示文档内部(没有子级)内容的元素。
 
方法摘要
 String getName()
          获取元素名称。
 AttributeSet getResolveParent()
          获得解析父级。
 
从类 javax.swing.text.AbstractDocument.LeafElement 继承的方法
children, getAllowsChildren, getElement, getElementCount, getElementIndex, getEndOffset, getStartOffset, isLeaf, toString
 
从类 javax.swing.text.AbstractDocument.AbstractElement 继承的方法
addAttribute, addAttributes, containsAttribute, containsAttributes, copyAttributes, dump, getAttribute, getAttributeCount, getAttributeNames, getAttributes, getChildAt, getChildCount, getDocument, getIndex, getParent, getParentElement, isDefined, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParent
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

HTMLDocument.RunElement

public HTMLDocument.RunElement(Element parent,
                               AttributeSet a,
                               int offs0,
                               int offs1)
构造表示文档内部(没有子级)内容的元素。

参数:
parent - 父元素
a - 元素属性
offs0 - 起始偏移量(必须至少为 0)
offs1 - 结束偏移量(必须至少为 offs0)
从以下版本开始:
1.4
方法详细信息

getName

public String getName()
获取元素名称。

指定者:
接口 Element 中的 getName
覆盖:
AbstractDocument.LeafElement 中的 getName
返回:
名称,如果没有,则返回 null

getResolveParent

public AttributeSet getResolveParent()
获得解析父级。HTML 属性不是在模型级继承的,因此我们重写此方法以返回 null。

指定者:
接口 AttributeSet 中的 getResolveParent
覆盖:
AbstractDocument.AbstractElement 中的 getResolveParent
返回:
null,表示没有
另请参见:
AttributeSet.getResolveParent()

JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策