コード例 #1
0
  public void setTableProperties() {

    setVisibleTableProperties("selected", "recapno", "divisionBean", "invoicedate");

    //		table.setColumnCollapsingAllowed(true);
    //		try{
    //			table.setColumnCollapsed("state", true);
    //			table.setColumnCollapsed("birthDate", true);
    //			table.setColumnCollapsed("joinDate", true);
    //
    //		} catch(Exception ex){}

    // ALIGNMENT
    table.setColumnAlignment("id", Align.CENTER);
    table.setColumnAlignment("invoicedate", Align.CENTER);
    table.setColumnAlignment("closing", Align.CENTER);
    table.setColumnAlignment("entrydate", Align.CENTER);

    // SET HEADER
    table.setColumnHeader("selected", "<input type='checkbox'/>");
    table.setColumnHeader("id", "DIV-REFNO");
    table.setColumnHeader("divisionBean", "DIVISI");
    table.setColumnHeader("invoicedate", "RECAP/INV. DATE");
    table.setColumnHeader("recapno", "NO. REKAP");

    //		table.setColumnExpandRatio("selected", 2);
    //		table.setColumnExpandRatio("recapno", 3);

  }
コード例 #2
0
  public Table buildTable(TimingsTableDataHolder holder) {
    Table table = new Table();
    table.setWidth("100%");
    table.setPageLength(0);
    table.addStyleName("pq");
    table.setSortEnabled(false);
    table.setFooterVisible(true);
    table.setColumnCollapsingAllowed(true);
    table.setColumnCollapsible(columnNames[0], false);
    table.setColumnCollapsible(columnNames[1], false);
    table.setColumnCollapsible(columnNames[3], false);

    table.setColumnAlignment(columnNames[0], Table.Align.LEFT);
    for (String name : columnNames) {
      table.addContainerProperty(name, String.class, null);
      table.setColumnExpandRatio(name, 2);
    }
    fillTable(table, holder.getTotal(), holder.getRows());

    return table;
  }
コード例 #3
0
  public void setTablePropertiesList() {

    setVisibleTablePropertiesList("refno", "norek", "trdate", "posting");

    tableList.setColumnCollapsingAllowed(true);
    try {
      tableList.setColumnCollapsed("refno", true);
      tableList.setColumnCollapsed("amount", true);

    } catch (Exception ex) {
    }

    // ALIGNMENT
    tableList.setColumnAlignment("invoicedate", Align.CENTER);
    tableList.setColumnAlignment("trdate", Align.CENTER);
    tableList.setColumnAlignment("posting", Align.CENTER);
    tableList.setColumnAlignment("amountafterdisc", Align.RIGHT);
    tableList.setColumnAlignment("amountafterdiscafterppn", Align.RIGHT);
    tableList.setColumnAlignment("amountpay", Align.RIGHT);

    // SET HEADER
    tableList.setColumnHeader("refno", "REF");
    tableList.setColumnHeader("norek", "NO. DOC");
    tableList.setColumnHeader("trdate", "MULAI BERLAKU");
    tableList.setColumnHeader("posting", "POSTING");

    tableList.setColumnHeader("podate", "PO. DATE");
    tableList.setColumnHeader("amount", "AMOUNT");
    tableList.setColumnHeader("amountafterdisc", "DPP");
    tableList.setColumnHeader("amountafterdiscafterppn", "DPP+PPN");
    tableList.setColumnHeader("amountpay", "AMOUNTPAY");

    //		tableList.setColumnExpandRatio("nopo", 1);
    //		tableList.setColumnExpandRatio("invoiceno", 4);
    //		tableList.setColumnExpandRatio("invoicedate", 10);
    //		tableList.setColumnExpandRatio("pprice", 5);
    //		tableList.setColumnExpandRatio("podate", 4);
    //		tableList.setColumnExpandRatio("amount", 4);
    //		tableList.setColumnExpandRatio("amountpay", 4);
    //		tableList.setColumnExpandRatio("podate", 4);
    //		tableList.setColumnExpandRatio("amount", 4);
    //		tableList.setColumnExpandRatio("amountpay", 4);

  }
