private Canvas createActivateForm(final ListGridRecord ruleRecord) {
   DynamicForm form = new DynamicForm();
   form.setItems(createActivateCheckboxItem(ruleRecord));
   form.setAutoWidth();
   return form;
 }
Пример #2
0
  public LoginDialog() {

    setTitle("登录");
    setShowMinimizeButton(false);
    setIsModal(true);
    // setCanDragReposition(true);
    // setCanDragResize(true);
    setShowModalMask(true);
    setOverflow(Overflow.VISIBLE);
    setAutoSize(true);
    setWidth(205);
    setHeight(100);
    forgetPass =
        UiUtils.getLink(
            "忘记密码?",
            new ClickHandler() {

              @Override
              public void onClick(ClickEvent event) {
                SC.say("忘记密码");
              }
            });
    // setLayoutAlign(VerticalAlignment.CENTER);

    addCloseClickHandler(
        new CloseClickHandler() {
          public void onCloseClick(CloseClickEvent event) {
            notLogin();
          }
        });

    // form.setHeight100();
    // form.setWidth100();
    loginForm.setAutoFocus(true);
    loginForm.setPadding(5);
    loginForm.setCellPadding(5);

    loginForm.setWrapItemTitles(false);
    loginForm.setLayoutAlign(VerticalAlignment.CENTER);
    // textItem.setLength(100);
    //
    // passItem.setLength(100);
    loginForm.setFields(userItem, passItem);

    HLayout hLayout = new HLayout(10);
    hLayout.setLayoutAlign(VerticalAlignment.BOTTOM);
    hLayout.setPadding(5);

    okBtn.setWidth(70);

    hLayout.addMember(forgetPass);
    hLayout.addMember(okBtn);

    hLayout.setAutoHeight();

    addItem(loginForm);

    addItem(hLayout);

    loginForm.setOverflow(Overflow.VISIBLE);
    loginForm.setAutoWidth();
    loginForm.setAutoHeight();
    setEdgeMarginSize(4);
    // setEdgeOpacity(60);
    setOpacity(80);
    setEdgeOffset(5);
    centerInPage();
  }