예제 #1
0
  @AutoGenerated
  private HorizontalLayout buildHorizontalLayout_1() {
    // common part: create layout
    horizontalLayout_1 = new HorizontalLayout();
    horizontalLayout_1.setImmediate(false);
    horizontalLayout_1.setWidth("-1px");
    horizontalLayout_1.setHeight("-1px");
    horizontalLayout_1.setMargin(false);
    horizontalLayout_1.setSpacing(true);

    // cmbPolicia
    cmbPolicia = new ComboBox();
    cmbPolicia.setCaption("Policia");
    cmbPolicia.setImmediate(false);
    cmbPolicia.setWidth("230px");
    cmbPolicia.setHeight("-1px");
    horizontalLayout_1.addComponent(cmbPolicia);

    // btnAgregarPolicia
    btnAgregarPolicia = new Button();
    btnAgregarPolicia.setCaption(" ");
    btnAgregarPolicia.setImmediate(true);
    btnAgregarPolicia.setWidth("-1px");
    btnAgregarPolicia.setHeight("-1px");
    horizontalLayout_1.addComponent(btnAgregarPolicia);
    horizontalLayout_1.setComponentAlignment(btnAgregarPolicia, new Alignment(9));

    return horizontalLayout_1;
  }
예제 #2
0
  ComboBox userList() {
    users.setCaption("Users: ");
    users.setWidth("200px");
    users.setNullSelectionAllowed(false);
    users.addContainerProperty("y", String.class, "");
    users.setItemCaptionPropertyId("y");

    Item i;
    for (User u : service.getUserList()) {
      i = users.addItem(u.getId());
      i.getItemProperty("y").setValue(u.getUsername());
    }

    users.addListener(
        new ValueChangeListener() {

          @Override
          public void valueChange(Property.ValueChangeEvent event) {
            allowedBackwardInputAttendance.setValue(
                service.isUserAllowedToEnterPreviousAttendance(
                    util.convertStringToInteger(event.getProperty().getValue().toString())));
          }
        });

    users.setImmediate(true);

    return users;
  }
예제 #3
0
  protected final void setupRowPerPageCombo(
      final PMContext ctx, final PaginatedList list, HorizontalLayout l, final PMMainWindow window)
      throws UnsupportedOperationException {
    rowPerPage = new ComboBox();
    rowPerPage.addItem("5");
    rowPerPage.addItem("10");
    rowPerPage.addItem("20");
    rowPerPage.addItem("50");
    if (list.getRowsPerPage() == null) {
      rowPerPage.select("10");
    } else {
      rowPerPage.select(list.getRowsPerPage().toString());
    }
    rowPerPage.setNullSelectionAllowed(false);
    rowPerPage.setNewItemsAllowed(false);
    rowPerPage.setWidth("50px");
    rowPerPage.setFilteringMode(Filtering.FILTERINGMODE_OFF);
    rowPerPage.setImmediate(true);
    rowPerPage.addListener(
        new ValueChangeListener() {

          public void valueChange(Property.ValueChangeEvent event) {
            list.setRowsPerPage(Integer.parseInt((String) event.getProperty().getValue()));
            PMContext c = cloneContext(ctx);
            c.put("rows_per_page", list.getRowsPerPage());
            final ListCommand cmd = new ListCommand(c);
            window.setMainScreen(cmd.execute());
          }
        });
    l.addComponent(rowPerPage);
  }
예제 #4
0
 private ComboBox createSelect() {
   final ComboBox outSelect = new ComboBox(null);
   outSelect.setStyleName("ripla-select"); // $NON-NLS-1$
   outSelect.setWidth(55, Unit.PIXELS);
   outSelect.setNullSelectionAllowed(false);
   outSelect.setImmediate(true);
   return outSelect;
 }
 @Override
 protected void setup(VaadinRequest request) {
   ComboBox cb = new ComboBox("200px wide ComboBox with 100% wide suggestion popup", items);
   cb.setPopupWidth("100%");
   cb.setWidth("200px");
   cb.addStyleName("width-as-percentage");
   addComponent(cb);
 }
예제 #6
0
  @AutoGenerated
  private AbsoluteLayout buildAbsLCaracteristicas2() {
    // common part: create layout
    absLCaracteristicas2 = new AbsoluteLayout();
    absLCaracteristicas2.setImmediate(false);
    absLCaracteristicas2.setWidth("100.0%");
    absLCaracteristicas2.setHeight("45px");

    // cmbEtapa
    cmbEtapa = new ComboBox();
    cmbEtapa.setCaption("Etapa Fenológica");
    cmbEtapa.setImmediate(false);
    cmbEtapa.setWidth("250px");
    cmbEtapa.setHeight("25px");
    absLCaracteristicas2.addComponent(cmbEtapa, "top:18.0px;left:10.0px;");

    // txtSupRegada
    txtSupRegada = new TextField();
    txtSupRegada.setCaption("Superficie Regada");
    txtSupRegada.setImmediate(false);
    txtSupRegada.setWidth("100px");
    txtSupRegada.setHeight("25px");
    absLCaracteristicas2.addComponent(txtSupRegada, "top:18.0px;left:280.0px;");

    // lblSupRegada
    lblSupRegada = new Label();
    lblSupRegada.setImmediate(false);
    lblSupRegada.setWidth("-1px");
    lblSupRegada.setHeight("-1px");
    lblSupRegada.setValue("ha");
    absLCaracteristicas2.addComponent(lblSupRegada, "top:22.0px;left:385.0px;");

    // txtProfRaices
    txtProfRaices = new TextField();
    txtProfRaices.setCaption("Prof. de Raíces");
    txtProfRaices.setImmediate(false);
    txtProfRaices.setWidth("100px");
    txtProfRaices.setHeight("25px");
    absLCaracteristicas2.addComponent(txtProfRaices, "top:18.0px;left:415.0px;");

    // lblProfRaices
    lblProfRaices = new Label();
    lblProfRaices.setImmediate(false);
    lblProfRaices.setWidth("-1px");
    lblProfRaices.setHeight("-1px");
    lblProfRaices.setValue("cm");
    absLCaracteristicas2.addComponent(lblProfRaices, "top:22.0px;left:520.0px;");

    return absLCaracteristicas2;
  }
예제 #7
0
  @AutoGenerated
  private HorizontalLayout buildHorizontalLayout_1() {
    // common part: create layout
    horizontalLayout_1 = new HorizontalLayout();
    horizontalLayout_1.setImmediate(false);
    horizontalLayout_1.setWidth("-1px");
    horizontalLayout_1.setHeight("-1px");
    horizontalLayout_1.setMargin(false);
    horizontalLayout_1.setSpacing(true);

    // textAreaDescription
    textAreaDescription = new TextArea();
    textAreaDescription.setCaption("Enter A Description");
    textAreaDescription.setImmediate(false);
    textAreaDescription.setWidth("50.0%");
    textAreaDescription.setHeight("-1px");
    horizontalLayout_1.addComponent(textAreaDescription);

    // textFieldFilter
    textFieldFilter = new TextField();
    textFieldFilter.setCaption("Filter Function By ID");
    textFieldFilter.setImmediate(false);
    textFieldFilter.setWidth("-1px");
    textFieldFilter.setHeight("-1px");
    horizontalLayout_1.addComponent(textFieldFilter);
    horizontalLayout_1.setComponentAlignment(textFieldFilter, new Alignment(9));

    // comboBoxDatatypeFilter
    comboBoxDatatypeFilter = new ComboBox();
    comboBoxDatatypeFilter.setCaption("Filter By Data Type");
    comboBoxDatatypeFilter.setImmediate(false);
    comboBoxDatatypeFilter.setWidth("-1px");
    comboBoxDatatypeFilter.setHeight("-1px");
    horizontalLayout_1.addComponent(comboBoxDatatypeFilter);
    horizontalLayout_1.setComponentAlignment(comboBoxDatatypeFilter, new Alignment(9));

    // checkBoxFilterIsBag
    checkBoxFilterIsBag = new CheckBox();
    checkBoxFilterIsBag.setCaption("Is Bag Filter");
    checkBoxFilterIsBag.setImmediate(false);
    checkBoxFilterIsBag.setWidth("-1px");
    checkBoxFilterIsBag.setHeight("-1px");
    horizontalLayout_1.addComponent(checkBoxFilterIsBag);
    horizontalLayout_1.setComponentAlignment(checkBoxFilterIsBag, new Alignment(9));

    return horizontalLayout_1;
  }
