예제 #1
0
  public PersonSearchPanel() {
    rootElement = uiBinder.createAndBindUi(this);
    searchBox.setVisibleLength(40);
    searchBox.addKeyPressHandler(
        new EnterKeyHandler(
            new HandlerAction() {
              public void actionPerformed() {
                personServiceAsync.getPersons(
                    new AsyncCallback<List<Person>>() {
                      public void onFailure(Throwable caught) {
                        Window.alert("What? An error has occured. Message: " + caught.getMessage());
                        caught.printStackTrace();
                      }

                      public void onSuccess(List<Person> result) {
                        populatePersonResult(result);
                        resultPanel.setVisible(true);
                      }
                    });
              }
            }));
    resultPanel.setVisible(false);
    resultPanel.add(new Label("Search Result:"));
    searchResult = new Grid(0, 2);
    resultPanel.add(searchResult);
  }
 /**
  * This method is used to print scored questions data
  *
  * @param scoredQuestionsData
  */
 void setQuestionsPrintData(ArrayList<UserDataDo> scoredQuestionsData) {
   scoredPrintWidget.clear();
   final SortTable sortableTable = new SortTable();
   sortableTable.setStyleName(res.css().tableMain());
   sortableTable.getElement().setId("results");
   sortableTable.setBorderWidth(1);
   sortableTable.setCellPadding(4);
   sortableTable.setCellSpacing(1);
   sortableTable.addColumnHeader(i18n.GL3259(), 0);
   sortableTable.addColumnHeader(i18n.GL0308(), 1);
   sortableTable.addColumnHeader(i18n.GL2229(), 2);
   sortableTable.addColumnHeader(i18n.GL3269(), 3);
   sortableTable.addColumnHeader(i18n.GL2084(), 4);
   sortableTable.addColumnHeader(i18n.GL3261(), 5);
   sortableTable.getRowFormatter().addStyleName(0, res.css().tableHeader());
   // To add scored questions
   scoredQuestionHeading.setText(i18n.GL2282());
   scoredQuestionHeading.getElement().getStyle().setClear(Clear.BOTH);
   scoredQuestionHeading.getElement().getStyle().setPaddingTop(15, Unit.PX);
   scoredQuestionHeading.getElement().getStyle().setPaddingBottom(20, Unit.PX);
   scoredQuestionHeading.getElement().getStyle().setTextAlign(TextAlign.LEFT);
   printWidget.add(scoredQuestionHeading);
   scoredPrintWidget.add(sortableTable);
   scoredPrintWidget.getElement().getStyle().setPaddingTop(15, Unit.PX);
   if (scoredQuestionsData.size() != 0) {
     setSortedData(scoredQuestionsData, sortableTable, true);
   } else {
     Label erroeMsg = new Label();
     erroeMsg.setStyleName(res.css().displayMessageTextForScoredQuestions());
     erroeMsg.setText(i18n.GL3265());
     scoredPrintWidget.add(erroeMsg);
   }
   scoredPrintWidget.setVisible(false);
 }
예제 #3
0
  @Override
  public void displayUsers(Map<Integer, String> users) {
    usersList.clear();

    for (Integer userId : users.keySet()) {
      HTMLPanel panel = new HTMLPanel("");

      Anchor linkToEdit = new Anchor();

      linkToEdit.setText(users.get(userId));

      PlaceRequest placeToGo =
          new PlaceRequest.Builder()
              .nameToken(NameTokens.USER)
              .with(NameTokens.PARAM_ID, String.valueOf(userId))
              .build();
      linkToEdit.setHref("#" + tokenFormatter.toPlaceToken(placeToGo));

      Button deleteButton = new Button();
      deleteButton.setText("X");
      deleteButton.addClickHandler(clickEvent -> getUiHandlers().deleteUser(userId));

      panel.add(linkToEdit);
      panel.add(deleteButton);

      usersList.add(panel);
    }
  }
 /**
  * This method is used to display scored data
  *
  * @param scoredQuestionsData
  */
 void setScoredQuestionsData(ArrayList<UserDataDo> scoredQuestionsData) {
   teacherScoredData.clear();
   final SortTable sortableTable = new SortTable();
   sortableTable.setStyleName(res.css().tableMain());
   sortableTable.getElement().setId("results");
   sortableTable.setBorderWidth(1);
   sortableTable.setCellPadding(4);
   sortableTable.setCellSpacing(1);
   sortableTable.setWidth("800");
   sortableTable.addColumnHeader(i18n.GL3259(), 0);
   sortableTable.addColumnHeader(i18n.GL0308(), 1);
   sortableTable.addColumnHeader(i18n.GL3276(), 2);
   sortableTable.addColumnHeader(i18n.GL3277(), 3);
   sortableTable.addColumnHeader(i18n.GL2084(), 4);
   sortableTable.addColumnHeader(i18n.GL3261(), 5);
   sortableTable.getRowFormatter().addStyleName(0, res.css().tableHeader());
   teacherScoredData.add(sortableTable);
   if (scoredQuestionsData.size() != 0) {
     setSortedData(scoredQuestionsData, sortableTable, false);
   } else {
     Label erroeMsg = new Label();
     erroeMsg.setStyleName(res.css().displayMessageTextForScoredQuestions());
     erroeMsg.setText(i18n.GL3265());
     teacherScoredData.add(erroeMsg);
   }
 }
