Пример #1
0
  @Override
  protected EnhancedVLayout buildContentPane() {
    EnhancedVLayout contentPane = new EnhancedVLayout();
    contentPane.setWidth100();
    contentPane.setHeight100();
    contentPane.setOverflow(Overflow.AUTO);

    EnhancedDynamicForm form = buildForm();
    setForm(form);

    EnhancedVLayout topPane = new EnhancedVLayout();
    topPane.setWidth100();
    topPane.setHeight(80);
    topPane.addMember(form);

    contentPane.addMember(topPane);

    TabSet tabSet = new TabSet();
    tabSet.setWidth100();
    tabSet.setHeight100();

    this.bundlesTab = buildBundlesTab(tabSet);
    tabSet.addTab(bundlesTab);

    contentPane.addMember(tabSet);

    return contentPane;
  }
Пример #2
0
  protected Canvas defaultView() {
    EnhancedVLayout vLayout = new EnhancedVLayout();
    vLayout.setWidth100();

    // TODO: Help icon.
    TitleBar titleBar = new TitleBar(MSG.view_testTop_title());
    vLayout.addMember(titleBar);

    Label label = new Label(MSG.view_testTop_description());
    label.setPadding(10);
    vLayout.addMember(label);

    return vLayout;
  }
  @Override
  protected Canvas buildResultsSection(GroupOperationHistory operationHistory) {
    EnhancedVLayout resultsSection = new EnhancedVLayout();

    Label title = new Label("<h4>" + MSG.view_operationHistoryDetails_results() + "</h4>");
    title.setHeight(27);
    resultsSection.addMember(title);

    GroupMemberResourceOperationHistoryListView memberHistoryListView =
        new GroupMemberResourceOperationHistoryListView(
            this.groupComposite, getOperationHistory().getId());
    memberHistoryListView.setOverflow(Overflow.VISIBLE);
    memberHistoryListView.setHeight(200);
    resultsSection.addMember(memberHistoryListView);

    return resultsSection;
  }
Пример #4
0
  private Canvas getActionLayout() {
    EnhancedVLayout actionLayout = new EnhancedVLayout(10);
    IButton deleteButton = new EnhancedIButton(MSG.common_button_delete(), ButtonColor.RED);
    // deleteButton.setIcon("subsystems/bundle/BundleVersionAction_Delete_16.png");
    deleteButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent clickEvent) {
            SC.ask(
                MSG.view_bundle_version_deleteConfirm(),
                new BooleanCallback() {
                  public void execute(Boolean aBoolean) {
                    if (aBoolean) {
                      bundleManager.deleteBundleVersion(
                          version.getId(),
                          false,
                          new AsyncCallback<Void>() {
                            public void onFailure(Throwable caught) {
                              CoreGUI.getErrorHandler()
                                  .handleError(
                                      MSG.view_bundle_version_deleteFailure(version.getVersion()),
                                      caught);
                            }

                            public void onSuccess(Void result) {
                              CoreGUI.getMessageCenter()
                                  .notify(
                                      new Message(
                                          MSG.view_bundle_version_deleteSuccessful(
                                              version.getVersion()),
                                          Message.Severity.Info));
                              // Bundle version is deleted, go back to main bundle view
                              CoreGUI.goToView(
                                  LinkManager.getBundleVersionLink(version.getBundle().getId(), 0),
                                  true);
                            }
                          });
                    }
                  }
                });
          }
        });
    actionLayout.addMember(deleteButton);

    if (!canDelete) {
      deleteButton.setDisabled(true);
    }

    return actionLayout;
  }