예제 #8
0
  @AutoGenerated
  private GridLayout buildHeadLayout() {
    // common part: create layout
    headLayout = new GridLayout();
    headLayout.setImmediate(false);
    headLayout.setWidth("-1px");
    headLayout.setHeight("-1px");
    headLayout.setMargin(false);
    headLayout.setSpacing(true);
    headLayout.setColumns(2);
    headLayout.setRows(2);

    // parameterTypeLabel
    parameterTypeLabel = new Label();
    parameterTypeLabel.setImmediate(false);
    parameterTypeLabel.setWidth("-1px");
    parameterTypeLabel.setHeight("-1px");
    parameterTypeLabel.setValue("Type of Parameter");
    headLayout.addComponent(parameterTypeLabel, 0, 0);

    // parameterType
    parameterType = new ComboBox();
    parameterType.setImmediate(false);
    parameterType.setWidth("-1px");
    parameterType.setHeight("-1px");
    headLayout.addComponent(parameterType, 1, 0);

    // parameterNameLabel
    parameterNameLabel = new Label();
    parameterNameLabel.setImmediate(false);
    parameterNameLabel.setWidth("-1px");
    parameterNameLabel.setHeight("-1px");
    parameterNameLabel.setValue("Parameter");
    headLayout.addComponent(parameterNameLabel, 0, 1);
    headLayout.setComponentAlignment(parameterNameLabel, new Alignment(6));

    // parameterName
    parameterName = new TextField();
    parameterName.setImmediate(false);
    parameterName.setWidth("-1px");
    parameterName.setHeight("-1px");
    parameterName.setRequired(true);
    headLayout.addComponent(parameterName, 1, 1);

    return headLayout;
  }
  @AutoGenerated
  private HorizontalLayout buildLytFormulario1() {
    // common part: create layout
    lytFormulario1 = new HorizontalLayout();
    lytFormulario1.setImmediate(false);
    lytFormulario1.setWidth("-1px");
    lytFormulario1.setHeight("-1px");
    lytFormulario1.setMargin(false);
    lytFormulario1.setSpacing(true);

    // lblUnidadProcuraduria
    lblUnidadProcuraduria = new Label();
    lblUnidadProcuraduria.setImmediate(false);
    lblUnidadProcuraduria.setWidth("160px");
    lblUnidadProcuraduria.setHeight("-1px");
    lblUnidadProcuraduria.setValue("Unidad Procuraduria");
    lytFormulario1.addComponent(lblUnidadProcuraduria);

    // cmbUnidadProcuraduria
    cmbUnidadProcuraduria = new ComboBox();
    cmbUnidadProcuraduria.setImmediate(false);
    cmbUnidadProcuraduria.setWidth("150px");
    cmbUnidadProcuraduria.setHeight("-1px");
    lytFormulario1.addComponent(cmbUnidadProcuraduria);

    // lblTipoNotificacion
    lblTipoNotificacion = new Label();
    lblTipoNotificacion.setImmediate(false);
    lblTipoNotificacion.setWidth("160px");
    lblTipoNotificacion.setHeight("-1px");
    lblTipoNotificacion.setValue("Tipo Notificacion");
    lytFormulario1.addComponent(lblTipoNotificacion);

    // cmbTipoNotificacion
    cmbTipoNotificacion = new ComboBoxLOVS();
    cmbTipoNotificacion.setImmediate(false);
    cmbTipoNotificacion.setWidth("150px");
    cmbTipoNotificacion.setHeight("-1px");
    lytFormulario1.addComponent(cmbTipoNotificacion);

    return lytFormulario1;
  }
  public void initComponent() {
    comboGroup0.setWidth("300px");
    comboGroup1.setWidth("300px");
    comboGroup2.setWidth("300px");
    comboGroup3.setWidth("300px");
    comboGroup4.setWidth("300px");
    comboGroup5.setWidth("300px");

    textField1.setWidth("200px");
    textField2.setWidth("300px");

    dateField1From.setDateFormat("dd/MM/yyyy");
    dateField1To.setDateFormat("dd/MM/yyyy");

    panelFilter.setCaption("Filter Criteria");
    panelOutput.setCaption("Jenis Laporan");
  }
예제 #11
0
  @AutoGenerated
  private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("560px");
    mainLayout.setHeight("280px");
    mainLayout.setMargin(true);

    // top-level component properties
    setWidth("560px");
    setHeight("280px");

    // commentField
    commentField = new TextField();
    commentField.setCaption("Comentario");
    commentField.setImmediate(false);
    commentField.setWidth("520px");
    commentField.setHeight("120px");
    commentField.setTabIndex(9);
    mainLayout.addComponent(commentField, "top:140.0px;left:20.0px;");

    // kmField
    kmField = new TextField();
    kmField.setCaption("Km");
    kmField.setImmediate(false);
    kmField.setWidth("80px");
    kmField.setHeight("-1px");
    kmField.setTabIndex(7);
    mainLayout.addComponent(kmField, "top:98.0px;left:260.0px;");

    // punctureField
    punctureField = new TextField();
    punctureField.setCaption("Pinchazos");
    punctureField.setImmediate(false);
    punctureField.setWidth("140px");
    punctureField.setHeight("-1px");
    punctureField.setTabIndex(5);
    mainLayout.addComponent(punctureField, "top:56.0px;left:400.0px;");

    // serialNumberField
    serialNumberField = new TextField();
    serialNumberField.setCaption("Número  de serie");
    serialNumberField.setImmediate(false);
    serialNumberField.setWidth("160px");
    serialNumberField.setHeight("-1px");
    serialNumberField.setTabIndex(1);
    serialNumberField.setRequired(true);
    mainLayout.addComponent(serialNumberField, "top:17.0px;left:20.0px;");

    // vehicleLocationField
    vehicleLocationField = new TextField();
    vehicleLocationField.setCaption("Ubicación vehículo");
    vehicleLocationField.setImmediate(false);
    vehicleLocationField.setWidth("120px");
    vehicleLocationField.setHeight("-1px");
    vehicleLocationField.setTabIndex(4);
    mainLayout.addComponent(vehicleLocationField, "top:56.0px;left:260.0px;");

    // supplierField
    supplierField = new ComboBox();
    supplierField.setCaption("Proveedor");
    supplierField.setImmediate(false);
    supplierField.setWidth("220px");
    supplierField.setHeight("-1px");
    supplierField.setTabIndex(6);
    mainLayout.addComponent(supplierField, "top:100.0px;left:20.0px;");

    // tireTypeField
    tireTypeField = new ComboBox();
    tireTypeField.setCaption("Tipo neumático");
    tireTypeField.setImmediate(false);
    tireTypeField.setWidth("168px");
    tireTypeField.setHeight("-1px");
    tireTypeField.setTabIndex(8);
    tireTypeField.setRequired(true);
    mainLayout.addComponent(tireTypeField, "top:97.0px;left:372.0px;");

    // vehicleField
    vehicleField = new ComboBox();
    vehicleField.setCaption("Vehículo");
    vehicleField.setImmediate(false);
    vehicleField.setWidth("220px");
    vehicleField.setHeight("-1px");
    vehicleField.setTabIndex(3);
    vehicleField.setRequired(true);
    mainLayout.addComponent(vehicleField, "top:56.0px;left:20.0px;");

    // tireStatusField
    tireStatusField = new ComboBox();
    tireStatusField.setCaption("Estado neumático");
    tireStatusField.setImmediate(false);
    tireStatusField.setWidth("168px");
    tireStatusField.setHeight("-1px");
    tireStatusField.setTabIndex(2);
    tireStatusField.setRequired(true);
    mainLayout.addComponent(tireStatusField, "top:17.0px;left:372.0px;");

    return mainLayout;
  }
