Example usage for com.lowagie.text Rectangle LEFT

List of usage examples for com.lowagie.text Rectangle LEFT

Introduction

In this page you can find the example usage for com.lowagie.text Rectangle LEFT.

Prototype

int LEFT

To view the source code for com.lowagie.text Rectangle LEFT.

Click Source Link

Document

This represents one side of the border of the Rectangle.

Usage

From source file:s2s.luna.reports.Report_LIS_INR_MAN_AZL.java

License:GNU General Public License

@Override
public void doReport() throws DocumentException, IOException, BadElementException, Exception { //----------------------------------------------------------------------

    IAziendaHome home = (IAziendaHome) PseudoContext.lookup("AziendaBean");
    IAzienda bean_az = home.findByPrimaryKey(new Long(lCOD_AZL));

    IAttivitaLavorativeHome h = (IAttivitaLavorativeHome) PseudoContext.lookup("AttivitaLavorativeBean");
    IRischioHome home_rs = (IRischioHome) PseudoContext.lookup("RischioBean");
    IMisurePreventiveHome home_mp = (IMisurePreventiveHome) PseudoContext.lookup("MisurePreventiveBean");

    this.bRotate = true;
    initDocument("the doc", null,
            ApplicationConfigurator.LanguageManager.getString("LISTA.DEGLI.INTERVENTI.AZIENDALI"),
            bean_az.getRAG_SCL_AZL(), null);
    AddImage();//from  w  w  w. j a v  a  2 s.  co m
    {
        CenterMiddleTable tbl = new CenterMiddleTable(1);
        tbl.setOffset(0);
        tbl.addHeaderCellB(ApplicationConfigurator.LanguageManager.getString("Azienda/Ente"));
        tbl.addCell(bean_az.getRAG_SCL_AZL());
        tbl.addHeaderCellB(
                ApplicationConfigurator.LanguageManager.getString("LISTA.DEGLI.INTERVENTI.AZIENDALI"));
        m_document.add(tbl);
    }
    writeIndent();
    {
        CenterMiddleTable tbl = null;
        if (!bShowSito) {
            tbl = new CenterMiddleTable(8);
            int width[] = { 5, 6, 12, 5, 25, 15, 7, 10 };
            tbl.setWidths(width);
        } else {
            tbl = new CenterMiddleTable(9);
            int width[] = { 5, 5, 6, 12, 5, 25, 15, 7, 10 };
            tbl.setWidths(width);
        }

        tbl.toLeft();
        tbl.setDefaultCellBorder(Rectangle.BOTTOM | Rectangle.TOP | Rectangle.LEFT | Rectangle.RIGHT);

        if (!bShowSito) {
            Iterator it = h.getAttivitaLavorative_Name_View(lCOD_AZL).iterator();
            while (it.hasNext()) {
                AttivitaLavorative_Name_View w = (AttivitaLavorative_Name_View) it.next();
                drawLuogoFisico(home_rs, home_mp, tbl, w.NOM_MAN, w.COD_MAN, bShowSito);
            }
        } else {
            ISitaAziendeHome home_sa = (ISitaAziendeHome) PseudoContext.lookup("SitaAziendeBean");
            Iterator it = home_sa.getNonEmptySiteAziendaleByAZLID_View(lCOD_AZL).iterator();
            while (it.hasNext()) {
                SiteAziendaleByAZLID_View w = (SiteAziendaleByAZLID_View) it.next();
                tbl.setDefaultCellBorder(Rectangle.BOTTOM | Rectangle.TOP | Rectangle.LEFT | Rectangle.RIGHT);
                tbl.addHeaderCellB(ApplicationConfigurator.LanguageManager.getString("Sito.aziendale"), 9);
                tbl.addHeaderCellI(w.NOM_SIT_AZL, 9);

                Iterator it2 = h.getAttivitaLavorative_Name_ViewBySito(w.COD_SIT_AZL).iterator();

                while (it2.hasNext()) {
                    AttivitaLavorative_Name_View ww = (AttivitaLavorative_Name_View) it2.next();
                    drawLuogoFisico(home_rs, home_mp, tbl, ww.NOM_MAN, ww.COD_MAN, bShowSito);
                }

            }
        }
        m_document.add(tbl);
    }
    closeDocument();
}

From source file:s2s.luna.reports.Report_LIS_INR_MAN_AZL.java

License:GNU General Public License

