com.lightdev.app.shtm
Class HTMLText

java.lang.Object
  extended by com.lightdev.app.shtm.HTMLText

public class HTMLText
extends java.lang.Object

A class to represent a portion of HTML text.

In stage 9 copy and paste have been refined to correct bugs that occurred when cut and paste was happening in nested paragraph elements


Constructor Summary
HTMLText()
          construct a new empty HTMLText object
 
Method Summary
 void copyHTML(SHTMLEditorPane src, int start, int length)
          copy an HTML string representation of a content portion from the given editor pane.
 void pasteHTML(javax.swing.text.Document doc, int pos)
          insert this HTMLText into a Document.
 java.lang.String toString()
          get a String containing all chunks of text contained in this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTMLText

public HTMLText()
construct a new empty HTMLText object

Method Detail

copyHTML

public void copyHTML(SHTMLEditorPane src,
                     int start,
                     int length)
              throws javax.swing.text.BadLocationException,
                     java.io.IOException
copy an HTML string representation of a content portion from the given editor pane.

Parameters:
src - the SHTMLEditorPane to copy from
start - the position to start copying at
length - the length of the content portion to copy
Throws:
javax.swing.text.BadLocationException
java.io.IOException
See Also:
SHTMLEditorPane

pasteHTML

public void pasteHTML(javax.swing.text.Document doc,
                      int pos)
               throws javax.swing.text.BadLocationException,
                      java.io.IOException
insert this HTMLText into a Document.

Parameters:
doc - the document to insert into
pos - the text position to insert at
Throws:
javax.swing.text.BadLocationException
java.io.IOException

toString

public java.lang.String toString()
get a String containing all chunks of text contained in this object

Overrides:
toString in class java.lang.Object
Returns:
string of all chunks in this object