コード例 #1
0
ファイル: Bcode_Family.java プロジェクト: dalinhuang/gwtbusi
  BaseFormPanel createbcode_Spouse_Form() {
    form = new BaseFormPanel(get_bcode_Spouse_Store());
    TableLayout tl = new TableLayout(6);

    TableData td = new TableData();
    td.setRowspan(1);
    td.setHorizontalAlign(HorizontalAlignment.LEFT);
    td.setVerticalAlign(VerticalAlignment.MIDDLE);
    td.setPadding(2);
    form.setLayout(tl);
    form.setHeaderVisible(false);
    form.setBodyBorder(false);
    form.setPadding(1);

    form.add(new Label("配偶中文名称:"), td);
    TextField<String> C_num3 = new TextField<String>();
    C_num3.setName("Spouse_cnname");
    form.add(C_num3, td);
    form.add(new Label("配偶英文名称:"), td);
    TextField<String> C_num4 = new TextField<String>();
    C_num4.setName("Spouse_enname");
    form.add(C_num4, td);
    form.add(new Label("身份证号:"), td);
    TextField<String> C_num5 = new TextField<String>();
    C_num5.setName("idcard");
    form.add(C_num5, td);
    form.add(new Label("国籍:"), td);
    BaseComboBoxX C_num6 = new BaseComboBoxX("name", "dictionary", "where type='hr_Country'");
    C_num6.setName("Nationality");
    form.add(C_num6, td);
    form.add(new Label("护照编码:"), td);
    TextField<String> C_num7 = new TextField<String>();
    C_num7.setName("PassportNo");
    form.add(C_num7, td);
    form.add(new Label("护照签发国家:"), td);
    BaseComboBoxX C_num8 = new BaseComboBoxX("name", "dictionary", "where type='hr_Country'");
    C_num8.setName("PassportIssueCountry");
    form.add(C_num8, td);
    form.add(new Label("护照签发日期:"), td);
    DateField C_data9 = new DateField();
    C_data9.getPropertyEditor().setFormat(DateTimeFormat.getFormat("yyyy-M-d"));
    C_data9.setName("PassportIssueDate");
    form.add(C_data9, td);
    form.add(new Label("职业:"), td);
    TextField<String> C_num10 = new TextField<String>();
    C_num10.setName("Occupation");
    form.add(C_num10, td);

    form.add(new Label("公司:"), td);
    TextField<String> C_num11 = new TextField<String>();
    C_num11.setName("Company");
    form.add(C_num11, td);

    form.add(new Label("工作职位:"), td);
    TextField<String> C_num14 = new TextField<String>();
    C_num14.setName("JobPosition");
    form.add(C_num14, td);
    form.inited(126);
    return form;
  };
コード例 #2
0
ファイル: CCODE.java プロジェクト: dalinhuang/gwtbusi
  /**
   * 客户资料
   *
   * @return
   */
  private LayoutContainer CreateCCodeDetailPanel() {
    LayoutContainer main = new LayoutContainer();
    TableLayout tl = new TableLayout(2);

    main.setLayout(new TableLayout(2));
    BaseFormPanel leftpanel = new BaseFormPanel(store);
    leftpanel.setLayout(new FormLayout());
    FormData fd = new FormData(200, 30);
    leftpanel.setHeaderVisible(false);
    leftpanel.setBodyBorder(false);

    BaseFormPanel rightpanel = new BaseFormPanel(store);
    rightpanel.setBodyBorder(false);
    rightpanel.setHeaderVisible(false);

    TextField<String> ccode = new TextField<String>();
    ccode.setName("ccode");
    ccode.setAllowBlank(false);
    ccode.setFieldLabel("编码");

    TextField<String> name = new TextField<String>();
    name.setName("cname");
    name.setAllowBlank(false);
    name.setFieldLabel("名称");

    TextField<String> shortcode = new TextField<String>();
    shortcode.setName("shortcode");
    shortcode.setFieldLabel("简码");
    TextField<String> ccodesource = new TextField<String>();
    ccodesource.setName("ccodesource");
    ccodesource.setFieldLabel("客户来源");

    TextField<String> ncode = new TextField<String>();
    ncode.setName("ncode");
    ncode.setFieldLabel("国别");

    TextField<String> httpurl = new TextField<String>();
    httpurl.setName("httpurl");
    httpurl.setFieldLabel("网址");

    DateField setupdate = new DateField();
    setupdate.setName("setupdate");
    setupdate.setFieldLabel("成立时间");
    TextField<String> registercapital = new TextField<String>();
    registercapital.setName("registercapital");
    registercapital.setFieldLabel("注册资金");

    TextField<String> employeenum = new TextField<String>();
    employeenum.setName("employeenum");
    employeenum.setFieldLabel("雇用人数");

    TextField<String> branchorgnum = new TextField<String>();
    branchorgnum.setName("branchorgnum");
    branchorgnum.setFieldLabel("分支机构数");

    TextField<String> artperson = new TextField<String>();
    artperson.setName("artperson");
    artperson.setFieldLabel("法人代表");

    TextField<String> taxno = new TextField<String>();
    taxno.setName("taxno");
    taxno.setFieldLabel("税务登记号");

    TextField<String> partner = new TextField<String>();
    partner.setName("partner");
    partner.setFieldLabel("合伙人");

    /*
     * TextField<String> artno = new TextField<String>();
     * artno.setName("artno"); artno.setFieldLabel("企业代码");
     */

    TextField<String> comholsdatedesc = new TextField<String>();
    comholsdatedesc.setName("comholsdatedesc");
    comholsdatedesc.setFieldLabel("公司特殊假日");

    BaseGrid gudong = CreateCCodeGudongPanel();
    gudong.setAutoHeight(true);
    gudong.setAutoWidth(true);
    leftpanel.add(ccode, fd);
    rightpanel.add(name, fd);
    leftpanel.add(shortcode, fd);
    rightpanel.add(ccodesource, fd);
    leftpanel.add(httpurl, fd);
    rightpanel.add(setupdate, fd);
    leftpanel.add(registercapital, fd);
    rightpanel.add(employeenum, fd);
    leftpanel.add(branchorgnum, fd);
    rightpanel.add(artperson, fd);
    leftpanel.add(taxno, fd);
    rightpanel.add(partner, fd);
    leftpanel.add(comholsdatedesc, fd);

    TableData td = new TableData();
    td.setColspan(1);
    td.setRowspan(1);
    // 对齐方式
    td.setHorizontalAlign(HorizontalAlignment.LEFT);
    td.setVerticalAlign(VerticalAlignment.TOP);
    // rightpanel.add(gudong,td2);
    leftpanel.inited();
    rightpanel.inited();
    FieldSet fieldSet = new FieldSet();
    fieldSet.setHeading("股东占股比例");
    fieldSet.add(gudong);
    main.add(leftpanel, td);
    main.add(rightpanel, td);
    main.add(fieldSet, td);
    return main;
  }
