RevisionColor

Inheritance: java.lang.Object

public class RevisionColor

Allows to specify color of document revisions.

Examples:

Shows how to alter the appearance of revisions in a rendered output document.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 // Insert a revision, then change the color of all revisions to green.
 builder.writeln("This is not a revision.");
 doc.startTrackRevisions("John Doe", new Date());
 builder.writeln("This is a revision.");
 doc.stopTrackRevisions();
 builder.writeln("This is not a revision.");

 // Remove the bar that appears to the left of every revised line.
 doc.getLayoutOptions().getRevisionOptions().setInsertedTextColor(RevisionColor.BRIGHT_GREEN);
 doc.getLayoutOptions().getRevisionOptions().setShowRevisionBars(false);
 doc.getLayoutOptions().getRevisionOptions().setRevisionBarsPosition(HorizontalAlignment.RIGHT);

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

Fields

FieldDescription
AUTODefault.
BLACKRepresents 000000 color.
BLUERepresents 2e97d3 color.
BRIGHT_GREENRepresents 84a35b color.
BY_AUTHORRevisions of each author receive their own color for highlighting from a predfined set of hi-contrast colors.
CLASSIC_BLUERepresents 0000ff color.
CLASSIC_REDRepresents ff0000 color.
DARK_BLUERepresents 376e96 color.
DARK_REDRepresents 881824 color.
DARK_YELLOWRepresents e09a2b color.
GRAY_25Represents a0a3a9 color.
GRAY_50Represents 50565e color.
GREENRepresents 2c6234 color.
NO_HIGHLIGHTNo color is used to highlight revision changes.
PINKRepresents ce338f color.
REDRepresents b5082e color.
TEALRepresents 1b9cab color.
TURQUOISERepresents 3eafc2 color.
VIOLETRepresents 633277 color.
WHITERepresents ffffff color.
YELLOWRepresents fad272 color.
length

Methods

MethodDescription
fromName(String revisionColorName)
getName(int revisionColor)
getValues()
toString(int revisionColor)

AUTO

public static int AUTO

Default.

BLACK

public static int BLACK

Represents 000000 color.

BLUE

public static int BLUE

Represents 2e97d3 color.

BRIGHT_GREEN

public static int BRIGHT_GREEN

Represents 84a35b color.

BY_AUTHOR

public static int BY_AUTHOR

Revisions of each author receive their own color for highlighting from a predfined set of hi-contrast colors.

CLASSIC_BLUE

public static int CLASSIC_BLUE

Represents 0000ff color.

CLASSIC_RED

public static int CLASSIC_RED

Represents ff0000 color.

DARK_BLUE

public static int DARK_BLUE

Represents 376e96 color.

DARK_RED

public static int DARK_RED

Represents 881824 color.

DARK_YELLOW

public static int DARK_YELLOW

Represents e09a2b color.

GRAY_25

public static int GRAY_25

Represents a0a3a9 color.

GRAY_50

public static int GRAY_50

Represents 50565e color.

GREEN

public static int GREEN

Represents 2c6234 color.

NO_HIGHLIGHT

public static int NO_HIGHLIGHT

No color is used to highlight revision changes.

PINK

public static int PINK

Represents ce338f color.

RED

public static int RED

Represents b5082e color.

TEAL

public static int TEAL

Represents 1b9cab color.

TURQUOISE

public static int TURQUOISE

Represents 3eafc2 color.

VIOLET

public static int VIOLET

Represents 633277 color.

WHITE

public static int WHITE

Represents ffffff color.

YELLOW

public static int YELLOW

Represents fad272 color.

length

public static int length

fromName(String revisionColorName)

public static int fromName(String revisionColorName)

Parameters:

ParameterTypeDescription
revisionColorNamejava.lang.String

Returns: int

getName(int revisionColor)

public static String getName(int revisionColor)

Parameters:

ParameterTypeDescription
revisionColorint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int revisionColor)

public static String toString(int revisionColor)

Parameters:

ParameterTypeDescription
revisionColorint

Returns: java.lang.String