예제 #5
0
  @Override
  public void setStories(List<StoryDto> stories, String searchTerm, boolean append) {
    if (!stories.isEmpty()) {
      initScroller();
    }

    if (!append) {
      clearStories();
    }

    if (stories.isEmpty()) {
      String text =
          searchTerm == null ? "No stories to load" : "No stories march your search terms";

      panelStories.add(
          new HTMLPanel(
              "<div class='col s10'>"
                  + "<div style=''>"
                  + "<h4><blockquote> "
                  + text
                  + " </blockquote></h4>"
                  + "</div>"
                  + "</div> "));
    }

    for (StoryDto dto : stories) {
      panelStories.add(new StoryItemView(dto));
    }
  }
 @Inject
 public InvoiceListView(final Binder binder) {
   widget = binder.createAndBindUi(this);
   SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
   SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true);
   pager.setDisplay(invoiceCellList);
   invoices.add(invoiceCellList);
   invoices.add(pager);
 }
 /** This method is used to set default data. */
 void setData() {
   collectionSummaryText.setText(i18n.GL1587());
   collectionSummaryText.getElement().getStyle().setPaddingBottom(15, Unit.PX);
   collectionSummaryText.addStyleName("collectionSummaryText");
   printWidget.add(collectionSummaryText);
   teacherTabContainer =
       new AnalyticsTabContainer() {
         @Override
         public void onTabClick(String tabClicked) {
           if (SCORED.equalsIgnoreCase(tabClicked)) {
             hideAllPanels();
             teacherScoredDatapnl.setVisible(true);
           } else if (OPENENDED.equalsIgnoreCase(tabClicked)) {
             hideAllPanels();
             teacherOpenendedData.setVisible(true);
           } else if (BREAKDOWN.equalsIgnoreCase(tabClicked)) {
             hideAllPanels();
             teacherResourceBreakdownDatapnl.setVisible(true);
           } else if (PRINT.equalsIgnoreCase(tabClicked)) {
             Element printElement = collectionSummaryText.getElement();
             printElement.appendChild(collectionSummaryWidget.getElement());
             printElement.appendChild(scoredQuestionHeading.getElement());
             printElement.appendChild(scoredPrintWidget.getElement());
             printElement.appendChild(opendedQuestionHeading.getElement());
             printElement.appendChild(printOpendedData.getElement());
             printElement.appendChild(collectionOverViewWidget.getElement());
             printElement.appendChild(printResourceData.getElement());
             scoredPrintWidget.setVisible(true);
             Print.it(style, printElement);
             scoredPrintWidget.setVisible(false);
           } else {
             scoredPrintWidget.setVisible(true);
             Element printElement = collectionSummaryText.getElement();
             printElement.appendChild(collectionSummaryWidget.getElement());
             printElement.appendChild(scoredQuestionHeading.getElement());
             printElement.appendChild(scoredPrintWidget.getElement());
             printElement.appendChild(opendedQuestionHeading.getElement());
             printElement.appendChild(printOpendedData.getElement());
             printElement.appendChild(collectionOverViewWidget.getElement());
             printElement.appendChild(printResourceData.getElement());
             getUiHandlers()
                 .setHtmltopdf(
                     style.toString().replaceAll("'", "\\\\\"")
                         + printElement.getInnerHTML().toString().replaceAll("\"", "\\\\\""),
                     collectionMetaData.getTitle() != null ? collectionMetaData.getTitle() : "");
             scoredPrintWidget.setVisible(false);
           }
         }
       };
   teacherTabContainer.getEmailButton().setVisible(false);
   tabContainer.add(teacherTabContainer);
   filterDropDown.clear();
   filterDropDown.addItem("All", "All");
   filterDropDown.addItem("Questions", "Questions");
   filterDropDown.addItem("Resources", "Resources");
 }