public void drawLuogoFisico(IRischioHome home_rs, IMisurePreventiveHome home_mp, CenterMiddleTable tbl,
        String strName, long lCOD_MAN, boolean bShowSito) throws BadElementException {

    int iTmp = bShowSito ? 1 : 0;
    tbl.setDefaultCellBorder(Rectangle.BOTTOM | Rectangle.TOP | Rectangle.LEFT | Rectangle.RIGHT);
    if (bShowSito) {
        tbl.setDefaultCellBorder(0);// w  ww.  j av a 2s .  c  o m
        tbl.addCell("", 0, 1);
        tbl.setDefaultCellBorder(Rectangle.BOTTOM | Rectangle.TOP | Rectangle.LEFT | Rectangle.RIGHT);
    }
    tbl.addHeaderCellB(ApplicationConfigurator.LanguageManager.getString("Attivit.lavorativa"), 8);
    if (bShowSito) {
        tbl.setDefaultCellBorder(0);
        tbl.addCell("", 0, 1);
        tbl.setDefaultCellBorder(Rectangle.BOTTOM | Rectangle.TOP | Rectangle.LEFT | Rectangle.RIGHT);
    }
    tbl.addHeaderCellI(strName, 8);
    tbl.setDefaultCellBorder(0);
    {
        Iterator it2 = home_rs.getReportRischioByMAN_Name_View(lCOD_AZL, lCOD_MAN).iterator();
        while (it2.hasNext()) {
            ReportRischio_Name_View ww = (ReportRischio_Name_View) it2.next();
            tbl.addCell("", 0, 1 + iTmp);
            tbl.addCellB(ApplicationConfigurator.LanguageManager.getString("Rischio") + ":", 0, 1);
            tbl.addCell(Formatter.format(ww.strNOM_RSO), 0, 4);
            tbl.toRight();
            tbl.addCellB(ApplicationConfigurator.LanguageManager.getString("PxD") + ":", 0, 1);
            tbl.toLeft();
            tbl.addCell(Formatter.format(ww.lSTM_NUM_RSO));
            {
                Iterator it3 = home_mp.getReportMisurePreventive_View(ww.lCOD_RSO_MAN).iterator();
                while (it3.hasNext()) {
                    ReportMisurePreventive_View www = (ReportMisurePreventive_View) it3.next();
                    tbl.addCell("", 0, 2 + iTmp);
                    tbl.addCellB(ApplicationConfigurator.LanguageManager.getString("Misure") + ":", 0, 1);
                    tbl.addCell(www.strNOM_MIS_PET + "\n" + www.strDES_MIS_PET, 0, 3);
                    tbl.toRight();
                    tbl.addCellB(ApplicationConfigurator.LanguageManager.getString("Dt.Comp.") + ":", 0, 1);
                    tbl.toLeft();
                    tbl.addCell(Formatter.format(www.dtDAT_CMP));
                    //tbl.setDefaultColspan(7);
                    {
                        CenterMiddleTable tb = tbl;//new CenterMiddleTable(4);
                        //tb.toLeft();
                        tbl.addCell("", 0, 2 + iTmp);
                        tb.addCellB(
                                ApplicationConfigurator.LanguageManager.getString("Data.pianificazione") + ":",
                                0, 2);
                        tb.addCellB(
                                ApplicationConfigurator.LanguageManager.getString("Referente.dell'intervento")
                                        + ":",
                                0, 1);
                        tb.addCellB(ApplicationConfigurator.LanguageManager.getString("Data.bonifica") + ":", 0,
                                1);
                        tb.addCellB(ApplicationConfigurator.LanguageManager.getString("Costo.intervento") + ":",
                                0, 2);

                        tbl.addCell("", 0, 2 + iTmp);
                        tb.addCell(".... / .... / ....", 0, 2);
                        tb.addCell(".............................................");
                        tb.addCell(".... / .... / ....");
                        tb.addCell(".................................", 0, 2);
                        //tbl.insertTable(tb);
                    }
                    //tbl.setDefaultColspan(1);
                }
            }
        }
    }

}

From source file:s2s.luna.reports.Report_REP_AZL_GSE.java

License:GNU General Public License

