Package com.itextpdf.text

Examples of com.itextpdf.text.BaseColor


     * Obtain the footer background color; Meant to be overriden if a different style is desired.
     * @return The footer background color.
     */
    protected BaseColor getFooterBackgroundColor()
    {
        return new BaseColor(0xce, 0xcf, 0xce);
    }
View Full Code Here


     * Obtain the footer font color; Meant to be overriden if a different style is desired.
     * @return The footer font color.
     */
    protected BaseColor getFooterFontColor()
    {
        return new BaseColor(0x00, 0x00, 0x00);
    }
View Full Code Here

     * color is desired.
     * @return The backgrounc color used to render the header.
     */
    protected BaseColor getHeaderBackgroundColor()
    {
        return new BaseColor(0xee, 0xee, 0xee);
    }
View Full Code Here

     * Set the font color used to render the header text; Meant to be overridden if a different header style is desired.
     * @return The font color used to render the header text.
     */
    protected BaseColor getHeaderFontColor()
    {
        return new BaseColor(0x00, 0x00, 0x00);
    }
View Full Code Here

  public long export(List<Person> persons, OutputStream out) throws DocumentException, IOException {
    if (createPrintVersion) {
      fontTimes12ItalicBlue = FontFactory.getFont(FontFactory.TIMES, 12, Font.ITALIC);
    }
    else {
      fontTimes12ItalicBlue = FontFactory.getFont(FontFactory.TIMES, 12, Font.ITALIC, new BaseColor(32, 32, 192));
    }

    // Ein paar Listen f�llen / leeren.
    this.persons = persons;
    listImages_D.clear();
View Full Code Here

    // strikethru
    if (chain.hasProperty(HtmlTags.S))
      style |= Font.STRIKETHRU;

    // [6] Color
    BaseColor color = HtmlUtilities.decodeColor(chain.getProperty(HtmlTags.COLOR));

    // Get the font object from the provider
    return provider.getFont(face, encoding, true, size, style, color);
  }
View Full Code Here

      if (tmpWidth > 0) percentage = tmpWidth;
      if (!width.endsWith("%"))
        percentage = 100; // Treat a pixel width as 100% for now.
    }
    // line color
    BaseColor lineColor = null;
    // alignment
    int align = HtmlUtilities.alignmentValue(attrs.get(HtmlTags.ALIGN));
    return new LineSeparator(lineWidth, percentage, lineColor, align, offset);
  }
View Full Code Here

      } else if (key.equals(HtmlTags.TEXTDECORATION)) {
        String ss = prop.getProperty(key).trim().toLowerCase();
        if (ss.equals(HtmlTags.UNDERLINE))
          h.put(HtmlTags.U, null);
      } else if (key.equals(HtmlTags.COLOR)) {
        BaseColor c = HtmlUtilities.decodeColor(prop.getProperty(key));
        if (c != null) {
          int hh = c.getRGB();
          String hs = Integer.toHexString(hh);
          hs = "000000" + hs;
          hs = "#" + hs.substring(hs.length() - 6);
          h.put(HtmlTags.COLOR, hs);
        }
View Full Code Here

                c[0] = Integer.parseInt(s+s, 16);
                String s2 = name.substring(1, 2);
                c[1] = Integer.parseInt(s2+s2, 16);
                String s3 = name.substring(2);
                c[2] = Integer.parseInt(s3+s3, 16);
                return new BaseColor(c[0], c[1], c[2], c[3]);
            }
            if (name.length() == 6) {
                c[0] = Integer.parseInt(name.substring(0, 2), 16);
                c[1] = Integer.parseInt(name.substring(2, 4), 16);
                c[2] = Integer.parseInt(name.substring(4), 16);
                return new BaseColor(c[0], c[1], c[2], c[3]);
            }
            throw new IllegalArgumentException(MessageLocalization.getComposedMessage("unknown.color.format.must.be.rgb.or.rrggbb"));
        }
        else if (name.startsWith("rgb(")) {
            StringTokenizer tok = new StringTokenizer(name, "rgb(), \t\r\n\f");
            for (int k = 0; k < 3; ++k) {
                String v = tok.nextToken();
                if (v.endsWith("%"))
                    c[k] = Integer.parseInt(v.substring(0, v.length() - 1)) * 255 / 100;
                else
                    c[k] = Integer.parseInt(v);
                if (c[k] < 0)
                    c[k] = 0;
                else if (c[k] > 255)
                    c[k] = 255;
            }
            return new BaseColor(c[0], c[1], c[2], c[3]);
        }

        if (!NAMES.containsKey(name))
            throw new IllegalArgumentException(MessageLocalization.getComposedMessage("color.not.found", new String[] { name }));
        c = NAMES.get(name);
        return new BaseColor(c[0], c[1], c[2], c[3]);
    }
View Full Code Here

                app.setLineWidth(borderWidth);
                app.rectangle(borderWidth / 2, borderWidth / 2, box.getWidth() - borderWidth, box.getHeight() - borderWidth);
                app.stroke();
            }
            // beveled
            BaseColor actual = backgroundColor;
            if (actual == null)
                actual = BaseColor.WHITE;
            app.setGrayFill(1);
            drawTopFrame(app);
            app.setColorFill(actual.darker());
            drawBottomFrame(app);
        }
        else if (borderStyle == PdfBorderDictionary.STYLE_INSET) {
            if (borderWidth != 0 && borderColor != null) {
                app.setColorStroke(borderColor);
View Full Code Here

TOP

Related Classes of com.itextpdf.text.BaseColor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.