org.sourcejammer.client.gui.vdiff
Class HunkPadVisitor

java.lang.Object
  |
  +--JLibDiff.HunkVisitor
        |
        +--org.sourcejammer.client.gui.vdiff.HunkPadVisitor

public class HunkPadVisitor
extends JLibDiff.HunkVisitor

Author:
rmacgrogan

Field Summary
private  int linesAddedToNew
           
private  int linesAddedToOld
           
private  javax.swing.JTextArea newTextArea
           
private  javax.swing.JTextArea oldTextArea
           
 
Constructor Summary
HunkPadVisitor(javax.swing.JTextArea oldTextArea, javax.swing.JTextArea newTextArea)
           
 
Method Summary
private  void addLinesToTextArea(int numLines, int addLineAfterIndex, javax.swing.JTextArea area)
           
private  void balanceViews(JLibDiff.Hunk hunk)
           
private  int getOffsetSOL(int linenumber, java.lang.String buffer)
           
private  java.lang.String insertString(java.lang.String target, java.lang.String insert, int index)
           
 void visitHunkAdd(JLibDiff.HunkAdd hunk)
           
 void visitHunkChange(JLibDiff.HunkChange hunk)
           
 void visitHunkDel(JLibDiff.HunkDel hunk)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oldTextArea

private javax.swing.JTextArea oldTextArea

newTextArea

private javax.swing.JTextArea newTextArea

linesAddedToNew

private int linesAddedToNew

linesAddedToOld

private int linesAddedToOld
Constructor Detail

HunkPadVisitor

public HunkPadVisitor(javax.swing.JTextArea oldTextArea,
                      javax.swing.JTextArea newTextArea)
Method Detail

visitHunkAdd

public void visitHunkAdd(JLibDiff.HunkAdd hunk)
Overrides:
visitHunkAdd in class JLibDiff.HunkVisitor

visitHunkChange

public void visitHunkChange(JLibDiff.HunkChange hunk)
Overrides:
visitHunkChange in class JLibDiff.HunkVisitor

visitHunkDel

public void visitHunkDel(JLibDiff.HunkDel hunk)
Overrides:
visitHunkDel in class JLibDiff.HunkVisitor

balanceViews

private void balanceViews(JLibDiff.Hunk hunk)

addLinesToTextArea

private void addLinesToTextArea(int numLines,
                                int addLineAfterIndex,
                                javax.swing.JTextArea area)

insertString

private java.lang.String insertString(java.lang.String target,
                                      java.lang.String insert,
                                      int index)

getOffsetSOL

private int getOffsetSOL(int linenumber,
                         java.lang.String buffer)


Copyright 2003 Soucejammer project.