예제 #12
0
  private void buildView() {
    logger.info(
        "Company ID : "
            + companyId
            + " | User Name : "
            + userName
            + " > "
            + "Painting Attendance Process UI");
    // Material Components Definition
    btnsaveAttenProc.setVisible(false);
    cbPayPeried = new GERPComboBox("Pay Period");
    cbPayPeried.setImmediate(true);
    cbPayPeried.setNullSelectionAllowed(false);
    cbPayPeried.setWidth("130");
    cbPayPeried.setItemCaptionPropertyId("periodName");
    cbPayPeried.addValueChangeListener(
        new Property.ValueChangeListener() {
          private static final long serialVersionUID = 1L;

          @Override
          public void valueChange(ValueChangeEvent event) {
            Object itemId = event.getProperty().getValue();
            if (itemId != null) {
              BeanItem<?> item = (BeanItem<?>) cbPayPeried.getItem(itemId);
              payPeriodList = (PayPeriodDM) item.getBean();
              payPeriodId = payPeriodList.getPayPeriodId();
              loadStartandEndDates();
            }
          }
        });
    btnsaveAttenProc.setCaption("Save");
    tblMstScrSrchRslt.addItemClickListener(
        new ItemClickListener() {
          private static final long serialVersionUID = 1L;

          @Override
          public void itemClick(ItemClickEvent event) {
            if (tblMstScrSrchRslt.isSelected(event.getItemId())) {
              tblMstScrSrchRslt.setImmediate(true);
              btnsaveAttenProc.setStyleName("savebt");
              resetFields();
            } else {
              ((AbstractSelect) event.getSource()).select(event.getItemId());
              btnsaveAttenProc.setStyleName("savebt");
              readonlyfalse();
              editAttenProc();
              readonlytrue();
            }
          }
        });
    hlPageHdrContainter.addComponent(btnsaveAttenProc);
    hlPageHdrContainter.setComponentAlignment(btnsaveAttenProc, Alignment.MIDDLE_RIGHT);
    tfProcessPeriod = new GERPTextField("Process Period");
    tfProcessPeriod.setWidth("170");
    tfProcessPeriod.setReadOnly(true);
    cbBranch = new GERPComboBox("Branch");
    cbBranch.setWidth("170");
    cbBranch.setNullSelectionAllowed(false);
    cbBranch.setItemCaptionPropertyId("branchName");
    cbBranch.setImmediate(true);
    cbBranch.setValue(0L);
    cbBranch.addValueChangeListener(
        new Property.ValueChangeListener() {
          private static final long serialVersionUID = 1L;

          @Override
          public void valueChange(ValueChangeEvent event) {
            Object itemId = event.getProperty().getValue();
            if (itemId != null) {
              loadEmployeeList();
            }
          }
        });
    btnsaveAttenProc.addClickListener(
        new ClickListener() {
          // Click Listener for Add and Update
          private static final long serialVersionUID = 6551953728534136363L;

          @Override
          public void buttonClick(ClickEvent event) {
            saveattapprove();
          }
        });
    cbEmployeeName = new GERPComboBox("Employee Name");
    cbEmployeeName.setItemCaptionPropertyId("firstname");
    cbEmployeeName.setWidth("200");
    cbEmployeeName.setImmediate(true);
    cbEmployeeName.setNullSelectionAllowed(false);
    btnSearchStaff = new GERPButton("Search Employee", "searchbt", this);
    btnAttendanceProc = new GERPButton("Run Attendance Process", "savebt", this);
    btnAttendanceProc.addClickListener(
        new ClickListener() {
          private static final long serialVersionUID = 1L;

          @Override
          public void buttonClick(ClickEvent event) {
            // TODO Auto-generated method stub
            loadAttendenceProcess();
            // new AttendenceApprove();
          }
        });
    btnSearch.setVisible(false);
    hlSearchLayout = new GERPAddEditHLayout();
    assembleSearchLayout();
    hlSrchContainer.addComponent(GERPPanelGenerator.createPanel(hlSearchLayout));
    resetFields();
    loadAttendanceProcessBranchList();
    loadPayPeriod();
    loadSrchRslt();
  }
  public void initComponent() {

    tableList =
        new Table() {
          @Override
          protected String formatPropertyValue(Object rowId, Object colId, Property property) {
            // Format by property type
            if (property.getType() == Date.class && property.getValue() != null) {
              SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
              return df.format((Date) property.getValue());
            }

            //		        if (property.getType()==Boolean.class){
            //		        	if ((Boolean) property.getValue()==true) {
            //		        		return "Active";
            //		        	} else {
            //		        		return "-";
            //		        	}
            //		        }

            return super.formatPropertyValue(rowId, colId, property);
          }
        };
    tableDetil =
        new Table() {
          @Override
          protected String formatPropertyValue(Object rowId, Object colId, Property property) {
            // Format by property type
            if (property.getType() == Date.class && property.getValue() != null) {
              SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
              return df.format((Date) property.getValue());
            }

            //		        if (property.getType()==Boolean.class){
            //		        	if ((Boolean) property.getValue()==true) {
            //		        		return "Active";
            //		        	} else {
            //		        		return "-";
            //		        	}
            //		        }

            return super.formatPropertyValue(rowId, colId, property);
          }
        };

    // ::LIST
    fieldSearch1.setWidth("100px");
    fieldSearch2.setWidth("100px");
    fieldSearch2.setWidth("100px");
    comboSearch1.setWidth("200px");
    comboSearch2.setWidth("200px");

    // ::DETIL
    fieldNomor.setNullRepresentation("");
    fieldInvoiceno.setNullRepresentation("");

    fieldNomor.setWidth("100px");
    fieldInvoiceno.setWidth("100px");
    comboTipeopname.setWidth("200px");
    comboTipeopname.setFilteringMode(FilteringMode.CONTAINS);
    comboWarehouse.setWidth("200px");
    comboWarehouse.setFilteringMode(FilteringMode.CONTAINS);

    dateFieldTrdate.setDateFormat("dd/MM/yyyy");
    dateFieldEntrydate.setDateFormat("dd/MM/yyyy");
    dateFieldTrdate.setWidth("100px");
    dateFieldEntrydate.setWidth("100px");

    btnSearch.setIcon(new ThemeResource("../images/navigation/12x12/Find.png"));
    btnNewForm.setIcon(new ThemeResource("../images/navigation/12x12/Create.png"));
    btnEditForm.setIcon(new ThemeResource("../images/navigation/12x12/Pencil.png"));
    btnDeleteForm.setIcon(new ThemeResource("../images/navigation/12x12/Erase.png"));
    //		btnPrint.setIcon(new ThemeResource("../images/navigation/12x12/Print.png"));

    btnSaveForm.setIcon(new ThemeResource("../images/navigation/12x12/Save.png"));
    btnCancelForm.setIcon(new ThemeResource("../images/navigation/12x12/Undo.png"));

    btnAddItem.setIcon(new ThemeResource("../images/navigation/12x12/Create.png"));
    btnEditForm.setIcon(new ThemeResource("../images/navigation/12x12/Pencil.png"));
    btnRemoveItem.setIcon(new ThemeResource("../images/navigation/12x12/Erase.png"));

    btnPosting.setIcon(new ThemeResource("../images/navigation/12x12/OK.png"));
    //		btnPostingBatal.setIcon(new ThemeResource("../images/navigation/12x12/OK.png"));
    btnLapselisih.setIcon(new ThemeResource("../images/navigation/12x12/Print.png"));

    tableList.setSelectable(true);
    tableList.setImmediate(true);
    tableList.setBuffered(false);
    tableList.setFooterVisible(true);

    tableDetil.setSelectable(true);
    tableDetil.setImmediate(true);
    tableDetil.setBuffered(false);
    tableDetil.setFooterVisible(true);

    // VALIDATOR
    fieldNomor.setRequired(true);
    comboTipeopname.setRequired(true);
    comboWarehouse.setRequired(true);
    dateFieldTrdate.setRequired(true);
    //		fieldDescription.setRequired(true);

    btnSeparator1.setEnabled(false);
    btnSeparator2.setEnabled(false);

    // FIELD FOOTER
    fieldDisc1 = new TextField();
    fieldDisc1rp = new TextField();
    fieldDisc1rpafterppn = new TextField();
    fieldDisc1.setWidth("50px");
    fieldDisc1rp.setWidth("50px");
    fieldDisc1rpafterppn.setWidth("150px");
    fieldDisc1rpafterppn.addStyleName("numerical");

    fieldDisc2 = new TextField();
    fieldDisc2rp = new TextField();
    fieldDisc2rpafterppn = new TextField();
    fieldDisc2.setWidth("50px");
    fieldDisc2rp.setWidth("50px");
    fieldDisc2rpafterppn.setWidth("150px");
    fieldDisc2rpafterppn.addStyleName("numerical");

    fieldDisc = new TextField();
    fieldDiscrp = new TextField();
    fieldDiscrpafterppn = new TextField();
    fieldDisc.setWidth("50px");
    fieldDiscrp.setWidth("50px");
    fieldDiscrpafterppn.setWidth("150px");
    fieldDiscrpafterppn.addStyleName("numerical");

    fieldAmount.setWidth("200px");
    fieldAmount.addStyleName("numerical");
    fieldAmountafterdisc.setWidth("200px");
    fieldAmountafterdisc.addStyleName("numerical");
    fieldAmountafterdiscafterppn.setWidth("200px");
    fieldAmountafterdiscafterppn.addStyleName("numerical");
    fieldAmountafterppn.setWidth("200px");
    fieldAmountafterppn.addStyleName("numerical");
    fieldAmountpay.setWidth("200px");
    fieldAmountpay.addStyleName("numerical");
    fieldAmountpayfaterppn.setWidth("200px");
    fieldAmountpayfaterppn.addStyleName("numerical");
    fieldPpnrp.setWidth("200px");
    fieldPpnrp.addStyleName("numerical");

    fieldPpnpercent.setWidth("50px");
  }
