public static class HTMLEditorKit.InsertHTMLTextAction extends HTMLEditorKit.HTMLTextAction
例如,让我们说,你想创建一个动作来插入一个表到身体。的parenttag会html.tag.body,addtag会html.tag.table,和字符串可以像 <表> < > < > < / TR TD TD > < > < > /表/ TR。 表>
还有一个选项提供一个替代parenttag和addtag。这些将被检查,如果有不parenttag偏移。
Modifier and Type | Field and Description |
---|---|
protected HTML.Tag |
addTag
标签在HTML开始添加标签。
|
protected HTML.Tag |
alternateAddTag
在HTML的替代标记开始添加标签如果parenttag没有找到和发现alternateparenttag。
|
protected HTML.Tag |
alternateParentTag
替换标记检查文档中是否parenttag没有发现。
|
protected String |
html
HTML插入。
|
protected HTML.Tag |
parentTag
在文档中检查的标签。
|
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
InsertHTMLTextAction(String name, String html, HTML.Tag parentTag, HTML.Tag addTag) |
InsertHTMLTextAction(String name, String html, HTML.Tag parentTag, HTML.Tag addTag, HTML.Tag alternateParentTag, HTML.Tag alternateAddTag) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent ae)
插入到文档中的HTML。
|
protected void |
insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag)
这是在插入到一个边界时调用的。
|
protected void |
insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag)
过时的。
作为java 2平台V1.3,使用insertatboundary
|
protected void |
insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag)
一套htmleditorkit.inserthtml。
|
elementCountToTag, findElementMatchingTag, getElementsAt, getHTMLDocument, getHTMLEditorKit
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
augmentList, getFocusedComponent, getTextComponent
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
protected String html
protected HTML.Tag parentTag
protected HTML.Tag addTag
protected HTML.Tag alternateParentTag
protected HTML.Tag alternateAddTag
public InsertHTMLTextAction(String name, String html, HTML.Tag parentTag, HTML.Tag addTag)
protected void insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag)
protected void insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag)
@Deprecated protected void insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag)
public void actionPerformed(ActionEvent ae)
ae
-事件
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, 2014, Oracle and/or its affiliates. All rights reserved.