Example usage for com.itextpdf.text Rectangle NO_BORDER

List of usage examples for com.itextpdf.text Rectangle NO_BORDER

Introduction

In this page you can find the example usage for com.itextpdf.text Rectangle NO_BORDER.

Prototype

int NO_BORDER

To view the source code for com.itextpdf.text Rectangle NO_BORDER.

Click Source Link

Document

This represents a rectangle without borders.

Usage

From source file:WeeklyReport.Sections.Declines.java

public PdfPTable declinesByCommodityTable() {
    PdfPTable table = new PdfPTable(2);
    cell = new PdfPCell(new Phrase("Commodities Declined by Cubic Meter & Trade Lane", SUBHEADING_FONT));
    cell.setBorder(Rectangle.NO_BORDER);
    cell.setColspan(3);/* w  w w  .ja va2s  . c  o m*/
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Commodity", COLUMN_HEADER));
    cell.setBorder(Rectangle.BOTTOM);
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Trade Lane"));
    cell.setBorder(Rectangle.BOTTOM);
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Cubic Meters"));
    cell.setBorder(Rectangle.BOTTOM);
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    Map<Double, Map<String, String>> mp = DECLINES_BY_COMMODITY_CLASS;
    mp.entrySet().stream().forEach((mapEntry) -> {
        Map<String, String> mp1 = mapEntry.getValue();
        mp1.entrySet().stream().forEach((secondMapEntry) -> {
            cell = new PdfPCell(new Phrase(String.valueOf(secondMapEntry.getValue()), TEXT_FONT));
            cell.setBorder(Rectangle.TOP);
            table.addCell(cell);

            cell = new PdfPCell(new Phrase(String.valueOf(secondMapEntry.getValue()), TEXT_FONT));
            cell.setBorder(Rectangle.TOP);
            table.addCell(cell);

            cell = new PdfPCell(new Phrase(String.valueOf(mapEntry.getKey()), TEXT_FONT));
            cell.setBorder(Rectangle.TOP);
            table.addCell(cell);
        });
    });
    return table;
}

From source file:WeeklyReport.Sections.Declines.java

public PdfPTable declinesByReasonTable() {
    PdfPTable table = new PdfPTable(2);
    cell = new PdfPCell(new Phrase("Reasons for Decline by Cubic Meter", SUBHEADING_FONT));
    cell.setBorder(Rectangle.NO_BORDER);
    cell.setColspan(2);/* www .  ja v a 2 s  . co  m*/
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Reason for Decline", COLUMN_HEADER));
    cell.setBorder(Rectangle.NO_BORDER);
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Cubic Meters", COLUMN_HEADER));
    cell.setBorder(Rectangle.NO_BORDER);
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    Map<Double, String> mp = DECLINES_BY_REASON;
    mp.entrySet().stream().forEach((mapEntry) -> {
        cell = new PdfPCell(new Phrase(String.valueOf(mapEntry.getValue()), TEXT_FONT));
        table.addCell(cell);
        cell = new PdfPCell(new Phrase(String.valueOf(mapEntry.getKey()), TEXT_FONT));
        table.addCell(cell);
    });
    return table;
}

From source file:WeeklyReport.Sections.RegionalQuoteData.java

public PdfPTable regionalAnalysis() {
    PdfPTable table = new PdfPTable(1);
    table.setHorizontalAlignment(Element.ALIGN_MIDDLE);
    table.setWidthPercentage(100f);//  w  w  w.  ja v a 2s  .  com
    table.setSpacingBefore(10f);

    cell = new PdfPCell(new Phrase("Regional Quote Data", SECTION_HEADING));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    cell.setPaddingBottom(10f);
    table.addCell(cell);

    String pending = null;

    if (PENDING_RESPONSE == 1) {
        pending = PENDING_RESPONSE + " is pending further action.";
    } else {
        pending = PENDING_RESPONSE + " are pending further action.";
    }

    cell = new PdfPCell(new Phrase("In week " + new ReportingDates().reportPeriod() + " a total of "
            + new CustomerQuoteData().totalNAQuotes()
            + " quotes were generated through RQS to North American customers (not including Canada). Of these quotes there were "
            + DECLINES + " declines, " + BOOKINGS + " bookings, and " + FEEDBACK
            + " received customer feedback, and " + pending, TEXT_FONT));
    cell.setHorizontalAlignment(Element.ALIGN_JUSTIFIED);
    cell.setBorder(Rectangle.NO_BORDER);
    table.addCell(cell);

    return table;

}