예제 #14
0
  public void initUI() {
    try {
      setModal(true);
      VerticalLayout layout = (VerticalLayout) this.getContent();
      layout.setMargin(true);
      layout.setSpacing(true);
      layout.setStyleName(Reindeer.LAYOUT_WHITE);

      processesComboBox =
          new ComboBox(
              ProcessbaseApplication.getCurrent().getPbMessages().getString("processToCategory"));
      processesComboBox.setFilteringMode(Filtering.FILTERINGMODE_CONTAINS);
      //            processesComboBox.setItemCaptionPropertyId("name");
      processesComboBox.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_EXPLICIT);
      processesComboBox.setWidth("100%");

      bar.setWidth("100%");
      bar.addComponent(processesComboBox);
      bar.setExpandRatio(processesComboBox, 1);

      addBtn =
          new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnAdd"), this);
      bar.addComponent(addBtn);
      bar.setComponentAlignment(addBtn, Alignment.BOTTOM_RIGHT);

      layout.addComponent(bar);
      layout.addComponent(table);

      deleteBtn =
          new Button(
              ProcessbaseApplication.getCurrent().getPbMessages().getString("btnDelete"), this);
      deleteBtn.setDescription(
          ProcessbaseApplication.getCurrent().getPbMessages().getString("deleteCategory"));
      cancelBtn =
          new Button(
              ProcessbaseApplication.getCurrent().getPbMessages().getString("btnCancel"), this);
      saveBtn =
          new Button(
              ProcessbaseApplication.getCurrent().getPbMessages().getString("btnSave"), this);
      buttons.addButton(deleteBtn);
      buttons.setComponentAlignment(deleteBtn, Alignment.MIDDLE_RIGHT);
      buttons.addButton(saveBtn);
      buttons.setComponentAlignment(saveBtn, Alignment.MIDDLE_RIGHT);
      buttons.setExpandRatio(saveBtn, 1);
      buttons.addButton(cancelBtn);
      buttons.setComponentAlignment(cancelBtn, Alignment.MIDDLE_RIGHT);
      buttons.setMargin(false);
      buttons.setHeight("30px");
      buttons.setWidth("100%");
      addComponent(buttons);
      setWidth("70%");
      //            setHeight("70%");
      setResizable(false);

      table.addContainerProperty(
          "name",
          String.class,
          null,
          ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionProcessName"),
          null,
          null);
      table.setColumnExpandRatio("name", 1);
      table.addContainerProperty(
          "version",
          String.class,
          null,
          ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionVersion"),
          null,
          null);
      table.setColumnWidth("version", 50);
      table.addContainerProperty(
          "deployedBy",
          String.class,
          null,
          ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionDeployedBy"),
          null,
          null);
      table.addContainerProperty(
          "actions",
          TableLinkButton.class,
          null,
          ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionActions"),
          null,
          null);
      table.setColumnWidth("actions", 50);
      table.setSelectable(false);
      table.setImmediate(true);
      table.setWidth("100%");
      table.setPageLength(10);
      refreshTable();
    } catch (Exception ex) {
      ex.printStackTrace();
      showError(ex.getMessage());
    }
  }
예제 #15
0
 private void assembleInputUserLayout() {
   logger.info(
       "Company ID : "
           + companyid
           + " | User Name : "
           + username
           + " > "
           + "Assembling search layout");
   // Remove all components in search layout
   hlUserInputLayout.removeAllComponents();
   flSmsPurHdr1 = new FormLayout();
   flSmsPurHdr2 = new FormLayout();
   flSmsPurHdr3 = new FormLayout();
   flSmsPurHdr4 = new FormLayout();
   flSmsPurHdr1.addComponent(tfEnqNo);
   flSmsPurHdr1.addComponent(cbBranch);
   flSmsPurHdr2.addComponent(lsVendorName);
   cbEnqStatus.setWidth("130px");
   cbEnqStatus.setHeight("24px");
   flSmsPurHdr3.addComponent(dfEnqDate);
   flSmsPurHdr3.addComponent(dfDueDate);
   flSmsPurHdr3.addComponent(cbEnqStatus);
   flSmsPurHdr4.addComponent(taEnqRem);
   HorizontalLayout hlSmsEnqHDR = new HorizontalLayout();
   hlSmsEnqHDR.addComponent(flSmsPurHdr1);
   hlSmsEnqHDR.addComponent(flSmsPurHdr2);
   hlSmsEnqHDR.addComponent(flSmsPurHdr3);
   lbl = new Label(" ");
   hlSmsEnqHDR.addComponent(lbl);
   hlSmsEnqHDR.addComponent(flSmsPurHdr4);
   tfEnqNo.setReadOnly(true);
   hlSmsEnqHDR.setSpacing(true);
   hlSmsEnqHDR.setMargin(true);
   // Adding SmsEnqDtl components
   // Add components for User Input Layout
   flSmsPurDtl1 = new FormLayout();
   flSmsPurDtl2 = new FormLayout();
   flSmsPurDtl3 = new FormLayout();
   flSmsPurDtl4 = new FormLayout();
   flSmsPurDtl5 = new FormLayout();
   flSmsPurDtl6 = new FormLayout();
   flSmsPurDtl1.addComponent(lsProduct);
   HorizontalLayout hlQtyUom = new HorizontalLayout();
   hlQtyUom.addComponent(tfEnqQty);
   hlQtyUom.addComponent(cbUom);
   hlQtyUom.setCaption("Enquiry Qty");
   flSmsPurDtl2.addComponent(hlQtyUom);
   flSmsPurDtl2.setComponentAlignment(hlQtyUom, Alignment.TOP_LEFT);
   flSmsPurDtl4.addComponent(taEnqDtlRem);
   flSmsPurDtl5.addComponent(cbEnqDtlStatus);
   VerticalLayout btn = new VerticalLayout();
   btn.addComponent(btnaddSpec);
   btn.addComponent(btndelete);
   flSmsPurDtl5.addComponent(btn);
   HorizontalLayout hlSmsEnqdTL = new HorizontalLayout();
   hlSmsEnqdTL.addComponent(flSmsPurDtl1);
   hlSmsEnqdTL.addComponent(flSmsPurDtl2);
   hlSmsEnqdTL.addComponent(flSmsPurDtl3);
   hlSmsEnqdTL.addComponent(flSmsPurDtl4);
   hlSmsEnqdTL.addComponent(flSmsPurDtl5);
   hlSmsEnqdTL.addComponent(flSmsPurDtl6);
   hlSmsEnqdTL.setSpacing(true);
   hlSmsEnqdTL.setMargin(true);
   VerticalLayout vlSmsEnqHDR = new VerticalLayout();
   vlSmsEnqHDR = new VerticalLayout();
   vlSmsEnqHDR.addComponent(hlSmsEnqdTL);
   vlSmsEnqHDR.addComponent(tblSmsEnqDtl);
   vlSmsEnqHDR.setSpacing(true);
   TabSheet dtlTab = new TabSheet();
   dtlTab.addTab(vlSmsEnqHDR, "Purchase Enquiry Detail");
   dtlTab.addTab(vlTableForm, "Comments");
   VerticalLayout vlSmsEnqHdrdTL = new VerticalLayout();
   vlSmsEnqHdrdTL = new VerticalLayout();
   vlSmsEnqHdrdTL.addComponent(GERPPanelGenerator.createPanel(hlSmsEnqHDR));
   vlSmsEnqHdrdTL.addComponent(GERPPanelGenerator.createPanel(dtlTab));
   vlSmsEnqHdrdTL.setSpacing(true);
   vlSmsEnqHdrdTL.setWidth("100%");
   hlUserInputLayout.addComponent(vlSmsEnqHdrdTL);
   hlUserInputLayout.setSizeFull();
   hlUserInputLayout.setWidth("100%");
   hlUserInputLayout.setMargin(false);
   hlUserInputLayout.setSpacing(true);
 }
예제 #16
0
  @AutoGenerated
  private VerticalLayout buildVerticalLayout_3() {
    // common part: create layout
    verticalLayout_3 = new VerticalLayout();
    verticalLayout_3.setStyleName("h1");
    verticalLayout_3.setCaption("Administracion del Usuario");
    verticalLayout_3.setImmediate(false);
    verticalLayout_3.setWidth("-1px");
    verticalLayout_3.setHeight("-1px");
    verticalLayout_3.setMargin(true);
    verticalLayout_3.setSpacing(true);

    // txtUsuario
    txtUsuario = new TextField();
    txtUsuario.setCaption("Usuario:");
    txtUsuario.setImmediate(false);
    txtUsuario.setWidth("-1px");
    txtUsuario.setHeight("-1px");
    txtUsuario.setRequired(true);
    txtUsuario.setInputPrompt("Usuario de logueo ");
    verticalLayout_3.addComponent(txtUsuario);

    // horizontalLayout_1
    horizontalLayout_1 = buildHorizontalLayout_1();
    verticalLayout_3.addComponent(horizontalLayout_1);

    // txtNombres
    txtNombres = new TextField();
    txtNombres.setCaption("Nombre:");
    txtNombres.setImmediate(false);
    txtNombres.setWidth("164px");
    txtNombres.setHeight("-1px");
    txtNombres.setRequired(true);
    txtNombres.setInputPrompt("Nombre de inicio de sesión");
    verticalLayout_3.addComponent(txtNombres);

    // txtApellidoPaterno
    txtApellidoPaterno = new TextField();
    txtApellidoPaterno.setCaption("Paterno");
    txtApellidoPaterno.setImmediate(false);
    txtApellidoPaterno.setWidth("250px");
    txtApellidoPaterno.setHeight("-1px");
    txtApellidoPaterno.setRequired(true);
    txtApellidoPaterno.setInputPrompt("Apellido Paterno");
    verticalLayout_3.addComponent(txtApellidoPaterno);

    // txtApellidoMaterno
    txtApellidoMaterno = new TextField();
    txtApellidoMaterno.setCaption("Materno");
    txtApellidoMaterno.setImmediate(false);
    txtApellidoMaterno.setWidth("250px");
    txtApellidoMaterno.setHeight("-1px");
    txtApellidoMaterno.setRequired(true);
    txtApellidoMaterno.setInputPrompt("Apellido Materno");
    verticalLayout_3.addComponent(txtApellidoMaterno);

    // cmbOficina
    cmbOficina = new ComboBox();
    cmbOficina.setCaption("Oficina");
    cmbOficina.setImmediate(false);
    cmbOficina.setWidth("204px");
    cmbOficina.setHeight("-1px");
    cmbOficina.setRequired(true);
    verticalLayout_3.addComponent(cmbOficina);

    // cmbRol
    cmbRol = new ComboBox();
    cmbRol.setCaption("Rol");
    cmbRol.setImmediate(false);
    cmbRol.setWidth("194px");
    cmbRol.setHeight("-1px");
    cmbRol.setRequired(true);
    verticalLayout_3.addComponent(cmbRol);

    // txtCargo
    txtCargo = new TextField();
    txtCargo.setCaption("Cargo");
    txtCargo.setImmediate(false);
    txtCargo.setWidth("250px");
    txtCargo.setHeight("-1px");
    txtCargo.setRequired(true);
    txtCargo.setInputPrompt("Cargo que desempeña");
    verticalLayout_3.addComponent(txtCargo);

    // txtCargoDescripcion
    txtCargoDescripcion = new TextField();
    txtCargoDescripcion.setCaption("Descripcion del Cargo");
    txtCargoDescripcion.setImmediate(false);
    txtCargoDescripcion.setWidth("250px");
    txtCargoDescripcion.setHeight("-1px");
    txtCargoDescripcion.setRequired(true);
    txtCargoDescripcion.setInputPrompt("Breve descripcion del Cargo que desempeña");
    verticalLayout_3.addComponent(txtCargoDescripcion);

    // horizontalLayout_2
    horizontalLayout_2 = buildHorizontalLayout_2();
    verticalLayout_3.addComponent(horizontalLayout_2);
    verticalLayout_3.setComponentAlignment(horizontalLayout_2, new Alignment(48));

    return verticalLayout_3;
  }