@Override
public void doReport() throws DocumentException, IOException, BadElementException, Exception {
    String strTemp = "";
    IAziendaHome home = (IAziendaHome) PseudoContext.lookup("AziendaBean");
    IAzienda bean = home.findByPrimaryKey(new Long(lCOD_AZL));

    initDocument("the doc", null,
            IncludeLogo ? ApplicationConfigurator.LanguageManager.getString("SCHEDA.AZIENDALE")
                    : ApplicationConfigurator.LanguageManager.getString("Informazioni.preliminari"),
            bean.getRAG_SCL_AZL(), null);
    if (IncludeLogo) {
        AddImage();/*from ww  w  .j  ava  2  s  . c o m*/
    }
    // writeIndent();
    {
        CenterMiddleTable tbl = new CenterMiddleTable(1);
        tbl.addHeaderCellB(IncludeLogo ? ApplicationConfigurator.LanguageManager.getString("SCHEDA.AZIENDALE")
                : ApplicationConfigurator.LanguageManager.getString("Informazioni.preliminari"));
        tbl.addTitleCell(bean.getRAG_SCL_AZL());
        m_document.add(tbl);
    }
    {// Dati anagrafici
        writeParagraph1(ApplicationConfigurator.LanguageManager.getString("Dati.anagrafici"));
        CenterMiddleTable tbl = new CenterMiddleTable(2);
        tbl.toLeft();
        int width[] = { 30, 79 };
        tbl.setWidths(width);

        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Attivit.svolta")); //ok
        tbl.addCell(bean.getDES_ATI_SVO_AZL());
        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Indirizzo.n.civico"));// ok
        tbl.addCell(bean.getIDZ_AZL() + ", " + bean.getNUM_CIC_AZL());
        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Citt.C.A.P."));// ok
        if (bean.getCAP_AZL() != null) {
            tbl.addCell(bean.getCIT_AZL() + " - " + bean.getCAP_AZL());
        } else {
            tbl.addCell(bean.getCIT_AZL());
        }
        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Provincia"));// ok
        tbl.addCell(bean.getPRV_AZL());
        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Nazionalit"));// ok
        strTemp = "";
        INazionalitaHome h = (INazionalitaHome) PseudoContext.lookup("NazionalitaBean");
        INazionalita b = h.findByPrimaryKey(new Long(bean.getCOD_STA()));
        tbl.addCell(b.getNOM_STA());
        m_document.add(tbl);
    }
    {// Dati sulla sicurezza
        writeParagraph1(ApplicationConfigurator.LanguageManager.getString("Dati.sulla.sicurezza"));
        CenterMiddleTable tbl = new CenterMiddleTable(2);
        tbl.toLeft();
        int width[] = { 30, 79 };
        tbl.setWidths(width);

        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Datore.di.lavoro"));// ok
        tbl.addCell(bean.getNOM_RSP_AZL());
        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Qualifica.del.datore.lavoro"));//ok
        tbl.addCell(bean.getQLF_RSP_AZL());

        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Resp.aziendale.SPP"));// ok
        tbl.addCell(bean.getNOM_RSP_SPP_AZL());
        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Medico.competente"));// ok
        tbl.addCell(bean.getNOM_MED_AZL());
        m_document.add(tbl);
    }
    {// Altro
        writeParagraph1(ApplicationConfigurator.LanguageManager.getString("Altro"));
        CenterMiddleTable tbl = new CenterMiddleTable(2);
        tbl.toLeft();
        int width[] = { 30, 79 };
        tbl.setWidths(width);

        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("E-mail.aziendale"));// ok
        tbl.addCell(bean.getIDZ_PSA_ELT_RSP_AZL());
        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Sito.internet.aziendale"));// ok
        tbl.addCell(bean.getSIT_INT_AZL());
        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Azienda.associata"));
        if (bean.getCOD_AZL_ASC() == 0) {
            tbl.addCell("");
        } else {
            strTemp = "";
            IAziendaHome h = (IAziendaHome) PseudoContext.lookup("AziendaBean");
            IAzienda b = h.findByPrimaryKey(new Long(bean.getCOD_AZL_ASC()));

            tbl.addCell(b.getRAG_SCL_AZL());
        }
        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Codice.ISTAT"));//ok
        tbl.addCell(bean.getCOD_IST_TAT_AZL());
        tbl.addCell(ApplicationConfigurator.LanguageManager.getString("Telefoni.utili"));//ok
        strTemp = "";
        IAziendaTelefonoHome h = (IAziendaTelefonoHome) PseudoContext.lookup("AziendaTelefonoBean");
        Iterator it = h.getAziendaTelefoniByAZLID_View(lCOD_AZL).iterator();
        while (it.hasNext()) {
            AziendaTelefoniByAZLID_View w = (AziendaTelefoniByAZLID_View) it.next();
            strTemp += w.NUM_TEL;
            if (it.hasNext()) {
                strTemp += ", ";
            }
        }
        tbl.addCell(strTemp);
        m_document.add(tbl);
    }
    {// Rappresentanti dei lavoratori
        writeParagraph1(ApplicationConfigurator.LanguageManager.getString("Rappresentanti.dei.lavoratori"));
        CenterMiddleTable tbl = new CenterMiddleTable(2);
        tbl.toLeft();
        int width[] = { 30, 79 };
        tbl.setWidths(width);

        Cell rlsCell = new Cell(ApplicationConfigurator.LanguageManager.getString("R.L.S."));
        rlsCell.setVerticalAlignment(Element.ALIGN_TOP);
        tbl.addCell(rlsCell);//ok
        strTemp = "";
        IDipendenteHome home_dpd = (IDipendenteHome) PseudoContext.lookup("DipendenteBean");
        java.util.Iterator it_dip = home_dpd.getDipendentiByAZLID_RLS_View(lCOD_AZL).iterator();
        while (it_dip.hasNext()) {
            DipendentiByAZLID_View dt = (DipendentiByAZLID_View) it_dip.next();
            strTemp += Formatter.format(dt.COG_DPD);
            strTemp += " " + Formatter.format(dt.NOM_DPD);
            if (it_dip.hasNext()) {
                strTemp += "\n";
            }
        }
        tbl.addCell(strTemp);
        m_document.add(tbl);
    }
    {// Siti aziendali
        writeParagraph1(ApplicationConfigurator.LanguageManager.getString("Sedi"));
        CenterMiddleTable tbl = new CenterMiddleTable(5);
        tbl.toLeft();
        int width[] = { 22, 25, 25, 20, 8 };
        tbl.setWidths(width);

        tbl.addHeaderCellB(ApplicationConfigurator.LanguageManager.getString("Sede"));// ok
        tbl.addHeaderCellB(ApplicationConfigurator.LanguageManager.getString("Immobile"));// ok
        tbl.addHeaderCellB(ApplicationConfigurator.LanguageManager.getString("Indirizzo"));
        tbl.addHeaderCellB(ApplicationConfigurator.LanguageManager.getString("Citt.C.A.P."));
        tbl.addHeaderCellB(ApplicationConfigurator.LanguageManager.getString("Prov."));
        tbl.endHeaders();

        IImmobili3lvHome imm3lv = (IImmobili3lvHome) PseudoContext.lookup("Immobili3lvBean");
        Iterator imm3lv_it = imm3lv.findEx(lCOD_AZL, null, null, null, null, null, null, null, null, 0)
                .iterator();
        String previousNOM_SIT_AZL = "";
        while (imm3lv_it.hasNext()) {
            Immobili3liv_View immobile3lv = (Immobili3liv_View) imm3lv_it.next();
            Cell nomSitAzlCell = null;
            // Cambio sede
            if (previousNOM_SIT_AZL.equals(immobile3lv.NOM_SIT_AZL) == false) {
                nomSitAzlCell = new Cell(immobile3lv.NOM_SIT_AZL);
                if (imm3lv_it.hasNext()) {
                    nomSitAzlCell.setBorder(Rectangle.TOP | Rectangle.LEFT | Rectangle.RIGHT);
                }
                // Sede uguale alle precedente
            } else {
                nomSitAzlCell = new Cell("");
                if (imm3lv_it.hasNext()) {
                    nomSitAzlCell.setBorder(Rectangle.LEFT | Rectangle.RIGHT);
                } else {
                    nomSitAzlCell.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
                }
            }
            tbl.addCell(nomSitAzlCell);
            previousNOM_SIT_AZL = immobile3lv.NOM_SIT_AZL;
            tbl.addCell(Formatter.format(immobile3lv.NOM_IMM));
            tbl.addCell(Formatter.format(immobile3lv.IND_IMM)
                    + (StringManager.isNotEmpty(immobile3lv.IND_IMM)
                            && StringManager.isNotEmpty(immobile3lv.NUM_CIV_IMM) ? ", " : "")
                    + Formatter.format(immobile3lv.NUM_CIV_IMM));
            tbl.addCell(Formatter.format(immobile3lv.CIT_IMM)
                    + (StringManager.isNotEmpty(immobile3lv.CIT_IMM)
                            && StringManager.isNotEmpty(immobile3lv.CAP_IMM) ? " - " : "")
                    + Formatter.format(immobile3lv.CAP_IMM));
            tbl.addCell(Formatter.format(immobile3lv.PRO_IMM));
        }
        m_document.add(tbl);
    }
    closeDocument();
}

