com.aspose.words

Class ShowInBalloons

  • java.lang.Object
    • com.aspose.words.ShowInBalloons
public class ShowInBalloons 
extends java.lang.Object

Utility class containing constants. Specifies which revisions are rendered in balloons.
Note that these values do not affect rendering of comments, which are controlled by LayoutOptions.ShowComments.

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
Renders insert, delete and format revisions inline.
static final intFORMAT = 1
Renders insert and delete revisions inline, format revisions in balloons.
static final intFORMAT_AND_DELETE = 2
Renders insert revisions inline, delete and format revisions in balloons.
 

    • Field Detail

      • NONE = 0

        public static final int NONE
        Renders insert, delete and format revisions inline.
      • FORMAT = 1

        public static final int FORMAT
        Renders insert and delete revisions inline, format revisions in balloons.
      • FORMAT_AND_DELETE = 2

        public static final int FORMAT_AND_DELETE
        Renders insert revisions inline, delete and format revisions in balloons.