javax.swing.text.html
Class HTMLEditorKit.HTMLTextAction

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.AbstractAction sample code for javax.swing.AbstractAction definition code for javax.swing.AbstractAction 
      extended by javax.swing.text.TextAction sample code for javax.swing.text.TextAction definition code for javax.swing.text.TextAction 
          extended by javax.swing.text.StyledEditorKit.StyledTextAction sample code for javax.swing.text.StyledEditorKit.StyledTextAction definition code for javax.swing.text.StyledEditorKit.StyledTextAction 
              extended by javax.swing.text.html.HTMLEditorKit.HTMLTextAction
All Implemented Interfaces:
ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable , EventListener sample code for java.util.EventListener definition code for java.util.EventListener , Action sample code for javax.swing.Action definition code for javax.swing.Action
Direct Known Subclasses:
HTMLEditorKit.InsertHTMLTextAction sample code for javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction definition code for javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
Enclosing class:
HTMLEditorKit sample code for javax.swing.text.html.HTMLEditorKit definition code for javax.swing.text.html.HTMLEditorKit

public abstract static class HTMLEditorKit.HTMLTextAction
extends StyledEditorKit.StyledTextAction sample code for javax.swing.text.StyledEditorKit.StyledTextAction definition code for javax.swing.text.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.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction sample code for javax.swing.AbstractAction definition code for javax.swing.AbstractAction
changeSupport sample code for javax.swing.AbstractAction.changeSupport definition code for javax.swing.AbstractAction.changeSupport , enabled sample code for javax.swing.AbstractAction.enabled definition code for javax.swing.AbstractAction.enabled
 
Fields inherited from interface javax.swing.Action sample code for javax.swing.Action definition code for javax.swing.Action
ACCELERATOR_KEY sample code for javax.swing.Action.ACCELERATOR_KEY definition code for javax.swing.Action.ACCELERATOR_KEY , ACTION_COMMAND_KEY sample code for javax.swing.Action.ACTION_COMMAND_KEY definition code for javax.swing.Action.ACTION_COMMAND_KEY , DEFAULT sample code for javax.swing.Action.DEFAULT definition code for javax.swing.Action.DEFAULT , LONG_DESCRIPTION sample code for javax.swing.Action.LONG_DESCRIPTION definition code for javax.swing.Action.LONG_DESCRIPTION , MNEMONIC_KEY sample code for javax.swing.Action.MNEMONIC_KEY definition code for javax.swing.Action.MNEMONIC_KEY , NAME sample code for javax.swing.Action.NAME definition code for javax.swing.Action.NAME , SHORT_DESCRIPTION sample code for javax.swing.Action.SHORT_DESCRIPTION definition code for javax.swing.Action.SHORT_DESCRIPTION , SMALL_ICON sample code for javax.swing.Action.SMALL_ICON definition code for javax.swing.Action.SMALL_ICON
 
