public class HtmlDiffOutputGenerator extends Object implements IStringOutputGenerator, IFileOutputGenerator
Represents a class for generating html representation of texts differences. Deleted line breaks are indicated by - paragraph mark.
| Constructor and Description |
|---|
HtmlDiffOutputGenerator()
Creates an instance of
HtmlDiffOutputGenerator class. |
HtmlDiffOutputGenerator(OutputTextStyle textStyle)
Creates an instance of
HtmlDiffOutputGenerator class. |
| Modifier and Type | Method and Description |
|---|---|
String |
generateOutput(List<List<DiffOperation>> diffrences)
Generates the output based on the differences between texts and saves it to a file.
|
void |
generateOutput(List<List<DiffOperation>> diffrences,
String targetFilePath)
Generates the output based on the differences between texts and saves it to a file.
|
String |
generateOutput1(List<DiffOperation> diffrences)
Generates the output based on the differences between texts and saves it to a file.
|
void |
generateOutput1(List<DiffOperation> diffrences,
String targetFilePath)
Generates the output based on the differences between texts and saves it to a file.
|
String |
generateOutputInternal(com.aspose.ms.System.Collections.Generic.List<com.aspose.ms.System.Collections.Generic.List<DiffOperation>> diffrences) |
void |
generateOutputInternal(com.aspose.ms.System.Collections.Generic.List<com.aspose.ms.System.Collections.Generic.List<DiffOperation>> diffrences,
String targetFilePath) |
String |
generateOutputInternal1(com.aspose.ms.System.Collections.Generic.List<DiffOperation> diffrences)
Internal method
|
void |
generateOutputInternal1(com.aspose.ms.System.Collections.Generic.List<DiffOperation> diffrences,
String targetFilePath) |
String |
getDeleteStyle()
Gets and sets the CSS-style string for Delete operation.
|
String |
getEqualStyle()
Gets and sets the CSS-style string for Equal operation.
|
String |
getInsertStyle()
Gets and sets the CSS-style string for Insert operation.
|
boolean |
getStrikethroughDeleted()
Get or set text-decoration: line-through style for the delete operation.
|
void |
setDeleteStyle(String value)
Gets and sets the CSS-style string for Delete operation.
|
void |
setEqualStyle(String value)
Gets and sets the CSS-style string for Equal operation.
|
void |
setInsertStyle(String value)
Gets and sets the CSS-style string for Insert operation.
|
void |
setStrikethroughDeleted(boolean value)
Get or set text-decoration: line-through style for the delete operation.
|
public HtmlDiffOutputGenerator()
Creates an instance of HtmlDiffOutputGenerator class.
public HtmlDiffOutputGenerator(OutputTextStyle textStyle)
Creates an instance of HtmlDiffOutputGenerator class.
textStyle - The styles for the changed text.public final String getEqualStyle()
Gets and sets the CSS-style string for Equal operation. Example: color: #003300; background-color: #ccff66;
public final void setEqualStyle(String value)
Gets and sets the CSS-style string for Equal operation. Example: color: #003300; background-color: #ccff66;
value - String valuepublic final String getInsertStyle()
Gets and sets the CSS-style string for Insert operation. Example: color: #003300; background-color: #ccff66;
public final void setInsertStyle(String value)
Gets and sets the CSS-style string for Insert operation. Example: color: #003300; background-color: #ccff66;
value - String valuepublic final String getDeleteStyle()
Gets and sets the CSS-style string for Delete operation. Example: color: #003300; background-color: #ccff66;
public final void setDeleteStyle(String value)
Gets and sets the CSS-style string for Delete operation. Example: color: #003300; background-color: #ccff66;
value - String valuepublic final boolean getStrikethroughDeleted()
Get or set text-decoration: line-through style for the delete operation.
Default value is False.
public final void setStrikethroughDeleted(boolean value)
Get or set text-decoration: line-through style for the delete operation.
Default value is False.
value - boolean valuepublic final String generateOutput1(List<DiffOperation> diffrences)
Generates the output based on the differences between texts and saves it to a file.
generateOutput1 in interface IStringOutputGeneratordiffrences - The list of differences between texts.public String generateOutputInternal1(com.aspose.ms.System.Collections.Generic.List<DiffOperation> diffrences)
Generates the output based on the differences between texts and saves it to a file.
generateOutputInternal1 in interface IStringOutputGeneratordiffrences - The list of differences between texts.public final void generateOutput1(List<DiffOperation> diffrences, String targetFilePath)
Generates the output based on the differences between texts and saves it to a file.
generateOutput1 in interface IFileOutputGeneratordiffrences - The list of differences between texts.targetFilePath - The path of the target file to save the output.public void generateOutputInternal1(com.aspose.ms.System.Collections.Generic.List<DiffOperation> diffrences, String targetFilePath)
generateOutputInternal1 in interface IFileOutputGeneratorpublic final String generateOutput(List<List<DiffOperation>> diffrences)
Generates the output based on the differences between texts and saves it to a file.
generateOutput in interface IStringOutputGeneratordiffrences - The list of differences between texts.public String generateOutputInternal(com.aspose.ms.System.Collections.Generic.List<com.aspose.ms.System.Collections.Generic.List<DiffOperation>> diffrences)
generateOutputInternal in interface IStringOutputGeneratorpublic final void generateOutput(List<List<DiffOperation>> diffrences, String targetFilePath)
Generates the output based on the differences between texts and saves it to a file.
generateOutput in interface IFileOutputGeneratordiffrences - The list of differences between texts.targetFilePath - The path of the target file to save the output.public void generateOutputInternal(com.aspose.ms.System.Collections.Generic.List<com.aspose.ms.System.Collections.Generic.List<DiffOperation>> diffrences, String targetFilePath)
generateOutputInternal in interface IFileOutputGeneratorCopyright © 2025 Aspose. All Rights Reserved.