public Canvas getViewPanel() {
    VLayout layout = new VLayout();
    layout.setWidth100();
    layout.setHeight100();

    // Map with ID mapGeoTools is defined in the XML configuration. (mapGeoTools.xml)
    final MapWidget map = new MapWidget("mapGeoTools", "appGeoTools");
    // Select the layer, so we can also create features !
    map.getMapModel()
        .runWhenInitialized(
            new Runnable() {

              @Override
              public void run() {
                // select to create new features
                map.getMapModel().getLayer("clientLayerCountriesGeoTools").setSelected(true);
              }
            });

    // Set a panning controller on the map:
    map.setController(new PanController(map));
    // Create a tool-bar for this map:
    final Toolbar toolbar = new Toolbar(map);
    toolbar.setButtonSize(WidgetLayout.toolbarLargeButtonSize);

    layout.addMember(toolbar);
    layout.addMember(map);
    return layout;
  }
  public PositionsListeWidget() {
    this.setWidth("100%");
    this.setHeight("100%");

    links = UIFactory.getVLayout("70%", "500px");
    rechts = UIFactory.getVLayout("30%", "100%");
    this.setBackgroundColor("#CCFFCC");

    Positionsliste einkaufArtikel = new Positionsliste();
    Artikel neuerArtikel;
    try {
      neuerArtikel = Bauteil.erzeugeBauteil(20, 3, 2, "zweiterTyp", "schlecht");
      einkaufArtikel.erfassePosition(neuerArtikel, 500, 1000);
      neuerArtikel = Bauteil.erzeugeBauteil(20, 3, 2, "dritter", "schlecht");
      einkaufArtikel.erfassePosition(neuerArtikel, 500, 1000);
    } catch (InstanceCreationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    einkaufsTabelle = new PositionsWidget();

    // Create a table to layout the form options
    FlexTable layout = new FlexTable();
    layout.setCellSpacing(6);
    FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();

    // Add a title to the form
    layout.setHTML(0, 0, "Gesamtverbrauch");
    cellFormatter.setColSpan(0, 0, 2);
    cellFormatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_CENTER);

    txtGesamtkosten = UIFactory.getStyledTextBox("TB1", true);
    txtLagerbedarf = UIFactory.getStyledTextBox("TB1", true);

    // Add some standard form options
    layout.setHTML(1, 0, "Gesamtkosten:");
    layout.setWidget(1, 1, txtGesamtkosten);
    layout.setHTML(2, 0, "Lagerbedarf:");
    layout.setWidget(2, 1, txtLagerbedarf);

    // Wrap the content in a DecoratorPanel
    //	    DecoratorPanel gesamt = new DecoratorPanel();
    Canvas gesamt = new Canvas();
    gesamt.setWidth("100%");
    //	    gesamt.setWidget(layout);
    gesamt.addChild(layout);

    auswahl = new AuswahlEinkaufWidget();

    // add Members to left and right side
    links.addMember(UIFactory.getStyledLabel("Einkaufsartikel", 30, 30));
    links.addMember(einkaufsTabelle);

    rechts.addMember(auswahl);
    rechts.addMember(gesamt);

    this.addMember(links);
    this.addMember(rechts);
  }