Constructor Summary
HTMLEditorKit.HTMLTextAction sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.HTMLEditorKit.HTMLTextAction(java.lang.String) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.HTMLEditorKit.HTMLTextAction(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
           
 
Method Summary
protected  int elementCountToTag sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.elementCountToTag(javax.swing.text.html.HTMLDocument, int, javax.swing.text.html.HTML.Tag) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.elementCountToTag(javax.swing.text.html.HTMLDocument, int, javax.swing.text.html.HTML.Tag) (HTMLDocument sample code for javax.swing.text.html.HTMLDocument definition code for javax.swing.text.html.HTMLDocument  doc, int offset, HTML.Tag sample code for javax.swing.text.html.HTML.Tag definition code for javax.swing.text.html.HTML.Tag  tag)
          Returns number of elements, starting at the deepest leaf, needed to get to an element representing tag.
protected  Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element findElementMatchingTag sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.findElementMatchingTag(javax.swing.text.html.HTMLDocument, int, javax.swing.text.html.HTML.Tag) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.findElementMatchingTag(javax.swing.text.html.HTMLDocument, int, javax.swing.text.html.HTML.Tag) (HTMLDocument sample code for javax.swing.text.html.HTMLDocument definition code for javax.swing.text.html.HTMLDocument  doc, int offset, HTML.Tag sample code for javax.swing.text.html.HTML.Tag definition code for javax.swing.text.html.HTML.Tag  tag)
          Returns the deepest element at offset matching tag.
protected  Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element [] getElementsAt sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getElementsAt(javax.swing.text.html.HTMLDocument, int) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getElementsAt(javax.swing.text.html.HTMLDocument, int) (HTMLDocument sample code for javax.swing.text.html.HTMLDocument definition code for javax.swing.text.html.HTMLDocument  doc, int offset)
          Returns an array of the Elements that contain offset.
protected  HTMLDocument sample code for javax.swing.text.html.HTMLDocument definition code for javax.swing.text.html.HTMLDocument getHTMLDocument sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getHTMLDocument(javax.swing.JEditorPane) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getHTMLDocument(javax.swing.JEditorPane) (JEditorPane sample code for javax.swing.JEditorPane definition code for javax.swing.JEditorPane  e)
           
protected  HTMLEditorKit sample code for javax.swing.text.html.HTMLEditorKit definition code for javax.swing.text.html.HTMLEditorKit getHTMLEditorKit sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getHTMLEditorKit(javax.swing.JEditorPane) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getHTMLEditorKit(javax.swing.JEditorPane) (JEditorPane sample code for javax.swing.JEditorPane definition code for javax.swing.JEditorPane  e)
           
 
Methods inherited from class javax.swing.text.StyledEditorKit.StyledTextAction sample code for javax.swing.text.StyledEditorKit.StyledTextAction definition code for javax.swing.text.StyledEditorKit.StyledTextAction
getEditor sample code for javax.swing.text.StyledEditorKit.StyledTextAction.getEditor(java.awt.event.ActionEvent) definition code for javax.swing.text.StyledEditorKit.StyledTextAction.getEditor(java.awt.event.ActionEvent) , getStyledDocument sample code for javax.swing.text.StyledEditorKit.StyledTextAction.getStyledDocument(javax.swing.JEditorPane) definition code for javax.swing.text.StyledEditorKit.StyledTextAction.getStyledDocument(javax.swing.JEditorPane) , getStyledEditorKit sample code for javax.swing.text.StyledEditorKit.StyledTextAction.getStyledEditorKit(javax.swing.JEditorPane) definition code for javax.swing.text.StyledEditorKit.StyledTextAction.getStyledEditorKit(javax.swing.JEditorPane) , setCharacterAttributes sample code for javax.swing.text.StyledEditorKit.StyledTextAction.setCharacterAttributes(javax.swing.JEditorPane, javax.swing.text.AttributeSet, boolean) definition code for javax.swing.text.StyledEditorKit.StyledTextAction.setCharacterAttributes(javax.swing.JEditorPane, javax.swing.text.AttributeSet, boolean) , setParagraphAttributes sample code for javax.swing.text.StyledEditorKit.StyledTextAction.setParagraphAttributes(javax.swing.JEditorPane, javax.swing.text.AttributeSet, boolean) definition code for javax.swing.text.StyledEditorKit.StyledTextAction.setParagraphAttributes(javax.swing.JEditorPane, javax.swing.text.AttributeSet, boolean)
 
Methods inherited from class javax.swing.text.TextAction sample code for javax.swing.text.TextAction definition code for javax.swing.text.TextAction
augmentList sample code for javax.swing.text.TextAction.augmentList(javax.swing.Action[], javax.swing.Action[]) definition code for javax.swing.text.TextAction.augmentList(javax.swing.Action[], javax.swing.Action[]) , getFocusedComponent sample code for javax.swing.text.TextAction.getFocusedComponent() definition code for javax.swing.text.TextAction.getFocusedComponent() , getTextComponent sample code for javax.swing.text.TextAction.getTextComponent(java.awt.event.ActionEvent) definition code for javax.swing.text.TextAction.getTextComponent(java.awt.event.ActionEvent)
 
Methods inherited from class javax.swing.AbstractAction sample code for javax.swing.AbstractAction definition code for javax.swing.AbstractAction
addPropertyChangeListener sample code for javax.swing.AbstractAction.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for javax.swing.AbstractAction.addPropertyChangeListener(java.beans.PropertyChangeListener) , clone sample code for javax.swing.AbstractAction.clone() definition code for javax.swing.AbstractAction.clone() , firePropertyChange sample code for javax.swing.AbstractAction.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for javax.swing.AbstractAction.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) , getKeys sample code for javax.swing.AbstractAction.getKeys() definition code for javax.swing.AbstractAction.getKeys() , getPropertyChangeListeners sample code for javax.swing.AbstractAction.getPropertyChangeListeners() definition code for javax.swing.AbstractAction.getPropertyChangeListeners() , getValue sample code for javax.swing.AbstractAction.getValue(java.lang.String) definition code for javax.swing.AbstractAction.getValue(java.lang.String) , isEnabled sample code for javax.swing.AbstractAction.isEnabled() definition code for javax.swing.AbstractAction.isEnabled() , putValue sample code for javax.swing.AbstractAction.putValue(java.lang.String, java.lang.Object) definition code for javax.swing.AbstractAction.putValue(java.lang.String, java.lang.Object) , removePropertyChangeListener sample code for javax.swing.AbstractAction.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for javax.swing.AbstractAction.removePropertyChangeListener(java.beans.PropertyChangeListener) , setEnabled sample code for javax.swing.AbstractAction.setEnabled(boolean) definition code for javax.swing.AbstractAction.setEnabled(boolean)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 
Methods inherited from interface java.awt.event.ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener
actionPerformed sample code for java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent) definition code for java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent)
 

