| 
JavaTM 2 Platform Standard Ed. 6  | 
|||||||||
| 上一个 下一个 | 框架 无框架 | |||||||||
| 使用 Element 的软件包 | |
|---|---|
| javax.swing | 提供一组“轻量级”(全部是 Java 语言)组件,尽量让这些组件在所有平台上的工作方式都相同。 | 
| javax.swing.event | 供 Swing 组件触发的事件使用。 | 
| javax.swing.plaf.basic | 提供了根据基本外观构建的用户界面对象。 | 
| javax.swing.text | 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。  | 
| javax.swing.text.html | 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。  | 
| javax.swing 中 Element 的使用 | 
|---|
| 参数类型为 Element 的 javax.swing 中的构造方法 | |
|---|---|
JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink(Element e)
 | 
|
| javax.swing.event 中 Element 的使用 | 
|---|
| 返回 Element 的 javax.swing.event 中的方法 | |
|---|---|
 Element[] | 
DocumentEvent.ElementChange.getChildrenAdded()
获得添加到给定父元素中的子元素。  | 
 Element[] | 
DocumentEvent.ElementChange.getChildrenRemoved()
获得从给定父元素中移除的子元素。  | 
 Element | 
DocumentEvent.ElementChange.getElement()
返回所表示的元素。  | 
 Element | 
HyperlinkEvent.getSourceElement()
返回对应于事件源的 Element。 | 
| 参数类型为 Element 的 javax.swing.event 中的方法 | |
|---|---|
 DocumentEvent.ElementChange | 
DocumentEvent.getChange(Element elem)
获得给定元素的更改信息。  | 
| 参数类型为 Element 的 javax.swing.event 中的构造方法 | |
|---|---|
HyperlinkEvent(Object source,
               HyperlinkEvent.EventType type,
               URL u,
               String desc,
               Element sourceElement)
创建一个表示超文本链接事件的新对象。  | 
|
| javax.swing.plaf.basic 中 Element 的使用 | 
|---|
| 参数类型为 Element 的 javax.swing.plaf.basic 中的方法 | |
|---|---|
 View | 
BasicPasswordFieldUI.create(Element elem)
创建元素的视图 (PasswordView)。  | 
 View | 
BasicTextAreaUI.create(Element elem)
创建元素的视图。  | 
 View | 
BasicTextFieldUI.create(Element elem)
基于元素创建视图 (FieldView)。  | 
 View | 
BasicTextUI.create(Element elem)
创建元素的视图。  | 
 View | 
BasicTextUI.create(Element elem,
       int p0,
       int p1)
创建元素的视图。  | 
| javax.swing.text 中 Element 的使用 | 
|---|
| 实现 Element 的 javax.swing.text 中的类 | |
|---|---|
 class | 
AbstractDocument.AbstractElement
实现元素的抽象部分。  | 
 class | 
AbstractDocument.BranchElement
实现一个包含其他元素的复合元素。  | 
 class | 
AbstractDocument.LeafElement
实现可直接表示某类内容的元素。  | 
protected  class | 
DefaultStyledDocument.SectionElement
文档的默认根元素... 与所包含的段落/行对应。  | 
| 声明为 Element 的 javax.swing.text 中的字段 | |
|---|---|
protected  Element | 
DefaultStyledDocument.AttributeUndoableEdit.element
 | 
| 返回 Element 的 javax.swing.text 中的方法 | |
|---|---|
 Element | 
DefaultStyledDocument.ElementBuffer.clone(Element parent,
      Element clonee)
创建此元素的一个副本,使其具有不同的父级。  | 
protected  Element | 
AbstractDocument.createBranchElement(Element parent,
                    AttributeSet a)
创建文档分支元素,它可包含其他元素。  | 
protected  Element | 
AbstractDocument.createLeafElement(Element parent,
                  AttributeSet a,
                  int p0,
                  int p1)
创建文档叶元素。  | 
 Element | 
