com.aspose.words
Class RevisionTextEffect

java.lang.Object
    extended by com.aspose.words.RevisionTextEffect

public class RevisionTextEffect 
extends java.lang.Object

Utility class containing constants. Allows to specify decoration effect for revisions of document text.

Example:

Show how to render revisions in the balloons and edit their appearance.
Document doc = new Document(getMyDir() + "Document.Revisions.docx");

// Get the RevisionOptions object that controls the appearance of revisions
RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions();

// Get movement, deletion, formatting revisions and comments to show up in green balloons on the right side of the page
revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT);
revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN);

// Render text inserted while revisions were being tracked in italic green
revisionOptions.setInsertedTextColor(RevisionColor.GREEN);
revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC);

// Render text deleted while revisions were being tracked in bold red
revisionOptions.setDeletedTextColor(RevisionColor.RED);
revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD);

// In a movement revision, the same text will appear twice: once at the departure point and once at the arrival destination
// Render the text at the moved-from revision yellow with double strike through and double underlined blue at the moved-to revision
revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW);
revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH);
revisionOptions.setMovedToTextColor(RevisionColor.BLUE);
revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE);

// Render text which had its format changed while revisions were being tracked in bold dark red
revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED);
revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD);

// Place a thick dark blue bar on the left side of the page next to lines affected by revisions
revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE);
revisionOptions.setRevisionBarsWidth(15.0f);

// Show revision marks and original text
revisionOptions.setShowOriginalRevision(true);
revisionOptions.setShowRevisionMarks(true);

doc.save(getArtifactsDir() + "Document.ShowRevisionsInBalloons.pdf");

Field Summary
static final intNONE = 0
           Revised content has no special effects applied. This corresponds to RevisionColor.NO_HIGHLIGHT.
static final intCOLOR = 1
           Revised content is highlighted with color only.
static final intBOLD = 2
           Revised content is made bold and colored.
static final intITALIC = 3
           Revised content is made italic and colored.
static final intUNDERLINE = 4
           Revised content is underlined and colored.
static final intDOUBLE_UNDERLINE = 5
           Revised content is double underlined and colored.
static final intSTRIKE_THROUGH = 6
           Revised content is stroked through and colored.
static final intDOUBLE_STRIKE_THROUGH = 7
           Revised content is double stroked through and colored.
static final intHIDDEN = 8
           Revised content is hidden.
 

Field Detail

NONE = 0

public static final int NONE
Revised content has no special effects applied. This corresponds to RevisionColor.NO_HIGHLIGHT.

COLOR = 1

public static final int COLOR
Revised content is highlighted with color only.

BOLD = 2

public static final int BOLD
Revised content is made bold and colored.

ITALIC = 3

public static final int ITALIC
Revised content is made italic and colored.

UNDERLINE = 4

public static final int UNDERLINE
Revised content is underlined and colored.

DOUBLE_UNDERLINE = 5

public static final int DOUBLE_UNDERLINE
Revised content is double underlined and colored.

STRIKE_THROUGH = 6

public static final int STRIKE_THROUGH
Revised content is stroked through and colored.

DOUBLE_STRIKE_THROUGH = 7

public static final int DOUBLE_STRIKE_THROUGH
Revised content is double stroked through and colored. Only works for RevisionType.DELETION, RevisionType.FORMAT_CHANGE and RevisionType.MOVING ('move from' type).

HIDDEN = 8

public static final int HIDDEN
Revised content is hidden. Only works for RevisionType.DELETION and RevisionType.MOVING ('move from' type).

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.