sferyx.administration.renderers
Class EditorHTMLDocument

java.lang.Object
  extended by javax.swing.text.AbstractDocument
      extended by javax.swing.text.DefaultStyledDocument
          extended by javax.swing.text.html.HTMLDocument
              extended by sferyx.administration.renderers.EditorHTMLDocument
All Implemented Interfaces:
java.io.Serializable, javax.swing.text.Document, javax.swing.text.StyledDocument

public class EditorHTMLDocument
extends javax.swing.text.html.HTMLDocument

EditorHTMLDocument gives simplified access to the internal document structure and its elements.

See Also:
Serialized Form

Nested Class Summary
 class EditorHTMLDocument.EditorHTMLReader
           
 class EditorHTMLDocument.ElementBuffer
           
 
Nested classes/interfaces inherited from class javax.swing.text.html.HTMLDocument
javax.swing.text.html.HTMLDocument.BlockElement, javax.swing.text.html.HTMLDocument.HTMLReader, javax.swing.text.html.HTMLDocument.Iterator, javax.swing.text.html.HTMLDocument.RunElement
 
Nested classes/interfaces inherited from class javax.swing.text.DefaultStyledDocument
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit, javax.swing.text.DefaultStyledDocument.ElementSpec, javax.swing.text.DefaultStyledDocument.SectionElement
 
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
 
Field Summary
 java.util.Vector externalStyles
           
static java.lang.Object realClassName
           
static java.lang.Object realIDName
           
 java.util.Vector selectedCells
           
static java.lang.Object sferyxInternalEmbeddedTagsCount
           
 
Fields inherited from class javax.swing.text.html.HTMLDocument
AdditionalComments
 
Fields inherited from class javax.swing.text.DefaultStyledDocument
buffer, BUFFER_SIZE_DEFAULT
 
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
EditorHTMLDocument()
          Creates a new instance of EditorHTMLDocument
EditorHTMLDocument(javax.swing.text.AbstractDocument.Content c, javax.swing.text.html.StyleSheet styles)
           
EditorHTMLDocument(javax.swing.text.html.StyleSheet styles)
           
 
Method Summary
 void addFixedBackgroundColorAttribute(int offset, int length, java.lang.Object attribute, java.lang.Object value)
           
 void addFixedBoldAttribute(int offset, int length, boolean value)
           
 void addFixedColorAttribute(int offset, int length, java.lang.Object attribute, java.lang.Object value)
           
 void addFixedFontFamilyAttribute(int offset, int length, java.lang.String fontFamily)
           
 void addFixedFontSizeAttribute(int offset, int length, int fontSize)
           
 void addFixedFontSizeAttribute(int offset, int length, java.lang.String fontSize)
           
 void addFixedFontStyleSizeAttribute(int offset, int length, int fontSize)
           
 void addFixedItalicAttribute(int offset, int length, boolean value)
           
 void addFixedStrikethroughAttribute(int offset, int length, boolean value)
           
 void addFixedSubscriptAttribute(int offset, int length, boolean value)
           
 void addFixedSuperscriptAttribute(int offset, int length, boolean value)
           
 void addFixedUnderlineAttribute(int offset, int length, boolean value)
           
 boolean checkNotDeletable(int offset, int length)
           
 javax.swing.text.Element clone(javax.swing.text.Element parent, javax.swing.text.Element clonee)
           
