Package com.gwtext.client.widgets.form

Examples of com.gwtext.client.widgets.form.FormPanel


        Panel wrappingPanel = new Panel();
        wrappingPanel.setHeight(270);
        wrappingPanel.setLayout(new FitLayout());

        final FormPanel formPanel = new FormPanel();
        formPanel.setPaddings(7);

        final TextField txtLabel = new TextField("Label");
        final TextField txtCode = new TextField("Code");
        final TextField txtSource = new TextField("Terminology");
        final TextField txtURL = new TextField("URL");
        HTMLPanel verticalSpacer = new HTMLPanel("<BR /><BR />");
//        final NoteInputPanel nip = new NoteInputPanel(getProjectId(), "Enter a comment about this reference (optional):",
//                false, "", "", null, window);
//        nip.showButtons(false);

        Button btnCreate = new Button("Create reference", new ButtonListenerAdapter() {
            @Override
            public void onClick(Button button, EventObject e) {
                String label = txtLabel.getText();
                String code = txtCode.getText();
                String source = txtSource.getText();
                String url = txtURL.getText();
                if (label.length() > 0 || code.length() > 0 || source.length() > 0 || url.length() > 0) {
//                    createNewReference(label, code, source, url, null);
                    createNewReference(label, code, source, url);
                }
                window.close();
            }
        });
        Button btnCancel = new Button("Cancel", new ButtonListenerAdapter() {
            @Override
            public void onClick(Button button, EventObject e) {
                window.close();
            }
        });

        formPanel.add(txtLabel, new AnchorLayoutData("100%"));
        formPanel.add(txtCode, new AnchorLayoutData("100%"));
        formPanel.add(txtSource, new AnchorLayoutData("100%"));
        formPanel.add(txtURL, new AnchorLayoutData("100%"));
        formPanel.add(verticalSpacer);

        wrappingPanel.add(null, new AnchorLayoutData("100% 170"));

        FormPanel formPanelBottom = new FormPanel();
        TextField dummyField = new TextField(); //we need to add this to the bottom formPanel
        //because otherwise we are not allowed to add buttons to it
        dummyField.setVisible(false);
        formPanelBottom.add(dummyField);
        formPanelBottom.addButton(btnCreate);
        formPanelBottom.addButton(btnCancel);

        panel.add(formPanel, new AnchorLayoutData("100% 150"));
        panel.add(wrappingPanel, new AnchorLayoutData("100% 170"));
        panel.add(formPanelBottom, new AnchorLayoutData("100% 20"));
        window.add(panel);
View Full Code Here


        field = createField();
        deleteLink = createDeleteHyperlink();
        commentLink = createCommentHyperLink();

        FormPanel formPanel = new FormPanel();
        formPanel.add(field, new AnchorLayoutData("100%"));

        wrappingPanel.add(formPanel, new ColumnLayoutData(1));

        Collection<Widget> suffixComponents = createSuffixComponents();
        for (Widget widget : suffixComponents) {
View Full Code Here

    String factHeaderStyle = "modeller-fact-TypeHeader"; //NON-NLS
    for (int i = 0; i < m.models.size(); i++) {

      final FactMetaModel mm = (FactMetaModel) m.models.get(i);

          FormPanel config = new FormPanel();
          config.setTitle(mm.name);
          config.setCollapsible(true);
          config.setCollapsed(!(editingFact == i));


      FlexTable tb = new FlexTable();
      config.add(tb);
      tb.setStyleName("modeller-fact-pattern-Widget");    //NON-NLS
      tb.setWidth("100%");
      //layout.add(tb);
      layout.add(config);
View Full Code Here

      this.dt.tableName = asset.metaData.name;


        layout = new VerticalPanel();

        FormPanel config = new FormPanel();
        config.setTitle(constants.DecisionTable());

        config.setBodyBorder(false);
        config.setCollapsed(true);
        config.setCollapsible(true);



        FieldSet conditions = new FieldSet(constants.ConditionColumns());
        conditions.setCollapsible(true);
        conditions.add(getConditions());
        config.add(conditions);


        FieldSet actions = new FieldSet(constants.ActionColumns());
        actions.setCollapsible(true);
        actions.add(getActions());
        config.add(actions);

        FieldSet grouping = new FieldSet(constants.options());
        grouping.setCollapsible(true);
        grouping.setCollapsed(true);
        grouping.add(getGrouping());
        grouping.add(getAttributes());
        config.add(grouping);


        layout.add(config);

        refreshGrid();
View Full Code Here

        h.add( new Image( img ) );
        h.add( new HTML( "&nbsp;" ) );
        h.add( new Label( name ) );
        if ( edit != null ) h.add( edit );

        FormPanel f = newForm( null );

        f.add( h );
        layout.add( f );
  }
View Full Code Here

  public void addHeader(String img, Widget content) {
        HorizontalPanel h = new HorizontalPanel();
        h.add( new Image( img ) );
        h.add( new HTML( "&nbsp;" ) );
        h.add( content );
        FormPanel f = newForm( null );
        f.add( h );
        layout.add( f );
    }
View Full Code Here

        f.add( h );
        layout.add( f );
    }

  private FormPanel newForm(final String hdr) {
    FormPanel fp = new FormPanel();
    fp.setWidth("100%");
    fp.setFrame(true);
    if (hdr != null) {
      fp.setTitle(hdr);
    }
    return fp;
  }
View Full Code Here

    return fp;
  }

    public void endSection() {

    FormPanel f = newForm(this.sectionName);

    f.add(this.currentTable);


    this.layout.add(f);
    this.sectionName = null;
  }
View Full Code Here

    private void endSection() {
        endSection( false );
    }

    private void endSection(boolean collapsed) {
        FormPanel config = new FormPanel();
        config.setTitle( currentSectionName );
        config.setCollapsible( true );
        config.setCollapsed( collapsed );
        config.add( this.currentSection );
        layout.add( config );
    }
View Full Code Here

TOP

Related Classes of com.gwtext.client.widgets.form.FormPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.