From source file:WeeklyReport.Sections.RegionalQuoteData.java

public PdfPTable southeastTable() {
    PdfPTable table = new PdfPTable(4);
    table.setHorizontalAlignment(Element.ALIGN_MIDDLE);
    table.setWidthPercentage(100f);//  www .  j a  v a  2 s  . c o m

    cell = new PdfPCell(new Phrase("South East", SUBHEADING_FONT));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    cell.setColspan(4);
    cell.setBorder(Rectangle.NO_BORDER);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Company Name", COLUMN_HEADER));
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Trade Lane", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_LEFT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Unit Count", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Cubic Meters", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    Map<Map<String, String>, Map<String, String>> m = SOUTH_EAST_QUOTES;
    m.entrySet().stream().map((entry) -> {
        Map<String, String> m1 = entry.getKey();
        m1.entrySet().stream().map((pair) -> {
            companyCell = new PdfPCell(new Phrase(String.valueOf(pair.getValue()), TEXT_FONT));
            return pair;
        }).forEach((pair) -> {
            tradeCell = new PdfPCell(new Phrase(String.valueOf(pair.getKey()), TEXT_FONT));
        });
        return entry;
    }).map((entry) -> {
        companyCell.setColspan(1);
        tradeCell.setColspan(1);
        return entry;
    }).map((entry) -> {
        companyCell.setBorder(Rectangle.BOTTOM);
        tradeCell.setBorder(Rectangle.BOTTOM);
        return entry;
    }).map((entry) -> {
        table.addCell(companyCell);
        table.addCell(tradeCell);
        Map<String, String> m1 = entry.getValue();
        m1.entrySet().stream().map((pair) -> {
            unitCell = new PdfPCell(new Phrase(String.valueOf(pair.getKey()), TEXT_FONT));
            return pair;
        }).forEach((pair) -> {
            cubicMetersCell = new PdfPCell(new Phrase(String.valueOf(pair.getValue()), TEXT_FONT));
        });
        return entry;
    }).map((_item) -> {
        unitCell.setColspan(1);
        cubicMetersCell.setColspan(1);
        return _item;
    }).map((_item) -> {
        unitCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
        cubicMetersCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
        return _item;
    }).map((_item) -> {
        unitCell.setBorder(Rectangle.BOTTOM);
        cubicMetersCell.setBorder(Rectangle.BOTTOM);
        return _item;
    }).forEach((_item) -> {
        table.addCell(unitCell);
        table.addCell(cubicMetersCell);
    });
    return table;
}

From source file:WeeklyReport.Sections.RegionalQuoteData.java