From source file:s2s.luna.reports.Report_REP_SCH_RSO_NEW_DVR.java

License:GNU General Public License

private MiddleTable prepareAttivitaTableHeader(short sMOD_CLC_RSO) throws Exception {
    int numberOfColumnsAttivitaLavorative = (sMOD_CLC_RSO == Azienda_MOD_CLC_RSO.MOD_EXTENDED) ? 7 : 5;
    MiddleTable rischioMansioneTable = new MiddleTable(numberOfColumnsAttivitaLavorative);
    rischioMansioneTable.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.TOP | Rectangle.BOTTOM);

    if (sMOD_CLC_RSO == Azienda_MOD_CLC_RSO.MOD_BASE) {
        int rischiAttivitaLavorativeWidth[] = { 45, 40, 5, 5, 5 };
        rischioMansioneTable.setWidths(rischiAttivitaLavorativeWidth);
    } else if (sMOD_CLC_RSO == Azienda_MOD_CLC_RSO.MOD_EXTENDED) {
        int rischiAttivitaLavorativeWidth[] = { 45, 30, 5, 5, 5, 5, 5 };
        rischioMansioneTable.setWidths(rischiAttivitaLavorativeWidth);
    }//from   w w w. j  a  v  a  2s  . c  o  m

    // Intestazione della tabella
    rischioMansioneTable.addHeaderCellBI(
            ApplicationConfigurator.LanguageManager.getString("Gruppo.omogeneo.di.lavoratori"), 1, true, 8);
    rischioMansioneTable.toCenter();
    rischioMansioneTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("MPP.applicate"), 1,
            true, 8);
    rischioMansioneTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("P"), 1, true, 8);
    rischioMansioneTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("D"), 1, true, 8);
    if (sMOD_CLC_RSO == Azienda_MOD_CLC_RSO.MOD_EXTENDED) {
        rischioMansioneTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("F"), 1, true,
                8);
        rischioMansioneTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("N"), 1, true,
                8);
    }
    rischioMansioneTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("R"), 1, true, 8);
    rischioMansioneTable.toLeft();

    return rischioMansioneTable;
}