예제 #8
0
 @Override
 public void setInSlot(Object slot, Widget content) {
   if (slot == HomePresenter.MENU_CONTENT_SLOT) {
     menuPanel.clear();
     if (content != null) {
       menuPanel.add(content);
     }
   } else if (slot == HomePresenter.MAIN_CONTENT_SLOT) {
     contentPanel.clear();
     if (content != null) {
       contentPanel.add(content);
     }
   } else {
     super.setInSlot(slot, content);
   }
 }
예제 #9
0
 @Override
 public void setInSlot(Object slot, IsWidget content) {
   if (slot == DetailsPresenter.IMAGE) {
     img.clear();
     img.add(content);
   }
 }
예제 #10
0
 @Override
 public void show(Detail detail) {
   ImageResource res = detail.imageResource();
   if (res.getWidth() > IMG_MAX_WIDTH || res.getHeight() > IMG_MAX_HEIGHT) {
     setInSlot(
         DetailsPresenter.IMAGE,
         new FitImage(res.getSafeUri().asString(), IMG_MAX_WIDTH, IMG_MAX_HEIGHT));
   } else {
     setInSlot(DetailsPresenter.IMAGE, new Image(res));
   }
   main.clear();
   main.add(detail.main());
   side.clear();
   side.add(detail.side());
   title.setText(detail.title());
 }
  @Override
  public void setErrors(Set<ErrorDisplay> errors) {
    HashSet<ErrorDisplay> errorsToRemove = new HashSet<ErrorDisplay>(containedErrros);
    errorsToRemove.removeAll(errors);
    for (ErrorDisplay errorDisplay : errorsToRemove) {
      Widget widget = widgets.get(errorDisplay);
      errorsList.remove(widget);
      widgets.remove(widget);
    }

    HashSet<ErrorDisplay> errorsToAdd = new HashSet<ErrorView.ErrorDisplay>(errors);
    errorsToAdd.removeAll(containedErrros);
    String errorViewItemClass = ApplicationResources.INSTANCE.css().errorViewItemClass();
    String errorViewImageClass = ApplicationResources.INSTANCE.css().errorViewImageClass();
    for (ErrorDisplay errorDisplay : errorsToAdd) {
      SafeHtml html =
          template.errorDisplayTemplate(
              errorImageSafeUri, errorDisplay.getErrorInfo(), errorViewImageClass);
      HTML widget = new HTML(html);
      widget.setStyleName(errorViewItemClass);
      widgets.put(errorDisplay, widget);
      errorsList.add(widget);
    }
    containedErrros = new HashSet<ErrorView.ErrorDisplay>(errors);
    int height = 0;
    for (int i = 0; i < errorsList.getWidgetCount(); ++i) {
      Widget widget = errorsList.getWidget(i);
      widget.getElement().getStyle().setTop(height, Unit.PX);
      height += widget.getOffsetHeight() + 5;
    }
  }
예제 #12
0
 private void generateProfile() {
   panel.clear();
   MaterialImage profile = new MaterialImage();
   MaterialLink3 link = new MaterialLink3();
   link.getElement().getStyle().setFontWeight(FontWeight.BOLD);
   link.setTextColor("white");
   link.setText(profileName);
   profile.setType("circle");
   profile.setUrl(profileImageUrl);
   profile.getElement().getStyle().setWidth(60, Unit.PX);
   profile.getElement().getStyle().setHeight(60, Unit.PX);
   panel.add(profile);
   panel.add(link);
   customPanel.getElement().getStyle().setMarginTop(20, Unit.PX);
   panel.add(customPanel);
 }
