List of usage examples for com.lowagie.text.rtf.style RtfColor RtfColor
public RtfColor(RtfDocument doc, Color col)
From source file:org.pentaho.reporting.engine.classic.core.modules.output.table.rtf.itext.PatchRtfBorder.java
License:Open Source License
/** * Makes a copy of the given PatchRtfBorder * * @param doc//w w w. j a va 2s.co m * The RtfDocument this PatchRtfBorder belongs to * @param borderType * The border type of this PatchRtfBorder * @param border * The PatchRtfBorder to copy */ protected PatchRtfBorder(RtfDocument doc, int borderType, PatchRtfBorder border) { super(doc); this.borderType = borderType; this.borderPosition = border.getBorderPosition(); this.borderStyle = border.getBorderStyle(); this.borderWidth = border.getBorderWidth(); this.borderColor = new RtfColor(this.document, border.getBorderColor()); }
From source file:org.pentaho.reporting.engine.classic.core.modules.output.table.rtf.itext.PatchRtfBorder.java
License:Open Source License
/** * Constructs a PatchRtfBorder/*from ww w . j a v a 2 s. c o m*/ * * @param doc * The RtfDocument this PatchRtfBorder belongs to * @param borderType * The type of border this PatchRtfBorder is * @param borderPosition * The position of this PatchRtfBorder * @param borderStyle * The style of this PatchRtfBorder * @param borderWidth * The width of this PatchRtfBorder * @param borderColor * The color of this PatchRtfBorder */ protected PatchRtfBorder(RtfDocument doc, int borderType, int borderPosition, int borderStyle, float borderWidth, Color borderColor) { super(doc); this.borderType = borderType; this.borderPosition = borderPosition; this.borderStyle = borderStyle; this.borderWidth = (int) Math.min((borderWidth * TWIPS_FACTOR), 75); if (this.borderWidth == 0) { this.borderStyle = BORDER_NONE; } if (borderColor == null) { this.borderColor = new RtfColor(this.document, new Color(0, 0, 0)); } else { this.borderColor = new RtfColor(this.document, borderColor); } }