Exemple #3
0
  protected void setValues(Collection<V> values) {
    try {
      for (int i = 0; i < records.length; i++) {
        records[i].setVisible(false);
        viewPort.removeMember(records[i]);
      }
    } catch (Exception e) {
    }

    if (values.isEmpty()) {
      viewPort.addMember(records[0]);
      updateRecord(-1, records[0], null);
      records[0].show();
      return;
    }

    int i = 0;
    for (V value : values) {
      try {
        viewPort.addMember(records[i]);
        updateRecord(i, records[i], value);
        records[i].show();
        i++;
      } catch (Exception e) {
        SC.say(e.getMessage() + ":::;" + Integer.toString(i));
      }
    }
  }
  private Layout() {

    vLayout = new VLayout();
    vLayout.setWidth100();
    vLayout.setHeight100();

    messageWindow = new MessageWindow(vLayout);

    vLayout.addMember(MainToolStrip.getInstance());

    mainSectionStack = new SectionStack();
    mainSectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
    mainSectionStack.setAnimateSections(true);
    mainSectionStack.setCanResizeSections(true);

    SectionStackSection mainTabSection = new SectionStackSection();
    mainTabSection.setCanCollapse(false);
    mainTabSection.setShowHeader(false);

    centerTabSet = CenterTabSet.getInstance();
    mainTabSection.addItem(centerTabSet);

    mainSectionStack.setSections(mainTabSection);

    vLayout.addMember(mainSectionStack);

    modal = new ModalWindow(vLayout);

    vLayout.draw();
  }
  public SearchWindow() {
    super();

    i_searchListGrid = new SearchValueSetsListGrid();

    VLayout layout = new VLayout(5);

    setWidth100();
    setHeight100();
    setMargin(20);

    setTitle(TITLE);
    setShowMinimizeButton(false);
    setIsModal(true);
    setShowModalMask(true);
    setCanDragResize(true);
    centerInPage();

    addCloseClickHandler(
        new CloseClickHandler() {

          @Override
          public void onCloseClick(CloseClickEvent event) {
            destroy();
          }
        });

    layout.addMember(createDisplayLabel());
    layout.addMember(createSearchPanel());
    layout.addMember(getButtons());

    addItem(layout);

    createValueSetsReceivedEvent();
  }
  public Canvas getViewPanel() {

    final TabSet topTabSet = new TabSet();
    topTabSet.setTabBarPosition(Side.TOP);
    topTabSet.setTabBarAlign(Side.LEFT);
    topTabSet.setWidth(400);
    topTabSet.setHeight(200);

    Tab tTab1 = new Tab("Blue", "pieces/16/pawn_blue.png");

    tTab1.setCanClose(true);
    Img tImg1 = new Img("pieces/48/pawn_blue.png", 48, 48);
    tTab1.setPane(tImg1);

    Tab tTab2 = new Tab("Green", "pieces/16/pawn_green.png");
    Img tImg2 = new Img("pieces/48/pawn_green.png", 48, 48);
    tTab2.setPane(tImg2);

    topTabSet.addTab(tTab1);
    topTabSet.addTab(tTab2);

    HLayout buttons = new HLayout();
    buttons.setMembersMargin(15);

    IButton addButton = new IButton("Add Tab");
    addButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            String title = topTabSet.getTabs().length % 2 == 0 ? "Yellow" : "Green";
            String iconType = topTabSet.getTabs().length % 2 == 0 ? "pawn" : "cube";
            Tab tTab = new Tab(title, "pieces/16/" + iconType + "_" + title.toLowerCase() + ".png");
            tTab.setCanClose(true);
            Img tImg =
                new Img("pieces/48/" + iconType + "_" + title.toLowerCase() + ".png", 48, 48);
            tTab.setPane(tImg);
            topTabSet.addTab(tTab);
          }
        });

    IButton removeButton = new IButton("Remove Tab");
    removeButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            topTabSet.removeTab(topTabSet.getTabs().length - 1);
          }
        });

    buttons.addMember(addButton);
    buttons.addMember(removeButton);

    VLayout vLayout = new VLayout();
    vLayout.setMembersMargin(15);
    vLayout.addMember(topTabSet);
    vLayout.addMember(buttons);
    vLayout.setHeight("auto");

    return vLayout;
  }
    private void reset(final UploadComponentOptions options) {
      resetComponents(options);
      clear();

      final Set<String> types = components.keySet();
      currentType = types.iterator().next();

      parentCanvas = new Canvas();
      layout = new VLayout();
      final SelectItem typeItem = new SelectItem("uploadType", "Upload Type");
      typeItem.setValueMap(types.toArray(new String[types.size()]));
      typeItem.setValue(currentType);
      typeItem.setWidth(250);
      typeItem.addChangedHandler(
          new ChangedHandler() {
            public void onChanged(final ChangedEvent event) {
              currentType = typeItem.getValue().toString();
              update();
            }
          });
      final Form form =
          new Form(
              DomConstants.buildConstant(DomConstants.UPLOAD_COMPONENT_TYPE, uploadComponentNumber),
              typeItem);
      form.setPadding(0);
      form.setMargin(0);
      form.setCellSpacing(0);
      form.setCellPadding(0);

      form.setAlign(Alignment.RIGHT);
      form.setWidth(350);
      form.setHeight(20);
      final HLayout header = new HLayout();
      header.setAlign(Alignment.RIGHT);
      header.addMember(form);
      header.setHeight(20);

      layout.setAlign(Alignment.RIGHT);
      layout.addMember(header);
      layout.addMember(parentCanvas);
      layout.setGroupTitle("File Chooser");
      layout.setIsGroup(true);
      layout.setHeight("185px");
      layout.setPadding(2);
      layout.setLayoutAlign(Alignment.CENTER);
      layout.setAlign(Alignment.CENTER);

      for (final UploadComponent uploadComponent : components.values()) {
        final Canvas childCanvas = uploadComponent.get();
        childCanvas.hide();
        parentCanvas.addChild(childCanvas);
      }
      update();
      wrapperLayout.addMember(layout);
    }
  public DigitalObjectTreeView(ClientMessages i18n) {
    this.i18n = i18n;
    this.i18nSmartGwt = ClientUtils.createSmartGwtMessages();
    treeSelector = createTreeSelector();

    VLayout vLayout = new VLayout();
    toolbar = createToolbar();
    vLayout.addMember(toolbar);
    vLayout.addMember(treeSelector);
    rootWidget = vLayout;
  }
  @Override
  public void attachToCanvas() {
    // remove all previous members, except crumbs
    for (int i = 1; i < canvas.getMembers().length; i++) {
      Canvas m = canvas.getMember(i);
      canvas.removeMember(m);
    }

    if (tabs.getTabs().length == 1) {
      Canvas c = tabs.getTabs()[0].getPane();
      c.setHeight100();
      canvas.addMember(c); // add the pane directly
    } else canvas.addMember(tabs);
  }
  private VLayout createSearchPanel() {

    VLayout searchLayout = new VLayout();
    searchLayout.setWidth100();
    searchLayout.setHeight100();
    searchLayout.setLayoutMargin(10);
    searchLayout.setLayoutMargin(6);
    searchLayout.setMembersMargin(15);

    searchLayout.addMember(createSearchLayout());
    searchLayout.addMember(i_searchListGrid);

    i_searchListGrid
        .getField(SearchValueSetsListGrid.ID_ADD)
        .addCellSavedHandler(
            new CellSavedHandler() {
              @Override
              public void onCellSaved(CellSavedEvent event) {

                boolean hasRecordsToAdd = i_searchListGrid.hasAddRecords();
                i_addButton.setDisabled(!hasRecordsToAdd);
              }
            });

    return searchLayout;
  }
  /** @param sourceLayout */
  public void addSource(AbstractSourceLayout sourceLayout, boolean disabled) {

    if (disabled) {
      sourceLayout.setDisabled(true);
    }
    sourcesLayout.addMember(sourceLayout);
  }
 @Override
 public void setStyleName(String styleName) {
   super.setStyleName(styleName);
   for (int i = 0; i < tabs.getNumTabs(); i++) {
     getRibbonBar(i).asWidget().setStyleName(getStyleName());
   }
 }
 MultiUploadComponentImpl(final UploadComponentOptions uploadOptions) {
   wrapperLayout.setID(
       DomConstants.buildConstant(
           DomConstants.UPLOAD_WRAPPER_LAYOUT_PREFIX, uploadComponentNumber));
   setWidget(wrapperLayout);
   reset(uploadOptions);
 }
