Examples of FormPanel


Examples of com.extjs.gxt.ui.client.widget.form.FormPanel

     
  }
 
  private void createSearchPanel()
  {
    searchPanel = new FormPanel()
    searchPanel.setFrame(false)
    searchPanel.setHeaderVisible(false);
    searchPanel.setBodyBorder(false);
    searchPanel.setButtonAlign(HorizontalAlignment.CENTER)
    searchPanel.setLayout(new FlowLayout())
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FormPanel

  chantierFieldset.setWidth(GuiUtil.getScreenWidth() / 2 - 25);
  LayoutContainer layoucent = new LayoutContainer();
  layoucent.setWidth(5);
  btnValider = new Button(messages.validate());
  btnAnnuler = new Button(messages.cancel());
  FormPanel contentForm = new FormPanel();
  contentForm.setLayout(new TableLayout(5));
  contentForm.setAutoHeight(true);
  contentForm.setBodyBorder(false);
  contentForm.setHeaderVisible(false);
  contentForm.setButtonAlign(HorizontalAlignment.CENTER);
  grid.setWidget(0, 0, adminFieldset);
  grid.setWidget(0, 1, chantierFieldset);
  contentForm.add(grid);
  contentForm.addButton(btnValider);
  contentForm.addButton(btnAnnuler);
  service.findAll(new AsyncCallbackWithErrorResolution<List<UtilisateurGrpModel>>() {
      @Override
      public void onSuccess(List<UtilisateurGrpModel> result) {
      }
  });
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FormPanel

  private static final String ANCHOR_SPEC = "100%";
 
  private static Messages   messages  = GWT.create(Messages.class);
 
  public AddAvancementForm() {
    final FormPanel formPanel = new FormPanel();
    formPanel.setBorders(false);
    formPanel.setBodyBorder(false);
    formPanel.setHeaderVisible(false);
    FormLayout fl_formPanel = new FormLayout();
    fl_formPanel.setLabelWidth(150);
    formPanel.setLayout(fl_formPanel);
   
    TextField<String> label = new TextField<String>();
    label.setMaxLength(MAX_LENGTH_1);
    label.setName(ProgressDto.LABEL);
    label.setFieldLabel(messages.label());
    formPanel.add(label, new FormData(ANCHOR_SPEC));
   
    DateField date = new DateField();
    date.setName(ProgressDto.DATE);
    date.setFieldLabel(messages.date());
    formPanel.add(date, new FormData(ANCHOR_SPEC));
   
    NumberField cumule1 = createNumberField(messages.cumule() + " avancement");
    cumule1.setName(ProgressDto.CUMULE);
    formPanel.add(cumule1, new FormData(ANCHOR_SPEC));
   
    NumberField cumule2 = createNumberField(messages.cumule() + " reteneus");
    cumule2.setName(ProgressDto.CUMULE2);
    formPanel.add(cumule2, new FormData(ANCHOR_SPEC));
   
    add(formPanel);
   
    ProgressDto dataModel = new ProgressDto();
    bindModel(formPanel, dataModel);
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FormPanel

public class AddCautionFournieForm extends AbstractDataForm<CautionFournieDto> {
 
  private static final String ANCHOR_SPEC = "100%";
 
  public AddCautionFournieForm() {
    final FormPanel formPanel = new FormPanel();
    formPanel.setBorders(false);
    formPanel.setBodyBorder(false);
    formPanel.setHeaderVisible(false);
    FormLayout fl_formPanel = new FormLayout();
    fl_formPanel.setLabelWidth(100);
    formPanel.setLayout(fl_formPanel);
   
    DateField date = new DateField();
    date.setName(CautionFournieDto.DATE);
    date.setFieldLabel(messages.date());
    formPanel.add(date, new FormData(ANCHOR_SPEC));
   
    NumberField amount = createNumberField(messages.amount());
    amount.setName(CautionFournieDto.AMOUNT);
    formPanel.add(amount, new FormData(ANCHOR_SPEC));
   
    add(formPanel);
   
    CautionFournieDto dataModel = new CautionFournieDto();
    bindModel(formPanel, dataModel);
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FormPanel

    add(vp);
  }

  private void createColumnForm() {
    FormData formData = new FormData("100%");
    FormPanel panel = new FormPanel();
    panel.setFrame(true);
    //panel.setIcon(Resources.ICONS.form());
    panel.setHeading("FormPanel");
    panel.setSize(600, -1);
    panel.setLabelAlign(LabelAlign.TOP);
    panel.setButtonAlign(HorizontalAlignment.CENTER);

    LayoutContainer main = new LayoutContainer();
    main.setLayout(new ColumnLayout());

    LayoutContainer left = new LayoutContainer();
    left.setStyleAttribute("paddingRight", "10px");
    FormLayout layout = new FormLayout();
    layout.setLabelAlign(LabelAlign.TOP);
    left.setLayout(layout);

    TextField<String> first = new TextField<String>();
    first.setFieldLabel("First Name");
    left.add(first, formData);

    TextField<String> company = new TextField<String>();
    company.setFieldLabel("Company");
    left.add(company, formData);

    DateField birthday = new DateField();
    birthday.setFieldLabel("Birthday");
    left.add(birthday, formData);

    LayoutContainer right = new LayoutContainer();
    right.setStyleAttribute("paddingLeft", "10px");
    layout = new FormLayout();
    layout.setLabelAlign(LabelAlign.TOP);
    right.setLayout(layout);

    TextField<String> last = new TextField<String>();
    last.setFieldLabel("Last");
    right.add(last, formData);

    TextField<String> email = new TextField<String>();
    email.setFieldLabel("Email");
    right.add(email, formData);

    Radio radio1 = new Radio();
    radio1.setBoxLabel("Yes");

    Radio radio2 = new Radio();
    radio2.setBoxLabel("No");

    RadioGroup group = new RadioGroup();
    group.setFieldLabel("Ext GWT User");
    group.add(radio1);
    group.add(radio2);
    right.add(group);

    main.add(left, new ColumnData(.5));
    main.add(right, new ColumnData(.5));

    panel.add(main, new FormData("100%"));

    HtmlEditor a = new HtmlEditor();
    a.setFieldLabel("Comment");
    a.setHeight(200);
    panel.add(a, new FormData("100%"));

    panel.addButton(new Button("Cancel"));
    panel.addButton(new Button("Submit"));

    vp.add(panel);
  }
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FormPanel

    createForm1();
    add(vp);
  }

  private void createForm1() {
    FormPanel simple = new FormPanel();
    simple.setHeading("Custom Form");
    simple.setFrame(true);
    simple.setWidth(350);

    ComponentPlugin plugin = new ComponentPlugin() {
      public void init(Component component) {
        component.addListener(Events.Render, new Listener<ComponentEvent>() {
          public void handleEvent(ComponentEvent be) {
            El elem = be.getComponent().el().findParent(".x-form-element", 3);
            // should style in external CSS  rather than directly
            elem.appendChild(XDOM.create("<div style='color: #615f5f;padding: 1 0 2 0px;'>" + be.getComponent().getData("text") + "</div>"));
          }
        });
      }
    };

    TextField<String> firstName = new TextField<String>();
    firstName.setFieldLabel("Name");
    firstName.setAllowBlank(false);
    firstName.addPlugin(plugin);
    firstName.setData("text", "Enter your fist name");
    simple.add(firstName, formData);

    TextField<String> email = new TextField<String>();
    email.setFieldLabel("Email");
    email.setAllowBlank(false);
    email.addPlugin(plugin);
    email.setData("text", "Enter you email (required)");
    simple.add(email, formData);

    List<Stock> stocks = TestData.getStocks();
    Collections.sort(stocks, new Comparator<Stock>() {
      public int compare(Stock arg0, Stock arg1) {
        return arg0.getName().compareTo(arg1.getName());
      }
    });

    ListStore<Stock> store = new ListStore<Stock>();
    store.add(stocks);

    ComboBox<Stock> combo = new ComboBox<Stock>();
    combo.setFieldLabel("Company");
    combo.setDisplayField("name");
    combo.setTriggerAction(TriggerAction.ALL);
    combo.setStore(store);
    combo.addPlugin(plugin);
    combo.setData("text", "Choose the company");
    simple.add(combo, formData);

    DateField date = new DateField();
    date.setFieldLabel("Birthday");
    date.addPlugin(plugin);
    date.setData("text", "Enter your birthday");
    simple.add(date, formData);

    TimeField time = new TimeField();
    time.setFieldLabel("Time");
    time.addPlugin(plugin);
    time.setData("text", "Enter the time");
    simple.add(time, formData);

    Slider slider = new Slider();
    slider.setMinValue(40);
    slider.setMaxValue(90);
    slider.setValue(60);
    slider.setIncrement(1);
    slider.setMessage("{0} inches tall");
    slider.addPlugin(plugin);
    slider.setData("text", "Select your height");

    final SliderField sf = new SliderField(slider);
    sf.setFieldLabel("Size");
    simple.add(sf, formData);
   
    CheckBox check1 = new CheckBox();
    check1.setBoxLabel("Classical");

    CheckBox check2 = new CheckBox();
    check2.setBoxLabel("Rock");
    check2.setValue(true);

    CheckBox check3 = new CheckBox();
    check3.setBoxLabel("Blues");

    CheckBoxGroup checkGroup = new CheckBoxGroup();
    checkGroup.setFieldLabel("Music");
    checkGroup.add(check1);
    checkGroup.add(check2);
    checkGroup.add(check3);
    checkGroup.addPlugin(plugin);
    checkGroup.setData("text", "Select your favorite music type");
    simple.add(checkGroup, formData);

    Radio radio = new Radio();
    radio.setBoxLabel("Red");
    radio.setValue(true);

    Radio radio2 = new Radio();
    radio2.setBoxLabel("Blue");

    RadioGroup radioGroup = new RadioGroup();
    radioGroup.setFieldLabel("Favorite Color");
    radioGroup.add(radio);
    radioGroup.add(radio2);
    radioGroup.addPlugin(plugin);
    radioGroup.setData("text", "Select your favorite color");
    simple.add(radioGroup, formData);

    Radio radio3 = new Radio();
    radio3.setBoxLabel("Apple");
    radio3.setValue(true);

    Radio radio4 = new Radio();
    radio4.setBoxLabel("Banana");

    RadioGroup radioGroup2 = new RadioGroup();
    radioGroup2.setFieldLabel("Favorite Fruit");
    radioGroup2.add(radio3);
    radioGroup2.add(radio4);
    radioGroup2.addPlugin(plugin);
    radioGroup2.setData("text", "Select you favorite fruit");
    simple.add(radioGroup2, formData);

    TextArea description = new TextArea();
    description.setPreventScrollbars(true);
    description.setFieldLabel("Description");
    simple.add(description, formData);

    Button b = new Button("Submit");
    simple.addButton(b);
    simple.addButton(new Button("Cancel"));

    simple.setButtonAlign(HorizontalAlignment.CENTER);

    FormButtonBinding binding = new FormButtonBinding(simple);
    binding.addButton(b);

    vp.add(simple);
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FormPanel

  @Override
  protected void onRender(Element parent, int index) {
    super.onRender(parent, index);
    setStyleAttribute("margin", "10px");

    FormPanel panel = new FormPanel();
    panel.setFrame(true);
    panel.setHeading("DualListField Example");

    TextField<String> name = new TextField<String>();
    name.setFieldLabel("Name");
    panel.add(name, new FormData("98%"));

    final DualListField<Stock> lists = new DualListField<Stock>();
    lists.setMode(Mode.INSERT);
    lists.setFieldLabel("Stocks");

    ListField<Stock> from = lists.getFromList();
    from.setDisplayField("name");
    ListStore<Stock> store = new ListStore<Stock>();
    store.add(TestData.getShortStocks());
    from.setStore(store);
    ListField<Stock> to = lists.getToList();
    to.setDisplayField("name");
    store = new ListStore<Stock>();
    to.setStore(store);

    panel.add(lists, new FormData("98%"));

    TextField<String> email = new TextField<String>();
    email.setFieldLabel("Email");
    panel.add(email, new FormData("98%"));

    panel.addButton(new Button("Cancel"));
    panel.addButton(new Button("Save"));

    panel.setWidth(550);

    add(panel);

  }
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FormPanel

public class AddPenaltyForm extends AbstractDataForm<PenaltyDto> {

  private static final String ANCHOR_SPEC = "100%";

  public AddPenaltyForm() {
    final FormPanel formPanel = new FormPanel();
    formPanel.setBorders(false);
    formPanel.setBodyBorder(false);
    formPanel.setHeaderVisible(false);
    FormLayout fl_formPanel = new FormLayout();
    fl_formPanel.setLabelWidth(100);
    formPanel.setLayout(fl_formPanel);

    DateField date = new DateField();
    date.setName(PenaltyDto.DATE);
    date.setFieldLabel(messages.date());
    formPanel.add(date, new FormData(ANCHOR_SPEC));

    NumberField amount = createNumberField(messages.amount());
    amount.setName(PenaltyDto.AMOUNT);
    formPanel.add(amount, new FormData(ANCHOR_SPEC));

    TextArea comment = new TextArea();
    comment.setFieldLabel(messages.comment());
    comment.setName(PenaltyDto.COMMENT);
    formPanel.add(comment, new FormData(ANCHOR_SPEC));

    add(formPanel);

    PenaltyDto dataModel = new PenaltyDto();
    dataModel.initData();
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FormPanel

    wordCount.setWidth(100);
    wordCount.setText("0 Words");
    wordCount.setBox(true);
    toolBar.add(wordCount);

    FormPanel form = new FormPanel();
    form.setHeading("Status Toolbar");
    form.setSize(450, 300);
    form.setPadding(5);
   
    form.setBottomComponent(toolBar);
    TextArea textArea = new TextArea();
    textArea.setHideLabel(true);
    textArea.addListener(Events.OnKeyPress, new Listener<FieldEvent>() {

      public void handleEvent(FieldEvent be) {
        status.setBusy("writing...");
        TextArea t = (TextArea) be.getField();
        String value = t.getValue();
        int length = value != null ? value.length() : 0;
        charCount.setText(length + (length == 1 ? " Char" : " Chars"));

        if (value != null) {
          int wc = getWordCount(value);
          wordCount.setText(wc + (wc == 1 ? " Word" : " Words"));
        }

        task.delay(1000);
      }

    });
    form.add(textArea, new FormData("100% 100%"));
    add(form);
  }
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.form.FormPanel

    w.setPlain(true);
    w.setSize(500, 300);
    w.setHeading("Resize Me");
    w.setLayout(new FitLayout());

    FormPanel panel = new FormPanel();
    panel.setBorders(false);
    panel.setBodyBorder(false);
    panel.setLabelWidth(55);
    panel.setPadding(5);
    panel.setHeaderVisible(false);

    TextField<String> field = new TextField<String>();
    field.setFieldLabel("Sent To");
    panel.add(field, new FormData("100%"));

    field = new TextField<String>();
    field.setFieldLabel("Subject");
    panel.add(field, new FormData("100%"));

    HtmlEditor html = new HtmlEditor();
    html.setHideLabel(true);
    panel.add(html, new FormData("100% -53"));

    w.addButton(new Button("Send"));
    w.addButton(new Button("Cancel"));
    w.add(panel);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.