コード例 #3
0
ファイル: BasicBindingExample.java プロジェクト: neolee/fsrg
  @Override
  protected void onRender(Element parent, int index) {
    super.onRender(parent, index);

    final Stock stock = TestData.getStocks().get(0);

    HorizontalPanel hp = new HorizontalPanel();
    hp.setSpacing(10);

    StringBuffer sb = new StringBuffer();
    sb.append("<div class=text style='line-height: 1.5em'>");
    sb.append("<b>Name:</b> {name}<br>");
    sb.append("<b>Symbol:</b> {symbol}<br>");
    sb.append("<b>Last:</b> {last}<br>");
    sb.append("<b>Change:</b> {[new Number(values.change).toFixed(2)]}<br>");
    sb.append("<b>Updated:</b> {date:date(\"MM/dd/y\")}<br>");
    sb.append("</div>");

    final XTemplate template = XTemplate.create(sb.toString());
    final HTML html = new HTML();
    html.setWidth("160px");
    template.overwrite(html.getElement(), Util.getJsObject(stock));
    hp.add(html);
    // update template when model changes
    stock.addChangeListener(
        new ChangeListener() {
          public void modelChanged(ChangeEvent event) {
            template.overwrite(html.getElement(), Util.getJsObject(stock));
          }
        });

    FormPanel panel = new FormPanel();
    panel.setHeaderVisible(false);
    panel.setWidth(350);

    TextField<String> name = new TextField<String>();
    name.setName("nameField");
    name.setFieldLabel("Name");
    panel.add(name);

    TextField<String> symbol = new TextField<String>();
    symbol.setName("symbol");
    symbol.setFieldLabel("Symbol");
    panel.add(symbol);

    NumberField open = new NumberField();
    open.setName("last");
    open.setFieldLabel("Last");
    panel.add(open);

    NumberField change = new NumberField();
    change.setName("change");
    change.setFieldLabel("Change");
    change.setFormat(NumberFormat.getDecimalFormat());
    panel.add(change);

    DateField last = new DateField();
    last.setName("date");
    last.setFieldLabel("Updated");
    panel.add(last);

    SimpleComboBox<String> scb = new SimpleComboBox<String>();
    for (Stock s : TestData.getStocks()) {
      scb.add(s.getName());
    }
    scb.setFieldLabel("Name");
    scb.setForceSelection(true);
    scb.setTypeAhead(true);
    scb.setName("company");
    scb.setTriggerAction(TriggerAction.ALL);
    panel.add(scb);

    hp.add(panel);

    FormBinding binding = new FormBinding(panel);
    // manually add bindings
    binding.addFieldBinding(new FieldBinding(name, "name"));
    binding.addFieldBinding(new FieldBinding(symbol, "symbol"));
    binding.addFieldBinding(new SimpleComboBoxFieldBinding(scb, "name"));

    // auto bind remaining fields, field name must match model property name
    binding.autoBind();
    binding.bind(stock);

    add(hp);
  }
