Beispiel #1
0
  protected void apply(PdfPCell cell, RenderingContext context, PJsonObject params) {
    if (paddingLeft != null) cell.setPaddingLeft(paddingLeft.floatValue());
    if (paddingRight != null) cell.setPaddingRight(paddingRight.floatValue());
    if (paddingTop != null) cell.setPaddingTop(paddingTop.floatValue());
    if (paddingBottom != null) cell.setPaddingBottom(paddingBottom.floatValue());

    if (borderWidthLeft != null) cell.setBorderWidthLeft(borderWidthLeft.floatValue());
    if (borderWidthRight != null) cell.setBorderWidthRight(borderWidthRight.floatValue());
    if (borderWidthTop != null) cell.setBorderWidthTop(borderWidthTop.floatValue());
    if (borderWidthBottom != null) cell.setBorderWidthBottom(borderWidthBottom.floatValue());

    if (getBorderColorLeftVal(context, params) != null)
      cell.setBorderColorLeft(getBorderColorLeftVal(context, params));
    if (getBorderColorRightVal(context, params) != null)
      cell.setBorderColorRight(getBorderColorRightVal(context, params));
    if (getBorderColorTopVal(context, params) != null)
      cell.setBorderColorTop(getBorderColorTopVal(context, params));
    if (getBorderColorBottomVal(context, params) != null)
      cell.setBorderColorBottom(getBorderColorBottomVal(context, params));

    if (getBackgroundColorVal(context, params) != null)
      cell.setBackgroundColor(getBackgroundColorVal(context, params));

    if (align != null) cell.setHorizontalAlignment(align.getCode());
    if (vertAlign != null) cell.setVerticalAlignment(vertAlign.getCode());
  }