Examples of LayoutContainer


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

    this.bus = b;
    this.chainter = c;
    setHeight("40px");
    setLayout(new BorderLayout());

    LayoutContainer westPanel = new LayoutContainer();
    westPanel.setLayout(new RowLayout(Orientation.HORIZONTAL));
   
    HTML chantier = new HTML("Chantier: " + this.chainter.getNom(), false);
    chantier.setStyleName("actionHTML");
    chantier.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        GuiUtil.gotoEcran(new SyntheseEcran(c, role, user) );
      }
    });
    westPanel.add(chantier);

    path = new HTML("", false);
    setSociete("");
    westPanel.add(path);
   
    add(westPanel, new BorderLayoutData(LayoutRegion.WEST, 450.0f));
    LayoutContainer eastPanel = new LayoutContainer();
    eastPanel.setLayout(new RowLayout(Orientation.HORIZONTAL));

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

    eastPanel.add(new HTML(LINKS_SPACE, false));
    HTML printAll = new HTML("<img src='./images/imprimer.png'/> " + messages.printAll(), false);
    printAll.setStyleName("actionHTML");

    eastPanel.add(printAll);
    add(eastPanel, new BorderLayoutData(LayoutRegion.EAST, 355.0f));

    LayoutContainer centerPanel = new LayoutContainer();
    centerPanel.setLayout(new RowLayout(Orientation.VERTICAL));
   
    printAll.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        bus.fireEvent(new ExportFicheStEvent());
      }
    });

    HTML html = new HTML("<br>", true);
    centerPanel.add(html);

    Label pageTitle = new Label("Fiche de suivi du sous traitant");
    centerPanel.add(pageTitle);
    pageTitle.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    add(centerPanel, new BorderLayoutData(LayoutRegion.CENTER));
  }