protected  void create(javax.swing.text.DefaultStyledDocument.ElementSpec[] data)
           
 javax.swing.text.Element createBranchElement(javax.swing.text.Element parent, javax.swing.text.AttributeSet a)
           
 javax.swing.text.Element createLeafElement(javax.swing.text.Element parent, javax.swing.text.AttributeSet a, int p0, int p1)
           
 void decreaseFixedFontSizeAttribute(int offset, int length, int fontSize)
           
 void disableImageCache()
           
 void fireChangedUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent changes)
           
 void fireInsertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent dde)
           
 void fireRemoveUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent dde)
           
 void fireUndoableEditUpdate(javax.swing.event.UndoableEditEvent e)
           
 javax.swing.text.Element getBodyElement()
          Gets the body element of the HTMLDocument.
 javax.swing.text.Element getCharacterElement(int pos)
           
 javax.swing.text.Element getCharsetElement()
           
 javax.swing.text.View getClickedFoldingView(int pos, int clickX, int clickY, javax.swing.JEditorPane comp)
           
 javax.swing.text.AbstractDocument.DefaultDocumentEvent getDefautDocumentEvent(int offset, int editLength, javax.swing.event.DocumentEvent.EventType eventType)
           
 javax.swing.text.AbstractDocument.DefaultDocumentEvent getDefautEvent(javax.swing.text.Element elem)
          Returns instance of the DefaultDocumentEvent which otherwise has protected package access.
 javax.swing.text.AbstractDocument.DefaultDocumentEvent getDefautInsertEvent(javax.swing.text.Element elem)
           
 javax.swing.text.AbstractDocument.DefaultDocumentEvent getDefautRemoveEvent(javax.swing.text.Element elem)
           
 javax.swing.text.Element getDivElement(int pos)
           
 javax.swing.text.AbstractDocument.Content getDocContent()
          Returns the document content.
 javax.swing.text.AbstractDocument.Content getDocumentContent()
           
 java.util.Dictionary getDocumentProperties()
          Fixes the bug into the default implementation when the title of the document is null.
 javax.swing.text.Element getElementOfType(javax.swing.text.html.HTML.Tag tag, int pos)
           
 javax.swing.text.Element getFormElement(int pos)
          Returns the form element at the given caret position.
 javax.swing.text.Element getHeadElement()
          Returns the HEAD element of the document.
 javax.swing.text.Element getHTMLParagraphElement(int pos)
           
 javax.swing.text.Element getImageElement(int pos)
           
 int getIndexForFontSize(int fontSize)
           
 javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction getNewBlockAction()
           
 javax.swing.text.Element getObjectElement(int pos)
           
 javax.swing.text.Element getOrderedListElement(int pos)
           
 javax.swing.text.Element getOrderedListItemElement(int pos)
           
 javax.swing.text.html.HTMLEditorKit.Parser getParser()
           
 javax.swing.text.Element getPreElement(int pos)
          Returns the pre element at the given caret position.
 javax.swing.text.html.HTMLEditorKit.ParserCallback getReader(int pos)
           
 javax.swing.text.html.HTMLEditorKit.ParserCallback getReader(int pos, int popDepth, int pushDepth, javax.swing.text.html.HTML.Tag insertTag)
           
 javax.swing.text.Element getTableCellElement(int pos)
          Returns the table cell element at the given caret position.
 javax.swing.text.Element getTableCellElementForTable(javax.swing.text.Element tableElement, int pos)
          Returns the table cell element at the given caret position for given table.
 javax.swing.text.Element getTableElement(int pos)
          Returns the table element at the given caret position.
 javax.swing.text.Element getTableForElement(javax.swing.text.Element element)
          Returns the table element under the given element.
 javax.swing.text.Element getTableRowElement(int pos)
          Returns the table row element at the given caret position.
 void getText(int offset, int length, javax.swing.text.Segment txt)
           
 javax.swing.text.Element[] getTitleElement()
           
 javax.swing.text.Element getTopListElement(int pos)
           
 javax.swing.text.Element getTopListItemElement(int pos)
           
 javax.swing.text.Element getUnorderedListElement(int pos)
           
 javax.swing.text.Element getUnorderedListItemElement(int pos)
           
 void increaseFixedFontSizeAttribute(int offset, int length, int fontSize)
           
 void insert(int offset, javax.swing.text.DefaultStyledDocument.ElementSpec[] data)
           
 void insertAfterEndForCustomTag(javax.swing.text.Element elem, java.lang.String htmlText)
           
 void insertAfterEndForPaste(javax.swing.text.Element elem, java.lang.String htmlText)
           
 void insertAfterStartForCustomTag(javax.swing.text.Element elem, java.lang.String htmlText)
           
 void insertBeforeEndForCustomTag(javax.swing.text.Element elem, java.lang.String htmlText)
           
 void insertBeforeStartForCustomTag(javax.swing.text.Element elem, java.lang.String htmlText)
           
 void insertHTMLAtPosition(java.lang.String html, int offset)
          Inserts string of HTML at the given position.
 void insertHTMLForPaste(javax.swing.text.Element parent, int offset, java.lang.String html, boolean wantsTrailingNewline)
           
 void insertHTMLInternally(javax.swing.text.Element parent, int offset, java.lang.String html, boolean wantsTrailingNewline, boolean outside)
           
 sferyx.administration.renderers.EditorHTMLDocument.CustomMap insertNewMap()
           
 void insertString(int offset, java.lang.String str, javax.swing.text.AttributeSet a)
           
 void insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent e, javax.swing.text.AttributeSet a)
           
 boolean isLeftToRightDoc(int p0, int p1)
           
 void lock()
          Lock the document for thread safe editing.
 boolean matchNameAttribute(javax.swing.text.Element elem, javax.swing.text.html.HTML.Tag tag)
          Returns if the given element has the name attribute equal to the given tag.
 boolean matchReadOnlyAttribute(javax.swing.text.Element elem, java.lang.String value)
           
 void postRemoveUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent dde)
           
 java.lang.String printAttributeSet(javax.swing.text.MutableAttributeSet as)
           
 void read_lock()
          Lock the document for thread safe editing.
 void read_unlock()
          Lock the document for thread safe editing.
 void remove(int offset, int length)
           
 void removeAnchorAttribute(int offset, int length)
           
 void removeAttributeFromElements(int offset, int length, java.lang.Object attribute)
           
 void removeFontAttribute(int offset, int length)
           
 void removeFontSizeAttribute(int offset, int length)
           
 void removeFormatting(int offset, int length)
           
 void removeSelectedTableCells()
           
 void resetFixedBackgroundColorAttribute(int offset, int length)
           
 void resetFixedBoldAttribute(int offset, int length)
           
 void resetFixedColorAttribute(int offset, int length)
           
 void setElementAttributes(javax.swing.text.Element elem, javax.swing.text.AttributeSet s, boolean replace)
          Sets the element's attributes.
 void setElementEditabilityEvaluator(ElementEditabilityEvaluator eee)
           
 void setInnerHTMLForCustomTag(javax.swing.text.Element elem, java.lang.String htmlText)
           
 void setOuterHTMLForCustomTag(javax.swing.text.Element elem, java.lang.String htmlText)
           
 void setReplaceClassesWithStyles(java.util.Hashtable styleDefinitions)
           
 void setTokenThreshold1(int tokenThreshold)
           
 void unlock()
          Unlocks the document from thread safe editing.