Exemple #14
0
  private void init(String caption) {
    this.records = records();
    this.setStyleName("grid-bg");
    //        this.setLayoutMargin(1);

    HLayout toolBar = this.toolBar();
    if (toolBar != null) {
      addMember(toolBar);
    }

    HLayout header = this.tableHeader();
    if (header != null) {
      addMember(header);
    }

    setAutoHeight();

    HLayout bottomPanel = new HLayout();
    bottomPanel.setHeight(30);
    bottomPanel.setBackgroundColor("#e6f1f6");

    viewPort.setAutoHeight();
    addMember(viewPort);
    //        addMember(bottomPanel);
  }
  public LaunchFormLayout(String title, String icon, final String description) {

    super("600", "*");
    addTitle(title, icon);

    Label docLabel =
        WidgetUtil.getLabel(
            "Documentation and Terms of Use", CoreConstants.ICON_INFORMATION, 30, Cursor.HAND);
    docLabel.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            new DocumentationLayout(event.getX(), event.getY(), description).show();
          }
        });
    this.addMember(docLabel);

    simulationNameItem = FieldUtil.getTextItem(400, "[0-9A-Za-z-_ ]");
    simulationNameItem.setValidators(ValidatorUtil.getStringValidator());
    addField("Simulation Name", simulationNameItem);

    sourcesLayout = new VLayout(5);
    sourcesLayout.setAutoHeight();
    this.addMember(sourcesLayout);
  }
  public Layout build() {
    VLayout itemsViewLayout = new VLayout();

    if (this.hasToolBar) {
      Layout navTools = this.buildToolbar();
      itemsViewLayout.addMember(navTools);
    }

    Layout content = this.buildContent();
    itemsViewLayout.addMember(content);

    Layout paginationBar = this.buildPagination();
    itemsViewLayout.addMember(paginationBar);

    return itemsViewLayout;
  }
 public Tab searchTab(JcrExplorer jackrabbitExplorer) {
   Tab searchTab = new Tab();
   searchTab.setTitle("Search");
   TabSet searchTabSet = new TabSet();
   searchTabSet.setTitle("SearchSet");
   searchTabSet.setTabs(
       fullTextSearchTab(jackrabbitExplorer),
       xpathSearchTab(jackrabbitExplorer),
       sqlSearchTab(jackrabbitExplorer));
   searchTabSet.setWidth100();
   searchTabSet.setHeight100();
   VLayout vlLayout = new VLayout();
   vlLayout.addChild(searchTabSet);
   searchTab.setPane(vlLayout);
   return searchTab;
 }