From source file:s2s.luna.reports.Report_REP_SCH_RSO_NEW_DVR.java

License:GNU General Public License

private MiddleTable prepareLuogoFisicoTableHeader(short sMOD_CLC_RSO) throws Exception {
    int numberOfColumnsLuoghiFisici = (sMOD_CLC_RSO == Azienda_MOD_CLC_RSO.MOD_EXTENDED) ? 7 : 5;
    MiddleTable rischiLuoghiFisiciTable = new MiddleTable(numberOfColumnsLuoghiFisici);
    rischiLuoghiFisiciTable.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.TOP | Rectangle.BOTTOM);

    if (sMOD_CLC_RSO == Azienda_MOD_CLC_RSO.MOD_BASE) {
        int rischiLuoghiFisiciWidth[] = { 45, 40, 5, 5, 5 };
        rischiLuoghiFisiciTable.setWidths(rischiLuoghiFisiciWidth);
    } else if (sMOD_CLC_RSO == Azienda_MOD_CLC_RSO.MOD_EXTENDED) {
        int rischiLuoghiFisiciWidth[] = { 45, 30, 5, 5, 5, 5, 5 };
        rischiLuoghiFisiciTable.setWidths(rischiLuoghiFisiciWidth);
    }//from  w ww. j a  va2 s  .  c  o  m

    // Intestazione della tabella
    rischiLuoghiFisiciTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("Luoghi.fisici"),
            1, true, 8);
    rischiLuoghiFisiciTable.toCenter();
    rischiLuoghiFisiciTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("MPP.applicate"),
            1, true, 8);
    rischiLuoghiFisiciTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("P"), 1, true, 8);
    rischiLuoghiFisiciTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("D"), 1, true, 8);
    if (sMOD_CLC_RSO == Azienda_MOD_CLC_RSO.MOD_EXTENDED) {
        rischiLuoghiFisiciTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("F"), 1, true,
                8);
        rischiLuoghiFisiciTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("N"), 1, true,
                8);
    }
    rischiLuoghiFisiciTable.addHeaderCellBI(ApplicationConfigurator.LanguageManager.getString("R"), 1, true, 8);
    rischiLuoghiFisiciTable.toLeft();

    return rischiLuoghiFisiciTable;
}