protected FramedPanel panelMain() {

    FramedPanel panel = new FramedPanel();
    panel.setHeadingText("Batal Transaksi Nota Buku");
    panel.setBodyStyle("background: none; padding: 5px");
    //        panel.setWidth(650);

    VerticalLayoutContainer p = new VerticalLayoutContainer();
    panel.add(p);

    // panel "Batal Nota Buku"
    FramedPanel panelBatalNotaBuku = new FramedPanel();
    panelBatalNotaBuku.setHeadingText("Pembatalan Transaksi Nota Buku");
    panelBatalNotaBuku.setBodyStyle("background: none; padding: 5px");
    //        panelAnggotaNotaBuku.setWidth(623);
    //        panelAnggotaNotaBuku.setHeight(400);

    VerticalLayoutContainer vlcBatalNotaBuku = new VerticalLayoutContainer();
    panelBatalNotaBuku.add(vlcBatalNotaBuku);

    hlcBatalNotaBuku = new HorizontalPanel();

    // panel " batal data"
    FramedPanel panelBatalData = new FramedPanel();
    FieldSet fsPembatalan = new FieldSet();
    panelBatalData.setHeadingText("Tambah Data");
    panelBatalData.setBodyStyle("background: none; padding: 5px");
    //        panelTambahData.setWidth(400);
    //        panelTambahData.setHeight(250);

    //        VerticalLayoutContainer vlcTambahData= new VerticalLayoutContainer();
    HorizontalPanel hlcPembatalan = new HorizontalPanel();

    Label lbl01 = new Label("Pilih Kode Kolektif: ");
    //        lbl01.getElement().getStyle().setMarginLeft(5, Style.Unit.PX);
    //        lbl01.getElement().getStyle().setMarginRight(5, Style.Unit.PX);
    //        lbl01.getElement().getStyle().setMarginTop(3, Style.Unit.PX);
    hlcPembatalan.add(lbl01);

    IconComboBox cbPilihKode = new IconComboBox();
    //         cbPilihKode.setComboWidth(20);
    hlcPembatalan.add(cbPilihKode);

    TextField txKodeKolektif = new TextField();
    hlcPembatalan.add(txKodeKolektif);
    TextButton btnKodeKolektif = new TextButton("Ambil Data");
    hlcPembatalan.add(btnKodeKolektif);

    fsPembatalan.add(hlcPembatalan);
    panelBatalData.add(fsPembatalan);

    //        hlcNota.add(panelTambahData);

    vlcBatalNotaBuku.add(panelBatalData);

    //        vlcAnggotaNotaBuku.add(fs);

    p.add(panelBatalNotaBuku);

    // panel "Data CN"

    IconDynamicGrid gpDataCN = new IconDynamicGrid();
    gpDataCN.setGridHeader("Data Tagihan");
    gpDataCN.setGridDimension(623, 200);
    gpDataCN.setStoreUrl("BasicProject/thuGetString.json?name=store1");
    gpDataCN.addColumn("CEK", 100);
    gpDataCN.addColumn("KDPP", 100);
    gpDataCN.addColumn("NO_BATULV06", 100);
    gpDataCN.addColumn("TGLTRANSAKSI", 100);
    gpDataCN.addColumn("TRANSAKSIID", 100);
    gpDataCN.addColumn("TRANSAKSIBY", 100);
    gpDataCN.addColumn("TGL_PELUNASAN", 100);
    gpDataCN.addColumn("TGL_SETOR", 100);
    gpDataCN.addColumn("RPTOTAL", 100);

    p.add(gpDataCN);

    FieldSet fs = new FieldSet();
    VerticalLayoutContainer vclBk = new VerticalLayoutContainer();
    TextField txRpTagihan = new TextField();
    vclBk.add(new FieldLabel(txRpTagihan, "RP Tagihan"));

    TextField txRpBk = new TextField();
    vclBk.add(new FieldLabel(txRpBk, "RP BK"));
    fs.add(vclBk);

    p.add(fs);
    HorizontalPanel hlcButton = new HorizontalPanel();
    TextButton btnProses = new TextButton("Proses");
    TextButton btnReset = new TextButton("Reset");
    //        btnProses.setIconAlign(ButtonCell.IconAlign.LEFT);
    hlcButton.add(btnProses);
    hlcButton.add(btnReset);

    p.add(hlcButton);
    return panel;
  }
예제 #2
0
  public Widget getWidget() {
    form2 = new FramedPanel();
    form2.setHeadingText("");
    form2.setWidth("100%");

    FieldSet fieldSet = new FieldSet();
    fieldSet.setHeadingText("Emailing Setting");
    fieldSet.setCollapsible(true);
    fieldSet.setHeight(155);
    form2.add(fieldSet);

    VerticalLayoutContainer p = new VerticalLayoutContainer();
    fieldSet.add(p);
    HorizontalPanel hp = new HorizontalPanel();
    //	    statusButton.setValue(true);
    //	    final TextButton refreshButton = new TextButton();
    //	    refreshButton.setIcon(ressources.loading());
    //	    statusButton.setWidth("60px");
    hp.add(statusButton);
    //	    hp.add(refreshButton);
    p.add(new FieldLabel(hp, "System status"));

    month.setTriggerAction(TriggerAction.ALL);
    month.setEditable(false);
    month.setWidth(100);
    month.add(lFrequency);

    month.addSelectionHandler(
        new SelectionHandler<String>() {

          @Override
          public void onSelection(SelectionEvent<String> event) {}
        });
    p.add(new FieldLabel(month, "Frequency"), new VerticalLayoutData(1, -1));
    date.addParseErrorHandler(
        new ParseErrorHandler() {

          @Override
          public void onParseError(ParseErrorEvent event) {
            Info.display("Parse Error", event.getErrorValue() + " could not be parsed as a date");
          }
        });

    date.addValueChangeHandler(
        new ValueChangeHandler<Date>() {

          @Override
          public void onValueChange(ValueChangeEvent<Date> event) {
            String v =
                event.getValue() == null
                    ? "nothing"
                    : DateTimeFormat.getFormat(PredefinedFormat.DATE_MEDIUM)
                        .format(event.getValue());
          }
        });
    //	    date.addValidator(new MinDateValidator(new Date()));
    p.add(new FieldLabel(date, "Starting date"), new VerticalLayoutData(1, -1));

    time.addParseErrorHandler(
        new ParseErrorHandler() {

          @Override
          public void onParseError(ParseErrorEvent event) {}
        });

    time.setMinValue(new DateWrapper().clearTime().addHours(8).asDate());
    time.setMaxValue(new DateWrapper().clearTime().addHours(18).addSeconds(1).asDate());
    p.add(new FieldLabel(time, "Starting time"), new VerticalLayoutData(1, -1));

    statusButton.addValueChangeHandler(
        new ValueChangeHandler<Boolean>() {

          @Override
          public void onValueChange(ValueChangeEvent<Boolean> event) {
            statusButton.setText(statusButton.getValue() ? "On" : "Off");
          }
        });
    load();
    form2.addButton(refresh);
    form2.addButton(save);
    refresh.addSelectHandler(
        new SelectHandler() {

          @Override
          public void onSelect(SelectEvent event) {
            refresh.setIcon(ressources.loading());
            refresh.setEnabled(false);
            load();
          }
        });
    save.addSelectHandler(
        new SelectHandler() {

          @Override
          public void onSelect(SelectEvent event) {
            save.setIcon(ressources.loading());
            save.setEnabled(false);
            save();
          }
        });
    return form2;
  }