예제 #13
0
  @Override
  protected IsWidget body(final ApplyContext context) {
    FlowPanel body = new FlowPanel();
    body.add(new HTML(TEMPLATES.errorPanel(Console.CONSTANTS.patch_manager_apply_error_body())));

    errorDetails =
        new ErrorDetails(
            Console.CONSTANTS.patch_manager_show_details(),
            Console.CONSTANTS.patch_manager_hide_details());
    body.add(errorDetails);

    body.add(
        new HTML(
            "<h3 class=\"patch-followup-header\">"
                + Console.CONSTANTS.patch_manager_possible_actions()
                + "</h3>"));
    HTMLPanel actions =
        new HTMLPanel(
            TEMPLATES.appliedFailed(
                Console.CONSTANTS.patch_manager_apply_error_cancel_title(),
                Console.CONSTANTS.patch_manager_apply_error_cancel_body(),
                Console.CONSTANTS.patch_manager_apply_error_select_title(),
                Console.CONSTANTS.patch_manager_apply_error_select_body()));
    selectPatch = new DefaultButton(Console.CONSTANTS.patch_manager_select_patch_title());
    selectPatch.getElement().setAttribute("style", "min-width:60px;");
    selectPatch.addStyleName("primary");
    actions.add(selectPatch, "select-different-patch");
    body.add(actions);

    return body;
  }
  public TransferElementPanel() {

    mainPnl = new FlowPanel();
    nodeList = new ArrayList<String>();
    container = new FlowPanel();
    container.setStyleName("trnsfrElmt-containerPnl");

    closeBtn = new Button();
    closeBtn.setStyleName("endpt-list-pnl-close-btn");

    HTMLPanel hdr = new HTMLPanel("Transfer Element");
    hdr.setStyleName("trnsfrElmnt-list-hdr");
    hdr.add(closeBtn);

    trnsfrElmntOkBtn = new SwitchButton("OK");
    trnsfrElmntOkBtn.setStyleName("priLvl-btn");
    FlowPanel btnPnl = new FlowPanel();
    btnPnl.setStyleName("trnsfrElem-btnPnl");
    btnPnl.add(trnsfrElmntOkBtn);

    nodeContainer = new FlowPanel();
    nodeContainer.setStyleName("node-wdgt-cntr");
    container.add(hdr);
    container.add(nodeContainer);
    container.add(btnPnl);

    mainPnl.setStyleName("endpt-list-pnl");
    mainPnl.add(container);
    // mainPnl.add(btnPnl);

    hide();

    initWidget(mainPnl);
  }
 protected void addStartProcessInstanceContainer(final FlowPanel buttonContainer) {
   domUtils.hideLoading();
   if (applicationHTMLPanel != null) {
     applicationHTMLPanel.add(buttonContainer, DOMUtils.DEFAULT_FORM_ELEMENT_ID);
   } else {
     RootPanel.get(DOMUtils.STATIC_CONTENT_ELEMENT_ID).add(buttonContainer);
   }
 }
예제 #16
0
  private void initScroller() {
    String id = DOM.createUniqueId();
    HTMLPanel target = new HTMLPanel("");
    target.getElement().setId(id);
    panelLoadStories.add(target);

    initScroller(this, id);
  }
 /**
  * Ad a new row with header name and header value fields. Header name is supported by GWT's
  * suggestion mechanism. Header values may have additional support while filling up the form.
  *
  * @see {@link HeadersFormRow} form more details.
  * @param name
  * @param value
  */
 private void addRow(String name, String value) {
   HeadersFormRow row = new HeadersFormRow(suggestOracle, name, value);
   headersFormPanel.add(row.asWidget());
   row.addChangeHandler(this);
   row.addRemoveHandler(removeHeaderRowHandler);
   row.addBlurHandler(headerBlurHandler);
   rows.add(row);
 }
 @UiHandler("explanaionButton")
 public void ClickOnExplanationButton(ClickEvent clickEvent) {
   if (explanaionButton.getStyleName().equals(oeStyle.hintsActiveButton())) {
     explanationContainer.add(getHTML(collectionItemDo.getResource().getExplanation()));
     explanationContainer.addStyleName(oeStyle.explanationTextBorder());
     explanaionButton.setStyleName(oeStyle.hintsInActiveButton());
     startExplanationDataLogEvent(collectionItemDo.getResource().getExplanation());
   }
 }
