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
Field | Description |
---|---|
AUTO | Default. |
BLACK | Represents 000000 color. |
BLUE | Represents 2e97d3 color. |
BRIGHT_GREEN | Represents 84a35b color. |
BY_AUTHOR | Revisions of each author receive their own color for highlighting from a predefined set of hi-contrast colors. |
CLASSIC_BLUE | Represents 0000ff color. |
CLASSIC_RED | Represents ff0000 color. |
DARK_BLUE | Represents 376e96 color. |
DARK_RED | Represents 881824 color. |
DARK_YELLOW | Represents e09a2b color. |
GRAY | Represents efeded color. |
GRAY_25 | Represents a0a3a9 color. |
GRAY_50 | Represents 50565e color. |
GREEN | Represents 2c6234 color. |
LIGHT_BLUE | Represents e1f2fa color. |
LIGHT_GREEN | Represents e9f8ce color. |
LIGHT_ORANGE | Represents fce3d0 color. |
LIGHT_PINK | Represents fce6f4 color. |
LIGHT_PURPLE | Represents eadfef color. |
LIGHT_YELLOW | Represents fef4de color. |
NO_HIGHLIGHT | No color is used to highlight revision changes. |
PINK | Represents ce338f color. |
RED | Represents b5082e color. |
TEAL | Represents 1b9cab color. |
TURQUOISE | Represents 3eafc2 color. |
VIOLET | Represents 633277 color. |
WHITE | Represents ffffff color. |
YELLOW | Represents fad272 color. |
length |
Methods
Method | Description |
---|---|
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 predefined 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
public static int GRAY
Represents efeded 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.
LIGHT_BLUE
public static int LIGHT_BLUE
Represents e1f2fa color.
LIGHT_GREEN
public static int LIGHT_GREEN
Represents e9f8ce color.
LIGHT_ORANGE
public static int LIGHT_ORANGE
Represents fce3d0 color.
LIGHT_PINK
public static int LIGHT_PINK
Represents fce6f4 color.
LIGHT_PURPLE
public static int LIGHT_PURPLE
Represents eadfef color.
LIGHT_YELLOW
public static int LIGHT_YELLOW
Represents fef4de 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:
Parameter | Type | Description |
---|---|---|
revisionColorName | java.lang.String |
Returns: int
getName(int revisionColor)
public static String getName(int revisionColor)
Parameters:
Parameter | Type | Description |
---|---|---|
revisionColor | int |
Returns: java.lang.String
getValues()
public static int[] getValues()
Returns: int[]
toString(int revisionColor)
public static String toString(int revisionColor)
Parameters:
Parameter | Type | Description |
---|---|---|
revisionColor | int |
Returns: java.lang.String