コード例 #1
0
ファイル: CreateGrouptopic.java プロジェクト: hchan/nositer
 @Override
 public void resize(int width, int height) {
   int newWidth =
       MainPanel.getInstance().getWidth()
           - groupDiscussionsContainer.getGroupDiscussionLeftPanel().getWidth();
   this.setWidth(newWidth - 15);
   formPanel.setWidth(newWidth - 15);
   this.setHeight(MainPanel.getInstance().getHeight() - 60);
   formPanel.setHeight(MainPanel.getInstance().getHeight() - 100);
   if (description.isRendered()) {
     description.setHeight(MainPanel.getInstance().getHeight() - 210);
   }
   formPanel.layout();
   layout();
   // groupDiscussionsContainer.getGroupDiscussionMainPanel().add(this);
   groupDiscussionsContainer.getGroupDiscussionMainPanel().setWidth(newWidth);
   groupDiscussionsContainer.getGroupDiscussionMainPanel().layout();
 }
コード例 #2
0
ファイル: CreateGrouptopic.java プロジェクト: hchan/nositer
  public void populateMainPanel() {
    this.setHeaderVisible(false);

    theHeading = new Label("Create New Topic and Message");
    theHeading.setStyleName("formHeading");
    groupDiscussionsContainer.getGroupDiscussionMainPanel().removeAll();
    this.add(theHeading, new MarginData(5, 0, 0, 5));

    formPanel.setBodyBorder(false);
    formPanel.setHeaderVisible(false);
    formPanel.setWidth("100%");
    formPanel.setLabelAlign(LabelAlign.TOP);
    name = new TextField<String>();
    name.setFieldLabel("Topic name");
    description =
        new HtmlEditor() {
          protected void afterRender() {
            resize(0, 0);
            super.afterRender();
          };
        };
    description.setFieldLabel("Message");

    formPanel.add(name, new FormData("100%"));
    formPanel.add(description, new FormData("100%"));
    saveButton = new Button("Save");
    formPanel.setButtonAlign(HorizontalAlignment.CENTER);
    formPanel.addButton(saveButton);
    this.add(formPanel, new MarginData(5, 5, 65, 0));
    groupDiscussionsContainer.getGroupDiscussionMainPanel().add(this);

    groupDiscussionsContainer.getGroupDiscussionMainPanel().getBottomComponent().hide();
    groupDiscussionsContainer
        .getGroupDiscussionMainPanel()
        .setHeight(MainPanel.getInstance().getHeight());
    // groupDiscussionsContainer.getGroupDiscussionMainPanel().layout(true);
    addDefaultListeners();
    resize(0, 0);
  }