예제 #19
0
 /** Class constructor */
 public CommunityView() {
   setWidget(uiBinder.createAndBindUi(this));
   libraryView = new LibraryView(PlaceTokens.DISCOVER);
   //		libraryView.getCourseTabs().setVisible(false);
   Window.scrollTo(0, 0);
   landingpagePanel.add(libraryView);
   landingpagePanel.getElement().setId("pnlPartnerPanel");
   // landingpagePanel.getElement().getStyle().setMarginTop(39, Unit.PX);
 }
예제 #20
0
파일: RowWidget.java 프로젝트: dastko/WIRA
  public void createTd(Widget widget, TextAlign align, String width) {
    HTMLPanel td = (HTMLPanel) getTd(widget);
    td.getElement().getStyle().setTextAlign(align);

    if (width != null) {
      td.setWidth(width);
    }
    row.add(td);
  }
예제 #21
0
 @Override
 public void addToSlot(Object slot, IsWidget content) {
   if (slot == DataSourcePresenter.TABLE_SLOT) {
     if (content != null) {
       tblRow.add(content);
     }
   } else {
     super.setInSlot(slot, content);
   }
 }
예제 #22
0
  public SectionTreeBoxView2() {
    addStyleName("Y-system-DialogBox");
    setGlassEnabled(false);
    setAnimationEnabled(true);
    setHTML("Drzewo sekcji");

    //		panel.setSize("100%", "100%");
    setWidget(panel);
    panel.setWidth("200px");

    panel.add(absolutePanel);

    SectionsTreeView sectionsTree = new SectionsTreeView();
    absolutePanel.add(sectionsTree);

    HTMLPanel buttonPanel = new HTMLPanel("");
    absolutePanel.add(buttonPanel);

    btnOk = new Button("Ok");
    buttonPanel.add(btnOk);

    btnOk.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {

            hide();
          }
        });

    btnCancel = new Button("Cancel");
    buttonPanel.add(btnCancel);
    btnCancel.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {

            hide();
          }
        });

    center();
  }
  @Override
  public void setInSlot(Object slot, Widget content) {

    if (content == null) filterPanel.clear();

    if (slot == InvoiceListPresenter.SLOT_filters) {
      filterPanel.clear();
      filterPanel.add(content);
    } else {
      super.setInSlot(slot, content);
    }
  }
예제 #24
0
  public void showCollectionAddImageWidget() {
    getAddToShelfCollectionButton().setText(i18n.GL0590());
    successMessageLabelText.setText(i18n.GL0547());
    successMessageLabelText.getElement().setAttribute("alt", i18n.GL0547());
    successMessageLabelText.getElement().setAttribute("title", i18n.GL0547());
    addResourceInsteadLabelContainerInCollectionImage.clear();
    addResourceInsteadLabelContainerInCollectionImage.add(addResourceInsteadLabel);

    addResourceInsteadLabel.getElement().getStyle().clearMarginLeft();
    addResourceInsteadLabel.getElement().getStyle().clearMarginTop();
    collectionAddImageContainer.setVisible(true);
    collectionAddedSuccessMessageContainer.setVisible(false);
  }
예제 #25
0
파일: RowWidget.java 프로젝트: dastko/WIRA
  public void createRow(List<Widget> widgets) {
    if (isAutoNumber) {
      row.add(getTd(new InlineLabel(rowNum + "")));
    }

    for (Widget widget : widgets) {
      row.add(getTd(widget));
    }

    if (isShowRemove) {
      ActionLink anchor = new ActionLink();
      anchor.setTitle("Remove Line");
      anchor.getElement().setInnerHTML("<i class=\"icon-trash\"></i>");
      anchor.addClickHandler(
          new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
              RowWidget.this.removeFromParent();
            }
          });
      row.add(getTd(anchor));
    }
  }
