/**
   * Set the widget to display in content area.
   *
   * @param content the {@link Widget} to display
   */
  public void setWidget(IsWidget content) {
    contentContainer.setWidget(content);

    // Do not animate the first time we show a widget.
    if (firstContentWidget) {
      firstContentWidget = false;
      contentContainer.animate(0);
    }
  }
Exemplo n.º 2
0
 @Override
 public void onResize() {
   for (int i = 0; i < outputPanel.getWidgetCount(); i++) {
     Widget widget = outputPanel.getWidget(i);
     if (widget instanceof RequiresResize) {
       ((RequiresResize) widget).onResize();
     }
   }
 }
Exemplo n.º 3
0
  @Override
  public void addProcessWidget(String processId, IsWidget widget) {
    processWidgets.put(processId, widget);
    outputPanel.add(widget);

    showProcessOutput(processId);
  }
Exemplo n.º 4
0
  @Override
  public void clear() {
    for (IsWidget widget : processWidgets.values()) {
      outputPanel.remove(widget);
    }

    processWidgets.clear();
  }
Exemplo n.º 5
0
  @Override
  public void showProcessOutput(String processId) {
    if (processWidgets.containsKey(processId)) {
      onResize();
      outputPanel.showWidget(processWidgets.get(processId).asWidget());

      activeProcessId = processId;

      ProcessTreeNode treeNode = processTreeNodes.get(processId);
      if (treeNode != null) {
        treeNode.setHasUnreadContent(false);
        treeNode
            .getTreeNodeElement()
            .getClassList()
            .remove(machineResources.getCss().badgeVisible());
      }
    }
  }
Exemplo n.º 6
0
 @Override
 public void hideProcessOutput(String processId) {
   IsWidget widget = processWidgets.get(processId);
   outputPanel.remove(widget);
   processWidgets.remove(processId);
 }
  /** Construct a new {@link MobileWebAppShellMobile}. */
  public LoveLicenseShellMobile(
      final EventBus eventBus,
      OrientationHelper orientationHelper,
      MainView mainView,
      MyInfoView myInfoView,
      SajuViewView sajuViewView,
      CurrentSajuView currentSajuView,
      SearchFriendView searchFriendView,
      GuestBookListView guestBookListView,
      GuestBookDetailView guestBookDetailView,
      GuestBookWriteView guestBookWriteView,
      GuestBookEditView guestBookEditView,
      LoveLicenseConstants constants) {

    /*
    titleName = new Label();
    titleName.setText(constants.mainTitle());*/
    // System.out.println("##############"+constants.mainTitle());

    initWidget(uiBinder.createAndBindUi(this));

    /*
     * Add all views to the DeckLayoutPanel so we can animate between them.
     * Using a DeckLayoutPanel here works because we only have a few views, and
     * we always know that the task views should animate in from the right side
     * of the screen. A more complex app will require more complex logic to
     * figure out which direction to animate.
     */
    contentContainer.add(mainView);
    contentContainer.add(guestBookListView);
    contentContainer.add(guestBookDetailView);
    contentContainer.add(guestBookWriteView);
    contentContainer.add(guestBookEditView);
    contentContainer.add(myInfoView);
    contentContainer.add(sajuViewView);
    contentContainer.add(currentSajuView);
    contentContainer.add(searchFriendView);
    contentContainer.setAnimationDuration(500);

    orientationHelper.setCommands(
        this,
        new Command() {
          @Override
          public void execute() {
            onShiftToPortrait();
          }
        },
        new Command() {
          @Override
          public void execute() {
            onShiftToLandscape();
          }
        });

    // Return to the task list when the title is clicked.
    titleBar.addDomHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            ActionEvent.fire(eventBus, ActionNames.GO_HOME);
          }
        },
        ClickEvent.getType());
  }