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