This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.text.html
class HTMLEditorKit.HTMLTextAction

java.lang.Object extended by javax.swing.AbstractAction extended by javax.swing.text.TextAction extended by javax.swing.text.StyledEditorKit.StyledTextAction extended by javax.swing.text.html.HTMLEditorKit.HTMLTextAction
All Implemented Interfaces:
Serializable, Cloneable, Action
Direct Known Subclasses:
HTMLEditorKit.InsertHTMLTextAction
Enclosing class:
HTMLEditorKit

public abstract static class HTMLEditorKit.HTMLTextAction
extends StyledEditorKit.StyledTextAction

An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.

NOTE: None of the convenience methods obtain a lock on the document. If you have another thread modifying the text these methods may have inconsistent behavior, or return the wrong thing.


Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Constructor Summary

          
 
Method Summary
protected int
elementCountToTag(HTMLDocument doc, int offset, HTML.Tag tag)

          Returns number of elements, starting at the deepest leaf, needed to get to an element representing tag.
protected Element

          Returns the deepest element at offset matching tag.
protected Element[]
getElementsAt(HTMLDocument doc, int offset)

          Returns an array of the Elements that contain offset.
protected HTMLDocument

          
protected HTMLEditorKit

          
 
Methods inherited from class javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
 
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLEditorKit.HTMLTextAction

public HTMLEditorKit.HTMLTextAction(String name)
Parameters:
name
Method Detail

elementCountToTag

protected int elementCountToTag(HTMLDocument doc,
                                int offset,
                                HTML.Tag tag)
Returns number of elements, starting at the deepest leaf, needed to get to an element representing tag. This will return -1 if no elements is found representing tag, or 0 if the parent of the leaf at offset represents tag.

Parameters:
doc
offset
tag

findElementMatchingTag

protected Element findElementMatchingTag(HTMLDocument doc,
                                         int offset,
                                         HTML.Tag tag)
Returns the deepest element at offset matching tag.

Parameters:
doc
offset
tag

getElementsAt

protected Element[] getElementsAt(HTMLDocument doc,
                                  int offset)
Returns an array of the Elements that contain offset. The first elements corresponds to the root.

Parameters:
doc
offset

getHTMLDocument

protected HTMLDocument getHTMLDocument(JEditorPane e)
Parameters:
e
Returns:
HTMLDocument of e.

getHTMLEditorKit

protected HTMLEditorKit getHTMLEditorKit(JEditorPane e)
Parameters:
e
Returns:
HTMLEditorKit for e.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.