protected  void verifyParser()
           
 javax.swing.text.Element verifyReadonlySectionElement(int pos, java.lang.String readonly)
           
 
Methods inherited from class javax.swing.text.html.HTMLDocument
createDefaultRoot, fireChangedUpdate, getBase, getElement, getElement, getIterator, getPreservesUnknownTags, getStyleSheet, getTokenThreshold, insertAfterEnd, insertAfterStart, insertBeforeEnd, insertBeforeStart, processHTMLFrameHyperlinkEvent, setBase, setInnerHTML, setOuterHTML, setParagraphAttributes, setParser, setPreservesUnknownTags, setTokenThreshold
 
Methods inherited from class javax.swing.text.DefaultStyledDocument
addDocumentListener, addStyle, getBackground, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, removeDocumentListener, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, styleChanged
 
Methods inherited from class javax.swing.text.AbstractDocument
addUndoableEditListener, createPosition, dump, fireInsertUpdate, fireRemoveUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getUndoableEditListeners, putProperty, readLock, readUnlock, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.text.Document
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, putProperty, removeUndoableEditListener, render
 

Field Detail

realClassName

public static final java.lang.Object realClassName

realIDName

public static final java.lang.Object realIDName

selectedCells

public java.util.Vector selectedCells

externalStyles

public java.util.Vector externalStyles

