Пример #1
0
 private final LayoutContainer createAccountChoice() {
   LayoutContainer panel = new LayoutContainer();
   panel.setLayout(new FillLayout());
   panel.add(createAccountPanel());
   panel.setHeight(30);
   return panel;
 }
Пример #2
0
  @Override
  public void initialize() {

    mainPanel = Panels.content("");
    mainPanel.setHeaderVisible(false);

    Label label = new Label(I18N.CONSTANTS.projectCoreSelectVersion());

    mainPanel.add(label);

    amendmentsComboBox1 = new ComboBox<AmendmentDTO>();
    amendmentsComboBox1.setStore(new ListStore<AmendmentDTO>());
    amendmentsComboBox1.setDisplayField("name");
    amendmentsComboBox1.setTriggerAction(ComboBox.TriggerAction.ALL);

    amendmentsComboBox2 = new ComboBox<AmendmentDTO>();
    amendmentsComboBox2.setStore(new ListStore<AmendmentDTO>());
    amendmentsComboBox2.setDisplayField("name");
    amendmentsComboBox2.setTriggerAction(ComboBox.TriggerAction.ALL);

    final LayoutContainer container = Layouts.hBox(HBoxLayoutAlign.TOP);

    container.add(amendmentsComboBox1, Layouts.hBoxData(Margin.LEFT));
    container.add(amendmentsComboBox2, Layouts.hBoxData(Margin.LEFT));

    projectFields = buildGrid();

    mainPanel.setScrollMode(Scroll.AUTO);
    mainPanel.add(container);
    mainPanel.add(projectFields);

    initPopup(mainPanel);
  }
  /**
   * Creates the center view in viewport by the user role, if the role is building modeler, then
   * show the building modeler view, else show the ui designer view.
   *
   * @param authority the authority
   */
  private void createCenter(Authority authority) {
    List<String> roles = authority.getRoles();
    modelerContainer = new LayoutContainer();
    modelerContainer.setLayout(new FitLayout());
    WidgetSelectionUtil widgetSelectionUtil = new WidgetSelectionUtil(eventBus);
    if (roles.contains(Role.ROLE_ADMIN)
        || (roles.contains(Role.ROLE_DESIGNER) && roles.contains(Role.ROLE_MODELER))) {
      this.buildingModelerView = new BuildingModelerView(eventBus);
      this.uiDesignerView = new UIDesignerView(widgetSelectionUtil);
      this.uiDesignerPresenter =
          new UIDesignerPresenter(eventBus, this.uiDesignerView, widgetSelectionUtil);
      if (Role.ROLE_DESIGNER.equals(Cookies.getCookie(Constants.CURRETN_ROLE))) {
        modelerContainer.add(uiDesignerView);
      } else {
        modelerContainer.add(buildingModelerView);
      }
    } else if (roles.contains(Role.ROLE_MODELER) && !roles.contains(Role.ROLE_DESIGNER)) {
      this.buildingModelerView = new BuildingModelerView(eventBus);
      modelerContainer.add(buildingModelerView);
    } else if (roles.contains(Role.ROLE_DESIGNER) && !roles.contains(Role.ROLE_MODELER)) {
      this.uiDesignerView = new UIDesignerView(widgetSelectionUtil);
      this.uiDesignerPresenter =
          new UIDesignerPresenter(eventBus, this.uiDesignerView, widgetSelectionUtil);
      modelerContainer.add(uiDesignerView);
    }

    BorderLayoutData data = new BorderLayoutData(Style.LayoutRegion.CENTER);
    data.setMargins(new Margins(0, 5, 0, 5));
    viewport.add(modelerContainer, data);
  }
  @Override
  protected Field createColumnCell(
      final ModelData model,
      String property,
      ListStore<ModelData> store,
      int rowIndex,
      int colIndex,
      Grid<ModelData> grid) {
    final gkDateRangeField drf = (gkDateRangeField) createField();
    LayoutContainer lc = (LayoutContainer) drf.getWidget();

    for (int i = 0; i < lc.getItemCount(); i++) { // 取出layoutConatainer裡面的物件
      Object obj = lc.getItem(i);
      if (obj instanceof gkDateField) { // 需要是field才作監聽動作
        final gkDateField df = (gkDateField) obj;
        // 如果重新render的時候,原本的就有值,要把那個值寫回去
        if (model.get(df.getId()) != null && model.get(df.getId()).toString().length() != 0) {
          df.setUseDate(model.get(df.getId()).toString());
        } else {
          model.set(df.getId(), df.getUseDate());
        }
        // 監聽事件
        df.addListener(
            Events.Change,
            new Listener<BaseEvent>() {

              @Override
              public void handleEvent(BaseEvent be) {
                model.set(df.getId(), df.getUseDate());
              }
            });

        addListener(df, grid, rowIndex, colIndex, store);
      }
      if (obj instanceof gkTimeField) { // 需要是field才作監聽動作
        final gkTimeField tf = (gkTimeField) obj;
        // 如果重新render的時候,原本的就有值,要把那個值寫回去
        if (model.get(tf.getId()) != null && model.get(tf.getId()).toString().length() != 0) {
          tf.setTimeValue(model.get(tf.getId()).toString());
        } else {
          model.set(tf.getId(), tf.getTimeValue());
        }

        // 監聽事件
        tf.addListener(
            Events.Change,
            new Listener<BaseEvent>() {
              @Override
              public void handleEvent(BaseEvent be) {
                model.set(tf.getId(), tf.getTimeValue());
              }
            });
        addListener(tf, grid, rowIndex, colIndex, store);
      }
    }
    onField(drf);
    return drf;
  }