ElementIterator.current()
获取当前 Element。  | 
 Element | 
ElementIterator.first()
获取第一个元素。  | 
 Element | 
AbstractDocument.getBidiRootElement()
返回此文档双向结构的根元素。  | 
 Element | 
StyledEditorKit.getCharacterAttributeRun()
获取表示该插入符处当前运行的字符属性的元素。  | 
 Element | 
DefaultStyledDocument.getCharacterElement(int pos)
获得基于某个位置的字符元素。  | 
 Element | 
StyledDocument.getCharacterElement(int pos)
获取表示文档中给定偏移量处字符的元素。  | 
 Element[] | 
AbstractDocument.ElementEdit.getChildrenAdded()
获得已添加的子元素列表。  | 
 Element[] | 
AbstractDocument.ElementEdit.getChildrenRemoved()
获得已移除的子元素列表。  | 
 Element | 
DefaultStyledDocument.getDefaultRootElement()
获得默认的根元素。  | 
 Element | 
PlainDocument.getDefaultRootElement()
获取文档模型的默认根元素。  | 
abstract  Element | 
AbstractDocument.getDefaultRootElement()
返回视图赖依存在的根元素,除非提供了向元素结构指派视图的其他机制。  | 
 Element | 
Document.getDefaultRootElement()
返回视图赖以存在的根元素,除非提供了向元素结构指定视图的其他机制。  | 
 Element | 
View.getElement()
获取此视图所映射的主题的结构化部分。  | 
 Element | 
AbstractDocument.ElementEdit.getElement()
返回基础元素。  | 
abstract  Element | 
AbstractDocument.AbstractElement.getElement(int index)
获取子元素。  | 
 Element | 
AbstractDocument.BranchElement.getElement(int index)
获得一个子元素。  | 
 Element | 
AbstractDocument.LeafElement.getElement(int index)
获得一个子元素。  | 
 Element | 
Element.getElement(int index)
获取给定索引处的子元素。  | 
 Element | 
DefaultStyledDocument.getParagraphElement(int pos)
获得位于偏移量 pos 的段落元素。 | 
 Element | 
StyledDocument.getParagraphElement(int pos)
获取表示包含文档中给定偏移量的段落的元素。  | 
 Element | 
PlainDocument.getParagraphElement(int pos)
获取包含给定位置的段落元素。  | 
abstract  Element | 
AbstractDocument.getParagraphElement(int pos)
获得包含给定位置的段落元素。  | 
static Element | 
Utilities.getParagraphElement(JTextComponent c,
                    int offs)
确定某个段落/行要使用的元素。  | 
 Element | 
AbstractDocument.AbstractElement.getParentElement()
获取该元素的父级。  | 
 Element | 
Element.getParentElement()
获得父元素。  | 
 Element | 
DefaultStyledDocument.ElementBuffer.getRootElement()
获得根元素。  | 
 Element[] | 
AbstractDocument.getRootElements()
获得已定义的所有根元素。  | 
 Element[] | 
Document.getRootElements()
返回定义的所有根元素。  | 
 Element | 
ElementIterator.next()
获取下一个 Element。  | 
 Element | 
AbstractDocument.BranchElement.positionToElement(int pos)
获得包含给定模型位置的子元素。  | 
 Element | 
ElementIterator.previous()
获取前一个 Element。  | 
| 参数类型为 Element 的 javax.swing.text 中的方法 | |
|---|---|
 Element | 
DefaultStyledDocument.ElementBuffer.clone(Element parent,
      Element clonee)
创建此元素的一个副本,使其具有不同的父级。  | 
 View | 
ViewFactory.create(Element elem)
根据给定的文档的结构化元素创建一个视图。  | 
protected  Element | 
AbstractDocument.createBranchElement(Element parent,
                    AttributeSet a)
创建文档分支元素,它可包含其他元素。  | 
protected  void | 
StyledEditorKit.createInputAttributes(Element element,
                      MutableAttributeSet set)