예제 #17
0
    public void attach() {
      this.addStyleName("custom-report-step-caption");
      Label caption = new Label("Select Reference Table");
      caption.setStyleName("caption");
      this.addComponent(caption);
      box.setWidth(fieldWidth);
      box.setImmediate(true);
      box.addStyleName("custom-report-step-box");
      BeanItemContainer<ReportModel> container =
          new BeanItemContainer<ReportModel>(ReportModel.class);
      container.addAll(getReportModels());
      box.setContainerDataSource(container);
      box.setItemCaptionPropertyId("tableLabel");
      box.addListener(this);
      this.addComponent(box);
      columnLayout.setSpacing(true);
      columnLayout.setVisible(false);

      //			List<ReportTable> relateReportTables=null;
      //			if(getEditableReportTable()!=null){
      //				for(Iterator<ReportModel> it=container.getItemIds().iterator();it.hasNext();){
      //					rm=(ReportModel) it.next();
      //					if(rm.getTableName().equals(getEditableReportTable().getTableName())){
      //						box.setValue(rm);
      //						mainReportTable=rm.getReportTables().iterator().next();
      //						relateReportTables=buildEditableRelatedTableInfo();
      //						break;
      //					}
      //				}
      //				box.setValue(getEditableReportTable().getTableName());
      //				rm.getReportTables().addAll(relateReportTables);
      //			}

      if (relateReportTables != null && isEditableFlg) {
        columnLayout.setVisible(true);
        columnLayout.setImmediate(true);
        //				columnLayout.addComponent(gridLayout);

        //				box.setValue(getEditableReportTable().getTableName());
        //				rm.getReportTables().addAll(relateReportTables);

        for (ReportTable relateRT : relateReportTables) {
          for (Iterator<ReportModel> it = container.getItemIds().iterator(); it.hasNext(); ) {
            ReportModel tempRm = it.next();
            if (tempRm.getTableName().equals(relateRT.getTableName())) {
              box.setValue(tempRm);
              break;
            }
          }
          List<ReportColumn> columnFields = relateRT.getReportColumns();

          for (final ReportColumn columnField : columnFields) {
            if (columnField.getColumnLabel() != null) {
              ReportColumnCard reportColumnCard =
                  new ReportColumnCard(columnField) {
                    private static final long serialVersionUID = 1L;

                    @Override
                    public void layoutClick(LayoutClickEvent event) {
                      ReportColumn reportColumn = columnField;
                      reportColumn.setColumnUseMode(
                          ReportConfiguration.ReportColumnType.OutputColumn.toString());
                      rm.getSubTableSelectedColumns().add(reportColumn);
                    }
                  };

              for (ReportColumn rc : relateRT.getReportColumns()) {
                if (rc.getColumnUseMode() != null
                    && rc.getColumnUseMode()
                        .equals(ReportConfiguration.ReportColumnType.OutputColumn.toString())) {
                  if (rc.getColumnName().equals(columnField.getColumnName())) {
                    reportColumnCard.getCheckBox().setValue(true);
                  }
                }
              }

              gridLayout.addComponent(reportColumnCard);
            }
          }
        }
      }

      this.addComponent(columnLayout);
      reportColumnLabel.setStyleName("custom-report-step-column-caption");
      reportColumnLabel.setVisible(false);
      reportColumnStepDesc.setStyleName("custom-report-step-column-desc");
      reportColumnStepDesc.setVisible(false);
      this.addComponent(reportColumnLabel);
      this.addComponent(reportColumnStepDesc);
      gridLayout.setSizeFull();
      gridLayout.setImmediate(true);
      gridLayout.addStyleName("custom-report-step-column-gridlayout");
      this.addComponent(gridLayout);
    }
  public TaskDashboardViewImpl() {
    this.withMargin(new MarginInfo(false, true, true, true));
    taskSearchPanel = new TaskSearchPanel();
    MHorizontalLayout groupWrapLayout = new MHorizontalLayout();
    groupWrapLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);

    groupWrapLayout.addComponent(new Label("Filter:"));
    final TaskSavedFilterComboBox savedFilterComboBox = new TaskSavedFilterComboBox();
    savedFilterComboBox.addQuerySelectListener(
        new SavedFilterComboBox.QuerySelectListener() {
          @Override
          public void querySelect(SavedFilterComboBox.QuerySelectEvent querySelectEvent) {
            List<SearchFieldInfo> fieldInfos = querySelectEvent.getSearchFieldInfos();
            TaskSearchCriteria criteria =
                SearchFieldInfo.buildSearchCriteria(TaskSearchCriteria.class, fieldInfos);
            criteria.setProjectid(new NumberSearchField(CurrentProjectVariables.getProjectId()));
            EventBusFactory.getInstance()
                .post(new TaskEvent.SearchRequest(TaskDashboardViewImpl.this, criteria));
          }
        });
    groupWrapLayout.addComponent(savedFilterComboBox);

    groupWrapLayout.addComponent(new Label("Sort:"));
    final ComboBox sortCombo = new ValueComboBox(false, DESCENDING, ASCENDING);
    sortCombo.setWidth("100px");
    sortCombo.addValueChangeListener(
        new Property.ValueChangeListener() {
          @Override
          public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
            String sortValue = (String) sortCombo.getValue();
            if (ASCENDING.equals(sortValue)) {
              sortDirection = SearchCriteria.ASC;
            } else {
              sortDirection = SearchCriteria.DESC;
            }
            queryAndDisplayTasks();
          }
        });
    sortDirection = SearchCriteria.DESC;
    groupWrapLayout.addComponent(sortCombo);

    groupWrapLayout.addComponent(new Label("Group by:"));
    final ComboBox groupCombo =
        new ValueComboBox(false, GROUP_DUE_DATE, GROUP_START_DATE, PLAIN_LIST);
    groupCombo.setWidth("100px");
    groupCombo.addValueChangeListener(
        new Property.ValueChangeListener() {
          @Override
          public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
            groupByState = (String) groupCombo.getValue();
            queryAndDisplayTasks();
          }
        });
    groupByState = GROUP_DUE_DATE;
    groupWrapLayout.addComponent(groupCombo);

    taskSearchPanel.addHeaderRight(groupWrapLayout);

    Button exportBtn = new Button("Export");
    final SplitButton exportSplitBtn = new SplitButton(exportBtn);
    exportBtn.addClickListener(
        new Button.ClickListener() {
          @Override
          public void buttonClick(ClickEvent event) {
            exportSplitBtn.setPopupVisible(true);
          }
        });
    exportSplitBtn.addStyleName(UIConstants.THEME_GREEN_LINK);
    OptionPopupContent popupButtonsControl = new OptionPopupContent();

    Button exportPdfBtn = new Button("PDF");
    exportPdfBtn.setIcon(FontAwesome.FILE_PDF_O);
    FileDownloader pdfFileDownloder = new FileDownloader(buildStreamSource(ReportExportType.PDF));
    pdfFileDownloder.extend(exportPdfBtn);
    popupButtonsControl.addOption(exportPdfBtn);

    Button exportExcelBtn = new Button("Excel");
    exportExcelBtn.setIcon(FontAwesome.FILE_EXCEL_O);
    FileDownloader excelFileDownloader =
        new FileDownloader(buildStreamSource(ReportExportType.EXCEL));
    excelFileDownloader.extend(exportExcelBtn);
    popupButtonsControl.addOption(exportExcelBtn);

    exportSplitBtn.setContent(popupButtonsControl);
    groupWrapLayout.with(exportSplitBtn);

    Button newTaskBtn =
        new Button(
            AppContext.getMessage(TaskI18nEnum.BUTTON_NEW_TASK),
            new Button.ClickListener() {
              private static final long serialVersionUID = 1L;

              @Override
              public void buttonClick(final ClickEvent event) {
                SimpleTask newTask = new SimpleTask();
                newTask.setProjectid(CurrentProjectVariables.getProjectId());
                UI.getCurrent().addWindow(new TaskAddWindow(newTask));
              }
            });
    newTaskBtn.setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS));
    newTaskBtn.setIcon(FontAwesome.PLUS);
    newTaskBtn.setDescription(AppContext.getMessage(TaskI18nEnum.BUTTON_NEW_TASKGROUP));
    newTaskBtn.setStyleName(UIConstants.THEME_GREEN_LINK);
    groupWrapLayout.addComponent(newTaskBtn);

    Button advanceDisplayBtn = new Button();
    advanceDisplayBtn.setWidth("50px");
    advanceDisplayBtn.setIcon(FontAwesome.SITEMAP);
    advanceDisplayBtn.setDescription(
        AppContext.getMessage(TaskGroupI18nEnum.ADVANCED_VIEW_TOOLTIP));

    Button calendarBtn =
        new Button(
            null,
            new Button.ClickListener() {
              @Override
              public void buttonClick(ClickEvent clickEvent) {
                EventBusFactory.getInstance()
                    .post(new TaskEvent.GotoCalendarView(TaskDashboardViewImpl.this));
              }
            });
    calendarBtn.setWidth("50px");
    calendarBtn.setDescription("Calendar View");
    calendarBtn.setIcon(FontAwesome.CALENDAR);

    Button chartDisplayBtn =
        new Button(
            null,
            new Button.ClickListener() {
              private static final long serialVersionUID = -5707546605789537298L;

              @Override
              public void buttonClick(ClickEvent event) {
                displayGanttChartView();
              }
            });
    chartDisplayBtn.setWidth("50px");
    chartDisplayBtn.setDescription("Display Gantt chart");
    chartDisplayBtn.setIcon(FontAwesome.BAR_CHART_O);

    Button kanbanBtn =
        new Button(
            null,
            new Button.ClickListener() {
              @Override
              public void buttonClick(ClickEvent clickEvent) {
                displayKanbanView();
              }
            });
    kanbanBtn.setWidth("50px");
    kanbanBtn.setDescription("Kanban View");
    kanbanBtn.setIcon(FontAwesome.TH);

    ToggleButtonGroup viewButtons = new ToggleButtonGroup();
    viewButtons.addButton(advanceDisplayBtn);
    viewButtons.addButton(calendarBtn);
    viewButtons.addButton(kanbanBtn);
    viewButtons.addButton(chartDisplayBtn);
    viewButtons.setDefaultButton(advanceDisplayBtn);
    groupWrapLayout.addComponent(viewButtons);

    mainLayout = new MHorizontalLayout().withFullHeight().withFullWidth();
    wrapBody = new MVerticalLayout().withMargin(new MarginInfo(false, true, true, false));
    rightColumn =
        new MVerticalLayout()
            .withWidth("350px")
            .withMargin(new MarginInfo(true, false, false, false));
    mainLayout.with(wrapBody, rightColumn).expand(wrapBody);
  }
