Ontimize 5.2072EN

com.ontimize.util.rtf.style
Class RTFDocument

java.lang.Object
  extended byjavax.swing.text.AbstractDocument
      extended byjavax.swing.text.DefaultStyledDocument
          extended bycom.ontimize.util.rtf.style.RTFDocument
All Implemented Interfaces:
javax.swing.text.Document, java.io.Serializable, javax.swing.text.StyledDocument

public class RTFDocument
extends javax.swing.text.DefaultStyledDocument

See Also:
Serialized Form

Nested Class Summary
 class RTFDocument.CellElement
           
 class RTFDocument.RowElement
           
 class RTFDocument.TableElement
           
 
Nested classes inherited from class javax.swing.text.DefaultStyledDocument
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit, javax.swing.text.DefaultStyledDocument.ElementBuffer, javax.swing.text.DefaultStyledDocument.ElementSpec, javax.swing.text.DefaultStyledDocument.SectionElement
 
Nested classes 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
 int DOCUMENT_WIDTH
           
 boolean isSplitted
           
 
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
RTFDocument()
           
RTFDocument(javax.swing.text.AbstractDocument.Content c, javax.swing.text.StyleContext styles)
           
RTFDocument(javax.swing.text.StyleContext styles)
           
 
Method Summary
protected  javax.swing.text.Element createBranchElement(javax.swing.text.Element parent, javax.swing.text.AttributeSet a)
           
protected  javax.swing.text.Element createLeafElement(javax.swing.text.Element parent, javax.swing.text.AttributeSet a, int p0, int p1)
           
 void deleteColumn(int offset)
           
 void deleteLastParagraph(RTFDocument.CellElement cell)
           
 void deleteRow(int offset)
           
 void deleteTable(int offset)
           
 javax.swing.text.Element getCell(int offset)
           
 java.awt.Insets getDocumentMargins()
           
 java.util.Vector getInnerTableList(int startOffset, int endOffset)
           
 javax.swing.text.Element getParagraph(int offset)
           
 javax.swing.text.Element getRow(int offset)
           
 javax.swing.text.Element getTable(int offset)
           
 void insertColumn(int offset, int colWidth, boolean insertBefore)
           
 void insertPicture(javax.swing.ImageIcon icon, int pos)
           
 void insertRow(int offset, boolean insertAbove)
           
 void insertString(int offs, java.lang.String str, javax.swing.text.AttributeSet a)
           
 javax.swing.text.Element insertTable(int offset, int rowCount, int colCount, javax.swing.text.AttributeSet attr, int[] colWidths, int[] rowHeights)
           
 void refresh()
           
 void remove(int offset, int length)
           
 void setDocumentMargins(java.awt.Insets margins)
           
 void setParagraphAttributes(int offset, int length, javax.swing.text.AttributeSet attrs, boolean replace)
           
 
Methods inherited from class javax.swing.text.DefaultStyledDocument
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, insertUpdate, removeDocumentListener, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, styleChanged
 
Methods inherited from class javax.swing.text.AbstractDocument
addUndoableEditListener, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, 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, getText, putProperty, removeUndoableEditListener, render
 

Field Detail

DOCUMENT_WIDTH

public int DOCUMENT_WIDTH

isSplitted

public boolean isSplitted
Constructor Detail

RTFDocument

public RTFDocument(javax.swing.text.AbstractDocument.Content c,
                   javax.swing.text.StyleContext styles)

RTFDocument

public RTFDocument(javax.swing.text.StyleContext styles)

RTFDocument

public RTFDocument()
Method Detail

insertString

public void insertString(int offs,
                         java.lang.String str,
                         javax.swing.text.AttributeSet a)
                  throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

createLeafElement

protected javax.swing.text.Element createLeafElement(javax.swing.text.Element parent,
                                                     javax.swing.text.AttributeSet a,
                                                     int p0,
                                                     int p1)

createBranchElement

protected javax.swing.text.Element createBranchElement(javax.swing.text.Element parent,
                                                       javax.swing.text.AttributeSet a)

insertTable

public javax.swing.text.Element insertTable(int offset,
                                            int rowCount,
                                            int colCount,
                                            javax.swing.text.AttributeSet attr,
                                            int[] colWidths,
                                            int[] rowHeights)

insertPicture

public void insertPicture(javax.swing.ImageIcon icon,
                          int pos)

deleteTable

public void deleteTable(int offset)

deleteRow

public void deleteRow(int offset)

deleteColumn

public void deleteColumn(int offset)

insertRow

public void insertRow(int offset,
                      boolean insertAbove)

insertColumn

public void insertColumn(int offset,
                         int colWidth,
                         boolean insertBefore)

setDocumentMargins

public void setDocumentMargins(java.awt.Insets margins)

getDocumentMargins

public java.awt.Insets getDocumentMargins()

remove

public void remove(int offset,
                   int length)
            throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

getCell

public javax.swing.text.Element getCell(int offset)

getRow

public javax.swing.text.Element getRow(int offset)

getParagraph

public javax.swing.text.Element getParagraph(int offset)

getInnerTableList

public java.util.Vector getInnerTableList(int startOffset,
                                          int endOffset)

deleteLastParagraph

public void deleteLastParagraph(RTFDocument.CellElement cell)

getTable

public javax.swing.text.Element getTable(int offset)

setParagraphAttributes

public void setParagraphAttributes(int offset,
                                   int length,
                                   javax.swing.text.AttributeSet attrs,
                                   boolean replace)

refresh

public void refresh()

Ontimize