sferyxInternalEmbeddedTagsCount

public static final java.lang.Object sferyxInternalEmbeddedTagsCount
Constructor Detail

EditorHTMLDocument

public EditorHTMLDocument()
Creates a new instance of EditorHTMLDocument


EditorHTMLDocument

public EditorHTMLDocument(javax.swing.text.AbstractDocument.Content c,
                          javax.swing.text.html.StyleSheet styles)

EditorHTMLDocument

public EditorHTMLDocument(javax.swing.text.html.StyleSheet styles)
Method Detail

isLeftToRightDoc

public boolean isLeftToRightDoc(int p0,
                                int p1)

disableImageCache

public void disableImageCache()

createBranchElement

public javax.swing.text.Element createBranchElement(javax.swing.text.Element parent,
                                                    javax.swing.text.AttributeSet a)
Overrides:
createBranchElement in class javax.swing.text.html.HTMLDocument

insertString

public void insertString(int offset,
                         java.lang.String str,
                         javax.swing.text.AttributeSet a)
                  throws javax.swing.text.BadLocationException
Specified by:
insertString in interface javax.swing.text.Document
Overrides:
insertString in class javax.swing.text.AbstractDocument
Throws:
javax.swing.text.BadLocationException

insert

public void insert(int offset,
                   javax.swing.text.DefaultStyledDocument.ElementSpec[] data)
            throws javax.swing.text.BadLocationException
Overrides:
insert in class javax.swing.text.html.HTMLDocument
Throws:
javax.swing.text.BadLocationException

setReplaceClassesWithStyles

public void setReplaceClassesWithStyles(java.util.Hashtable styleDefinitions)

insertNewMap

public sferyx.administration.renderers.EditorHTMLDocument.CustomMap insertNewMap()

getReader

public javax.swing.text.html.HTMLEditorKit.ParserCallback getReader(int pos)
Overrides:
getReader in class javax.swing.text.html.HTMLDocument

getReader

public javax.swing.text.html.HTMLEditorKit.ParserCallback getReader(int pos,
                                                                    int popDepth,
                                                                    int pushDepth,
                                                                    javax.swing.text.html.HTML.Tag insertTag)
Overrides:
getReader in class javax.swing.text.html.HTMLDocument

getDefautInsertEvent

public javax.swing.text.AbstractDocument.DefaultDocumentEvent getDefautInsertEvent(javax.swing.text.Element elem)

getDefautRemoveEvent

public javax.swing.text.AbstractDocument.DefaultDocumentEvent getDefautRemoveEvent(javax.swing.text.Element elem)

getDefautDocumentEvent

public javax.swing.text.AbstractDocument.DefaultDocumentEvent getDefautDocumentEvent(int offset,
                                                                                     int editLength,
                                                                                     javax.swing.event.DocumentEvent.EventType eventType)

fireInsertUpdate

public void fireInsertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent dde)

fireRemoveUpdate

public void fireRemoveUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent dde)

postRemoveUpdate

public void postRemoveUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent dde)
Overrides:
postRemoveUpdate in class javax.swing.text.AbstractDocument

getDefautEvent

public javax.swing.text.AbstractDocument.DefaultDocumentEvent getDefautEvent(javax.swing.text.Element elem)
Returns instance of the DefaultDocumentEvent which otherwise has protected package access. It could be used for undo/redo operations.


fireUndoableEditUpdate

public void fireUndoableEditUpdate(javax.swing.event.UndoableEditEvent e)
Overrides:
fireUndoableEditUpdate in class javax.swing.text.html.HTMLDocument

fireChangedUpdate

public void fireChangedUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent changes)

getCharacterElement

public javax.swing.text.Element getCharacterElement(int pos)
Specified by:
getCharacterElement in interface javax.swing.text.StyledDocument
Overrides:
getCharacterElement in class javax.swing.text.DefaultStyledDocument