Пример #5
0
 private LayoutContainer getLayoutContainer_1() {
   if (layoutContainer_1 == null) {
     layoutContainer_1 = new LayoutContainer();
     FormLayout formLayout = new FormLayout();
     formLayout.setLabelAlign(LabelAlign.TOP);
     layoutContainer_1.setLayout(formLayout);
     layoutContainer_1.add(getVersionComboBox(), new FormData("100%"));
   }
   return layoutContainer_1;
 }
Пример #6
0
 private LayoutContainer getTextAreaContainer() {
   if (textAreaContainer == null) {
     textAreaContainer = new LayoutContainer();
     FormLayout formLayout = new FormLayout();
     formLayout.setLabelAlign(LabelAlign.TOP);
     textAreaContainer.setLayout(formLayout);
     textAreaContainer.add(getCommandLineTextArea(), new FormData("-40 -35"));
   }
   return textAreaContainer;
 }
    protected void reloadFoglioOre() {

      setHeight(480);
      setWidth(680);

      dtfldGiorno.setValue(giornoRiferimento.getValue());

      cmbxDipendente.setFieldLabel("Dipendente");
      cmbxDipendente.setEnabled(true);
      cmbxDipendente.setEmptyText("Selezionare il dipendente..");
      cmbxDipendente.setEditable(false);
      cmbxDipendente.setVisible(true);
      cmbxDipendente.setTriggerAction(TriggerAction.ALL);
      cmbxDipendente.setAllowBlank(false);
      cmbxDipendente.setDisplayField("nomeCompleto");
      cmbxDipendente.addListener(
          Events.OnClick,
          new Listener<BaseEvent>() {
            @Override
            public void handleEvent(BaseEvent be) {
              getAllDipendenti();
            }
          });

      ButtonBar buttonBarTop = new ButtonBar();
      buttonBarTop.setAlignment(HorizontalAlignment.CENTER);
      buttonBarTop.setStyleAttribute("padding-bottom", "5px");
      buttonBarTop.setBorders(false);
      buttonBarTop.setWidth(570);
      buttonBarTop.setItemId("buttonBar");

      buttonBarTop.add(giornoRiferimento);
      buttonBarTop.add(cmbxDipendente);
      buttonBarTop.add(btnSend);

      ButtonBar btnBarOperazioni = new ButtonBar();
      btnBarOperazioni.setAlignment(HorizontalAlignment.LEFT);
      btnBarOperazioni.setBorders(false);
      btnBarOperazioni.add(btnRiepilogoCommesse);
      btnBarOperazioni.add(btnInviaCommenti);
      btnBarOperazioni.add(btnConferma);

      left.removeAll();
      right.removeAll();

      left.add(btnBarOperazioni);
      left.add(buttonBarTop);
      // left.add(new FldsetIntervalliIU());
      left.add(new FldsetIntervalliCommesse());

      // right.add(new FldsetGiustificativi());
      // right.add(new FldsetRiepilogo());

      main.removeAll();
      main.add(left);
      main.add(right);
      main.layout(true);

      frm.layout(true);
    }