View Full Code Here

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

  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);
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.LayoutContainer

           }
         }
      }
      prepareRendererAll(facesContext, component);
      if (component instanceof LayoutContainer) {
        LayoutContainer layoutContainer = (LayoutContainer) component;
        Measure width = layoutContainer.getCurrentWidth();
        Measure height = layoutContainer.getCurrentHeight();
        Measure oldWidth = layoutContainer.getWidth();
        Measure oldHeight = layoutContainer.getHeight();
        layoutContainer.setWidth(width);
        layoutContainer.setHeight(height);
        new LayoutContext(layoutContainer).layout();
        layoutContainer.setWidth(oldWidth);
        layoutContainer.setHeight(oldHeight);
      }
      encodeAll(facesContext, component);
    } catch (IOException e) {
      throw new FacesException(e);
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.LayoutContainer

    // find *
    if (orientation == Orientation.HORIZONTAL && !horizontalAuto
        || orientation == Orientation.VERTICAL && !verticalAuto) {

      final FacesContext facesContext = FacesContext.getCurrentInstance();
      final LayoutContainer container = getLayoutContainer();
      final AbstractUISheet sheet = (AbstractUISheet) container;

      if (orientation == Orientation.HORIZONTAL) {

        ensureColumnWidthList(facesContext, sheet);
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.LayoutContainer

        factorList.add(((RelativeLayoutToken) head.getToken()).getFactor());
      }
    }
    if (!factorList.isEmpty()) {
      // find rest
      LayoutContainer container = getLayoutContainer();
      Measure available = LayoutUtils.getCurrentSize(orientation, container);
      if (available != null) {
        for (BankHead head : heads) {
          available = available.subtractNotNegative(head.getCurrent());
        }
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.LayoutContainer

           }
         }
      }
      prepareRendererAll(facesContext, component);
      if (component instanceof LayoutContainer) {
        LayoutContainer layoutContainer = (LayoutContainer) component;
        Measure width = layoutContainer.getCurrentWidth();
        Measure height = layoutContainer.getCurrentHeight();
        Measure oldWidth = layoutContainer.getWidth();
        Measure oldHeight = layoutContainer.getHeight();
        layoutContainer.setWidth(width);
        layoutContainer.setHeight(height);
        new LayoutContext(layoutContainer).layout();
        layoutContainer.setWidth(oldWidth);
        layoutContainer.setHeight(oldHeight);
      }
      encodeAll(facesContext, component);
    } catch (IOException e) {
      throw new FacesException(e);
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.LayoutContainer

    // find *
    if (orientation == Orientation.HORIZONTAL && !horizontalAuto
        || orientation == Orientation.VERTICAL && !verticalAuto) {

      final FacesContext facesContext = FacesContext.getCurrentInstance();
      final LayoutContainer container = getLayoutContainer();
      final AbstractUISheet sheet = (AbstractUISheet) container;

      if (orientation == Orientation.HORIZONTAL) {

        ensureColumnWidthList(facesContext, sheet);
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.LayoutContainer

    // find *
    if (orientation == Orientation.HORIZONTAL && !horizontalAuto
        || orientation == Orientation.VERTICAL && !verticalAuto) {
      // find rest
      LayoutContainer container = getLayoutContainer();
      Measure available = LayoutUtils.getCurrentSize(orientation, container);
      if (available != null) {
        for (LayoutComponent component : getLayoutContainer().getComponents()) {
          LayoutUtils.setCurrentSize(orientation, component, available);
        }
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.LayoutContainer

    } else {
      LOG.warn("Layout Constraints inside of a non LayoutBase component!");
    }

    if (parent instanceof LayoutContainer) {
      LayoutContainer container = (LayoutContainer) parent;

      if (borderLeft != null) {
        if (borderLeft.isLiteral()) {
          container.setBorderLeft(Measure.parse(borderLeft.getValue()));
        } else {
          parent.setValueBinding(Attributes.BORDER_LEFT,
              faceletContext.getFacesContext().getApplication().createValueBinding(borderLeft.getValue()));
        }
      }

      if (borderRight != null) {
        if (borderRight.isLiteral()) {
          container.setBorderRight(Measure.parse(borderRight.getValue()));
        } else {
          parent.setValueBinding(Attributes.BORDER_RIGHT,
              faceletContext.getFacesContext().getApplication().createValueBinding(borderRight.getValue()));
        }
      }

      if (borderTop != null) {
        if (borderTop.isLiteral()) {
          container.setBorderTop(Measure.parse(borderTop.getValue()));
        } else {
          parent.setValueBinding(Attributes.BORDER_TOP,
              faceletContext.getFacesContext().getApplication().createValueBinding(borderTop.getValue()));
        }
      }

      if (borderBottom != null) {
        if (borderBottom.isLiteral()) {
          container.setBorderBottom(Measure.parse(borderBottom.getValue()));
        } else {
          parent.setValueBinding(Attributes.BORDER_BOTTOM,
              faceletContext.getFacesContext().getApplication().createValueBinding(borderBottom.getValue()));
        }
      }

      if (paddingLeft != null) {
        if (paddingLeft.isLiteral()) {
          container.setPaddingLeft(Measure.parse(paddingLeft.getValue()));
        } else {
          parent.setValueBinding(Attributes.PADDING_LEFT,
              faceletContext.getFacesContext().getApplication().createValueBinding(paddingLeft.getValue()));
        }
      }

      if (paddingRight != null) {
        if (paddingRight.isLiteral()) {
          container.setPaddingRight(Measure.parse(paddingRight.getValue()));
        } else {
          parent.setValueBinding(Attributes.PADDING_RIGHT,
              faceletContext.getFacesContext().getApplication().createValueBinding(paddingRight.getValue()));
        }
      }

      if (paddingTop != null) {
        if (paddingTop.isLiteral()) {
          container.setPaddingTop(Measure.parse(paddingTop.getValue()));
        } else {
          parent.setValueBinding(Attributes.PADDING_TOP,
              faceletContext.getFacesContext().getApplication().createValueBinding(paddingTop.getValue()));
        }
      }

      if (paddingBottom != null) {
        if (paddingBottom.isLiteral()) {
          container.setPaddingBottom(Measure.parse(paddingBottom.getValue()));
        } else {
          parent.setValueBinding(Attributes.PADDING_BOTTOM,
              faceletContext.getFacesContext().getApplication().createValueBinding(paddingBottom.getValue()));
        }
      }
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.LayoutContainer

    // find *
    if (orientation == Orientation.HORIZONTAL && !horizontalAuto
        || orientation == Orientation.VERTICAL && !verticalAuto) {

      final FacesContext facesContext = FacesContext.getCurrentInstance();
      final LayoutContainer container = getLayoutContainer();
      final AbstractUISheet sheet = (AbstractUISheet) container;

      if (orientation == Orientation.HORIZONTAL) {

        ensureColumnWidthList(facesContext, sheet);
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.