예제 #26
0
파일: Toolbar.java 프로젝트: ltly/firefly
  public Toolbar() {

    //        DockPanel wrapper = new DockPanel();

    leftToolbar = new TTabBar();
    leftToolbar.setStylePrimaryName("DropDownToolBar");
    rightToolbar = new TTabBar();
    rightToolbar.setStylePrimaryName("DropDownToolBar");
    rightToolbar.addStyleName("right");
    centerToolbar = new TTabBar();
    centerToolbar.setStylePrimaryName("DropDownToolBar");
    centerToolbar.addStyleName("center");

    HTMLPanel tbar =
        new HTMLPanel(
            "<div style='white-space:nowrap'>\n"
                + "    <div id='leftBar' style='display:inline-block'></div>\n"
                + "    <div id='centerBar' style='display:inline-block;margin-left:20px'></div>\n"
                + "    <div id='rightBar' style='display:inline-block;position:absolute;right:0'></div>\n"
                + "</div>");

    tbar.add(leftToolbar, "leftBar");
    tbar.add(centerToolbar, "centerBar");
    tbar.add(rightToolbar, "rightBar");

    initWidget(tbar);

    EventHandler eventHandler = new EventHandler();

    leftToolbar.addBeforeSelectionHandler(eventHandler);
    centerToolbar.addBeforeSelectionHandler(eventHandler);
    rightToolbar.addBeforeSelectionHandler(eventHandler);
    leftToolbar.addSelectionHandler(eventHandler);
    centerToolbar.addSelectionHandler(eventHandler);
    rightToolbar.addSelectionHandler(eventHandler);
  }
예제 #27
0
  public UserPortalMainTab(TabData tabData, AbstractTabPanel tabPanel) {
    super(tabData, tabPanel);

    root = new HTMLPanel("li", ""); // $NON-NLS-1$ //$NON-NLS-2$
    hyperlink = new Anchor();
    hyperlink
        .getElement()
        .getStyle()
        .setProperty(
            "fontFamily",
            "'Open Sans', Helvetica, Arial, sans-serif !important"); //$NON-NLS-1$ //$NON-NLS-2$
    root.add(hyperlink);
    root.setVisible(true);
    accessible = true;
  }
예제 #28
0
  /**
   * Sets the title to display with this menu button.
   *
   * @param label
   */
  public void setLabel(String label) {

    this.label = label;

    HTMLPanel labelHtml = new HTMLPanel(label);
    Style labelStyle = labelHtml.getElement().getStyle();
    labelStyle.setColor("white");
    labelStyle.setFontSize(0.8, Unit.EM);
    labelStyle.setFontWeight(FontWeight.BOLD);
    labelStyle.setPosition(Position.ABSOLUTE);
    labelStyle.setTextAlign(TextAlign.CENTER);
    labelStyle.setTop(75, Unit.PCT);
    labelStyle.setWidth(100, Unit.PCT);

    panel.add(labelHtml);
  }
예제 #29
0
  /**
   * Sets the image to use in this menu button.
   *
   * @param image
   */
  public void setImage(ImageResource image) {

    this.image = image;

    Image imageHtml = new Image(image.getSafeUri());
    Style imageStyle = imageHtml.getElement().getStyle();
    imageStyle.setDisplay(Display.BLOCK);
    imageStyle.setProperty("margin", "1.25em auto 0");
    imageStyle.setProperty("maxWidth", "60%");
    imageStyle.setPosition(Position.ABSOLUTE);
    imageStyle.setTop(0, Unit.PX);
    imageStyle.setRight(0, Unit.PX);
    imageStyle.setBottom(0, Unit.PX);
    imageStyle.setLeft(0, Unit.PX);

    panel.add(imageHtml);
  }
예제 #30
0
파일: ProjectView.java 프로젝트: regnou/TGM
  @Override
  public void setInSlot(Object slot, IsWidget content) {

    if (slot == ProjectPresenter.PROJECT_POSTERS_SLOT) {
      c("ProjectV - setInSlot +++");
      //			Window.alert("clean");
      projectSlot.clear();
      //						projectSlot.add(content);
      if (content != null) {
        projectSlot.add(content);
      }
    } else if (slot == ProjectPresenter.MAP_SLOT) {
      c("ProjectV - setInSlot pour MAP = RARE NORMALEMENT+++");
      mapSlot.clear();
      if (content != null) {
        //				Window.alert("3 - add map widget to project");
        mapSlot.setWidget(content);
      }
    }
  }