将 element 的 AttributeSet 键/值复制到 set 中。 | 
protected  Element | 
AbstractDocument.createLeafElement(Element parent,
                  AttributeSet a,
                  int p0,
                  int p1)
创建文档叶元素。  | 
protected  TableView.TableCell | 
TableView.createTableCell(Element elem)
已过时。 现在表单元格可以是任意视图实现并且应该由 ViewFactory 而不是表来产生。  | 
protected  TableView.TableRow | 
TableView.createTableRow(Element elem)
创建新的表格行。  | 
 DocumentEvent.ElementChange | 
AbstractDocument.DefaultDocumentEvent.getChange(Element elem)
获得元素的更改。  | 
protected  String | 
AbstractWriter.getText(Element elem)
返回与该元素关联的文本。  | 
protected  boolean | 
AbstractWriter.inRange(Element next)
此方法确定当前元素是否位于指定的范围内。  | 
 void | 
AbstractDocument.BranchElement.replace(int offset,
        int length,
        Element[] elems)
使用新的元素集替换该内容。  | 
protected  void | 
AbstractWriter.text(Element elem)
写出文本。  | 
| 参数类型为 Element 的 javax.swing.text 中的构造方法 | |
|---|---|
AbstractDocument.AbstractElement(Element parent,
                                 AttributeSet a)
创建新的 AbstractElement。  | 
|
AbstractDocument.BranchElement(Element parent,
                               AttributeSet a)
构造最初不包含任何子元素的复合元素。  | 
|
AbstractDocument.ElementEdit(Element e,
                             int index,
                             Element[] removed,
                             Element[] added)
构造一个编辑记录。  | 
|
AbstractDocument.ElementEdit(Element e,
                             int index,
                             Element[] removed,
                             Element[] added)
构造一个编辑记录。  | 
|
AbstractDocument.ElementEdit(Element e,
                             int index,
                             Element[] removed,
                             Element[] added)
构造一个编辑记录。  | 
|
AbstractDocument.LeafElement(Element parent,
                             AttributeSet a,
                             int offs0,
                             int offs1)
构造一个表示文档中内容的元素(没有子元素)。  | 
|
AbstractWriter(Writer w,
               Element root)
创建新的 AbstractWriter。  | 
|
AbstractWriter(Writer w,
               Element root,
               int pos,
               int len)
创建新的 AbstractWriter。  | 
|
AsyncBoxView(Element elem,
             int axis)
构造执行异步布局处理的 BoxView。  | 
|
BoxView(Element elem,
        int axis)
构造一个 BoxView。 | 
|
ComponentView(Element elem)
创建新的 ComponentView 对象。  | 
|
CompositeView(Element elem)
为给定元素构造一个 CompositeView。 | 
|
DefaultStyledDocument.AttributeUndoableEdit(Element element,
                                            AttributeSet newAttributes,
                                            boolean isReplacing)
 | 
|
DefaultStyledDocument.ElementBuffer(Element root)
创建新的 ElementBuffer。  | 
|
ElementIterator(Element root)
创建新的 ElementIterator。  | 
|
FieldView(Element elem)
构造包装了元素的新 FieldView。  | 
|
FlowView(Element elem,
         int axis)
构造给定元素的 FlowView。  | 
|
GlyphView(Element elem)
构造在元素上包装的新视图。  | 
|
IconView(Element elem)
创建表示元素的新图标视图。  | 
|
LabelView(Element elem)
构造在元素上包装的新视图。  | 
|
ParagraphView(Element elem)
创建给定元素的 ParagraphView。 | 
|
PasswordView(Element elem)
构造在元素上包装的新视图。  | 
|
PlainView(Element elem)
构造在元素上包装的新 PlainView。  | 
|
TableView.TableCell(Element elem)
已过时。 构造给定元素的 TableCell。  | 
|
TableView.TableRow(Element elem)
构造给定元素的 TableView。  | 
|
TableView(Element elem)
针对给定的元素构造一个 TableView。  | 
|
View(Element elem)
创建一个新的 View 对象。 | 
|
WrappedPlainView(Element elem)
创建一个新的 WrappedPlainView。  | 
|
WrappedPlainView(Element elem,
                 boolean wordWrap)
