Example #1
0
 @Override
 public void storeProperties(Map properties) {
   super.storeProperties(properties);
   properties.put("projectId", this.projectId);
   properties.put("number", this.number);
   properties.put("label", this.label);
   properties.put("description", this.description);
   properties.put("testDescription", this.testDescription);
 }
Example #2
0
  @Override
  protected Widget onInitialization() {
    new RequestCommentsServiceCall(parent.getId()).execute(); // TODO commentsManagerComponent

    activateCommentLink = new HyperlinkWidget(new ActivateCommentEditorAction());

    widgets = new HashMap<Comment, CommentWidget>();

    containerPanel = new FlowPanel();
    containerPanel.setStyleName("CommentsWidget");

    return containerPanel;
  }
Example #3
0
  private void updateCommentList() {
    for (CommentWidget widget : widgets.values()) {
      if (widget.isEditMode()) return;
    }
    commentListPanel.clear();
    List<Comment> comments = parent.getComments();
    Collections.sort(comments, Comment.REVERSE_DATEANDTIME_COMPARATOR);
    List<Comment> pageComments = filterCurrentPageComments(comments);
    for (Comment comment : pageComments) {
      CommentWidget widget = getWidget(comment);
      commentListPanel.add(widget);
    }

    if (comments.size() > COMMENTS_PER_PAGE) {
      commentListPanel.add(createPageNavigator(comments.size()));
    }
  }
Example #4
0
  @Override
  protected void onUpdate() {
    containerPanel.clear();

    if (this.editor == null) {
      containerPanel.add(activateCommentLink);
    } else {
      containerPanel.add(this.editor);
    }

    List<Comment> comments = parent.getComments();
    Collections.sort(comments, Comment.REVERSE_DATEANDTIME_COMPARATOR);
    for (Comment comment : comments) {
      CommentWidget widget = getWidget(comment);
      containerPanel.add(widget);
    }

    super.onUpdate();
  }
Example #5
0
  @Override
  protected Widget onInitialization() {
    new RequestCommentsServiceCall(parent.getId()).execute(); // TODO commentsManagerComponent

    activateCommentLink = new HyperlinkWidget(new ActivateCommentEditorAction());

    widgets = new HashMap<Comment, CommentWidget>();

    editorWrapper = new SimplePanel();
    editorWrapper.setWidget(activateCommentLink);

    commentListPanel = new FlowPanel();

    FlowPanel panel = new FlowPanel();
    panel = new FlowPanel();
    panel.setStyleName("CommentsWidget");
    panel.add(editorWrapper);
    panel.add(commentListPanel);
    return panel;
  }