getNewBlockAction

public javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction getNewBlockAction()

getParser

public javax.swing.text.html.HTMLEditorKit.Parser getParser()
Overrides:
getParser in class javax.swing.text.html.HTMLDocument

getBodyElement

public javax.swing.text.Element getBodyElement()
Gets the body element of the HTMLDocument. Returns null if not presented.


getHeadElement

public javax.swing.text.Element getHeadElement()
Returns the HEAD element of the document. Returns null if not presented.


getCharsetElement

public javax.swing.text.Element getCharsetElement()

getTitleElement

public javax.swing.text.Element[] getTitleElement()

create

protected void create(javax.swing.text.DefaultStyledDocument.ElementSpec[] data)
Overrides:
create in class javax.swing.text.html.HTMLDocument

getDocContent

public javax.swing.text.AbstractDocument.Content getDocContent()
Returns the document content.


setElementEditabilityEvaluator

public void setElementEditabilityEvaluator(ElementEditabilityEvaluator eee)

setTokenThreshold1

public void setTokenThreshold1(int tokenThreshold)

setElementAttributes

public void setElementAttributes(javax.swing.text.Element elem,
                                 javax.swing.text.AttributeSet s,
                                 boolean replace)
Sets the element's attributes.


removeAttributeFromElements

public void removeAttributeFromElements(int offset,
                                        int length,
                                        java.lang.Object attribute)

addFixedFontFamilyAttribute

public void addFixedFontFamilyAttribute(int offset,
                                        int length,
                                        java.lang.String fontFamily)

addFixedFontStyleSizeAttribute

public void addFixedFontStyleSizeAttribute(int offset,
                                           int length,
                                           int fontSize)

addFixedFontSizeAttribute

public void addFixedFontSizeAttribute(int offset,
                                      int length,
                                      java.lang.String fontSize)

increaseFixedFontSizeAttribute

public void increaseFixedFontSizeAttribute(int offset,
                                           int length,
                                           int fontSize)

decreaseFixedFontSizeAttribute

public void decreaseFixedFontSizeAttribute(int offset,
                                           int length,
                                           int fontSize)

addFixedFontSizeAttribute

public void addFixedFontSizeAttribute(int offset,
                                      int length,
                                      int fontSize)

printAttributeSet

public java.lang.String printAttributeSet(javax.swing.text.MutableAttributeSet as)

getIndexForFontSize

public int getIndexForFontSize(int fontSize)

addFixedColorAttribute

public void addFixedColorAttribute(int offset,
                                   int length,
                                   java.lang.Object attribute,
                                   java.lang.Object value)

resetFixedBoldAttribute

public void resetFixedBoldAttribute(int offset,
                                    int length)

resetFixedColorAttribute

public void resetFixedColorAttribute(int offset,
                                     int length)

resetFixedBackgroundColorAttribute

public void resetFixedBackgroundColorAttribute(int offset,
                                               int length)

addFixedBackgroundColorAttribute

public void addFixedBackgroundColorAttribute(int offset,
                                             int length,
                                             java.lang.Object attribute,
                                             java.lang.Object value)

addFixedUnderlineAttribute

public void addFixedUnderlineAttribute(int offset,
                                       int length,
                                       boolean value)

addFixedStrikethroughAttribute

public void addFixedStrikethroughAttribute(int offset,
                                           int length,
                                           boolean value)

addFixedSuperscriptAttribute

public void addFixedSuperscriptAttribute(int offset,
                                         int length,
                                         boolean value)

addFixedSubscriptAttribute

public void addFixedSubscriptAttribute(int offset,
                                       int length,
                                       boolean value)

removeFontSizeAttribute

public void removeFontSizeAttribute(int offset,
                                    int length)

removeFontAttribute

public void removeFontAttribute(int offset,
                                int length)

removeFormatting

public void removeFormatting(int offset,
                             int length)

removeAnchorAttribute