public PdfPTable northEastTable() {
    PdfPTable table = new PdfPTable(4);
    table.setHorizontalAlignment(Element.ALIGN_MIDDLE);
    table.setWidthPercentage(100f);//from w  w  w.j  ava2s  . c  o m
    table.setSpacingBefore(10f);

    cell = new PdfPCell(new Phrase("North East", SUBHEADING_FONT));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    cell.setColspan(4);
    cell.setBorder(Rectangle.NO_BORDER);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Company Name", COLUMN_HEADER));
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Trade Lane", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_LEFT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Unit Count", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Cubic Meters", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    Map<Map<String, String>, Map<String, String>> m = NORTH_EAST_QUOTES;
    m.entrySet().stream().map((entry) -> {
        Map<String, String> m1 = entry.getKey();
        m1.entrySet().stream().map((pair) -> {
            companyCell = new PdfPCell(new Phrase(String.valueOf(pair.getValue()), TEXT_FONT));
            return pair;
        }).forEach((pair) -> {
            tradeCell = new PdfPCell(new Phrase(String.valueOf(pair.getKey()), TEXT_FONT));
        });
        return entry;
    }).map((entry) -> {
        companyCell.setColspan(1);
        tradeCell.setColspan(1);
        return entry;
    }).map((entry) -> {
        companyCell.setBorder(Rectangle.BOTTOM);
        tradeCell.setBorder(Rectangle.BOTTOM);
        return entry;
    }).map((entry) -> {
        table.addCell(companyCell);
        table.addCell(tradeCell);
        Map<String, String> m1 = entry.getValue();
        m1.entrySet().stream().map((pair) -> {
            unitCell = new PdfPCell(new Phrase(String.valueOf(pair.getKey()), TEXT_FONT));
            return pair;
        }).forEach((pair) -> {
            cubicMetersCell = new PdfPCell(new Phrase(String.valueOf(pair.getValue()), TEXT_FONT));
        });
        return entry;
    }).map((_item) -> {
        unitCell.setColspan(1);
        cubicMetersCell.setColspan(1);
        return _item;
    }).map((_item) -> {
        unitCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
        cubicMetersCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
        return _item;
    }).map((_item) -> {
        unitCell.setBorder(Rectangle.BOTTOM);
        cubicMetersCell.setBorder(Rectangle.BOTTOM);
        return _item;
    }).forEach((_item) -> {
        table.addCell(unitCell);
        table.addCell(cubicMetersCell);
    });
    return table;
}

From source file:WeeklyReport.Sections.RegionalQuoteData.java

public PdfPTable midWestTable() {
    PdfPTable table = new PdfPTable(4);
    table.setHorizontalAlignment(Element.ALIGN_MIDDLE);
    table.setWidthPercentage(100f);/*from  w ww .  jav a  2s  .co m*/
    table.setSpacingBefore(10f);

    cell = new PdfPCell(new Phrase("Mid West", SUBHEADING_FONT));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    cell.setColspan(4);
    cell.setBorder(Rectangle.NO_BORDER);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Company Name", COLUMN_HEADER));
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Trade Lane", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_LEFT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Unit Count", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Cubic Meters", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    Map<Map<String, String>, Map<String, String>> m = MID_WEST_QUOTES;
    m.entrySet().stream().map((entry) -> {
        Map<String, String> m1 = entry.getKey();
        m1.entrySet().stream().map((pair) -> {
            companyCell = new PdfPCell(new Phrase(String.valueOf(pair.getValue()), TEXT_FONT));
            return pair;
        }).forEach((pair) -> {
            tradeCell = new PdfPCell(new Phrase(String.valueOf(pair.getKey()), TEXT_FONT));
        });
        return entry;
    }).map((entry) -> {
        companyCell.setColspan(1);
        tradeCell.setColspan(1);
        return entry;
    }).map((entry) -> {
        companyCell.setBorder(Rectangle.BOTTOM);
        tradeCell.setBorder(Rectangle.BOTTOM);
        return entry;
    }).map((entry) -> {
        table.addCell(companyCell);
        table.addCell(tradeCell);
        Map<String, String> m1 = entry.getValue();
        m1.entrySet().stream().map((pair) -> {
            unitCell = new PdfPCell(new Phrase(String.valueOf(pair.getKey()), TEXT_FONT));
            return pair;
        }).forEach((pair) -> {
            cubicMetersCell = new PdfPCell(new Phrase(String.valueOf(pair.getValue()), TEXT_FONT));
        });
        return entry;
    }).map((_item) -> {
        unitCell.setColspan(1);
        cubicMetersCell.setColspan(1);
        return _item;
    }).map((_item) -> {
        unitCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
        cubicMetersCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
        return _item;
    }).map((_item) -> {
        unitCell.setBorder(Rectangle.BOTTOM);
        cubicMetersCell.setBorder(Rectangle.BOTTOM);
        return _item;
    }).forEach((_item) -> {
        table.addCell(unitCell);
        table.addCell(cubicMetersCell);
    });
    return table;
}

From source file:WeeklyReport.Sections.RegionalQuoteData.java