コード例 #4
0
ファイル: NewCCode.java プロジェクト: dalinhuang/gwtbusi
  /** * 主窗口 */
  void initmainpanel() {

    w = new BaseFormPanel(getStore());
    w.setHeaderVisible(false);
    Label cardno_l = new Label("卡号:");
    cardno_l.setWidth("50");
    Label cname_l = new Label("名字:");
    cname_l.setWidth("50");
    Label sex_l = new Label("性别:");
    sex_l.setWidth("50");
    Label edu_l = new Label("学历:");
    Label bird_l = new Label("出生日期:");

    Label mobil_l = new Label("手机号:");
    Label idno_l = new Label("身份证号:");
    Label mark_l = new Label("备注:");

    cardno_t = new TextField<String>();
    cardno_t.setAllowBlank(false);
    cardno_t.addListener(Events.Change, this);
    cname_t = new TextField<String>();
    cname_t.setAllowBlank(false);

    //		passwordc_t.setAllowBlank(false);
    //		password_t.setAllowBlank(false);
    //
    // TextField<String> sex_t = new TextField<String>();
    // BaseGridEditor sex_t= CodeNameMapFactory.aa();
    BaseComboBoxForm<BaseModelData> sex_t = CodeNameMapFactory.createSexInput_F();
    TextField<String> edu_t = new TextField<String>();
    // CodeNameMapFactory codenamemap = new CodeNameMapFactory();

    // BaseGridEditor<String> edu_t =codenamemap.createSexInput_G();

    // createBocdeInput_F
    DateField bird_t = new DateField();
    bird_t.setAutoWidth(true);

    bird_t.getPropertyEditor().setFormat(DateTimeFormat.getFormat("yyyy-M-d H:mm:ss"));
    TextField<String> mobil_t = new TextField<String>();
    mobil_t.setAllowBlank(false);
    TextField<String> idno_t = new TextField<String>();

    TextArea mark_t = new TextArea();
    mark_t.setSize(420, 40);
    // TextField<String> password_t = new TextField<String>();

    password_t.setPassword(true);
    passwordc_t.setPassword(true);
    // password_t.setToolTip("将光标放到此处,并由会员录入自己的密码");
    ccode_t = new TextField<String>();
    // ccode_t.setEnabled(false);
    ccode_t.setVisible(false);
    icode_t = new TextField<String>();
    icode_t.setVisible(false);

    cardno_t.setName("s_cardno");
    cname_t.setName("cname");
    password_t.setName("password");

    sex_t.setName("s_sex");
    edu_t.setName("s_edu");
    bird_t.setName("s_birid");
    mobil_t.setName("s_mobil");
    idno_t.setName("s_idno");
    mark_t.setName("s_mark");
    ccode_t.setName("ccode");
    icode_t.setName("icode");
    // password_t.setName("password");

    TableLayout tl = new TableLayout(4);
    tl.setWidth("600");
    w.setLayout(tl);
    TableData td = new TableData();
    td.setColspan(1);
    // td.setWidth("2000");
    td.setMargin(100);
    td.setPadding(5);
    td.setRowspan(1);

    TableData td2 = new TableData();
    td2.setColspan(3);
    // td.setWidth("2000");
    td2.setMargin(100);
    td2.setPadding(5);
    td2.setRowspan(1);

    w.add(cardno_l, td);
    w.add(cardno_t, td);
    w.add(cname_l, td);
    w.add(cname_t, td);

    w.add(mobil_l, td);
    w.add(mobil_t, td);
    w.add(sex_l, td);
    w.add(sex_t, td);

    w.add(new Label("密码:"), td);
    w.add(password_t, td);
    w.add(new Label("重新录入密码:"), td);
    w.add(passwordc_t, td);

    w.add(edu_l, td);
    w.add(edu_t, td);
    w.add(bird_l, td);
    w.add(bird_t, td);

    w.add(idno_l, td);
    w.add(idno_t, td);
    w.add(new Label(""), td);
    w.add(new Label(""), td);
    w.add(mark_l, td);
    w.add(mark_t, td2);

    w.add(new Label("销售人员:"), td);
    BaseComboBoxForm<BaseModelData> cbf = createBcode_filter();
    cbf.setName("rbcode");
    cbf.setAllowBlank(false);
    w.add(cbf, td2);

    w.add(ccode_t, td);
    w.add(icode_t, td);
    w.setBottomComponent(addfinace);

    addfinace.addListener(Events.Select, this);
    addfinace.setEnabled(false);
    w.inited();

    // w.setAutoHeight(true);
    // w.setAutoWidth(true);
    // w.setSize(661, 300);

    cardno_t.addListener(Events.Change, this);
    cname_t.addListener(Events.Change, this);

    // mobil_t.addListener(Events.Change, this);

    cardno_t.setValidateOnBlur(true);
    cname_t.setValidateOnBlur(true);
  }