Пример #8
0
 private LayoutContainer getLayoutContainer() {
   if (layoutContainer == null) {
     layoutContainer = new LayoutContainer();
     layoutContainer.setWidth("167px");
     FormLayout formLayout = new FormLayout();
     formLayout.setLabelAlign(LabelAlign.TOP);
     layoutContainer.setLayout(formLayout);
     layoutContainer.add(getCpusComboBox(), new FormData("100%"));
   }
   return layoutContainer;
 }
  public void initWidgets(
      Component leftTree,
      Component topTable,
      Component bottomTabs,
      Component topToolbar,
      Component statusBar) {
    if (topToolbar != null) {
      topToolbar.setId("JahiaGxtManagerToolbar");
      setTopComponent(topToolbar);
    }

    if (statusBar != null) {
      statusBar.setId("JahiaGxtManagerStatusbar");
      setBottomComponent(statusBar);
    }

    // east panels may contain either a table and the details, or only a table
    LayoutContainer eastPanels = new LayoutContainer();
    eastPanels.setLayout(new BorderLayout());
    if (bottomTabs != null) {
      centerData.setSplit(true);
      bottomTabs.setId("JahiaGxtManagerBottomTabs");
      eastPanels.add(bottomTabs, centerData);
    }

    if (topTable != null) {

      northData.setSplit(true);
      topTable.setId("JahiaGxtManagerTobTable");
      eastPanels.add(topTable, northData);
    }

    // this is the main layout, containing a toolbar at the top, an optional tree on the left,
    // and the layout defined previously (table + details)
    LayoutContainer layout = new LayoutContainer();
    layout.setLayout(new BorderLayout());

    if (leftTree != null) {
      westData.setSplit(true);
      westData.setCollapsible(true);
      leftTree.setId("JahiaGxtManagerLeftTree");
      layout.add(leftTree, westData);
    }

    layout.add(eastPanels, new BorderLayoutData(Style.LayoutRegion.CENTER));

    layout.setId("JahiaGxtManagerMain");

    layout.setId("JahiaGxtManagerMain");

    // layout is the main widget contained in the viewport
    add(layout);
  }
Пример #10
0
 @Override
 public void run() {
   int newHeight = Window.getClientHeight();
   int newWidth = Window.getClientWidth();
   if (newHeight != height) {
     height = newHeight;
     LayoutContainer center = (LayoutContainer) Registry.get(AppView.CENTER_PANEL);
     calendar.setHeight(center.getHeight() - calendarHeightSize + "px");
     calendar.doSizing();
     calendar.doLayout();
   }
 }
Пример #11
0
 private LayoutContainer getMinutesContainer() {
   if (minutesContainer == null) {
     minutesContainer = new LayoutContainer();
     FormLayout formLayout = new FormLayout();
     formLayout.setLabelAlign(LabelAlign.TOP);
     minutesContainer.setLayout(formLayout);
     FormData formData = new FormData(null);
     formData.setWidth(70);
     minutesContainer.add(getMinutesComboBox(), formData);
   }
   return minutesContainer;
 }
