JavaTM 2 Platform
Standard Ed. 6

类 javax.swing.JEditorPane
的使用

使用 JEditorPane 的软件包
javax.swing 提供一组“轻量级”(全部是 Java 语言)组件,尽量让这些组件在所有平台上的工作方式都相同。 
javax.swing.text 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。 
javax.swing.text.html 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。 
 

javax.swingJEditorPane 的使用
 

javax.swingJEditorPane 的子类
 class JTextPane
          可以用以图形方式表示的属性来标记的文本组件。
 

javax.swing.textJEditorPane 的使用
 

返回 JEditorPanejavax.swing.text 中的方法
protected  JEditorPane StyledEditorKit.StyledTextAction.getEditor(ActionEvent e)
          获得操作的目标编辑器。
 

参数类型为 JEditorPanejavax.swing.text 中的方法
 void StyledEditorKit.deinstall(JEditorPane c)
          工具包从 JEditorPane 移除时调用。
 void EditorKit.deinstall(JEditorPane c)
          从 JEditorPane 中移除工具包时调用。
protected  StyledDocument StyledEditorKit.StyledTextAction.getStyledDocument(JEditorPane e)
          获取与编辑器窗格相关的文档。
protected  StyledEditorKit StyledEditorKit.StyledTextAction.getStyledEditorKit(JEditorPane e)
          获取与编辑器窗格相关的编辑器工具包。
 void StyledEditorKit.install(JEditorPane c)
          工具包安装到 JEditorPane 时调用。
 void EditorKit.install(JEditorPane c)
          将工具包安装到 JEditorPane 中时调用。
protected  void StyledEditorKit.StyledTextAction.setCharacterAttributes(JEditorPane editor, AttributeSet attr, boolean replace)
          对字符内容应用给定的属性。
protected  void StyledEditorKit.StyledTextAction.setParagraphAttributes(JEditorPane editor, AttributeSet attr, boolean replace)
          对段落应用给定的属性。
 

javax.swing.text.htmlJEditorPane 的使用
 

参数类型为 JEditorPanejavax.swing.text.html 中的方法
protected  void HTMLEditorKit.LinkController.activateLink(int pos, JEditorPane editor)
          如果给定位置表示一个链接,则调用关联 JEditorPane 上的 linkActivated。
 void HTMLEditorKit.deinstall(JEditorPane c)
          工具包从 JEditorPane 移除时调用。
protected  HTMLDocument HTMLEditorKit.HTMLTextAction.getHTMLDocument(JEditorPane e)
           
protected  HTMLEditorKit HTMLEditorKit.HTMLTextAction.getHTMLEditorKit(JEditorPane e)
           
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
protected  void HTMLEditorKit.InsertHTMLTextAction.insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag)
          HTMLEditorKit.insertHTML 的一个覆盖。
 void HTMLEditorKit.install(JEditorPane c)
          将工具包安装到 JEditorPane 中时调用。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only