public void removeAnchorAttribute(int offset,
                                  int length)

addFixedBoldAttribute

public void addFixedBoldAttribute(int offset,
                                  int length,
                                  boolean value)

addFixedItalicAttribute

public void addFixedItalicAttribute(int offset,
                                    int length,
                                    boolean value)

getDocumentProperties

public java.util.Dictionary getDocumentProperties()
Fixes the bug into the default implementation when the title of the document is null.

Overrides:
getDocumentProperties in class javax.swing.text.AbstractDocument

checkNotDeletable

public boolean checkNotDeletable(int offset,
                                 int length)

verifyReadonlySectionElement

public javax.swing.text.Element verifyReadonlySectionElement(int pos,
                                                             java.lang.String readonly)

matchReadOnlyAttribute

public boolean matchReadOnlyAttribute(javax.swing.text.Element elem,
                                      java.lang.String value)

getTableCellElementForTable

public javax.swing.text.Element getTableCellElementForTable(javax.swing.text.Element tableElement,
                                                            int pos)
Returns the table cell element at the given caret position for given table. It is useful for nested tables. Returns null if there is no table at this location or the given table element is null.


getTableForElement

public javax.swing.text.Element getTableForElement(javax.swing.text.Element element)
Returns the table element under the given element. Returns null if there is no table at this location.


getTableCellElement

public javax.swing.text.Element getTableCellElement(int pos)
Returns the table cell element at the given caret position. Returns null if there is no table at this location.


getTableRowElement

public javax.swing.text.Element getTableRowElement(int pos)
Returns the table row element at the given caret position. Returns null if there is no table at this location.


getClickedFoldingView

public javax.swing.text.View getClickedFoldingView(int pos,
                                                   int clickX,
                                                   int clickY,
                                                   javax.swing.JEditorPane comp)

getDivElement

public javax.swing.text.Element getDivElement(int pos)

getTableElement

public javax.swing.text.Element getTableElement(int pos)
Returns the table element at the given caret position. Returns null if there is no table at this location.


getImageElement

public javax.swing.text.Element getImageElement(int pos)

getObjectElement

public javax.swing.text.Element getObjectElement(int pos)

getHTMLParagraphElement

public javax.swing.text.Element getHTMLParagraphElement(int pos)

getPreElement

public javax.swing.text.Element getPreElement(int pos)
Returns the pre element at the given caret position. Returns null otherwise.


getFormElement

public javax.swing.text.Element getFormElement(int pos)
Returns the form element at the given caret position. Returns null otherwise.


getTopListItemElement

public javax.swing.text.Element getTopListItemElement(int pos)

getTopListElement

public javax.swing.text.Element getTopListElement(int pos)

getElementOfType

public javax.swing.text.Element getElementOfType(javax.swing.text.html.HTML.Tag tag,
                                                 int pos)

getUnorderedListElement

public javax.swing.text.Element getUnorderedListElement(int pos)

getOrderedListElement

public javax.swing.text.Element getOrderedListElement(int pos)

getOrderedListItemElement

public javax.swing.text.Element getOrderedListItemElement(int pos)

getUnorderedListItemElement

public javax.swing.text.Element getUnorderedListItemElement(int pos)

matchNameAttribute

public boolean matchNameAttribute(javax.swing.text.Element elem,
                                  javax.swing.text.html.HTML.Tag tag)
Returns if the given element has the name attribute equal to the given tag.


createLeafElement

public javax.swing.text.Element createLeafElement(javax.swing.text.Element parent,
                                                  javax.swing.text.AttributeSet a,
                                                  int p0,
                                                  int p1)
Overrides:
createLeafElement in class javax.swing.text.html.HTMLDocument

insertHTMLAtPosition

public void insertHTMLAtPosition(java.lang.String html,
                                 int offset)
                          throws javax.swing.text.BadLocationException,
                                 java.io.IOException
Inserts string of HTML at the given position.

Throws:
javax.swing.text.BadLocationException
java.io.IOException

insertAfterEndForPaste