Пример #12
0
 private LayoutContainer getHoursContainer() {
   if (hoursContainer == null) {
     hoursContainer = new LayoutContainer();
     FormLayout formLayout = new FormLayout();
     formLayout.setLabelAlign(LabelAlign.TOP);
     hoursContainer.setLayout(formLayout);
     FormData formData = new FormData("");
     formData.setWidth(70);
     hoursContainer.add(getHoursComboBox(), formData);
   }
   return hoursContainer;
 }
Пример #13
0
 private LayoutContainer getFirstRowRightSide() {
   if (firstRowRightSide == null) {
     firstRowRightSide = new LayoutContainer();
     FormLayout formLayout = new FormLayout();
     formLayout.setLabelWidth(50);
     firstRowRightSide.setLayout(formLayout);
     firstRowRightSide.add(getCheckBox(), new FormData("100%"));
     FormData formData = new FormData("");
     formData.setWidth(150);
     firstRowRightSide.add(getEmailTextField(), formData);
   }
   return firstRowRightSide;
 }
Пример #14
0
 private LayoutContainer getDaysContainer() {
   if (daysContainer == null) {
     daysContainer = new LayoutContainer();
     FormLayout formLayout = new FormLayout();
     formLayout.setLabelAlign(LabelAlign.TOP);
     daysContainer.setLayout(formLayout);
     FormData formData = new FormData("");
     formData.setWidth(70);
     formData.setMargins(new Margins(0, 0, 0, 0));
     daysContainer.add(getDaysComboBox(), formData);
   }
   return daysContainer;
 }
Пример #15
0
 private LayoutContainer getFirstRowLeftSide() {
   if (firstRowLeftSide == null) {
     firstRowLeftSide = new LayoutContainer();
     firstRowLeftSide.setLayout(new FormLayout());
     FormData formData = new FormData(null);
     formData.setWidth(155);
     formData.setMargins(new Margins(0, 0, 0, 0));
     firstRowLeftSide.add(getJobnameTextField(), formData);
     FormData formData_1 = new FormData(null);
     formData_1.setWidth(155);
     firstRowLeftSide.add(getVoComboBox(), formData_1);
   }
   return firstRowLeftSide;
 }
Пример #16
0
  private void initUI() {
    long time = new java.util.Date().getTime();
    GWT.log("Initializing the UI ", null);

    permissions = Registry.get(Constants.LOGIN_USER_PERMISSIONS);

    //		container = new LayoutContainer();
    container = new ContentPanel();
    container.setLayout(new BorderLayout());
    container.setHeading("User Profile");

    formButtonContainer = new LayoutContainer();
    formButtonContainer.setScrollMode(Scroll.AUTO);

    TableLayout identlayout = new TableLayout(2);
    identlayout.setWidth("100%");
    identlayout.setCellSpacing(5);
    identlayout.setCellVerticalAlign(VerticalAlignment.TOP);

    TableLayout formlayout = new TableLayout(2);
    formlayout.setWidth("100%");
    formlayout.setCellSpacing(5);
    formlayout.setCellVerticalAlign(VerticalAlignment.TOP);

    formContainer = new LayoutContainer();
    //			formContainer.setBorders(true);
    formContainer.setLayout(formlayout);
    leftFormPanel = setupUserLeftForm("", 1);
    rightFormPanel = setupUserRightForm("", 8);

    formContainer.add(leftFormPanel);
    formContainer.add(rightFormPanel);
    buttonPanel = setupButtonPanel(17);

    formButtonContainer.add(formContainer);
    formButtonContainer.add(buttonPanel);

    // check permissions
    checkPermissins();

    BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER);
    data.setMargins(new Margins(4, 2, 4, 2));
    container.add(formButtonContainer, data);

    LayoutContainer wrapper = (LayoutContainer) Registry.get(Constants.CENTER_PANEL);
    wrapper.removeAll();
    wrapper.add(container);
    wrapper.layout();
    GWT.log("Done Initializing the UI in " + (new java.util.Date().getTime() - time), null);
  }