예제 #19
0
  @AutoGenerated
  private AbsoluteLayout buildGeneralLayout() {
    // common part: create layout
    generalLayout = new AbsoluteLayout();
    generalLayout.setImmediate(false);
    generalLayout.setWidth("100.0%");
    generalLayout.setHeight("100.0%");
    generalLayout.setMargin(false);

    // photoField
    photoField = new ImageField();
    photoField.setImmediate(false);
    photoField.setWidth("420px");
    photoField.setHeight("140px");
    generalLayout.addComponent(photoField, "top:20.0px;left:10.0px;");

    // vatField
    vatField = new TextField();
    vatField.setCaption("CIF/NIF");
    vatField.setImmediate(false);
    vatField.setWidth("120px");
    vatField.setHeight("-1px");
    generalLayout.addComponent(vatField, "top:16.0px;left:435.0px;");

    // clientTypeField
    clientTypeField = new ComboBox();
    clientTypeField.setCaption("Tipo");
    clientTypeField.setImmediate(false);
    clientTypeField.setDescription("Tipo Cliente");
    clientTypeField.setWidth("-1px");
    clientTypeField.setHeight("-1px");
    clientTypeField.setRequired(true);
    generalLayout.addComponent(clientTypeField, "top:54.0px;left:435.0px;");

    // clientGroupField
    clientGroupField = new ComboBox();
    clientGroupField.setCaption("Grupo");
    clientGroupField.setImmediate(false);
    clientGroupField.setWidth("-1px");
    clientGroupField.setHeight("-1px");
    clientGroupField.setRequired(true);
    generalLayout.addComponent(clientGroupField, "top:92.0px;left:435.0px;");

    // phoneField
    phoneField = new TextField();
    phoneField.setCaption("Teléfono 01");
    phoneField.setImmediate(false);
    phoneField.setWidth("115px");
    phoneField.setHeight("-1px");
    generalLayout.addComponent(phoneField, "top:16.0px;left:653.0px;");

    // faxField
    faxField = new TextField();
    faxField.setCaption("Fax");
    faxField.setImmediate(false);
    faxField.setWidth("115px");
    faxField.setHeight("-1px");
    generalLayout.addComponent(faxField, "top:54.0px;left:779.0px;");

    // facebookIdField
    facebookIdField = new TextField();
    facebookIdField.setCaption("Facebook Id");
    facebookIdField.setImmediate(false);
    facebookIdField.setWidth("242px");
    facebookIdField.setHeight("24px");
    generalLayout.addComponent(facebookIdField, "top:90.0px;left:653.0px;");

    // mobileField
    mobileField = new TextField();
    mobileField.setCaption("Teléfono 02");
    mobileField.setImmediate(false);
    mobileField.setWidth("115px");
    mobileField.setHeight("-1px");
    generalLayout.addComponent(mobileField, "top:16.0px;left:780.0px;");

    // descriptionField
    descriptionField = new TextField();
    descriptionField.setCaption("Descripción");
    descriptionField.setImmediate(false);
    descriptionField.setWidth("460px");
    descriptionField.setHeight("-1px");
    generalLayout.addComponent(descriptionField, "top:132.0px;left:435.0px;");

    // commentField
    commentField = new TextArea();
    commentField.setCaption("Comentarios");
    commentField.setImmediate(false);
    commentField.setWidth("885px");
    commentField.setHeight("70px");
    generalLayout.addComponent(commentField, "top:206.0px;left:11.0px;");

    // emailField
    emailField = new TextField();
    emailField.setCaption("Email");
    emailField.setImmediate(false);
    emailField.setWidth("460px");
    emailField.setHeight("-1px");
    generalLayout.addComponent(emailField, "top:172.0px;left:435.0px;");

    return generalLayout;
  }
예제 #20
0
 private ComboBox createComboBox(Map<Object, String> data, String width) {
   ComboBox s = CommonFieldHandler.createComBox(null, data, 0, true);
   s.setWidth(width);
   return s;
 }