public void insertAfterEndForPaste(javax.swing.text.Element elem,
                                   java.lang.String htmlText)
                            throws javax.swing.text.BadLocationException,
                                   java.io.IOException
Throws:
javax.swing.text.BadLocationException
java.io.IOException

insertHTMLForPaste

public void insertHTMLForPaste(javax.swing.text.Element parent,
                               int offset,
                               java.lang.String html,
                               boolean wantsTrailingNewline)
                        throws javax.swing.text.BadLocationException,
                               java.io.IOException
Throws:
javax.swing.text.BadLocationException
java.io.IOException

verifyParser

protected void verifyParser()

insertAfterEndForCustomTag

public void insertAfterEndForCustomTag(javax.swing.text.Element elem,
                                       java.lang.String htmlText)
                                throws javax.swing.text.BadLocationException,
                                       java.io.IOException
Throws:
javax.swing.text.BadLocationException
java.io.IOException

insertBeforeEndForCustomTag

public void insertBeforeEndForCustomTag(javax.swing.text.Element elem,
                                        java.lang.String htmlText)
                                 throws javax.swing.text.BadLocationException,
                                        java.io.IOException
Throws:
javax.swing.text.BadLocationException
java.io.IOException

setOuterHTMLForCustomTag

public void setOuterHTMLForCustomTag(javax.swing.text.Element elem,
                                     java.lang.String htmlText)
                              throws javax.swing.text.BadLocationException,
                                     java.io.IOException
Throws:
javax.swing.text.BadLocationException
java.io.IOException

setInnerHTMLForCustomTag

public void setInnerHTMLForCustomTag(javax.swing.text.Element elem,
                                     java.lang.String htmlText)
                              throws javax.swing.text.BadLocationException,
                                     java.io.IOException
Throws:
javax.swing.text.BadLocationException
java.io.IOException

insertBeforeStartForCustomTag

public void insertBeforeStartForCustomTag(javax.swing.text.Element elem,
                                          java.lang.String htmlText)
                                   throws javax.swing.text.BadLocationException,
                                          java.io.IOException
Throws:
javax.swing.text.BadLocationException
java.io.IOException

insertAfterStartForCustomTag

public void insertAfterStartForCustomTag(javax.swing.text.Element elem,
                                         java.lang.String htmlText)
                                  throws javax.swing.text.BadLocationException,
                                         java.io.IOException
Throws:
javax.swing.text.BadLocationException
java.io.IOException

insertHTMLInternally

public void insertHTMLInternally(javax.swing.text.Element parent,
                                 int offset,
                                 java.lang.String html,
                                 boolean wantsTrailingNewline,
                                 boolean outside)
                          throws javax.swing.text.BadLocationException,
                                 java.io.IOException
Throws:
javax.swing.text.BadLocationException
java.io.IOException

getDocumentContent

public javax.swing.text.AbstractDocument.Content getDocumentContent()

insertUpdate

public void insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent e,
                         javax.swing.text.AttributeSet a)
Overrides:
insertUpdate in class javax.swing.text.html.HTMLDocument

remove

public void remove(int offset,
                   int length)
            throws javax.swing.text.BadLocationException
Specified by:
remove in interface javax.swing.text.Document
Overrides:
remove in class javax.swing.text.AbstractDocument
Throws:
javax.swing.text.BadLocationException

removeSelectedTableCells

public void removeSelectedTableCells()

read_lock

public void read_lock()
Lock the document for thread safe editing.


read_unlock

public void read_unlock()
Lock the document for thread safe editing.


lock

public void lock()
Lock the document for thread safe editing.


unlock

public void unlock()
Unlocks the document from thread safe editing.


getText

public void getText(int offset,
                    int length,
                    javax.swing.text.Segment txt)
Specified by:
getText in interface javax.swing.text.Document
Overrides:
getText in class javax.swing.text.AbstractDocument

clone

public javax.swing.text.Element clone(javax.swing.text.Element parent,
                                      javax.swing.text.Element clonee)