public PdfPTable westCoastTable() {
    PdfPTable table = new PdfPTable(4);
    table.setHorizontalAlignment(Element.ALIGN_MIDDLE);
    table.setWidthPercentage(100f);//from w w  w.j  a  v a 2  s  . co  m
    table.setSpacingBefore(10f);

    cell = new PdfPCell(new Phrase("West Coast", SUBHEADING_FONT));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    cell.setColspan(4);
    cell.setBorder(Rectangle.NO_BORDER);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Company Name", COLUMN_HEADER));
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Trade Lane", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_LEFT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Unit Count", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Cubic Meters", COLUMN_HEADER));
    cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
    cell.setPaddingBottom(5f);
    cell.setBorder(Rectangle.BOTTOM);
    cell.setBorderWidthBottom(2f);
    table.addCell(cell);

    Map<Map<String, String>, Map<String, String>> m = WEST_COAST_QUOTES;
    m.entrySet().stream().map((entry) -> {
        Map<String, String> m1 = entry.getKey();
        m1.entrySet().stream().map((pair) -> {
            companyCell = new PdfPCell(new Phrase(String.valueOf(pair.getValue()), TEXT_FONT));
            return pair;
        }).forEach((pair) -> {
            tradeCell = new PdfPCell(new Phrase(String.valueOf(pair.getKey()), TEXT_FONT));
        });
        return entry;
    }).map((entry) -> {
        companyCell.setColspan(1);
        tradeCell.setColspan(1);
        return entry;
    }).map((entry) -> {
        companyCell.setBorder(Rectangle.BOTTOM);
        tradeCell.setBorder(Rectangle.BOTTOM);
        return entry;
    }).map((entry) -> {
        table.addCell(companyCell);
        table.addCell(tradeCell);
        Map<String, String> m1 = entry.getValue();
        m1.entrySet().stream().map((pair) -> {
            unitCell = new PdfPCell(new Phrase(String.valueOf(pair.getKey()), TEXT_FONT));
            return pair;
        }).forEach((pair) -> {
            cubicMetersCell = new PdfPCell(new Phrase(String.valueOf(pair.getValue()), TEXT_FONT));
        });
        return entry;
    }).map((_item) -> {
        unitCell.setColspan(1);
        cubicMetersCell.setColspan(1);
        return _item;
    }).map((_item) -> {
        unitCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
        cubicMetersCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
        return _item;
    }).map((_item) -> {
        unitCell.setBorder(Rectangle.BOTTOM);
        cubicMetersCell.setBorder(Rectangle.BOTTOM);
        return _item;
    }).forEach((_item) -> {
        table.addCell(unitCell);
        table.addCell(cubicMetersCell);
    });
    return table;
}

From source file:WeeklyReport.WeeklyPDF.java

private PdfPTable endOfReport() {
    PdfPTable table = new PdfPTable(1);
    cell = new PdfPCell(new Phrase("End of Report", HEADING_FONT));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    cell.setBorder(Rectangle.NO_BORDER);
    cell.setBorderWidth(2f);//  w ww .java  2  s . c  o  m
    table.addCell(cell);

    return table;
}

From source file:WeeklyReport.WeeklyPDF.java

public static PdfPTable header() {
    PdfPTable table = new PdfPTable(1);
    table.setHorizontalAlignment(Element.ALIGN_MIDDLE);
    table.setWidthPercentage(100f);/*w  ww  . j  a  va2s.c o m*/

    cell = new PdfPCell(new Phrase("RQS Report", HEADING_FONT));
    cell.setColspan(1);
    cell.setBorder(Rectangle.NO_BORDER);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("Week: " + new ReportingDates().reportPeriod(), SUBHEADING_FONT));
    cell.setColspan(1);
    cell.setBorder(Rectangle.BOTTOM);
    table.addCell(cell);

    return table;
}

From source file:zeugnis.ZeugnisPDF.java

/***
 * Erzeugt eine leere Zeile als Abstandshalter
 * @param colspan//from w ww.ja v  a  2 s.  com
 * @param fixedHeight
 * @return 
 */
private PdfPCell emptyLine(int colspan, float fixedHeight) {
    PdfPCell cell = new PdfPCell();
    cell.setColspan(colspan);
    cell.setFixedHeight(fixedHeight);
    cell.setBorder(Rectangle.NO_BORDER);
    return cell;
}