Exemple #18
0
  public CalendarCanvas() {
    VLayout mainLayout = new VLayout();
    mainLayout.setWidth100();
    mainLayout.setHeight100();

    HLayout calendarLayout = new HLayout();
    calendarLayout.setWidth100();
    calendarLayout.setHeight100();

    NavigationView view = new NavigationView(NavigationView.VIEW_CALENDER);
    view.setWidth("25%");
    view.setShowResizeBar(true);
    view.setOverflow(Overflow.CLIP_H);

    VLayout addressListLayout = new VLayout();
    addressListLayout.addMember(new AddressFilterToolbar());

    HLayout addressHLayout = new HLayout();
    AddressList list = new AddressList();
    list.setWidth("220px");
    addressHLayout.addMember(list);
    addressHLayout.addMember(new AddressEditForm());
    addressListLayout.addMember(addressHLayout);

    calendarLayout.setMembers(view, addressListLayout);

    mainLayout.addMember(calendarLayout);
    addChild(mainLayout);
  }
Exemple #19
0
  /** This is the entry point method. */
  public void onModuleLoad() {
    loading = new LoadingWindow();

    VLayout main = new VLayout();
    main.setWidth("100%");
    main.setHeight100();
    main.setAlign(Alignment.CENTER);

    Layout imgLayout = new Layout();
    content = new HLayout();
    content.setHeight100();

    Img header = new Img("GarsComLogo.jpg");
    header.setWidth(600);
    header.setHeight(130);
    header.setAlign(Alignment.CENTER);
    imgLayout.addMember(header);
    imgLayout.setWidth("100%");
    imgLayout.setAlign(Alignment.CENTER);

    main.addMember(imgLayout);
    main.addMember(content);

    Tabs tabs = new Tabs();
    content.addMember(tabs);

    main.draw();
  }
  /**
   * Sets a value to an input name. The value should be in the following forms:
   *
   * <p>For single list field: a string For multiple list fields: strings separated by '; ' For
   * ranges: an string like 'Start: 0 - Stop: 0 - Step: 0'
   *
   * @param inputName
   * @param value
   */
  public void setInputValue(String inputName, String value) {

    for (Canvas canvas : sourcesLayout.getMembers()) {
      if (canvas instanceof AbstractSourceLayout) {
        AbstractSourceLayout source = (AbstractSourceLayout) canvas;
        if (source.getName().equals(inputName)) {
          source.setValue(value);
        }
      }
    }
  }
  private Layout buildHeader() {
    HLayout header = new HLayout();
    header.setWidth100();
    header.setLayoutMargin(10);
    header.setBackgroundImage(GWT.getModuleBaseURL() + "admin/images/header_bg.png");

    LayoutSpacer sp = new LayoutSpacer();
    sp.setWidth(20);
    header.addMember(sp);
    header.addMember(buildLogo());
    header.addMember(new LayoutSpacer());

    VLayout userAndLocale = new VLayout();
    userAndLocale.setHeight100();
    userAndLocale.addMember(buildUserInfo());
    // userAndLocale.addMember(buildLocaleSelection());

    header.addMember(userAndLocale);
    return header;
  }
  /**
   * Gets a map of parameters.
   *
   * @return Map of parameters
   */
  public Map<String, String> getParametersMap() {

    Map<String, String> paramsMap = new HashMap<String, String>();

    for (Canvas canvas : sourcesLayout.getMembers()) {
      if (canvas instanceof AbstractSourceLayout) {
        AbstractSourceLayout source = (AbstractSourceLayout) canvas;
        paramsMap.put(source.getName(), source.getValue());
      }
    }
    return paramsMap;
  }
 private void createExportMenu() {
   exportMenu = new VLayout();
   exportMenu.setLeft(exportButton.getAbsoluteLeft());
   exportMenu.setTop(30);
   exportMenu.setStyleName("n52_sensorweb_client_interactionmenu");
   exportMenu.setAutoHeight();
   exportMenu.setZIndex(1000000);
   exportMenu.addMember(createPDFLabel());
   exportMenu.addMember(createCSVLabel());
   exportMenu.setVisible(false);
 }
  Canvas build() {
    VLayout vl = new VLayout();
    vl.setOverflow(Overflow.AUTO);

    this.label = new Label("No node selected");
    this.label.setWidth100();
    this.label.setAlign(Alignment.CENTER);

    this.nodeMonitoring = new MonitoringNodeView(controller);
    this.nodeMonitoring.setOverflow(Overflow.AUTO);
    this.nodeMonitoring.setWidth100();

    this.nodeCanvas = new VLayout();
    this.nodeCanvas.setWidth100();
    this.nodeCanvas.setHeight100();
    this.nodeLabel = new Label();
    this.nodeLabel.setIcon(RMImages.instance.node_add_16().getSafeUri().asString());
    this.nodeLabel.setHeight(16);
    this.nodeCanvas.addMember(nodeLabel);
    this.nodeCanvas.addMember(nodeMonitoring);
    this.nodeCanvas.hide();

    this.hostMonitoring = new MonitoringHostView(controller);
    this.hostMonitoring.setOverflow(Overflow.AUTO);
    this.hostMonitoring.setWidth100();

    this.hostCanvas = new VLayout();
    this.hostCanvas.setWidth100();
    this.hostCanvas.setHeight100();
    this.hostLabel = new Label();
    this.hostLabel.setHeight(16);
    this.hostLabel.setIcon(RMImages.instance.host_16().getSafeUri().asString());
    this.hostCanvas.addMember(hostLabel);
    this.hostCanvas.addMember(hostMonitoring);
    this.hostCanvas.hide();

    vl.setMembers(label, nodeCanvas, hostCanvas);
    return vl;
  }
  /** @return */
  public boolean validate() {

    boolean valid = simulationNameItem.validate();
    for (Canvas canvas : sourcesLayout.getMembers()) {
      if (canvas instanceof AbstractSourceLayout) {
        AbstractSourceLayout source = (AbstractSourceLayout) canvas;
        if (!source.validate()) {
          valid = false;
        }
      }
    }
    return valid;
  }
  protected Layout buildContent() {
    VLayout layout = new VLayout();
    this.buildGrid();

    this.loadingLabel = new Label("fetching " + this.itemName + "...");
    this.loadingLabel.setIcon("loading.gif");
    this.loadingLabel.setWidth100();
    this.loadingLabel.setHeight100();
    this.loadingLabel.setAlign(Alignment.CENTER);
    this.loadingLabel.hide();

    this.errorLabel = new Label("");
    this.errorLabel.setWidth100();
    this.errorLabel.setAlign(Alignment.CENTER);
    this.errorLabel.hide();

    layout.addMember(this.itemsGrid);
    layout.addMember(this.loadingLabel);
    layout.addMember(this.errorLabel);

    return layout;
  }
  public Canvas getViewPanel() {

    VLayout layout = new VLayout();
    layout.setMembersMargin(10);

    final Img image = new Img("other/magnifier.png", 48, 48);
    image.setTop(125);
    image.setLeft(100);
    image.setAnimateTime(500); // milliseconds

    IButton zoomButton = new IButton();
    zoomButton.setTitle("Zoom");
    zoomButton.setLeft(40);
    zoomButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            image.animateRect(0, 50, 248, 248);
          }
        });

    IButton shrinkButton = new IButton();
    shrinkButton.setTitle("Shrink");
    shrinkButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            image.animateRect(100, 125, 48, 48);
          }
        });

    HLayout hLayout = new HLayout();
    hLayout.setMembersMargin(10);
    hLayout.addMember(zoomButton);
    hLayout.addMember(shrinkButton);
    layout.addMember(hLayout);

    layout.addChild(image);
    return layout;
  }