Пример #17
0
 @Override
 public void onComponentEvent(ComponentEvent ce) {
   super.onComponentEvent(ce);
   if (ce.getEventTypeInt() == Event.ONCLICK) {
     onClick(ce);
   }
 }
  protected void onRender(Element parent, int index) {
    super.onRender(parent, index);

    setId("settings-tabs-wrapper");
    setLayout(new FitLayout());

    m_tabsPanel = new TabPanel();
    m_tabsPanel.setPlain(true);
    m_tabsPanel.setBorders(false);
    m_tabsPanel.setBodyBorder(false);
    m_tabsPanel.setStyleAttribute("padding-top", "5px");

    m_snapshotsConfig = new TabItem(MSGS.settingsSnapshots());
    m_snapshotsConfig.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.snapshots()));
    m_snapshotsConfig.setBorders(true);
    m_snapshotsConfig.setLayout(new FitLayout());
    m_snapshotsConfig.add(m_snapshotsTab);
    m_tabsPanel.add(m_snapshotsConfig);

    m_certificatesConfig = new TabItem(MSGS.settingsAddSSLCertificates());
    m_certificatesConfig.setBorders(true);
    m_certificatesConfig.setLayout(new FitLayout());
    m_certificatesConfig.add(m_certificatesTab);
    m_tabsPanel.add(m_certificatesConfig);

    m_permissionsConfig = new TabItem(MSGS.permissions());
    m_permissionsConfig.setBorders(true);
    m_permissionsConfig.setLayout(new FitLayout());
    m_permissionsConfig.add(m_permissionsTab);
    m_tabsPanel.add(m_permissionsConfig);

    add(m_tabsPanel);
  }
Пример #19
0
  private final LayoutContainer createAccountPanel() {
    LayoutContainer panel = new LayoutContainer();
    FormLayout layout = new FormLayout();
    layout.setLabelAlign(LabelAlign.LEFT);
    layout.setPadding(0);
    layout.setLabelWidth(80);
    panel.setLayout(layout);
    FormData formData = new FormData("100%");

    // add alias field editor;
    accounts = new AccountComboBox(constants.account(), constants.lowerCaseAccount());
    //				"Account");
    ComboBox<XObjectModel> accountsCombo = accounts.getComboBox();
    panel.add(accountsCombo, formData);

    return panel;
  }
Пример #20
0
 private static Widget createClientDetails() {
   LayoutContainer ct = new LayoutContainer();
   ct.setLayout(new BorderLayout());
   ContentPanel clientDetailsEast = new ContentPanel();
   ContentPanel clientDetailsWest = new ContentPanel();
   clientDetailsWest.setHeading("Clients");
   BorderLayoutData eastClientData = new BorderLayoutData(LayoutRegion.EAST, 500);
   eastClientData.setCollapsible(false);
   eastClientData.setSplit(false);
   BorderLayoutData westClientData = new BorderLayoutData(LayoutRegion.WEST, 230);
   westClientData.setCollapsible(false);
   westClientData.setSplit(false);
   ct.setBorders(false);
   ct.add(clientDetailsEast, eastClientData);
   ct.add(clientDetailsWest, westClientData);
   return ct;
 }
Пример #21
0
  private <T> void buildField(
      Config config, String label, Field<T> field, LayoutContainer c1, LayoutContainer c2) {
    assert null != field : "field shouldn't be null";

    field.setFieldLabel(label);
    field.addListener(Events.SelectionChange, this);
    field.addListener(Events.Change, this);
    field.addListener(Events.Focus, this);
    field.addListener(Events.KeyPress, this);
    field.addListener(Events.KeyDown, this);
    field.addListener(Events.KeyUp, this);
    field.addListener(Events.SpecialKey, this);
    MessageWidget messageWidget = new MessageWidget();
    c1.add(field, new FormData("-20"));
    c2.add(messageWidget);
    mapKeyStatus.put(config, messageWidget);
  }
Пример #22
0
 @Override
 protected void onEnable() {
   super.onEnable();
   if (collapseBtn != null) {
     collapseBtn.enable();
   } else if (checkbox != null) {
     checkbox.setDisabled(false);
   }
 }
