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

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

Introduction

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

Prototype

public void setVerticalAlignment(int verticalAlignment) 

Source Link

Document

Sets the vertical alignment for the cell.

Usage

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) {
    PdfPCell celda = new PdfPCell(new Paragraph(texto, new Font(tipo, tamanio, estilo)));
    celda.setHorizontalAlignment(alineacion);
    celda.setVerticalAlignment(Element.ALIGN_TOP);
    celda.setBorderColor(Color.LIGHT_GRAY);
    celda.setBorderWidth(borde);//ww w.  j  a v a2  s .c o m
    celda.setPadding(padding);
    return celda;
}

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 w  w. ja v a2s.  c o  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  v a 2s  .co 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 . ja  v a2s .com*/
    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);/*www  . j a v  a 2s.  c  om*/
    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) {//w  w w .  j a  v  a2  s.co  m
    PdfPCell celda = new PdfPCell(new Paragraph(texto, new Font(tipo, tamanio, estilo)));
    celda.setHorizontalAlignment(alineacion);
    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,
        Color color, int padding, int colspan) {
    PdfPCell celda = new PdfPCell(new Paragraph(texto, new Font(tipo, tamanio, estilo)));
    celda.setHorizontalAlignment(alineacion);
    celda.setPadding(padding);//from www .j  av a 2s. c o  m
    celda.setColspan(colspan);
    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);//from   ww w  . j  a v a2s.com
    celda.setColspan(colspan);
    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 setCeldaPDF(PdfPTable tabla, int alineacion, int borde) {
    PdfPCell celda = new PdfPCell(tabla);
    celda.setHorizontalAlignment(alineacion);
    celda.setVerticalAlignment(Element.ALIGN_TOP);
    celda.setBorderColor(Color.LIGHT_GRAY);
    celda.setBorderWidth(borde);/*from   w  ww  .  jav a  2 s. com*/
    return celda;
}

From source file:net.bull.javamelody.internal.web.pdf.PdfDatabaseInformationsReport.java

License:Apache License

private void writeRow(String[] row) {
    final PdfPCell defaultCell = getDefaultCell();
    defaultCell.setVerticalAlignment(Element.ALIGN_TOP);
    for (final String value : row) {
        if (value == null || value.isEmpty()) {
            addCell("");
        } else {/*  ww  w  .j  a  va  2 s  .c o  m*/
            if (isNumber(value)) {
                defaultCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
            } else {
                defaultCell.setHorizontalAlignment(Element.ALIGN_LEFT);
            }
            addCell(value);
        }
    }
}