Example usage for com.lowagie.text.pdf PdfPCell setPadding

List of usage examples for com.lowagie.text.pdf PdfPCell setPadding

Introduction

In this page you can find the example usage for com.lowagie.text.pdf PdfPCell setPadding.

Prototype

public void setPadding(float padding) 

Source Link

Document

Sets the padding of the contents in the cell (space between content and border).

Usage

From source file:jm.web.Addons.java

License:GNU General Public License

public static PdfPCell setCeldaPDFBottom(String texto, int tipo, int tamanio, int estilo, int alineacion,
        int borde, int padding, int colspan) {
    PdfPCell celda = new PdfPCell(new Paragraph(texto, new Font(tipo, tamanio, estilo, Color.WHITE)));
    celda.setHorizontalAlignment(alineacion);
    celda.setVerticalAlignment(Element.ALIGN_TOP);
    celda.setBorderColor(Color.WHITE);
    celda.setColspan(colspan);/*w  ww.j av a 2  s. co  m*/
    celda.setBorder(borde);
    celda.setPadding(padding);
    return celda;
}

From source file:jm.web.Addons.java

License:GNU General Public License

public static PdfPCell setCeldaPDFCarnetOpciones(String texto, int tipo, int tamanio, int estilo,
        int alineacion, int borde, int padding, int colspan, Color color) {
    PdfPCell celda = new PdfPCell(new Paragraph(texto, new Font(tipo, tamanio, estilo, Color.WHITE)));
    celda.setHorizontalAlignment(alineacion);
    celda.setVerticalAlignment(Element.ALIGN_TOP);
    celda.setBorderColor(Color.black);
    celda.setBackgroundColor(color);/* w w w .  j a va2s. c o m*/
    celda.setColspan(colspan);
    celda.setBorderWidth(borde);
    celda.setPadding(0);
    celda.setPaddingBottom(padding);
    return celda;
}

From source file:jm.web.Addons.java

License:GNU General Public License

public static PdfPCell setCeldaPDFCarnet(String texto, int tipo, int tamanio, int estilo, int alineacion,
        int borde, int padding, int colspan) {
    PdfPCell celda = new PdfPCell(new Paragraph(texto, new Font(tipo, tamanio, estilo, Color.WHITE)));
    celda.setHorizontalAlignment(alineacion);
    celda.setVerticalAlignment(Element.ALIGN_TOP);
    celda.setBorderColor(Color.WHITE);
    celda.setColspan(colspan);/*  w w  w . j  a v a  2  s  . c o  m*/
    celda.setBorderWidth(0);
    celda.setBorderWidthBottom(borde);
    celda.setPadding(0);
    celda.setPaddingBottom(padding);
    return celda;
}

From source file:jm.web.Addons.java

License:GNU General Public License

public static PdfPCell setCeldaPDFCarnet(String texto, int tipo, int tamanio, int estilo, int alineacion,
        int borde, int padding, int colspan, Color color) {
    PdfPCell celda = new PdfPCell(new Paragraph(texto, new Font(tipo, tamanio, estilo, color)));
    celda.setHorizontalAlignment(alineacion);
    celda.setVerticalAlignment(Element.ALIGN_TOP);
    celda.setBorderColor(Color.WHITE);
    celda.setColspan(colspan);//from  ww  w . j  a  va  2 s .  c o m
    celda.setBorderWidth(0);
    celda.setBorderWidthBottom(borde);
    celda.setPadding(0);
    celda.setPaddingBottom(padding);
    return celda;
}

From source file:jm.web.Addons.java

License:GNU General Public License

public static PdfPCell setCeldaPDF(String texto, int tipo, int tamanio, int estilo, int alineacion, int borde,
        Color color, int padding, int colspan) {
    PdfPCell celda = new PdfPCell(new Paragraph(texto, new Font(tipo, tamanio, estilo)));
    celda.setHorizontalAlignment(alineacion);
    celda.setPadding(padding);
    celda.setColspan(colspan);//from   w  ww .java 2  s .co  m
    celda.setVerticalAlignment(Element.ALIGN_TOP);
    celda.setBorderColor(Color.LIGHT_GRAY);
    celda.setBorderWidth(borde);
    celda.setBackgroundColor(color);
    return celda;
}

From source file:jm.web.Addons.java

License:GNU General Public License

public static PdfPCell setCeldaPDF(String texto, int tipo, int tamanio, int estilo, int alineacion, int borde,
        int padding, int colspan) {
    PdfPCell celda = new PdfPCell(new Paragraph(texto, new Font(tipo, tamanio, estilo)));
    celda.setHorizontalAlignment(alineacion);
    celda.setPadding(padding);
    celda.setColspan(colspan);/*  w  ww  .  ja v  a 2s.  c  o  m*/
    celda.setVerticalAlignment(Element.ALIGN_TOP);
    celda.setBorderColor(Color.LIGHT_GRAY);
    celda.setBorderWidth(borde);
    return celda;
}

From source file:jm.web.Addons.java

License:GNU General Public License

public static PdfPCell setFilaBlanco(int colSpan, int alto) {
    PdfPCell celda = new PdfPCell(new Paragraph(" ", new Font(Font.HELVETICA, alto, Font.NORMAL)));
    celda.setBorderWidth(0);/*from   ww w . j ava2 s  .  co m*/
    celda.setPadding(0);
    celda.setColspan(colSpan);
    return celda;
}

From source file:jm.web.Addons.java

License:GNU General Public License

public static PdfPCell setBarra(int colSpan, float color) {
    PdfPCell celda = new PdfPCell(new Paragraph(" ", new Font(Font.HELVETICA, 1, Font.NORMAL)));
    celda.setGrayFill(color);/*from   www .  jav  a 2 s.  c om*/
    celda.setBorderWidth(0);
    celda.setPadding(0);
    celda.setColspan(colSpan);
    return celda;
}

From source file:jm.web.Addons.java

License:GNU General Public License

public static PdfPCell setLogo(String logo, int ancho, int alto) {
    PdfPCell celdaImg = null;
    try {/*from   w  ww.  j  a v a2s.co  m*/
        Image imagelogo = Image.getInstance(logo);
        imagelogo.scaleAbsolute(ancho, alto);
        celdaImg = new PdfPCell(imagelogo);
        celdaImg.setBorderWidth(0);
        celdaImg.setPadding(0);
    } catch (Exception e) {
        celdaImg = null;
    }
    return celdaImg;
}

From source file:jm.web.Addons.java

License:GNU General Public License

public static PdfPCell setLogo(String logo, int ancho, int alto, int alineacion) {
    PdfPCell celdaImg = null;
    try {//from w ww .  j a  v a2  s .c o m
        Image imagelogo = Image.getInstance(logo);
        imagelogo.scaleAbsolute(ancho, alto);
        celdaImg = new PdfPCell(imagelogo);
        celdaImg.setBorderWidth(0);
        celdaImg.setHorizontalAlignment(alineacion);
        celdaImg.setPadding(0);
    } catch (Exception e) {
        celdaImg = null;
    }
    return celdaImg;
}