@Override
  public void init(final DocumentDetailsPresenter presenter) {
    this.presenter = presenter;

    documentIdLabel.setText(constants.DocumentID());
    documentNameLabel.setText(constants.DocumentName());
    openDocumentButton.setText(constants.DownloadButton());
    documentPathLabel.setText(constants.DownloadButtonLabel());
  }
Example #2
0
  public MainContainer() {
    initWidget(uiBinder.createAndBindUi(this));
    deck.add(flow);
    deck.add(new Label("Deck 1"));
    final Label label2 = new Label("Deck 2");
    label2.setType(LabelType.WARNING);
    deck.add(label2);
    final Label label3 = new Label("Deck 3");
    label3.setType(LabelType.DANGER);
    deck.add(label3);

    scroll.getElement().getStyle().setOverflowX(Overflow.AUTO);
    scroll.getElement().getStyle().setOverflowY(Overflow.SCROLL);

    // scroll.setTouchScrollingDisabled(false);
    // NotifyUser.info("Touch enabled: " + !scroll.isTouchScrollingDisabled());

    // getScrollableElement().getStyle().setOverflowX(Overflow.HIDDEN);
    // scroll.getScrollableElement().getStyle().setOverflowY(Overflow.SCROLL);
    //
    // scroll.addScrollHandler(new ScrollHandler() {
    //
    // @Override
    // public void onScroll(final ScrollEvent event) {
    // // NotifyUser.info("scrolling");
    // }
    // });

    // addTouchEndHandler(new TouchEndHandler() {
    // @Override
    // public void onTouchEnd(final TouchEndEvent event) {
    // // NotifyUser.info("Touch end event");
    // next();
    // }
    // });
    // addTouchStartHandler(new TouchStartHandler() {
    // @Override
    // public void onTouchStart(final TouchStartEvent event) {
    // // NotifyUser.info("Touch start event");
    // }
    // });
    // addTouchCancelHandler(new TouchCancelHandler() {
    // @Override
    // public void onTouchCancel(final TouchCancelEvent event) {
    // // NotifyUser.info("Touch cancel event");
    // }
    // });
    // addTouchMoveHandler(new TouchMoveHandler() {
    // @Override
    // public void onTouchMove(final TouchMoveEvent event) {
    // // NotifyUser.info("Touch move event");
    //
    // }
    // });
  }
  private void enableModeParams(ViewMode mode) {

    if (mode == ViewMode.EDIT_MULTI_MODULE_PROJECT || mode == ViewMode.EDIT_SINGLE_MODULE_PROJECT) {
      groupIdTextBox.setVisible(true);
      groupIdTextBoxHelpInline.setVisible(true);
      artifactIdTextBox.setVisible(true);
      artifactIdTextBoxHelpInline.setVisible(true);
      versionTextBox.setVisible(true);
      versionTextBoxHelpInline.setVisible(true);
    }
  }
Example #4
0
 public LoadingLabel(String text) {
   loadingLabel = new Label(text);
   initWidget(loadingLabel);
   loadingLabel.setType(LabelType.INFO);
 }
  @Override
  public void setMode(ViewMode mode) {
    this.mode = mode;

    if (mode == ViewMode.CREATE_STRUCTURE) {

      projectTypeLabel.setText(
          Constants.INSTANCE.Repository_structure_view_create_projectTypeLabel());

      groupIdTextBoxHelpInline.setText(
          Constants.INSTANCE.Repository_structure_view_create_groupIdTextBoxHelpInline());
      artifactIdTextBoxHelpInline.setText(
          Constants.INSTANCE.Repository_structure_view_create_artifactIdTextBoxHelpInline());
      versionTextBoxHelpInline.setText(
          Constants.INSTANCE.Repository_structure_view_create_versionTextBoxHelpInline());

    } else if (mode == ViewMode.EDIT_SINGLE_MODULE_PROJECT) {

      projectTypeLabel.setText(
          Constants.INSTANCE.Repository_structure_view_edit_single_projectTypeLabel());

      groupIdTextBoxHelpInline.setText(
          Constants.INSTANCE.Repository_structure_view_edit_single_groupIdTextBoxHelpInline());
      artifactIdTextBoxHelpInline.setText(
          Constants.INSTANCE.Repository_structure_view_edit_single_artifactIdTextBoxHelpInline());
      versionTextBoxHelpInline.setText(
          Constants.INSTANCE.Repository_structure_view_edit_single_versionTextBoxHelpInline());

      groupIdTextBox.setVisible(true);
      groupIdTextBoxHelpInline.setVisible(true);
      artifactIdTextBox.setVisible(true);
      artifactIdTextBoxHelpInline.setVisible(true);
      versionTextBox.setVisible(true);
      versionTextBoxHelpInline.setVisible(true);

    } else if (mode == ViewMode.EDIT_MULTI_MODULE_PROJECT) {

      projectTypeLabel.setText(
          Constants.INSTANCE.Repository_structure_view_edit_multi_projectTypeLabel());

      groupIdTextBoxHelpInline.setText(
          Constants.INSTANCE.Repository_structure_view_edit_multi_groupIdTextBoxHelpInline());
      artifactIdTextBoxHelpInline.setText(
          Constants.INSTANCE.Repository_structure_view_edit_multi_artifactIdTextBoxHelpInline());
      versionTextBoxHelpInline.setText(
          Constants.INSTANCE.Repository_structure_view_edit_multi_versionTextBoxHelpInline());

      groupIdTextBox.setVisible(true);
      groupIdTextBoxHelpInline.setVisible(true);
      artifactIdTextBox.setVisible(true);
      artifactIdTextBoxHelpInline.setVisible(true);
      versionTextBox.setVisible(true);
      versionTextBoxHelpInline.setVisible(true);

    } else if (mode == ViewMode.EDIT_UNMANAGED_REPOSITORY) {

      projectTypeLabel.setText(
          Constants.INSTANCE.Repository_structure_view_edit_unmanaged_projectTypeLabel());

      groupIdTextBox.setVisible(false);
      groupIdTextBoxHelpInline.setVisible(false);
      artifactIdTextBox.setVisible(false);
      artifactIdTextBoxHelpInline.setVisible(false);
      versionTextBox.setVisible(false);
      versionTextBoxHelpInline.setVisible(false);
    }
  }
 @Override
 public String getVersionId() {
   return versionTextBox.getText();
 }
 @Override
 public void setVersion(String version) {
   versionTextBox.setText(version);
 }
 @Override
 public String getArtifactId() {
   return artifactIdTextBox.getText();
 }
 @Override
 public void setArtifactId(String artifactId) {
   artifactIdTextBox.setText(artifactId);
 }
 @Override
 public String getGroupId() {
   return groupIdTextBox.getText();
 }
 @Override
 public void setGroupId(String groupId) {
   groupIdTextBox.setText(groupId);
 }
 public void clear() {
   groupIdTextBox.setText(null);
   artifactIdTextBox.setText(null);
   versionTextBox.setText(null);
 }