Пример #23
0
 @Override
 protected void onFocus(ComponentEvent ce) {
   super.onFocus(ce);
   if (GXT.isFocusManagerEnabled()) {
     if (checkboxToggle && checkbox != null) {
       checkbox.focus();
     } else if (collapseBtn != null) {
       collapseBtn.focus();
     }
   }
 }
Пример #24
0
  @Override
  protected void onRender(Element parent, int pos) {
    super.onRender(parent, pos);
    VerticalPanel vp = new VerticalPanel();
    vp.setSpacing(10);

    vp.add(createStandard());
    vp.add(createMulti());
    vp.add(createMulti2());
    vp.add(createMixed());
    add(vp);
  };
Пример #25
0
  @Override
  protected void onRender(Element parent, int pos) {
    super.onRender(parent, pos);
    HorizontalPanel hp = new HorizontalPanel();
    hp.setSpacing(10);

    Button btn = new Button("Basic");
    btn.setToolTip(new ToolTipConfig("Information", "Prints the current document"));
    hp.add(btn);

    btn = new Button("Closable");
    ToolTipConfig config = new ToolTipConfig();
    config.setTitle("Information");
    config.setText("Prints the current document");
    config.setCloseable(true);
    btn.setToolTip(config);
    hp.add(btn);

    btn = new Button("Mouse Tracking");
    config = new ToolTipConfig();
    config.setTitle("Information");
    config.setText("Prints the current document");
    config.setTrackMouse(true);
    btn.setToolTip(config);
    hp.add(btn);

    btn = new Button("Anchor");
    config = new ToolTipConfig();
    config.setTitle("Information");
    config.setText("Prints the current document");
    config.setMouseOffset(new int[] {0, 0});
    config.setAnchor("left");
    btn.setToolTip(config);
    hp.add(btn);

    btn = new Button("Custom");
    config = new ToolTipConfig();
    config.setText("Prints the current document");
    config.setTitle("Template Tip");
    config.setMouseOffset(new int[] {0, 0});
    config.setAnchor("left");
    config.setTemplate(new Template(getTemplate()));
    config.setCloseable(true);
    config.setMaxWidth(415);
    btn.setToolTip(config);
    hp.add(btn);

    add(hp);
  }
Пример #26
0
  @Override
  protected void onRender(Element parent, int index) {
    super.onRender(parent, index);
    setLayout(new FlowLayout(10));

    ContentPanel accordionPanel = new ContentPanel();
    accordionPanel.setHeading("Menu Siu");
    accordionPanel.setBodyBorder(false);
    accordionPanel.setLayout(new AccordionLayout());
    accordionPanel.setHeight(500);
    tablero(accordionPanel);
    reportesMenu(accordionPanel);
    adminMenu(accordionPanel);
    populateMenu(accordionPanel);
    add(accordionPanel);
  }
Пример #27
0
  public LayoutContainer getRightSide() {
    BorderLayout layout = new BorderLayout();

    LayoutContainer container = new LayoutContainer();
    container.setLayout(layout);

    container.add(getButtonBar(), new BorderLayoutData(LayoutRegion.SOUTH, .1F));

    selected = new DataList();
    selected.setContextMenu(getListMenu());

    LayoutContainer right = new LayoutContainer();
    right.setLayout(new FillLayout());
    right.add(selected);

    container.add(selected, new BorderLayoutData(LayoutRegion.CENTER, .8F));
    container.setHeight(PANEL_HEIGHT - 20);
    return container;
  }
Пример #28
0
  @Override
  protected void onRender(Element parent, int index) {
    super.onRender(parent, index);
    ContentPanel cp = new ContentPanel();
    cp.setHeading("Charts Gallery");
    cp.setFrame(true);
    cp.setSize(700, 350);
    cp.setLayout(new BorderLayout());

    BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 370);

    BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
    centerData.setMargins(new Margins(0, 5, 0, 0));

    cp.add(getChart(), centerData);
    cp.add(getDetails(), eastData);

    add(cp, new MarginData(20));
  }
