com.alkacon.diff
Class HtmlDiffConfiguration

java.lang.Object
  extended by com.alkacon.diff.HtmlDiffConfiguration
All Implemented Interfaces:
I_DiffConfiguration, I_HtmlDiffConfiguration

public class HtmlDiffConfiguration
extends java.lang.Object
implements I_HtmlDiffConfiguration

Default Html Diff operation configuration class.


Constructor Summary
HtmlDiffConfiguration(I_DiffConfiguration baseConf)
          Creates a new configuration object.
 
Method Summary
 java.lang.String getDivStyleName(DiffLineType type)
          Returns the style name to format a whole line.
 int getLinesBeforeSkip()
          Returns the number of lines to show before skipping.
 java.lang.String getMessageEqualLinesSkipped(int lines)
          Returns a localized message like '({0} equal lines skipped)'.
 java.lang.String getSpanStyleName(DiffLineType type)
          Returns the style name to format a block in a line.
 void setDivStyleNames(java.lang.String unchanged, java.lang.String added, java.lang.String removed, java.lang.String skipped)
          Sets all div style names.
 void setSpanStyleNames(java.lang.String unchanged, java.lang.String added, java.lang.String removed)
          Sets all span style names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlDiffConfiguration

public HtmlDiffConfiguration(I_DiffConfiguration baseConf)
Creates a new configuration object.

Parameters:
baseConf - base configuration
Method Detail

getDivStyleName

public java.lang.String getDivStyleName(DiffLineType type)
Description copied from interface: I_HtmlDiffConfiguration
Returns the style name to format a whole line.

Specified by:
getDivStyleName in interface I_HtmlDiffConfiguration
Parameters:
type - the line type, can be any DiffLineType
Returns:
the style name for the given line type
See Also:
I_HtmlDiffConfiguration.getDivStyleName(com.alkacon.diff.DiffLineType)

getLinesBeforeSkip

public int getLinesBeforeSkip()
Description copied from interface: I_DiffConfiguration
Returns the number of lines to show before skipping.

Use -1 to show all lines.

Specified by:
getLinesBeforeSkip in interface I_DiffConfiguration
Returns:
the number of lines to show before skipping
See Also:
I_DiffConfiguration.getLinesBeforeSkip()

getMessageEqualLinesSkipped

public java.lang.String getMessageEqualLinesSkipped(int lines)
Description copied from interface: I_DiffConfiguration
Returns a localized message like '({0} equal lines skipped)'.

Specified by:
getMessageEqualLinesSkipped in interface I_DiffConfiguration
Parameters:
lines - the number of skipped lines
Returns:
a localized message
See Also:
I_DiffConfiguration.getMessageEqualLinesSkipped(int)

getSpanStyleName

public java.lang.String getSpanStyleName(DiffLineType type)
Description copied from interface: I_HtmlDiffConfiguration
Returns the style name to format a block in a line.

Specified by:
getSpanStyleName in interface I_HtmlDiffConfiguration
Parameters:
type - the line type, can not be DiffLineType.SKIPPED
Returns:
the style name for the given line type
See Also:
I_HtmlDiffConfiguration.getSpanStyleName(com.alkacon.diff.DiffLineType)

setDivStyleNames

public void setDivStyleNames(java.lang.String unchanged,
                             java.lang.String added,
                             java.lang.String removed,
                             java.lang.String skipped)
Sets all div style names.

Parameters:
unchanged - style for unchanged lines
added - style for added lines
removed - style for removed lines
skipped - style for skipped lines

setSpanStyleNames

public void setSpanStyleNames(java.lang.String unchanged,
                              java.lang.String added,
                              java.lang.String removed)
Sets all span style names.

Parameters:
unchanged - style for unchanged text
added - style for added text
removed - style for removed text


Copyright © 2005-2011. All Rights Reserved.