Examples of LayoutContainer


Examples of com.extjs.gxt.ui.client.widget.LayoutContainer

  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.LayoutContainer

        storeRole.rejectChanges();
    }

      }
  };
  LayoutContainer layoutChantier = new LayoutContainer();
  List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
  GridCellRenderer<UtilisateurGrpModel> deleteBtn = deleteButtonGridRole();
  ColumnConfig column = new ColumnConfig("supprimer", "Supprimer", 75);
  column.setSortable(false);
  column.setMenuDisabled(true);
  column.setGroupable(false);
  column.setFixed(true);
  column.setResizable(false);
  column.setRenderer(deleteBtn);
  column.setAlignment(HorizontalAlignment.LEFT);
  configs.add(column);
  column_1 = new ColumnConfig();// id
  column_1.setHeader("Utilisateur/Groupe");
  column_1.setId("identifiant");
  column_1.setSortable(false);
  column_1.setMenuDisabled(true);
  column_1.setResizable(false);
  column_1.setAlignment(HorizontalAlignment.LEFT);
  configs.add(column_1);

  chkBox1 = new CheckBox();

  CellEditor checkboxEditor1 = new CellEditor(chkBox1);

  column_2 = new CheckColumnConfig(UtilisateurGrpModel.B_Lecteur, "Lecteur", 100) {
  };
  column_2.setEditor(checkboxEditor1);
  column_2.setAlignment(HorizontalAlignment.LEFT);// id
  column_2.setSortable(false);
  column_2.setMenuDisabled(true);
  column_2.setResizable(false);
  configs.add(column_2);
  chkBox2 = new CheckBox();
  CellEditor checkboxEditor2 = new CellEditor(chkBox2);
  column_3 = new CheckColumnConfig(UtilisateurGrpModel.B_Contributeur, "Contributeur", 100) {
  };
  column_3.setAlignment(HorizontalAlignment.LEFT);
  column_3.setEditor(checkboxEditor2);
  column_3.setSortable(false);
  column_3.setMenuDisabled(true);
  column_3.setResizable(false);
  configs.add(column_3); // model,header
  storeRole = new ListStore<UtilisateurGrpModel>();
  ColumnModel cm = new ColumnModel(configs);
  gridUserInChantier = new EditorGrid<UtilisateurGrpModel>(storeRole, cm);
  gridUserInChantier.setColumnReordering(true);
  gridUserInChantier.setColumnLines(true);
  gridUserInChantier.setAutoExpandColumn("identifiant");
  gridUserInChantier.setAutoExpandMax(500);
  gridUserInChantier.setAutoExpandMin(200);
  gridUserInChantier.setBorders(true);
  gridUserInChantier.setStripeRows(true);
  gridUserInChantier.setHeight(345);
  gridUserInChantier.addPlugin(column_2);
  gridUserInChantier.addPlugin(column_3);
  gridUserInChantier.getStore().addStoreListener(new StoreListener<UtilisateurGrpModel>() {
      @Override
      public void storeDataChanged(StoreEvent<UtilisateurGrpModel> se) {
    super.storeDataChanged(se);
      }

      @Override
      public void storeRemove(StoreEvent<UtilisateurGrpModel> se) {
    super.storeRemove(se);
    isDelete = true;
      }

      @Override
      public void storeUpdate(StoreEvent<UtilisateurGrpModel> se) {
    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);
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.LayoutContainer

  }

  @Override
  protected void handleEvent(AppEvent event) {
    if (event.getType() == AppEvents.NavMail) {
      LayoutContainer wrapper = (LayoutContainer) Registry.get(AppView.CENTER_PANEL);
      wrapper.removeAll();
      wrapper.add(container);
      wrapper.layout();
      return;
    }

    if (event.getType() == AppEvents.ViewMailItems) {
      Folder f = (Folder) event.getData("folder");
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.LayoutContainer

    }
  }

  @Override
  protected void initialize() {
    container = new LayoutContainer();

    BorderLayout layout = new BorderLayout();
    layout.setEnableState(false);
    container.setLayout(layout);
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.LayoutContainer

    panel.setHeading("FormPanel");
    panel.setSize(600, -1);
    panel.setLabelAlign(LabelAlign.TOP);
    panel.setButtonAlign(HorizontalAlignment.CENTER);

    LayoutContainer main = new LayoutContainer();
    main.setLayout(new ColumnLayout());

    LayoutContainer left = new LayoutContainer();
    left.setStyleAttribute("paddingRight", "10px");
    FormLayout layout = new FormLayout();
    layout.setLabelAlign(LabelAlign.TOP);
    left.setLayout(layout);

    TextField<String> first = new TextField<String>();
    first.setFieldLabel("First Name");
    left.add(first, formData);

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

    DateField birthday = new DateField();
    birthday.setFieldLabel("Birthday");
    left.add(birthday, formData);

    LayoutContainer right = new LayoutContainer();
    right.setStyleAttribute("paddingLeft", "10px");
    layout = new FormLayout();
    layout.setLabelAlign(LabelAlign.TOP);
    right.setLayout(layout);

    TextField<String> last = new TextField<String>();
    last.setFieldLabel("Last");
    right.add(last, formData);

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

    Radio radio1 = new Radio();
    radio1.setBoxLabel("Yes");

    Radio radio2 = new Radio();
    radio2.setBoxLabel("No");

    RadioGroup group = new RadioGroup();
    group.setFieldLabel("Ext GWT User");
    group.add(radio1);
    group.add(radio2);
    right.add(group);

    main.add(left, new ColumnData(.5));
    main.add(right, new ColumnData(.5));

    panel.add(main, new FormData("100%"));
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.LayoutContainer

    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.LayoutContainer

  }

  @Override
  protected void handleEvent(AppEvent event) {
    if (event.getType() == AppEvents.NavContacts) {
      LayoutContainer wrapper = (LayoutContainer) Registry.get(AppView.CENTER_PANEL);
      wrapper.removeAll();
      wrapper.add(panel);
      wrapper.layout();
    }
  }
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.LayoutContainer

  }

  @Override
  protected void handleEvent(AppEvent event) {
    if (event.getType() == AppEvents.NavTasks) {
      LayoutContainer wrapper = (LayoutContainer) Registry.get(AppView.CENTER_PANEL);
      wrapper.removeAll();
      wrapper.add(panel);
      wrapper.layout();
    }
  }
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.LayoutContainer

    viewport.add(west, data);
  }

  private void createCenter() {
    center = new LayoutContainer();
    center.setLayout(new FitLayout());

    BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER);
    data.setMargins(new Margins(5, 5, 5, 5));
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.LayoutContainer

    @Override
    protected void onRender(Element parent, int index) {
  super.onRender(parent, index);
  this.setBorders(false);
  setWhiteBackgroundColor(this);
  mainPanel = new LayoutContainer();
  mainPanel.setMonitorWindowResize(true);
  mainPanel.setBorders(true);
  setLayout(new BorderLayout());
  mainPanel.setLayout(new BorderLayout());
  HTML newLine = new HTML("<br>", true);
  add(newLine, new BorderLayoutData(LayoutRegion.NORTH, 20.0f));
  leftPanel = new LayoutContainer();
  setPadding(leftPanel);
  mainPanel.add(leftPanel, new BorderLayoutData(LayoutRegion.WEST, 110.0f));
  leftPanel.setLayout(new RowLayout(Orientation.VERTICAL));
  logo = new HTML("<img src='./images/logo.gif'/>");
  leftPanel.add(logo);
  LayoutContainer rightPanel = new LayoutContainer();

  mainPanel.add(rightPanel, new BorderLayoutData(LayoutRegion.EAST, 200));
  rightPanel.setLayout(new VBoxLayout());
  rightPanel.add(nomLabel);
  LayoutContainer linksPanel = new LayoutContainer();
  // linksPanel.setWidth("100%");
  TableLayout tl_linksPanel = new TableLayout(2);
  tl_linksPanel.setWidth("100%");
  // tl_linksPanel.setCellPadding(7);
  tl_linksPanel.setCellHorizontalAlign(HorizontalAlignment.LEFT);
  tl_linksPanel.setTableStyle("padding-left:45px");
  linksPanel.setLayout(tl_linksPanel);

  acceuilLink.addListener(Events.OnClick, new Listener<BaseEvent>() {
      @Override
      public void handleEvent(BaseEvent be) {
    GuiUtil.gotoEcran(new AcceuilEcran());
      }
  });
  linksPanel.add(acceuilLink, new TableData(HorizontalAlignment.RIGHT, VerticalAlignment.BOTTOM));

  adminLink.addListener(Events.OnClick, new Listener<BaseEvent>() {
      @Override
      public void handleEvent(BaseEvent be) {
    GuiUtil.gotoEcran(new AdminEcran());
      }
  });
  linksPanel.add(adminLink, new TableData(HorizontalAlignment.RIGHT, VerticalAlignment.BOTTOM));

  version = new HTML("", false);
  version.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
  version.setWordWrap(false);
  ClientPropertiesServiceAsync.Util.getInstance().getVersionInfo(new AsyncCallbackWithErrorResolution<String>() {
      @Override
      public void onSuccess(String result) {
    version.setHTML("<font size='1'>" + result + "</font>");
      }
  });

  // linksPanel.add(version);
  rightPanel.add(linksPanel);
  LayoutContainer layoutBanner = new LayoutContainer();
  LayoutContainer layoutVersion = new LayoutContainer();
  layoutVersion.setLayout(new RowLayout(Orientation.HORIZONTAL));
  layoutVersion.add(version, new RowData());
  layoutVersion.setHeight(20);
  layoutVersion.setWidth(50);
  layoutVersion.setStyleAttribute("padding-bottom", "25px");
  layoutBanner.setLayout(new TableLayout(2));
  banner = new HTML("<img src='./images/banner-first.png'/>");
  banner.setStyleName("actionHTML");
  banner.addClickHandler(new ClickHandler() {
      @Override
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.