コード例 #4
0
  public void setTablePropertiesDetil() {
    setVisibleTablePropertiesDetil(
        "id",
        "nourut",
        "fproductBean.pcode",
        "fproductBean.pname",
        "fproductBean.packaging",
        "fproductBean.pprice",
        "fproductBean.ppriceafterppn",
        "fproductBean.pprice2",
        "fproductBean.pprice2afterppn",
        "fproductBean.sprice",
        "fproductBean.spriceafterppn",
        "fproductBean.sprice2",
        "fproductBean.sprice2afterppn",
        "pprice",
        "ppriceafterppn",
        "pprice2",
        "pprice2afterppn",
        "sprice",
        "spriceafterppn",
        "sprice2",
        "sprice2afterppn",
        "ppricebefore",
        "pprice2before",
        "spricebefore",
        "sprice2before",
        "ftpricehBean",
        "fproductBean");

    tableDetil.setColumnCollapsingAllowed(true);

    try {
      tableDetil.setColumnCollapsed("id", true);
      tableDetil.setColumnCollapsed("nourut", true);

      tableDetil.setColumnCollapsed("fproductBean.pprice", true);
      tableDetil.setColumnCollapsed("fproductBean.ppriceafterppn", true);
      tableDetil.setColumnCollapsed("fproductBean.pprice2", true);
      tableDetil.setColumnCollapsed("fproductBean.pprice2afterppn", true);
      tableDetil.setColumnCollapsed("fproductBean.sprice", true);
      tableDetil.setColumnCollapsed("fproductBean.spriceafterppn", true);
      tableDetil.setColumnCollapsed("fproductBean.sprice2", true);
      tableDetil.setColumnCollapsed("fproductBean.sprice2afterppn", true);

      tableDetil.setColumnCollapsed("fproductBean.sprice", true);
      tableDetil.setColumnCollapsed("fproductBean.spriceafterppn", true);
      tableDetil.setColumnCollapsed("fproductBean.sprice2", true);
      tableDetil.setColumnCollapsed("fproductBean.sprice2afterppn", true);

      tableDetil.setColumnCollapsed("pprice", true);
      tableDetil.setColumnCollapsed("pprice2", true);
      tableDetil.setColumnCollapsed("sprice", true);
      tableDetil.setColumnCollapsed("sprice2", true);

      tableDetil.setColumnCollapsed("ppricebefore", true);
      tableDetil.setColumnCollapsed("pprice2before", true);
      tableDetil.setColumnCollapsed("spricebefore", true);
      tableDetil.setColumnCollapsed("sprice2before", true);

      tableDetil.setColumnCollapsed("ftpricehBean", true);
      tableDetil.setColumnCollapsed("fproductBean", true);

    } catch (Exception ex) {
    }

    // ALIGNMENT
    tableDetil.setColumnAlignment("id", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.pprice", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.ppriceafterppn", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.pprice2", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.pprice2afterppn", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.sprice", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.spriceafterppn", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.sprice2", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.sprice2afterppn", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.pcode", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.pcode", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.pcode", Align.RIGHT);
    tableDetil.setColumnAlignment("fproductBean.pcode", Align.RIGHT);

    tableDetil.setColumnAlignment("pprice", Align.RIGHT);
    tableDetil.setColumnAlignment("ppriceafterppn", Align.RIGHT);
    tableDetil.setColumnAlignment("pprice2", Align.RIGHT);
    tableDetil.setColumnAlignment("pprice2afterppn", Align.RIGHT);
    tableDetil.setColumnAlignment("pprice2", Align.RIGHT);
    tableDetil.setColumnAlignment("sprice", Align.RIGHT);
    tableDetil.setColumnAlignment("spriceafterppn", Align.RIGHT);
    tableDetil.setColumnAlignment("sprice2", Align.RIGHT);
    tableDetil.setColumnAlignment("sprice2afterppn", Align.RIGHT);

    tableDetil.setColumnAlignment("ppricebefore", Align.RIGHT);
    tableDetil.setColumnAlignment("pprice2before", Align.RIGHT);
    tableDetil.setColumnAlignment("spricebefore", Align.RIGHT);
    tableDetil.setColumnAlignment("sprice2before", Align.RIGHT);

    // SET HEADER
    tableDetil.setColumnHeader("id", "ID");
    tableDetil.setColumnHeader("nourut", "No.");
    tableDetil.setColumnHeader("fproductBean.pcode", "KODE");
    tableDetil.setColumnHeader("fproductBean.pname", "NAMA PRODUK");
    tableDetil.setColumnHeader("fproductBean.packaging", "PACKAGING");
    tableDetil.setColumnHeader("fproductBean.pprice", "H.BELI ACTUAL");
    tableDetil.setColumnHeader("fproductBean.ppriceafterppn", "H.BELI+PPN ACTUAL");
    tableDetil.setColumnHeader("fproductBean.pprice2", "H.BELI+PPN ACTUAL");
    tableDetil.setColumnHeader("fproductBean.pprice2afterppn", "H.BELIPCS+PPN ACTUAL");
    tableDetil.setColumnHeader("fproductBean.sprice", "H.JUAL+PPN ACTUAL");
    tableDetil.setColumnHeader("fproductBean.spriceafterppn", "H.JUAL+PPN ACTUAL");
    tableDetil.setColumnHeader("fproductBean.sprice2", "H.JUALPCS ACTUAL");
    tableDetil.setColumnHeader("fproductBean.sprice2afterppn", "H.JUALPCS+PPN ACTUAL");

    tableDetil.setColumnHeader("ppricebefore", "H.BELI SEBELUM");
    tableDetil.setColumnHeader("pprice2before", "H.BELI PCS SEBELUM");
    tableDetil.setColumnHeader("spricebefore", "H.JUAL SEBELUM");
    tableDetil.setColumnHeader("sprice2before", "H.JUALPCS SEBELUM");

    tableDetil.setColumnHeader("pprice", "H.BELI");
    tableDetil.setColumnHeader("ppriceafterppn", "H.BELI+PPN");
    tableDetil.setColumnHeader("pprice2", "H.BELIPCS");
    tableDetil.setColumnHeader("pprice2afterppn", "H.BELIPCS+PPN");
    tableDetil.setColumnHeader("sprice", "H.JUAL");
    tableDetil.setColumnHeader("spriceafterppn", "H.JUAL+PPN");
    tableDetil.setColumnHeader("sprice2", "H.JUALPCS");
    tableDetil.setColumnHeader("sprice2afterppn", "H.JUALPCS+PPN");
    tableDetil.setColumnHeader("ftpricehBean", "PRICEH");
    tableDetil.setColumnHeader("fproductBean", "PRODUCT");

    tableDetil.setColumnExpandRatio("id", 1);
    tableDetil.setColumnExpandRatio("fproductBean.pcode", 4);
    tableDetil.setColumnExpandRatio("fproductBean.pname", 10);
    tableDetil.setColumnExpandRatio("fproductBean.packaging", 5);
    tableDetil.setColumnExpandRatio("pprice", 5);
    tableDetil.setColumnExpandRatio("ppriceafterppn", 5);
    tableDetil.setColumnExpandRatio("pprice2", 5);
    tableDetil.setColumnExpandRatio("pprice2afterppn", 5);
    tableDetil.setColumnExpandRatio("sprice", 5);
    tableDetil.setColumnExpandRatio("spriceafterppn", 5);
    tableDetil.setColumnExpandRatio("sprice2", 5);
    tableDetil.setColumnExpandRatio("sprice2afterppn", 5);
  }