예제 #21
0
  private void buildView() {
    logger.info(
        "Company ID : "
            + companyid
            + " | User Name : "
            + username
            + " > "
            + "Painting PurchaseEnquiry UI");
    // Initialization for Purchase Enquire Details user input components
    tfEnqNo = new TextField("Enquiry No");
    tfEnqNo.setMaxLength(40);
    tfEnqQty = new TextField();
    tfEnqQty.setValue("0");
    tfEnqQty.setWidth("90");
    dfDueDate = new GERPPopupDateField("Due Date");
    dfDueDate.setInputPrompt("Select Date");
    dfEnqDate = new GERPPopupDateField("Enquiry Date");
    dfEnqDate.setInputPrompt("Select Date");
    taEnqDtlRem = new TextArea("Remarks");
    taEnqDtlRem.setMaxLength(40);
    taEnqDtlRem.setWidth("150");
    taEnqDtlRem.setHeight("50");
    taEnqRem = new TextArea("Remarks");
    taEnqRem.setHeight("50");
    taEnqDtlRem.setMaxLength(100);
    cbBranch = new GERPComboBox("Branch Name");
    cbBranch.setItemCaptionPropertyId("branchName");
    loadBranchList();
    try {
      ApprovalSchemaDM obj =
          serviceSmsPurEnqHdr.getReviewerId(companyid, appScreenId, branchId, roleId).get(0);
      if (obj.getApprLevel().equals("Approver")) {
        cbEnqStatus =
            new GERPComboBox("Status", BASEConstants.T_SMS_P_ENQUIRY_HDR, BASEConstants.RP_STATUS);
      } else {
        cbEnqStatus =
            new GERPComboBox(
                "Status", BASEConstants.T_SMS_P_ENQUIRY_HDR, BASEConstants.PE_STATUS_RV);
      }
    } catch (Exception e) {
      logger.info(e.getMessage());
    }
    cbEnqStatus.setWidth("120");
    cbEnqDtlStatus =
        new GERPComboBox("Status", BASEConstants.M_GENERIC_TABLE, BASEConstants.M_GENERIC_COLUMN);
    lsProduct = new ListSelect("Product Name");
    lsProduct.setItemCaptionPropertyId("prodname");
    lsProduct.setMultiSelect(true);
    loadProduct();
    lsProduct.setImmediate(true);
    lsProduct.addValueChangeListener(
        new ValueChangeListener() {
          /** */
          private static final long serialVersionUID = 1L;

          @Override
          public void valueChange(ValueChangeEvent event) {
            String[] split =
                lsProduct
                    .getValue()
                    .toString()
                    .replaceAll("\\[", "")
                    .replaceAll("\\]", "")
                    .split(",");
            for (String obj : split) {
              if (obj.trim().length() > 0) {
                cbUom.setReadOnly(false);
                cbUom.setValue(
                    serviceProduct
                        .getProductList(
                            companyid, Long.valueOf(obj.trim()), null, null, null, null, null, "F")
                        .get(0)
                        .getUom());
                cbUom.setReadOnly(true);
              }
            }
          }
        });
    cbUom = new TextField();
    cbUom.setWidth("77");
    cbUom.setHeight("23");
    lsVendorName = new ListSelect("Vendor Name ");
    lsVendorName.setMultiSelect(true);
    lsVendorName.setItemCaptionPropertyId("vendorName");
    loadVendorList();
    lsVendorName.setWidth("150");
    lsVendorName.setHeight("75");
    hlSearchLayout = new GERPAddEditHLayout();
    assembleSearchLayout();
    hlSrchContainer.addComponent(GERPPanelGenerator.createPanel(hlSearchLayout));
    resetFields();
    loadSrchRslt();
    loadPurDtl();
    btnaddSpec.setStyleName("add");
    btnaddSpec.addClickListener(
        new ClickListener() {
          // Click Listener for Add and Update
          private static final long serialVersionUID = 6551953728534136363L;

          @Override
          public void buttonClick(ClickEvent event) {
            if (dtlValidation()) {
              saveEnqDtl();
            }
          }
        });
    btndelete.setEnabled(false);
    // ClickListener for Enquire Detail Tale
    tblSmsEnqDtl.addItemClickListener(
        new ItemClickListener() {
          private static final long serialVersionUID = 1L;

          @Override
          public void itemClick(ItemClickEvent event) {
            if (tblSmsEnqDtl.isSelected(event.getItemId())) {
              tblSmsEnqDtl.setImmediate(true);
              btnaddSpec.setCaption("Add");
              btnaddSpec.setStyleName("savebt");
              btndelete.setEnabled(false);
              enqDtlresetFields();
            } else {
              ((AbstractSelect) event.getSource()).select(event.getItemId());
              btnaddSpec.setCaption("Update");
              btnaddSpec.setStyleName("savebt");
              btndelete.setEnabled(true);
              editSmsPurDetail();
            }
          }
        });
    btndelete.addClickListener(
        new ClickListener() {
          // Click Listener for Add and Update
          private static final long serialVersionUID = 6551953728534136363L;

          @Override
          public void buttonClick(ClickEvent event) {
            if (btndelete == event.getButton()) {
              deleteDetails();
            }
          }
        });
  }
  @Override
  public void init() {
    inputUserName = new TextField("Nama Untuk Log In");
    inputUserName.setDescription("Nama yang digunakan untuk log in");
    inputUserName.setImmediate(true);
    inputUserName.setWidth(function.FORM_WIDTH);
    inputUserName.setMaxLength(10);
    inputUserName.addValueChangeListener(this);
    inputName = new TextField("Nama Lengkap");
    inputName.setDescription("Nama lengkap pengguna");
    inputName.setImmediate(true);
    inputName.addValueChangeListener(this);
    inputName.setWidth(function.FORM_WIDTH);
    selectRole = new ComboBox("Role Pengguna");
    selectRole.setImmediate(true);
    selectRole.setDescription("Role dari pengguna");
    selectRole.addValueChangeListener(this);
    selectRole.setWidth(function.FORM_WIDTH);
    selectRole.setNullSelectionAllowed(false);
    inputEmployeeNum = new TextField("Nomor pegawai");
    inputEmployeeNum.setDescription("Nomor pegawai");
    inputEmployeeNum.addValueChangeListener(this);
    inputEmployeeNum.setImmediate(true);
    inputEmployeeNum.setWidth(function.FORM_WIDTH);
    inputTitle = new TextField("Jabatan");
    inputTitle.setDescription("Jabatan dari pengguna");
    inputTitle.addValueChangeListener(this);
    inputTitle.setImmediate(true);
    inputTitle.setWidth(function.FORM_WIDTH);
    inputPhoneNumber = new TextField("Nomor Telepon");
    inputPhoneNumber.setDescription("Nomor Telepon yang bisa dihubungi");
    inputPhoneNumber.setImmediate(true);
    inputPhoneNumber.addValueChangeListener(this);
    inputPhoneNumber.setWidth(function.FORM_WIDTH);
    inputAddress = new TextArea("Alamat");
    inputAddress.setDescription("Alamat pengguna");
    inputAddress.addValueChangeListener(this);
    inputAddress.setImmediate(true);
    inputAddress.setWidth(function.FORM_WIDTH);
    inputPassword1 = new PasswordField("Password");
    inputPassword1.setDescription("Masukan password untuk pengguna");
    inputPassword1.addValueChangeListener(this);
    inputPassword1.setImmediate(true);
    inputPassword1.setWidth(function.FORM_WIDTH);
    inputPassword2 = new PasswordField("Ulangi Password");
    inputPassword2.setDescription("Masukan password untuk pengguna");
    inputPassword2.addValueChangeListener(this);
    inputPassword2.setImmediate(true);
    inputPassword2.setWidth(function.FORM_WIDTH);
    inputSika = new TextField("SIKA");
    inputSika.setDescription("Masukan nomor SIKA");
    inputSika.addValueChangeListener(this);
    inputSika.setImmediate(true);
    inputSika.setWidth(function.FORM_WIDTH);

    labelError =
        new Label() {
          {
            setVisible(false);
            addStyleName("form-error");
            setContentMode(ContentMode.HTML);
          }
        };
    buttonSubmit = new Button("Simpan");
    buttonSubmit.addClickListener(this);

    buttonSaveEdit = new Button("Simpan Perubahan");
    buttonSaveEdit.addClickListener(this);
    buttonReset = new Button("Reset Form");
    buttonReset.addClickListener(this);
    buttonCancel = new Button("Batalkan");
    buttonCancel.addClickListener(this);
    buttonActivation = new Button("");
    buttonActivation.addClickListener(this);
    buttonResetPassword = new Button("Reset Password");
    buttonResetPassword.addClickListener(this);
    construct();
  }