Пример #29
0
  private void createDesignPanel() {

    // create main panel
    mainContainer = new LayoutContainer();
    final BorderLayout layout = new BorderLayout();
    mainContainer.setLayout(layout);
    mainContainer.setAutoWidth(true);
    mainContainer.setHeight(HEIGHT);
    mainContainer.addStyleName("design-main-panel");

    // north zone
    final BorderLayoutData upperLayoutData = new BorderLayoutData(LayoutRegion.NORTH);
    NorthPanel upperPanel = PmsFactory.getInstance().getNorthPanel();
    upperPanel.init(page, pageLayoutDto);
    upperLayoutData.setSize(UPPER_PANEL_HEIGHT);

    // west zone
    final BorderLayoutData leftLayoutData = new BorderLayoutData(LayoutRegion.WEST, 220, 150, 320);
    palettesPanel = PmsFactory.getInstance().getPalettesPanel();
    palettesPanel.init(pageLayoutDto);
    leftLayoutData.setSplit(true);
    leftLayoutData.setCollapsible(true);
    leftLayoutData.setSize(LEFT_PANEL_WIDTH);
    leftLayoutData.setMargins(new Margins(PANEL_MARGIN));

    // east zone
    final BorderLayoutData rightLayoutData = new BorderLayoutData(LayoutRegion.EAST);
    ComponentsTreePanel rightPanel = PmsFactory.getInstance().getRightPanel();
    rightPanel.init(page);
    rightLayoutData.setSplit(true);
    rightLayoutData.setCollapsible(true);
    // rightLayoutData.setSize(RIGHT_PANEL_WIDTH);
    rightLayoutData.setMargins(new Margins(PANEL_MARGIN));

    // design zone
    final BorderLayoutData centerLayoutData = new BorderLayoutData(LayoutRegion.CENTER);
    designPanel = new DesignPanel(pageLayoutDto);
    centerLayoutData.setMargins(new Margins(PANEL_MARGIN, 0, PANEL_MARGIN, 0));

    mainContainer.add(upperPanel, upperLayoutData);
    mainContainer.add(palettesPanel, leftLayoutData);
    mainContainer.add(designPanel, centerLayoutData);
    mainContainer.add(rightPanel, rightLayoutData);
    add(mainContainer);
  }
Пример #30
0
  /**
   * DOC bessaies Comment method "build".
   *
   * @param configGroups
   */
  public void build(ConfigGroup[] configGroups) {
    for (ConfigGroup configGroup : configGroups) {
      ImageResource imageResource = IconConfigProvider.provideIcon(configGroup);
      ContentPanel cPanel = buildConfigBloc(configGroup, imageResource);
      cPanel.setVisible(false);
      FormLayout formLayout1 = new FormLayout();
      formLayout1.setLabelWidth(200);

      FormLayout formLayout2 = new FormLayout();

      final LayoutContainer fieldPart = new LayoutContainer(formLayout1);
      final LayoutContainer messagePart = new LayoutContainer(formLayout2);

      fieldPart.setStyleAttribute("padding-left", "10px");
      fieldPart.setStyleAttribute("padding-top", "10px");
      fieldPart.setStyleAttribute("padding-bottom", "10px");
      messagePart.setStyleAttribute("padding-top", "12px");
      messagePart.setStyleAttribute("padding-bottom", "12px");

      cPanel.add(fieldPart, new ColumnData(0.7));
      cPanel.add(messagePart, new ColumnData(0.25));

      for (Config config : configGroup.configs) {
        Field<?> field = null;
        switch (config.type) {
          case txt:
            field = buildTextField(fieldPart, messagePart, config);
            break;
          case password:
            field = buildPasswordField(fieldPart, messagePart, config);
            break;
          case list:
            field = buildListField(fieldPart, messagePart, config);
            break;
          default:
            break;
        }
        if (null != field) {
          mapKeyField.put(config, field);
        }
      }

      add(cPanel);
    }
  }