com.alkacon.diff
Class HtmlDiffOutput

java.lang.Object
  extended by com.alkacon.diff.HtmlDiffOutput
All Implemented Interfaces:
I_DiffOutput

public class HtmlDiffOutput
extends java.lang.Object
implements I_DiffOutput

Outputs the diff result as HTML elements to a SAX ContentHandler.


Constructor Summary
HtmlDiffOutput(org.xml.sax.ContentHandler handler, I_HtmlDiffConfiguration config)
          Creates a new HTML Diff output based on the given XML content handler.
 
Method Summary
 void addChangedText(java.lang.String text)
          Adds some changed text to this output.
 void addUnchangedText(java.lang.String text)
          Adds some unchanged text to this output.
 void endLine()
          Ends the current output line.
 void skippedLines(int linesSkipped)
          Adds an indicator that some lines have been skipped.
 void startLine(DiffLineType type)
          Starts a new line of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlDiffOutput

public HtmlDiffOutput(org.xml.sax.ContentHandler handler,
                      I_HtmlDiffConfiguration config)
Creates a new HTML Diff output based on the given XML content handler.

Parameters:
handler - the content handler to use
config - the configuration to use
Method Detail

addChangedText

public void addChangedText(java.lang.String text)
                    throws java.lang.Exception
Description copied from interface: I_DiffOutput
Adds some changed text to this output.

Specified by:
addChangedText in interface I_DiffOutput
Parameters:
text - the changed text to add
Throws:
java.lang.Exception - in case something goes wrong
See Also:
I_DiffOutput.addChangedText(java.lang.String)

addUnchangedText

public void addUnchangedText(java.lang.String text)
                      throws java.lang.Exception
Description copied from interface: I_DiffOutput
Adds some unchanged text to this output.

Specified by:
addUnchangedText in interface I_DiffOutput
Parameters:
text - the unchanged text to add
Throws:
java.lang.Exception - in case something goes wrong
See Also:
I_DiffOutput.addUnchangedText(java.lang.String)

endLine

public void endLine()
             throws java.lang.Exception
Description copied from interface: I_DiffOutput
Ends the current output line.

Specified by:
endLine in interface I_DiffOutput
Throws:
java.lang.Exception - in case something goes wrong
See Also:
I_DiffOutput.endLine()

skippedLines

public void skippedLines(int linesSkipped)
                  throws java.lang.Exception
Description copied from interface: I_DiffOutput
Adds an indicator that some lines have been skipped.

Specified by:
skippedLines in interface I_DiffOutput
Parameters:
linesSkipped - the number of skipped lines
Throws:
java.lang.Exception - in case something goes wrong
See Also:
I_DiffOutput.skippedLines(int)

startLine

public void startLine(DiffLineType type)
               throws java.lang.Exception
Description copied from interface: I_DiffOutput
Starts a new line of the given type.

Specified by:
startLine in interface I_DiffOutput
Parameters:
type - the type of line to add
Throws:
java.lang.Exception - in case something goes wrong
See Also:
I_DiffOutput.startLine(com.alkacon.diff.DiffLineType)


Copyright © 2005-2011. All Rights Reserved.