创建一个新的 WrappedPlainView。  | 
|
ZoneView(Element elem,
         int axis)
构造一个 ZoneView。  | 
|
| javax.swing.text.html 中 Element 的使用 | 
|---|
| 实现 Element 的 javax.swing.text.html 中的类 | |
|---|---|
 class | 
HTMLDocument.BlockElement
表示结构性 HTML 块 的元素。  | 
 class | 
HTMLDocument.RunElement
表示文本块的元素,该文本块具有一个分配给它的 HTML 字符级的属性集。  | 
| 返回 Element 的 javax.swing.text.html 中的方法 | |
|---|---|
protected  Element | 
HTMLDocument.createBranchElement(Element parent,
                    AttributeSet a)
创建文档分支元素,它可以包含其他元素。  | 
protected  Element | 
HTMLDocument.createLeafElement(Element parent,
                  AttributeSet a,
                  int p0,
                  int p1)
创建直接表示文本的文档叶元素(没有任何子级)。  | 
protected  Element | 
HTMLEditorKit.HTMLTextAction.findElementMatchingTag(HTMLDocument doc,
                       int offset,
                       HTML.Tag tag)
返回在 offset 处与 tag 匹配的最深的元素。 | 
 Element | 
HTMLDocument.getElement(Element e,
           Object attribute,
           Object value)
返回 e(它包含具有值 value 的属性 attribute)的子元素,如果未找到,则返回 null。 | 
 Element | 
HTMLDocument.getElement(String id)
返回具有给定 id Attribute 的元素。 | 
protected  Element[] | 
HTMLEditorKit.HTMLTextAction.getElementsAt(HTMLDocument doc,
              int offset)
返回包含 offset 的 Elements 数组。 | 
| 参数类型为 Element 的 javax.swing.text.html 中的方法 | |
|---|---|
protected  void | 
HTMLWriter.comment(Element elem)
写出注释。  | 
 View | 
HTMLEditorKit.HTMLFactory.create(Element elem)
根据元素创建视图。  | 
protected  Element | 
HTMLDocument.createBranchElement(Element parent,
                    AttributeSet a)
创建文档分支元素,它可以包含其他元素。  | 
protected  void | 
HTMLEditorKit.createInputAttributes(Element element,
                      MutableAttributeSet set)
将 element 的 AttributeSet 键/值复制到 set 中。 | 
protected  Element | 
HTMLDocument.createLeafElement(Element parent,
                  AttributeSet a,
                  int p0,
                  int p1)
创建直接表示文本的文档叶元素(没有任何子级)。  | 
protected  void | 
HTMLWriter.emptyTag(Element elem)
写出所有空元素(没有对应结束标记的所有标记)。  | 
protected  void | 
HTMLWriter.endTag(Element elem)
写出元素的结束标记。  | 
 Element | 
HTMLDocument.getElement(Element e,
           Object attribute,
           Object value)
返回 e(它包含具有值 value 的属性 attribute)的子元素,如果未找到,则返回 null。 | 
 Style | 
StyleSheet.getRule(HTML.Tag t,
        Element e)
获取用来呈现给定类型的 HTML 标记的样式。  | 
 void | 
HTMLDocument.insertAfterEnd(Element elem,
               String htmlText)
将指定为字符串的 HTML 插入给定元素的起始处之后。  | 
 void | 
HTMLDocument.insertAfterStart(Element elem,
                 String htmlText)
将指定为字符串的 HTML 插入元素的起始处。  | 
protected  void | 
HTMLEditorKit.InsertHTMLTextAction.insertAtBoundary(JEditorPane editor,
                 HTMLDocument doc,
                 int offset,
                 Element insertElement,
                 String html,
                 HTML.Tag parentTag,
                 HTML.Tag addTag)
