- java.lang.Object
 -  
      
- javax.swing.AbstractAction
 -  
        
- javax.swing.text.TextAction
 -  
          
- javax.swing.text.StyledEditorKit.StyledTextAction
 -  
            
- javax.swing.text.html.HTMLEditorKit.HTMLTextAction
 
 
 
 
 
-  
       
- 实现的所有接口
 -  
         
ActionListener,Serializable,Cloneable,EventListener,Action 
- Enclosing class:
 - HTMLEditorKit
 
public abstract static class HTMLEditorKit.HTMLTextAction extends StyledEditorKit.StyledTextAction
一个抽象的Action提供了一些方便的方法,可以在将HTML插入现有文档时使用。注意:没有一种便捷方法可以锁定文档。 如果你有另一个线程修改文本,这些方法可能会有不一致的行为,或返回错误的东西。
- 另请参见:
 - Serialized Form
 
 
-  
        
       
-  
             
字段汇总
-  
               
声明的属性在类 javax.swing.AbstractAction
changeSupport, enabled 
-  
               
Fields declared in interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON 
 -  
               
 
-  
             
构造方法摘要
构造方法 构造器 描述 HTMLTextAction(String name)从字符串操作名称创建新的HTMLTextAction。 
-  
             
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 protected intelementCountToTag(HTMLDocument doc, int offset, HTML.Tag tag)返回从最深叶开始的元素数,以获取表示tag的元素。protected ElementfindElementMatchingTag(HTMLDocument doc, int offset, HTML.Tag tag)返回offset匹配tag的最深元素。protected Element[]getElementsAt(HTMLDocument doc, int offset)返回包含offset的Elements数组。protected HTMLDocumentgetHTMLDocument(JEditorPane e)protected HTMLEditorKitgetHTMLEditorKit(JEditorPane e)-  
               
声明方法的类 javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes 
-  
               
声明方法的类 javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent 
-  
               
声明方法的类 javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled 
-  
               
声明方法的类 java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
-  
               
声明方法的接口 java.awt.event.ActionListener
actionPerformed 
 -  
               
 
 -  
             
 
-  
        
       
-  
             
构造方法详细信息
-  
HTMLTextAction
public HTMLTextAction(String name)
从字符串操作名称创建新的HTMLTextAction。- 参数
 -  
              
name- 操作的名称 
 
 -  
 
-  
             
方法详细信息
-  
getHTMLDocument
protected HTMLDocument getHTMLDocument(JEditorPane e)
- 参数
 -  
              
e- JEditorPane - 结果
 - 
               HTMLDocument of 
              
e。 
 
-  
getHTMLEditorKit
protected HTMLEditorKit getHTMLEditorKit(JEditorPane e)
- 参数
 -  
              
e- JEditorPane - 结果
 - 
               HTMLEditorKit为 
              
e。 
 
-  
getElementsAt
protected Element[] getElementsAt(HTMLDocument doc, int offset)
返回包含offset的Elements数组。 第一个元素对应于根。- 参数
 -  
              
doc- HTMLDocument的一个实例 -  
              
offset- 偏移值 - 结果
 - 
               包含 
              
offset的元素数组 
 
-  
elementCountToTag
protected int elementCountToTag(HTMLDocument doc, int offset, HTML.Tag tag)
返回从最深叶开始的元素数量,以获取表示tag的元素。 这将返回-1,如果没有找到元素表示tag,或0,如果叶的在父offset表示tag。- 参数
 -  
              
doc- HTMLDocument的一个实例 -  
              
offset- 从中开始的偏移量 -  
              
tag- 要表示的标签 - 结果
 - 元素数量
 
 
-  
findElementMatchingTag
protected Element findElementMatchingTag(HTMLDocument doc, int offset, HTML.Tag tag)
返回offset匹配tag的最深元素。- 参数
 -  
              
doc- HTMLDocument的一个实例 -  
              
offset- 指定的偏移量> = 0 -  
              
tag-tag一个实例 - 结果
 - 最深刻的元素
 
 
 -  
 
 -