Examples of FieldSet


Examples of com.extjs.gxt.ui.client.widget.form.FieldSet

  column_left.setWidth("10%");
  TableData column_right = new TableData();
  column_right.setWidth("10%");
  TableData column1 = new TableData();
  column1.setHorizontalAlign(HorizontalAlignment.LEFT);
  FieldSet adminFieldset = createAdminFieldSet();
  adminFieldset.setWidth(GuiUtil.getScreenWidth() / 2 - 25);
  FieldSet chantierFieldset = CreateChantierFieldset();
  chantierFieldset.setWidth(GuiUtil.getScreenWidth() / 2 - 25);
  LayoutContainer layoucent = new LayoutContainer();
  layoucent.setWidth(5);
  btnValider = new Button(messages.validate());
  btnAnnuler = new Button(messages.cancel());
  FormPanel contentForm = new FormPanel();
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FieldSet

  gridAdmin.setAutoExpandColumn("identifiant");
  gridAdmin.setBorders(true);
  gridAdmin.setStripeRows(true);
  gridAdmin.setHeight(345);

  FieldSet fieldSet = new FieldSet();
  fieldSet.setStyleAttribute("backgroundColor", "#EDF5EA");
  fieldSet.setHeading("Droits d'administration");
  fieldSet.setHeight(460);
  // fieldSet.setWidth(RootPanel.get().getOffsetWidth() / 2 - 20);
  RowLayout rl_fieldSet = new RowLayout(Orientation.VERTICAL);

  rl_fieldSet.setAdjustForScroll(true);
  fieldSet.setLayout(rl_fieldSet);

  LayoutContainer layoutContainer = new LayoutContainer();
  layoutContainer.setLayout(new ColumnLayout());
  layoutContainer.setBorders(false);

  LabelField lblfldNouveauxAdministrateur = new LabelField(messages.newAdmin());

  layoutContainer.add(lblfldNouveauxAdministrateur);
  layoutContainer.add(new Html("&nbsp"));
  txtAdmin = new TextField();

  txtAdmin.addKeyListener(new KeyListener() {

      @Override
      public void componentKeyUp(ComponentEvent event) {
    if (txtAdmin.getValue() != null && !txtAdmin.getValue().trim().isEmpty() && txtAdmin.getValue().toLowerCase().matches("\\b.{0,60}\\\\+.{1,60}")) {
        btnAjouter.setEnabled(true);
    } else {
        btnAjouter.setEnabled(false);

    }

      }
  });

  txtAdmin.setWidth("45%");

  txtAdmin.setToolTip("Hint:domain\\loginname");

  com.extjs.gxt.ui.client.widget.layout.ColumnData cd_txtfldNewTextfield = new com.extjs.gxt.ui.client.widget.layout.ColumnData();
  cd_txtfldNewTextfield.setWidth(0.65);
  layoutContainer.add(txtAdmin, cd_txtfldNewTextfield);
  txtAdmin.setFieldLabel("New TextField");
  Html space = new Html("&nbsp");
  Html space1 = new Html("&nbsp");
  layoutContainer.add(space);
  btnAjouter = new Button(messages.commonAdd());
  btnAjouter.setEnabled(false);
  SelectionListener<ButtonEvent> add = AddButtonEvent();
  btnAjouter.addSelectionListener(add);
  layoutContainer.add(btnAjouter, new com.extjs.gxt.ui.client.widget.layout.ColumnData(100.0));

  layoutContainer.setBorders(false);
  LayoutContainer contentTop = new LayoutContainer();
  contentTop.setHeight(30);
  fieldSet.add(contentTop);
  fieldSet.add(gridAdmin);
  fieldSet.add(space1);
  fieldSet.add(layoutContainer);
  return fieldSet;
    }
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FieldSet

    super.storeUpdate(se);
    isUpdate = true;
      }
  });

  FieldSet fieldSet = new FieldSet();
  fieldSet.setStyleAttribute("backgroundColor", "#EDF5EA");
  fieldSet.setHeading("Droits d’accès aux chantiers ");
  fieldSet.setHeight(460);
  fieldSet.setWidth(RootPanel.get().getOffsetWidth() / 2 - 20);
  LayoutContainer layoutContainer = new LayoutContainer();
  layoutContainer.setLayout(new ColumnLayout());
  layoutContainer.setBorders(false);
  layoutContainer.setAutoWidth(true);
  LabelField lblfldNouveauxAdministrateur = new LabelField("Nouveaux:");
  layoutContainer.add(lblfldNouveauxAdministrateur);
  layoutContainer.add(new Html("&nbsp"));
  txtChantier = new TextField();
  com.extjs.gxt.ui.client.widget.layout.ColumnData cd_txtChantier = new com.extjs.gxt.ui.client.widget.layout.ColumnData();
  cd_txtChantier.setWidth(0.85);
  layoutContainer.add(txtChantier, cd_txtChantier);
  txtChantier.setFieldLabel("New TextField");
  txtChantier.setWidth("80%");
  txtChantier.addKeyListener(new KeyListener() {

      @Override
      public void componentKeyUp(ComponentEvent event) {
    if (txtChantier.getValue() != null && !txtChantier.getValue().trim().isEmpty() && txtChantier.getValue().toLowerCase().matches("\\b.{0,60}\\\\+.{1,60}")) {
        btnAdd.setEnabled(true);
    } else {
        btnAdd.setEnabled(false);
    }

      }
  });

  txtChantier.setWidth("35%");

  txtChantier.setToolTip("Hint:domain\\loginname");

  SelectionListener<ButtonEvent> add = AddButtonEventGridRole();
  btnAdd = new Button("Ajouter");
  btnAdd.addSelectionListener(add);
  btnAdd.setEnabled(false);
  layoutContainer.add(new Html("&nbsp"));
  layoutContainer.add(btnAdd, new com.extjs.gxt.ui.client.widget.layout.ColumnData(100.0));

  RowLayout rl_fieldSet = new RowLayout(Orientation.VERTICAL);
  rl_fieldSet.setAdjustForScroll(true);
  fieldSet.setLayout(rl_fieldSet);

  LayoutContainer layoutContainer_1 = new LayoutContainer();
  layoutContainer_1.setLayout(new ColumnLayout());
  layoutContainer_1.setBorders(false);
  layoutContainer_1.setAutoWidth(true);
  LabelField lblfldChantier = new LabelField("Chantier:");
  layoutContainer_1.add(lblfldChantier);
  storeChantier = new ListStore<ChantierModel>();
  cbbChantier = new SimpleComboBox();
  cbbChantier.setEditable(false);
  cbbChantier.setDisplayField("nom");
  cbbChantier.setStore(storeChantier);
  cbbChantier.setStyleAttribute("marginLeft", "20px");
  cbbChantier.setTriggerAction(TriggerAction.ALL);
  cbbChantier.setAllowBlank(false);
  cbbChantier.setShadow(false);
  cbbChantier.setLazyRender(false);
  cbbChantier.setSelectOnFocus(true);
  addListener = new Listener<BaseEvent>() {
      @Override
      public void handleEvent(BaseEvent be) {
    if (isUpdate || isDelete || isAdded) {
        MessageBox box = new MessageBox();
        box.alert("", "Il faut valider d'abord", null);
    }
      }
  };
  cbbChantier.addListener(Events.OnClick, addListener);
  cbbChantier.addSelectionChangedListener(new SelectionChangedListener<ChantierModel>() {

      @Override
      public void selectionChanged(SelectionChangedEvent<ChantierModel> se) {
    ch = se.getSelectedItem();
    idChantier = ch.getId();
    service.findAllUserByChantier(idChantier, new AsyncCallback<List<UtilisateurGrpModel>>() {
        @Override
        public void onFailure(Throwable arg0) {

        }

        @Override
        public void onSuccess(List<UtilisateurGrpModel> result) {
      storeRole.removeAll();
      storeRole.add(result);
      storeRole.commitChanges();
      listUserInChantierBefore = storeRole.getModels();
        }
    });
      }
  });
  cbbChantier.disableEvents(true);
  cbbChantier.getStore().addStoreListener(new StoreListener<ChantierModel>() {
      @Override
      public void storeAdd(StoreEvent<ChantierModel> se) {
    cbbChantier.setValue(storeChantier.getAt(0));

      }
  });
  cbbChantier.enableEvents(true);
  layoutContainer_1.add(cbbChantier, new com.extjs.gxt.ui.client.widget.layout.ColumnData(0.80));
  cbbChantier.setFieldLabel("New ComboBox");
  fieldSet.add(layoutContainer_1, new RowData(RootPanel.get().getOffsetWidth() / 2 - 50, 30.0, new Margins()));
  fieldSet.add(gridUserInChantier);
  fieldSet.add(new Html("&nbsp;"));
  fieldSet.add(layoutContainer);

  layoutChantier.add(fieldSet);
  return fieldSet;
    }
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FieldSet

  gridChantier.setAutoExpandColumn("nom");
  gridChantier.setHeight(370);
  gridChantier.setAutoExpandMax(1500);
  gridChantier.setAutoExpandMin(250);
  gridChantier.setWidth(1500);
  FieldSet fsChantier = new CustomFieldSet();
  add(fsChantier);
  fsChantier.setHeading("Chantiers existants");
  fsChantier.setAutoHeight(true);
  // fsChantier.setHeight(400);
  contentChantier.setLayout(new FitLayout());
  contentChantier.setHeaderVisible(false);
  contentChantier.setHeight(200);
  // contentChantier.setAutoHeight(true);
  contentChantier.add(gridChantier);
  fsChantier.add(contentChantier);
  fsNouveauxChantier = new CustomFieldSet();
  fsNouveauxChantier.setCollapsible(false);
  fsNouveauxChantier.setLayout(new ColumnLayout());
  LabelField lblfldNomDuChantier = new LabelField(messages.nameChantier() + ":");
  fsNouveauxChantier.add(lblfldNomDuChantier);
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FieldSet

  private static Images images = GWT.create(Images.class);

  public SubConstructor() {
    setLayout(new RowLayout(Orientation.VERTICAL));

    FieldSet fldstNewFieldset = new FieldSet();
    add(fldstNewFieldset);
    fldstNewFieldset.setHeading("New FieldSet");

    FieldSet fldstNewFieldset_1 = new FieldSet();
    fldstNewFieldset_1.setLayout(new RowLayout(Orientation.VERTICAL));
    add(fldstNewFieldset_1);
    fldstNewFieldset_1.setHeading("New FieldSet");
    LayoutContainer c = new LayoutContainer();
    c.setLayout(new HBoxLayout());

    Label lblNewLabel = new Label("");
    c.add(lblNewLabel);
    HBoxLayoutData flex = new HBoxLayoutData(new Margins(0, 5, 0, 0));
    flex.setFlex(1);
    c.add(new Text(), flex);
    Hyperlink hprlnkNewHyperlink = new Hyperlink("New hyperlink", false, "newHistoryToken");
    c.add(hprlnkNewHyperlink);

    Hyperlink hprlnkNewHyperlink_1 = new Hyperlink("New hyperlink", false, "newHistoryToken");
    c.add(hprlnkNewHyperlink_1);

    Hyperlink hprlnkNewHyperlink_2 = new Hyperlink("New hyperlink", false, "newHistoryToken");
    c.add(hprlnkNewHyperlink_2);
    fldstNewFieldset_1.add(c);
   
    Label lblNewLabel_1 = new Label("New label");
    lblNewLabel_1.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    fldstNewFieldset_1.add(lblNewLabel_1);
  }
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FieldSet

    public TransfertPpPanel(final ChantierModel chantier, final Integer transfertPpId, RoleModel role, UtilisateurGrpModel user) {
  loadBudj();
  loadLig(chantier, transfertPpId, role, user);
  createDetailsTransferPp(role, user);
  createTotalPP();
  inforFieldset = new FieldSet();
  inforFieldset.setHeading("INFORMATION GENERALES");
  LayoutContainer layoutContainer_0 = new LayoutContainer();
  FormLayout fl_layoutContainer_0 = new FormLayout();
  fl_layoutContainer_0.setLabelWidth(70);
  layoutContainer_0.setLayout(new TableLayout(2));
  TableData col1 = new TableData();
  col1.setWidth("600px");
  TableData col2 = new TableData();
  col2.setWidth("600px");
  labelChantier = new Label();
  labelChantier.setText("Chantier:" + chantier.getNom());
  labelRefTransfertpp = new Label();
  labelRefTransfertpp.setVisible(false);
  layoutContainer_0.add(labelChantier, col1);
  layoutContainer_0.add(labelRefTransfertpp, col2);
  setDefaultBackgroundColor(layoutContainer_0);
  setDefaultBackgroundColor(inforFieldset);
  inforFieldset.add(layoutContainer_0);
  formDetails = new CustomFormPanel();
  formDetails.add(inforFieldset);
  fsTransfertPp = new FieldSet();
  fsTransfertPp.setHeading("TRANSFERTS PP");
  fsTransfertPp.setLayout(new RowLayout(Orientation.VERTICAL));
  LayoutContainer layoutContainer_10 = new LayoutContainer();
  layoutContainer_10.setLayout(new BorderLayout());
  LayoutContainer buttonPanel = new LayoutContainer();
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FieldSet

    ficheStGrid1.addPlugin(checkSelection1);
    ficheStGrid1.setSelectionModel(checkSelection1);
    ficheStGrid1.getColumnModel().getColumns().add(0, checkSelection1.getColumn());
    ficheStGrid1.getView().setForceFit(true);
   
    FieldSet fieldSetGrid1 = new FieldSet();
    fieldSetGrid1.setHeading("Liste des sous-traitants à imprimer");
    fieldSetGrid1.add(ficheStGrid1);
    add(fieldSetGrid1);
   
    checkSelection2 = new CheckBoxSelectionModel<FicheStDto>();
    checkSelection2.setSelectionMode(SelectionMode.MULTI);
    checkSelection2.bind(ficheStStore2);
   
    ficheStGrid2 = new EditorGrid<FicheStDto>(ficheStStore2, createColumnModelGrid2());
    ficheStStore2.setSortDir(SortDir.NONE);
    ficheStGrid2.setHeight(60);
    ficheStGrid2.setBorders(false);
    ficheStGrid2.setBorders(true);
    ficheStGrid2.setStripeRows(true);
    ficheStGrid2.setLoadMask(true);
    ficheStGrid2.setColumnLines(true);
    ficheStGrid2.addPlugin(checkSelection2);
    ficheStGrid2.setSelectionModel(checkSelection2);
    ficheStGrid2.getColumnModel().getColumns().add(0, checkSelection2.getColumn());
    ficheStGrid2.getView().setForceFit(true);
    FieldSet fieldSetGrid2 = new FieldSet();
    fieldSetGrid2.setHeading("Choix par type de lot");
    fieldSetGrid2.add(ficheStGrid2);
    add(fieldSetGrid2);
    btnImprimer = new Button("Imprimer");
    btnImprimer.addListener(Events.OnClick, new Listener<BaseEvent>() {
      @Override
      public void handleEvent(BaseEvent be) {
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FieldSet

    super();
    this.bus = b;
    this.ficheStId = ficheStId;
    this.role = roleModel;
    this.user = utilisateurGrpModel;
    FieldSet paymentFieldSet = new CustomFieldSet();
    paymentFieldSet.setCollapsible(true);
    setDefaultBackgroundColor(paymentFieldSet);
    paymentFieldSet.setHeading(messages.accomptes());
    TableLayout tl12 = new TableLayout(1);
    tl12.setWidth("100%");
    paymentFieldSet.setLayout(tl12);

    LayoutContainer accomptesPanel1 = new LayoutContainer();
    TableLayout tl_accomptesPanel1 = new TableLayout(2);
    tl_accomptesPanel1.setWidth("98%");
    tl_accomptesPanel1.setCellHorizontalAlign(HorizontalAlignment.RIGHT);
    accomptesPanel1.setLayout(tl_accomptesPanel1);
    saveButton = new HTML("<img src='./images/sauvegarder.png'/> " + messages.saveForm());
    saveButton.setStyleName("actionHTML");
    saveButton.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        bus.fireEvent(new SaveFicheStEvent());
      }
    });
    // Report
    txtTotalDeduction = new TextField<String>();
    txtTotalDeduction.setId("ACCOMPTES_PANEL_TOTALDEDUCTION_ID");
    txtTotalDeduction.setValue(totaldeduction);
    txtTotalDeduction.hide();
    add(txtTotalDeduction);

    accomptesPanel1.add(saveButton);

    bus.addHandler(ExportSuiviDesAccomptesPanelEvent.TYPE, new ExportSuiviDesAccomptesPanelHandler() {

      @Override
      public void onExport(ExportSuiviDesAccomptesPanelEvent event) {
        exportAccomptesPanel();
      }
    });

    HTML printPayment = new HTML("<img src='./images/imprimer.png'/> " + messages.printAcomptes());
    printPayment.setStyleName("actionHTML");
    printPayment.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent arg0) {
        exportAccomptesPanel();
      }
    });

    TableData td = new TableData();
    td.setWidth("230px");
    accomptesPanel1.add(printPayment, td);
    paymentFieldSet.add(accomptesPanel1);

    LayoutContainer accomptesPanel2 = new LayoutContainer();
    TableLayout tl3 = new TableLayout(3);
    tl3.setWidth("100%");
    tl3.setCellHorizontalAlign(HorizontalAlignment.LEFT);
    accomptesPanel2.setLayout(tl3);
    HTML chantier2 = new HTML("<label>" + messages.chantier() + ":</label>" + SPACES + "Chantier 1", true);
    // Report
    chantier = "Chantier 1";
    TableData td2 = new TableData();
    td2.setWidth("300px");
    accomptesPanel2.add(chantier2, td2);

    String conducter = navigation.getContext().getMapConducteurdetravaux().get(ficheStId);
    if (conducter == null)
      conducter = "";
    final HTML responsable = new HTML("<label>" + messages.responsable() + ":</label>" + SPACES + conducter, true);
    bus.addHandler(ConducteurEvent.TYPE, new ConducteurHandler() {
      @Override
      public void onChangeConducteur(ConducteurEvent conducteurEvent) {
        String conducter = conducteurEvent.getConducter() != null ? conducteurEvent.getConducter() : "";
        responsable.setHTML("<label>" + messages.responsable() + ":</label>" + SPACES + conducter);
        responsables = conducteurEvent.getConducter();
      }
    });
    // Report
    responsables = "";
    TableData td3 = new TableData();
    td3.setWidth("400px");
    accomptesPanel2.add(responsable, td3);

    String societe_ = navigation.getContext().getMapSociete().get(ficheStId);
    if (societe_ == null)
      societe_ = "";
    final HTML societe2 = new HTML("<label>" + messages.societe() + ":</label>" + SPACES + societe_, true);
    bus.addHandler(SocieteEvent.TYPE, new SocieteHandler() {
      @Override
      public void onChangeSociete(SocieteEvent societeEvent) {
        String societe = societeEvent.getSociete() != null ? societeEvent.getSociete() : "";
        societe2.setHTML("<label>" + messages.societe() + ":</label>" + SPACES + societe);
        societe = societeEvent.getSociete();

      }
    });
    societe = "";

    accomptesPanel2.add(societe2);
    paymentFieldSet.add(accomptesPanel2);

    FieldSet deductionsPaymentsFieldSet = new FieldSet();
    deductionsPaymentsFieldSet.setWidth("100%");
    deductionsPaymentsFieldSet.setCollapsible(true);
    setBackgroundColor(deductionsPaymentsFieldSet, BACKGROUD_COLOR_2);
    TableLayout tl1 = new TableLayout(1);
    tl1.setWidth("100%");
    deductionsPaymentsFieldSet.setLayout(tl1);
    deductionsPaymentsFieldSet.setHeading(messages.retenuesEffectuees());

    createDeductionGrid();
    deductionsPaymentsFieldSet.add(deductionGrid);

    FlexTable flexTable = new FlexTable();
    HTML space = new HTML(SPACES_4);
    flexTable.setWidget(0, 0, space);
    addRow.setStyleName("actionHTML2");
    addRow.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        showAddAccomptesDialog();
      }

      private void showAddAccomptesDialog() {
        final Dialog dialog = new Dialog();
        dialog.setHeading(messages.titlePopup());
        dialog.setLayout(new BorderLayout());
        dialog.setWidth(600);
        dialog.setHeight(400);
        dialog.setBodyBorder(false);
        dialog.setHideOnButtonClick(false);
        dialog.setButtons(Dialog.OKCANCEL);
        dialog.setButtonAlign(HorizontalAlignment.CENTER);
        dialog.setScrollMode(Scroll.AUTO);
        dialog.setModal(true);
        dialog.setBlinkModal(true);
        Button cancelButton = dialog.getButtonById(Dialog.CANCEL);
        cancelButton.setText(messages.cancel());
        Button okButton = dialog.getButtonById(Dialog.OK);
        okButton.setText(messages.ok());

        final AddAccomptesForm addDataForm = new AddAccomptesForm();
        dialog.add(addDataForm, new BorderLayoutData(LayoutRegion.CENTER));

        okButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
          @Override
          public void componentSelected(ButtonEvent ce) {
            if (addDataForm.isValid()) {
              DeductionDto model = addDataForm.getDataModel();
              deductionGrid.getStore().add(model);
              deductionGrid.getView().refresh(true);
              // bus.fireEvent(new
              // DeductionGridUpdateEvent(deductionGrid.getStore().getModels()));
              dialog.hide();
            }
          }
        });

        cancelButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
          @Override
          public void componentSelected(ButtonEvent ce) {
            dialog.hide();
          }
        });

        dialog.show();
      }
    });

    flexTable.setWidget(0, 1, addRow);
    deductionsPaymentsFieldSet.add(flexTable);

    paymentFieldSet.add(deductionsPaymentsFieldSet);

    LayoutContainer accomptesPanel3 = new LayoutContainer();
    accomptesPanel3.setWidth("75%");
    TableLayout tl2 = new TableLayout(3);
    tl2.setWidth("100%");
    accomptesPanel3.setLayout(tl2);

    FieldSet penaltyFielSet = new FieldSet();
    // penaltyFielSet.setWidth("80%");
    setBackgroundColor(penaltyFielSet, BACKGROUD_COLOR_2);
    penaltyFielSet.setHeading(messages.penalites().toUpperCase());
    TableData td4 = new TableData();
    td4.setWidth("55%");

    createPenaltyGrid();
    penaltyFielSet.add(penaltyGrid);

    FlexTable flexTable2 = new FlexTable();
    HTML space2 = new HTML(SPACES_4);
    flexTable2.setWidget(0, 0, space2);
    addRow2.setStyleName("actionHTML2");
    addRow2.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        showAddPenaltyDialog();
      }

      private void showAddPenaltyDialog() {
        Dialog dialog = new Dialog();
        dialog.setHeading(messages.titlePopup());
        dialog.setLayout(new BorderLayout());
        dialog.setWidth(500);
        dialog.setHeight(260);
        dialog.setBodyBorder(false);
        dialog.setHideOnButtonClick(true);
        dialog.setButtons(Dialog.OKCANCEL);
        dialog.setButtonAlign(HorizontalAlignment.CENTER);
        dialog.setScrollMode(Scroll.AUTO);
        dialog.setModal(true);
        dialog.setBlinkModal(true);
        Button cancelButton = dialog.getButtonById(Dialog.CANCEL);
        cancelButton.setText(messages.cancel());
        Button okButton = dialog.getButtonById(Dialog.OK);
        okButton.setText(messages.ok());

        final AddPenaltyForm addDataForm = new AddPenaltyForm();
        dialog.add(addDataForm, new BorderLayoutData(LayoutRegion.CENTER));

        okButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
          @Override
          public void componentSelected(ButtonEvent ce) {
            PenaltyDto model = addDataForm.getDataModel();
            penaltyGrid.getStore().add(model);
            penaltyGrid.getView().refresh(true);
          }
        });

        dialog.show();
      }
    });

    flexTable2.setWidget(0, 1, addRow2);

    penaltyFielSet.add(flexTable2);
    accomptesPanel3.add(penaltyFielSet, td4);

    LayoutContainer lc1 = new LayoutContainer();
    lc1.setWidth("100%");
    setDefaultBackgroundColor(lc1);
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FieldSet

    public GestionPanel(SimpleEventBus b, RoleModel roleModel, UtilisateurGrpModel utilisateurGrpModel) {
  super();
  this.bus = b;
  this.role = roleModel;
  this.user = utilisateurGrpModel;
  FieldSet gestionFieldSet = new CustomFieldSet();
  gestionFieldSet.setCollapsible(true);
  gestionFieldSet.setLayout(new RowLayout(Orientation.VERTICAL));

  LayoutContainer layoutContainer_10 = new LayoutContainer();
  layoutContainer_10.setLayout(new BorderLayout());

  LayoutContainer buttonPanel = new LayoutContainer();
  buttonPanel.setId("buttonPanel");
  buttonPanel.setLayout(new RowLayout(Orientation.HORIZONTAL));

  saveButton = new HTML("<img src='./images/sauvegarder.png'/> " + messages.saveForm(), false);
  saveButton.setStyleName("actionHTML");
  buttonPanel.add(saveButton);
  saveButton.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
    bus.fireEvent(new SaveFicheStEvent());
      }
  });

  buttonPanel.add(new HTML(LINKS_SPACE, false));
  bus.addHandler(ExportGestionPanelEvent.TYPE, new ExportGestionPanelHandler() {
      @Override
      public void onExport(ExportGestionPanelEvent event) {
    exportGestion();
      }
  });

  HTML print = new HTML("<img src='./images/imprimer.png'/> " + messages.print(), false);
  print.setStyleName("actionHTML");
  print.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent arg0) {
    exportGestion();
      }
  });
  buttonPanel.add(print);
  layoutContainer_10.add(buttonPanel, new BorderLayoutData(LayoutRegion.EAST, 350.0f));
  gestionFieldSet.add(layoutContainer_10);
  layoutContainer_10.setHeight("30");

  addFicheST = new HTML("<img src='./images/ajouter.png'/> " + messages.addRow(), false);

  LayoutContainer layoutContainer_11 = new LayoutContainer();

  createGestionGrid();

  layoutContainer_11.add(gestionGrid);

  gestionFieldSet.add(layoutContainer_11);

  LayoutContainer layoutContainer_12 = new LayoutContainer();
  TableLayout tl_layoutContainer_12 = new TableLayout(2);
  tl_layoutContainer_12.setWidth("100%");
  layoutContainer_12.setLayout(tl_layoutContainer_12);
  gestionFieldSet.add(layoutContainer_12);
  layoutContainer_12.setBorders(false);

  FlexTable ft1 = new FlexTable();
  int commonWidth = 265;
  ft1.setWidget(0, 0, new HTML(SPACES_4));

  addFicheST.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
    showAddDialog();
      }

      private void showAddDialog() {
    final Dialog dialog = new Dialog();
    dialog.setHeading(messages.titlePopup());
    dialog.setLayout(new BorderLayout());
    dialog.setWidth(600);
    dialog.setHeight(550);
    dialog.setBodyBorder(false);
    dialog.setHideOnButtonClick(false);
    dialog.setButtons(Dialog.OKCANCEL);
    dialog.setButtonAlign(HorizontalAlignment.CENTER);
    dialog.setScrollMode(Scroll.AUTO);
    dialog.setModal(true);
    dialog.setBlinkModal(true);
    Button cancelButton = dialog.getButtonById(Dialog.CANCEL);
    cancelButton.setText(messages.cancel());
    Button okButton = dialog.getButtonById(Dialog.OK);
    okButton.setText(messages.ok());

    final AddGestionForm addGestionForm = new AddGestionForm();
    dialog.add(addGestionForm, new BorderLayoutData(LayoutRegion.CENTER));

    okButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
        @Override
        public void componentSelected(ButtonEvent ce) {
      if (addGestionForm.isValid()) {
          GestionDto model = addGestionForm.getDataModel();
          gestionGrid.getStore().add(model);

          bus.fireEvent(new EtatAvancementEvent(gestionGrid.getStore().getModels(), null));
          dialog.hide();
      }
        }
    });

    cancelButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
        @Override
        public void componentSelected(ButtonEvent ce) {
      dialog.hide();
        }
    });

    dialog.show();
      }
  });

  addFicheST.setStyleName("actionHTML2");
  ft1.setWidget(0, 1, addFicheST);
  TableData td_ft1 = new TableData();
  td_ft1.setVerticalAlign(VerticalAlignment.TOP);
  layoutContainer_12.add(ft1, td_ft1);
  ft1.getCellFormatter().setVerticalAlignment(1, 1, HasVerticalAlignment.ALIGN_TOP);

  LayoutContainer layoutContainer_13 = new LayoutContainer();

  TableLayout tl_layoutContainer_13 = new TableLayout(1);
  tl_layoutContainer_13.setCellHorizontalAlign(HorizontalAlignment.RIGHT);
  tl_layoutContainer_13.setWidth("100%");
  layoutContainer_13.setLayout(tl_layoutContainer_13);

  FlexTable ft2 = new FlexTable();
  ft2.setBorderWidth(2);
  inforGrid = createInforGrid();

  ft2.setWidget(0, 0, new HTML("<label>" + messages.dont() + ":<label> "));
  ft2.setWidget(0, 1, inforGrid);

  layoutContainer_13.add(ft2);
  ft2.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);

  summary = new CustomFormPanel();
  TableLayout tl_summary = new TableLayout(2);
  tl_summary.setBorder(1);
  summary.setLayout(tl_summary);

  TableData td_summary = new TableData();
  td_summary.setPadding(5);
  layoutContainer_13.add(summary, td_summary);
  HTML budgetLabel = new HTML(messages.budget());
  TableData td_budgetPanel = new TableData();
  td_budgetPanel.setHorizontalAlign(HorizontalAlignment.LEFT);
  LayoutContainer budgetPanel = new LayoutContainer();
  budgetPanel.setStyleAttribute("background-color", HEADER_BACKGROUND_COLOR);
  budgetPanel.add(budgetLabel);
  summary.add(budgetPanel, td_budgetPanel);
  NumberField budget = createNumberField(null);
  budget.setName(FicheStDto.GEST_BUDGET_INITIAL);
  budget.setId("GESTIONAL_PANEL_BUDGET_ID");
  budget.setWidth(commonWidth);
  summary.add(budget);
  if (budget != null) {
      budgetInitial = budget.getValue() + "";
  }
  HTML ecardDernierLabel = new HTML(messages.ecardDernier());

  TableData td_ecardDernierPanel = new TableData();
  td_ecardDernierPanel.setHorizontalAlign(HorizontalAlignment.LEFT);
  LayoutContainer ecardDernierPanel = new LayoutContainer();
  ecardDernierPanel.setStyleAttribute("background-color", HEADER_BACKGROUND_COLOR);
  ecardDernierPanel.add(ecardDernierLabel);
  summary.add(ecardDernierPanel, td_ecardDernierPanel);
  NumberField ecardDernier = createNumberField(null);
  ecardDernier.setName(FicheStDto.GEST_ECART_DERNIER_PT);
  ecardDernier.setId("GESTIONAL_PANEL_ECARDDERNIER_ID");
  ecardDernier.setWidth(commonWidth);
  summary.add(ecardDernier);
  if (ecardDernier != null) {
      dernierPoint = ecardDernier.getValue() + "";
  }
  HTML dateDernierLabel = new HTML(messages.dernierDate());

  LayoutContainer dateDernierPanel = new LayoutContainer();
  dateDernierPanel.setStyleAttribute("background-color", HEADER_BACKGROUND_COLOR);
  dateDernierPanel.add(dateDernierLabel);
  TableData td_dateDernierPanel = new TableData();
  td_dateDernierPanel.setHorizontalAlign(HorizontalAlignment.LEFT);
  summary.add(dateDernierPanel, td_dateDernierPanel);
  DateField dateDernier = new DateField();
  dateDernier.setName(FicheStDto.GEST_DATE_DERNIER_PT);
  dateDernier.setId("GESTION_PANEL_DATEDERNIER_ID");
  dateDernier.setWidth(commonWidth);
  summary.add(dateDernier);

  if (dateDernier != null) {
      dernier = dateDernier.getValue() + "";
  }

  layoutContainer_12.add(layoutContainer_13);
  gestionFieldSet.setHeading(messages.gestion());
  add(gestionFieldSet);

  // Set background color to green
  setDefaultBackgroundColor(layoutContainer_10);
  setDefaultBackgroundColor(gestionFieldSet);
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FieldSet

    form2.setFrame(true);
    form2.setHeading("Simple Form with FieldSets");
    form2.setWidth(350);
    form2.setLayout(new FlowLayout());

    FieldSet fieldSet = new FieldSet();
    fieldSet.setHeading("User Information");
    fieldSet.setCheckboxToggle(true);

    FormLayout layout = new FormLayout();
    layout.setLabelWidth(75);
    fieldSet.setLayout(layout);

    TextField<String> firstName = new TextField<String>();
    firstName.setFieldLabel("First Name");
    firstName.setAllowBlank(false);
    fieldSet.add(firstName, formData);

    TextField<String> lastName = new TextField<String>();
    lastName.setFieldLabel("Last Name");
    fieldSet.add(lastName, formData);

    TextField<String> company = new TextField<String>();
    company.setFieldLabel("Company");
    fieldSet.add(company, formData);

    TextField<String> email = new TextField<String>();
    email.setFieldLabel("Email");
    fieldSet.add(email, formData);

    form2.add(fieldSet);

    fieldSet = new FieldSet();
    fieldSet.setHeading("Phone Numbers");
    fieldSet.setCollapsible(true);

    layout = new FormLayout();
    layout.setLabelWidth(75);
    fieldSet.setLayout(layout);

    TextField<String> field = new TextField<String>();
    field.setFieldLabel("Home");
    fieldSet.add(field, formData);

    field = new TextField<String>();
    field.setFieldLabel("Business");
    fieldSet.add(field, formData);

    field = new TextField<String>();
    field.setFieldLabel("Mobile");
    fieldSet.add(field, formData);

    field = new TextField<String>();
    field.setFieldLabel("Fax");
    fieldSet.add(field, formData);

    form2.add(fieldSet);
    form2.setButtonAlign(HorizontalAlignment.CENTER);
    form2.addButton(new Button("Save"));
    form2.addButton(new Button("Cancel"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.