Exemple #28
0
  public Canvas getViewPanel() {

    VLayout layout = new VLayout();
    layout.setMembersMargin(10);

    final Canvas cubeBin = new Canvas("cubeBin");
    cubeBin.setTop(40);
    cubeBin.setWidth(400);
    cubeBin.setHeight(300);
    cubeBin.setShowEdges(true);

    IButton button = new IButton();
    button.setTitle("Create");
    button.setIcon("pieces/16/cube_blue.png");
    button.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            final Img img = new Img();
            img.setLeft(Random.nextInt(340));
            img.setTop(Random.nextInt(240));
            img.setWidth(48);
            img.setHeight(48);
            img.setParentElement(cubeBin);
            img.setSrc("pieces/48/cube_blue.png");
            img.addClickHandler(
                new ClickHandler() {
                  public void onClick(ClickEvent event) {
                    img.destroy();
                  }
                });
            img.draw();
          }
        });
    layout.addMember(button);
    layout.addMember(cubeBin);

    return layout;
  }
Exemple #29
0
  public PrintSign(String[][] values) {
    setMembersMargin(10);
    setHeight(120);

    for (String[] item : values) { // expect size = 3
      if (item.length == 3) {
        VLayout component = new VLayout(20);
        component.setMargin(30);
        // component.setOverflow(Overflow.HIDDEN);
        component.setAlign(Alignment.CENTER);
        SignLabel item_0 = new SignLabel("");
        SignLabel item_1 =
            new SignLabel("(ลงชื่อ).............................................." + item[0]);
        SignLabel item_2 = new SignLabel("(" + item[1] + ")");
        SignLabel item_3 = new SignLabel(item[2]);
        // SignLabel item_4 = new SignLabel("วันที่ "+DateTimeFormat.getFormat( "MM/dd/yyyy"
        // ).format(new Date()));
        SignLabel item_4 = new SignLabel("วันที่ ...../...../.....");
        component.addMembers(item_0, item_1, item_2, item_3, item_4);
        addMember(component);
      }
    }
  }
  /**
   * Get view panel.
   *
   * @return The viewPanel Canvas
   */
  public Canvas getViewPanel() {
    VLayout layout = new VLayout(5);
    layout.setPadding(5);

    MapWidget mapWidget = new MapWidget("mapGuwWmsCountries", "appGuw");
    final RibbonTabLayout ribbon = new RibbonTabLayout(mapWidget, "appGuw", "guwRibbon1");
    ribbon.setSize("100%", "120px");

    ToolStrip toolStrip = new ToolStrip();
    toolStrip.setWidth100();
    ToolStripButton btn1 = new ToolStripButton("Toggle group title");
    btn1.addClickHandler(
        new ClickHandler() {

          public void onClick(ClickEvent event) {
            ribbon.getRibbonBar(0).setShowGroupTitles(!ribbon.getRibbonBar(0).isShowGroupTitles());
          }
        });
    toolStrip.addButton(btn1);
    layout.addMember(toolStrip);
    layout.addMember(ribbon);
    layout.addMember(mapWidget);
    return layout;
  }