当在边界上插入时调用。  | 
protected  void | 
HTMLEditorKit.InsertHTMLTextAction.insertAtBoundry(JEditorPane editor,
                HTMLDocument doc,
                int offset,
                Element insertElement,
                String html,
                HTML.Tag parentTag,
                HTML.Tag addTag)
已过时。 从 Java 2 平台 v1.3 开始,使用 insertAtBoundary  | 
 void | 
HTMLDocument.insertBeforeEnd(Element elem,
                String htmlText)
将指定为字符串的 HTML 插入元素的结尾处。  | 
 void | 
HTMLDocument.insertBeforeStart(Element elem,
                  String htmlText)
将指定为字符串的 HTML 插入给定元素的起始处之前。  | 
protected  boolean | 
MinimalHTMLWriter.isText(Element elem)
如果元素是文本元素,则返回 true。  | 
 void | 
HTMLDocument.setInnerHTML(Element elem,
             String htmlText)
用指定为 HTML 字符串的内容替换给定元素的子元素。  | 
 void | 
HTMLDocument.setOuterHTML(Element elem,
             String htmlText)
用指定为 HTML 字符串的内容替换父元素中的给定元素。  | 
protected  void | 
HTMLWriter.startTag(Element elem)
写出元素的开始标记。  | 
protected  boolean | 
HTMLWriter.synthesizedElement(Element elem)
如果元素是合成元素,则返回 true。  | 
protected  void | 
HTMLWriter.text(Element elem)
写出文本。  | 
protected  void | 
MinimalHTMLWriter.text(Element elem)
写出文本。  | 
protected  void | 
MinimalHTMLWriter.writeComponent(Element elem)
负责处理 Component Elements;有意不实现它。  | 
protected  void | 
MinimalHTMLWriter.writeContent(Element elem,
             boolean needsIndenting)
以与 HTML 兼容的方式写出属性集。  | 
protected  void | 
MinimalHTMLWriter.writeImage(Element elem)
负责处理 Icon Elements;有意不实现它。  | 
protected  void | 
MinimalHTMLWriter.writeLeaf(Element elem)
负责写出其他非文本叶元素。  | 
protected  void | 
MinimalHTMLWriter.writeStartParagraph(Element elem)
发出段落的开始标记。  | 
| 参数类型为 Element 的 javax.swing.text.html 中的构造方法 | |
|---|---|
BlockView(Element elem,
          int axis)
创建表示 html 框的新视图。  | 
|
FormView(Element elem)
创建新的 FormView 对象。  | 
|
HTMLDocument.BlockElement(Element parent,
                          AttributeSet a)
构造初始不包含子元素的复合元素。  | 
|
HTMLDocument.RunElement(Element parent,
                        AttributeSet a,
                        int offs0,
                        int offs1)
构造表示文档内部(没有子级)内容的元素。  | 
|
HTMLFrameHyperlinkEvent(Object source,
                        HyperlinkEvent.EventType type,
                        URL targetURL,
                        Element sourceElement,
                        String targetFrame)
创建一个表示超文本链接事件的新对象。  | 
|
HTMLFrameHyperlinkEvent(Object source,
                        HyperlinkEvent.EventType type,
                        URL targetURL,
                        String desc,
                        Element sourceElement,
                        String targetFrame)
创建一个表示超文本链接事件的新对象。  | 
|
ImageView(Element elem)
创建表示 IMG 元素的新视图。  | 
|
InlineView(Element elem)
构造在元素上包装的新视图。  | 
|
ListView(Element elem)
创建表示列表元素的新视图。  | 
|
ObjectView(Element elem)
创建新的 ObjectView 对象。  | 
|
ParagraphView(Element elem)
构造给定元素的 ParagraphView。  | 
|
  | 
JavaTM 2 Platform Standard Ed. 6  | 
|||||||||
| 上一个 下一个 | 框架 无框架 | |||||||||
版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only。