예제 #23
0
  @AutoGenerated
  private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("650px");
    mainLayout.setHeight("220px");
    mainLayout.setMargin(true);

    // top-level component properties
    setWidth("650px");
    setHeight("220px");

    // jobGroupField
    jobGroupField = new TextField();
    jobGroupField.setCaption("Grupo");
    jobGroupField.setImmediate(false);
    jobGroupField.setWidth("140px");
    jobGroupField.setHeight("-1px");
    jobGroupField.setRequired(true);
    mainLayout.addComponent(jobGroupField, "top:20.0px;left:180.0px;");

    // jobIntervalField
    jobIntervalField = new TextField();
    jobIntervalField.setCaption("Intervalo");
    jobIntervalField.setImmediate(false);
    jobIntervalField.setWidth("60px");
    jobIntervalField.setHeight("-1px");
    mainLayout.addComponent(jobIntervalField, "top:180.0px;left:20.0px;");

    // jobNameField
    jobNameField = new TextField();
    jobNameField.setCaption("Nombre");
    jobNameField.setImmediate(false);
    jobNameField.setWidth("140px");
    jobNameField.setHeight("-1px");
    jobNameField.setRequired(true);
    mainLayout.addComponent(jobNameField, "top:20.0px;left:20.0px;");

    // jobTriggerPriorityField
    jobTriggerPriorityField = new TextField();
    jobTriggerPriorityField.setCaption("Job Trigger Priority");
    jobTriggerPriorityField.setImmediate(false);
    jobTriggerPriorityField.setWidth("160px");
    jobTriggerPriorityField.setHeight("-1px");
    mainLayout.addComponent(jobTriggerPriorityField, "top:140.0px;left:200.0px;");

    // jobTriggerTypeField
    jobTriggerTypeField = new ComboBox();
    jobTriggerTypeField.setCaption("Tipo Disparador");
    jobTriggerTypeField.setImmediate(true);
    jobTriggerTypeField.setWidth("160px");
    jobTriggerTypeField.setHeight("-1px");
    jobTriggerTypeField.setRequired(true);
    mainLayout.addComponent(jobTriggerTypeField, "top:140.0px;left:20.0px;");

    // cronExpressionField
    cronExpressionField = new TextField();
    cronExpressionField.setCaption("Expresión Cron ");
    cronExpressionField.setImmediate(false);
    cronExpressionField.setWidth("340px");
    cronExpressionField.setHeight("-1px");
    mainLayout.addComponent(cronExpressionField, "top:180.0px;left:20.0px;");

    // descriptionField
    descriptionField = new TextField();
    descriptionField.setCaption("Descripción");
    descriptionField.setImmediate(false);
    descriptionField.setWidth("620px");
    descriptionField.setHeight("-1px");
    mainLayout.addComponent(descriptionField, "top:100.0px;left:20.0px;");

    // endTimeField
    endTimeField = new DateField();
    endTimeField.setCaption("Fecha Finalización");
    endTimeField.setImmediate(false);
    endTimeField.setWidth("-1px");
    endTimeField.setHeight("-1px");
    endTimeField.setInvalidAllowed(false);
    mainLayout.addComponent(endTimeField, "top:60.0px;left:225.0px;");

    // futureField
    futureField = new CheckBox();
    futureField.setCaption("Futuro");
    futureField.setImmediate(false);
    futureField.setWidth("-1px");
    futureField.setHeight("-1px");
    mainLayout.addComponent(futureField, "top:140.0px;left:585.0px;");

    // future_timeField
    future_timeField = new TextField();
    future_timeField.setCaption("Future_time");
    future_timeField.setImmediate(false);
    future_timeField.setWidth("160px");
    future_timeField.setHeight("-1px");
    mainLayout.addComponent(future_timeField, "top:140.0px;left:400.0px;");

    // repeatCountField
    repeatCountField = new TextField();
    repeatCountField.setCaption("Repeticiones");
    repeatCountField.setImmediate(false);
    repeatCountField.setWidth("60px");
    repeatCountField.setHeight("24px");
    mainLayout.addComponent(repeatCountField, "top:180.0px;right:290.0px;");

    // startTimeField
    startTimeField = new DateField();
    startTimeField.setCaption("Fecha Comienzo");
    startTimeField.setImmediate(false);
    startTimeField.setWidth("-1px");
    startTimeField.setHeight("-1px");
    startTimeField.setInvalidAllowed(false);
    mainLayout.addComponent(startTimeField, "top:60.0px;left:20.0px;");

    // areaField
    areaField = new ComboBox();
    areaField.setCaption("Area Trabajo");
    areaField.setImmediate(false);
    areaField.setWidth("-1px");
    areaField.setHeight("-1px");
    areaField.setRequired(true);
    mainLayout.addComponent(areaField, "top:60.0px;left:420.0px;");

    // jobCalendarField
    jobCalendarField = new JobTriggerCalendarField();
    jobCalendarField.setImmediate(false);
    jobCalendarField.setWidth("-1px");
    jobCalendarField.setHeight("-1px");
    mainLayout.addComponent(jobCalendarField, "top:167.0px;left:397.0px;");

    // jobIntervalTypeField
    jobIntervalTypeField = new ComboBox();
    jobIntervalTypeField.setCaption("Tipo Intervalo");
    jobIntervalTypeField.setImmediate(false);
    jobIntervalTypeField.setWidth("175px");
    jobIntervalTypeField.setHeight("-1px");
    mainLayout.addComponent(jobIntervalTypeField, "top:180.0px;left:100.0px;");

    return mainLayout;
  }
  public GestionNotificacion() {
    super();
    setMargin(true);
    setSpacing(true);
    setSizeFull();
    HorizontalL h1 = new HorizontalL();
    id = new CampoRuc();
    razonSocial = new CampoRazonSocial();
    razonSocial.setWidth("320px");
    direccion = new CampoDireccion();
    direccion.setWidth("450px");
    correoElectronico = new CampoCorreoElectronico();
    correoElectronico.setWidth("260px");

    tipoIdentificacion = new ComboBox();
    tipoIdentificacion.addItem("04");
    tipoIdentificacion.addItem("05");
    tipoIdentificacion.addItem("06");
    tipoIdentificacion.addItem("07");
    tipoIdentificacion.addItem("08");
    tipoIdentificacion.setItemCaption("04", "RUC");
    tipoIdentificacion.setItemCaption("05", "CEDULA");
    tipoIdentificacion.setItemCaption("06", "PASAPORTE");
    tipoIdentificacion.setItemCaption("07", "CONSUMIDOR FINAL");
    tipoIdentificacion.setItemCaption("08", "IDENTIFICADOR EXTERIOR");
    tipoIdentificacion.setNullSelectionAllowed(false);
    tipoIdentificacion.setValue("04");
    tipoIdentificacion.setWidth("140px");

    h1.addComponent(tipoIdentificacion, id);
    h1.addComponent("Razón Social", razonSocial);
    // h1.addComponent("Dirección",direccion);
    h1.addComponent("Email", correoElectronico);
    botonAnadir = new BotonAnadir();

    addComponent(h1);
    setComponentAlignment(h1, Alignment.TOP_CENTER);
    HorizontalL h2 = new HorizontalL();
    h2.addComponent("direccion", direccion);
    h2.addComponent(botonAnadir);
    addComponent(h2);

    grid = new Grid();
    beanItemC = new BeanItemContainer<DemografiaCliente>(DemografiaCliente.class);
    grid.setContainerDataSource(beanItemC);
    //		DemografiaCliente d=new DemografiaCliente();
    //		beanItemC.addBean(d);
    grid.removeColumn("entidadEmisora");
    grid.getColumn("id").setHeaderCaption("Identificacion");
    grid.setColumnOrder("razonSocial", "identificacion", "direccion", "correoElectronico");
    grid.setSizeFull();
    grid.removeColumn("tipoIdentificacion");
    grid.removeColumn("id");
    botonCancelar = new BotonCancelar();

    addComponent(grid);
    addComponent(botonCancelar);
    setComponentAlignment(botonCancelar, Alignment.BOTTOM_RIGHT);
    setComponentAlignment(h2, Alignment.TOP_CENTER);
    setExpandRatio(h1, 1);
    setExpandRatio(h2, 1);
    setExpandRatio(grid, 8);
    setExpandRatio(botonCancelar, 1);
    nuevoDato = new DemografiaCliente();
    beanItem = new BeanItem<DemografiaCliente>(nuevoDato);
    fg = new FieldGroup();
    fg.setItemDataSource(beanItem);
  }
  public void initComponent() {
    table =
        new Table() {
          @Override
          protected String formatPropertyValue(Object rowId, Object colId, Property property) {
            // Format by property type
            try {
              if (property.getType() == Date.class && property.getValue() != null) {
                SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
                return df.format((Date) property.getValue());
              }
            } catch (Exception ex) {
            }

            try {
              if (property.getType() == Boolean.class) {
                if ((Boolean) property.getValue() == true) {
                  return "CLOSE";
                } else {
                  return "-";
                }
              }
            } catch (Exception ex) {
            }

            return super.formatPropertyValue(rowId, colId, property);
          }
        };

    // Inisialisasi Panel
    setSizeFull();
    content.setSizeFull();
    content.setMargin(true);

    // INIT COMPONENT TENGAH
    table.setSizeFull();
    table.setSelectable(true);
    table.setImmediate(true);
    table.setBuffered(false);
    table.setFooterVisible(true);

    // INIT COMPONENT ATAS
    btnSeparator1.setEnabled(false);
    btnSeparator2.setEnabled(false);

    //		fieldSearchByRekap = new TextField("NO. REKAP");
    fieldSearchById = new TextField("NO. REKAP");
    fieldSearchById.setInputPrompt("NO. REKAP");
    fieldSearchById.setStyleName(Reindeer.TEXTFIELD_SMALL);
    fieldSearchById.setWidth("120px");

    //		fieldSearchByInvoice = new TextField("INVOICE");
    comboSearchByDivision = new ComboBox("DIVISION");
    comboSearchByDivision.setInputPrompt("DIVISION");
    comboSearchByDivision.setStyleName(Reindeer.TEXTFIELD_SMALL);
    comboSearchByDivision.setWidth("120px");

    dateFieldSearchByTransdateFrom = new DateField("INV FROM");
    dateFieldSearchByTransdateFrom.setStyleName(Reindeer.TEXTFIELD_SMALL);
    dateFieldSearchByTransdateFrom.setWidth("120px");

    dateFieldSearchByTransdateTo = new DateField("INV TO");
    dateFieldSearchByTransdateTo.setStyleName(Reindeer.TEXTFIELD_SMALL);
    dateFieldSearchByTransdateTo.setWidth("120px");

    btnSearch.setStyleName(Reindeer.BUTTON_SMALL);

    btnSearch.setIcon(new ThemeResource("images/navigation/12x12/Find.png"));
    btnSelect.setIcon(new ThemeResource("images/navigation/16x16/OK.png"));
  }