Constructor Detail

HTMLEditorKit.HTMLTextAction sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction(java.lang.String) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction(java.lang.String)

public HTMLEditorKit.HTMLTextAction(String sample code for java.lang.String definition code for java.lang.String  name)
Method Detail

getHTMLDocument sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getHTMLDocument(javax.swing.JEditorPane) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getHTMLDocument(javax.swing.JEditorPane)

protected HTMLDocument sample code for javax.swing.text.html.HTMLDocument definition code for javax.swing.text.html.HTMLDocument  getHTMLDocument(JEditorPane sample code for javax.swing.JEditorPane definition code for javax.swing.JEditorPane  e)
Returns:
HTMLDocument of e.

getHTMLEditorKit sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getHTMLEditorKit(javax.swing.JEditorPane) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getHTMLEditorKit(javax.swing.JEditorPane)

protected HTMLEditorKit sample code for javax.swing.text.html.HTMLEditorKit definition code for javax.swing.text.html.HTMLEditorKit  getHTMLEditorKit(JEditorPane sample code for javax.swing.JEditorPane definition code for javax.swing.JEditorPane  e)
Returns:
HTMLEditorKit for e.

getElementsAt sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getElementsAt(javax.swing.text.html.HTMLDocument, int) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.getElementsAt(javax.swing.text.html.HTMLDocument, int)

protected Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element [] getElementsAt(HTMLDocument sample code for javax.swing.text.html.HTMLDocument definition code for javax.swing.text.html.HTMLDocument  doc,
                                  int offset)
Returns an array of the Elements that contain offset. The first elements corresponds to the root.


elementCountToTag sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.elementCountToTag(javax.swing.text.html.HTMLDocument, int, javax.swing.text.html.HTML.Tag) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.elementCountToTag(javax.swing.text.html.HTMLDocument, int, javax.swing.text.html.HTML.Tag)

protected int elementCountToTag(HTMLDocument sample code for javax.swing.text.html.HTMLDocument definition code for javax.swing.text.html.HTMLDocument  doc,
                                int offset,
                                HTML.Tag sample code for javax.swing.text.html.HTML.Tag definition code for javax.swing.text.html.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.


findElementMatchingTag sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.findElementMatchingTag(javax.swing.text.html.HTMLDocument, int, javax.swing.text.html.HTML.Tag) definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction.findElementMatchingTag(javax.swing.text.html.HTMLDocument, int, javax.swing.text.html.HTML.Tag)

protected Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  findElementMatchingTag(HTMLDocument sample code for javax.swing.text.html.HTMLDocument definition code for javax.swing.text.html.HTMLDocument  doc,
                                         int offset,
                                         HTML.Tag sample code for javax.swing.text.html.HTML.Tag definition code for javax.swing.text.html.HTML.Tag  tag)
Returns the deepest element at offset matching tag.