Examples of FieldSet


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

    LayoutContainer lc = new LayoutContainer();
    VBoxLayout vLayout = new VBoxLayout();
    vLayout.setVBoxLayoutAlign(VBoxLayoutAlign.STRETCH);
    lc.setLayout(vLayout);

    FieldSet controls = new FieldSet();
    controls.setHeading("Controls");
    FormLayout fl = new FormLayout();
    fl.setLabelWidth(125);
    controls.setLayout(fl);

    Slider segments = new Slider();
    segments.setMaxValue(12);
    segments.setMinValue(1);
    segments.setIncrement(1);
    segments.setValue(numSegments);
    segments.addListener(Events.Change, new Listener<SliderEvent>() {
      public void handleEvent(SliderEvent be) {
        numSegments = be.getNewValue();
        adjustUpdateSpeed(updateSpeed);
      }
    });
    SliderField segFld = new SliderField(segments);
    segFld.setFieldLabel("Segments (#)");
    controls.add(segFld);

    final Slider update = new Slider() {
      @Override
      protected String onFormatValue(int value) {
        if (value == 0) return "Off";
        return super.onFormatValue(value);
      }
    };
    update.setMinValue(0);
    update.setMaxValue(3000);
    update.setIncrement(100);
    update.setValue(updateSpeed);
    update.setMessage("{0}ms");
    update.addListener(Events.Change, new Listener<SliderEvent>() {
      public void handleEvent(SliderEvent se) {
        adjustUpdateSpeed(se.getNewValue());
      }
    });
    SliderField updFld = new SliderField(update);
    updFld.setFieldLabel("Update Interval (ms)");
    controls.add(updFld);

    lc.add(controls);

    FieldSet gallery = new FieldSet();
    gallery.setHeading("Gallery");
    gallery.setLayout(new FitLayout());

    ListStore<GalleryChartModel> store = new ListStore<GalleryChartModel>();
    store.add(new GalleryChartModel("Area", "area.gif", new AreaChartExample()));
    store.add(new GalleryChartModel("Pie", "pie.gif", new PieChartExample()));
    store.add(new GalleryChartModel("Filled Bar", "filled.gif", new FilledBarChartExample()));
    store.add(new GalleryChartModel("Bar - Glass", "barglass.gif", new BarGlassChartExample()));
    store.add(new GalleryChartModel("Bar - 3D", "bar3d.gif", new Bar3DChartExample()));
    store.add(new GalleryChartModel("Radar", "radar.gif", new RadarChartExample()));
    store.add(new GalleryChartModel("Horizontal Bar", "horizontalbar.gif", new HorizontalChartExample()));
    store.add(new GalleryChartModel("Cylinder", "cylinder.gif", new CylinderChartExample()));
    store.add(new GalleryChartModel("Sketch Bar", "sketchbar.gif", new SketchChartExample()));

    ListView<GalleryChartModel> view = new ListView<GalleryChartModel>() {
      @Override
      protected GalleryChartModel prepareData(GalleryChartModel model) {
        String s = model.get("name");
        model.set("shortName", Format.ellipse(s, 15));
        return model;
      }

    };
    view.setId("img-chooser-view");
    view.setTemplate(getTemplate(!Examples.isExplorer() ? "../../" : ""));
    view.setStore(store);
    view.setItemSelector("div.thumb-wrap");
    view.getSelectionModel().select(0, false);
    view.getSelectionModel().addListener(Events.SelectionChange,
        new Listener<SelectionChangedEvent<GalleryChartModel>>() {

          public void handleEvent(SelectionChangedEvent<GalleryChartModel> be) {
            example = be.getSelectedItem().getExample();
            adjustUpdateSpeed(updateSpeed);
          }

        });
    gallery.add(view, new FitData(0, 0, 20, 0));

    VBoxLayoutData vFlex = new VBoxLayoutData();
    vFlex.setFlex(1);
    lc.add(gallery, vFlex);
    return lc;
View Full Code Here

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

    lc.add(gallery, vFlex);
    return lc;
  }

  private LayoutContainer getChart() {
    FieldSet fs = new FieldSet();
    fs.setHeading("Chart");
    fs.setLayout(new FitLayout());

    String url = !Examples.isExplorer() ? "../../" : "";
    url += "gxt/chart/open-flash-chart.swf";

    final Chart chart = new Chart(url);
    chart.setBorders(true);
    fs.add(chart, new FitData(0, 0, 20, 0));
    updateCmd = new Command() {
      public void execute() {
        chart.setChartModel(example.getChartModel(numSegments));
      }
    };
View Full Code Here

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

                ctn = new LayoutContainer(new FitLayout());
                tab.add(ctn);
                htmlPreview = new LayoutContainer();
                htmlPreview.addStyleName(cssWrapper);
                htmlPreview.setStyleAttribute("background-color", "white");
                FieldSet f = new FieldSet();
                f.addStyleName("x-panel");
                f.setHeading(Messages.get("label.preview", "Preview"));
                f.setScrollMode(Style.Scroll.AUTO);
                f.add(htmlPreview);
                tab.add(f);
            }

            ctn.add(propertiesEditor);
        } else {
View Full Code Here

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

    private void attachManualListOrderingEditor(NodeHolder engine, AsyncTabItem tab, final PropertiesEditor propertiesEditor) {
        manualListOrderingEditor = new ManualListOrderingEditor(engine.getNode());
        useManualRanking = new CheckBox();

        // create a field set for the manual ranking
        final FieldSet fieldSet = new FieldSet();
        fieldSet.setCollapsible(true);
        fieldSet.setHeading(Messages.get("label.manualRanking", "Manual ranking"));
        useManualRanking.setBoxLabel(Messages.get("label.useManualRanking", "Use manual ranking"));

        useManualRanking.addListener(Events.Change, new Listener<ComponentEvent>() {
            public void handleEvent(ComponentEvent componentEvent) {
                if (useManualRanking.getValue()) {
                    propertiesEditor.getRemovedTypes().add(JMIX_ORDERED_LIST);
                    propertiesEditor.getAddedTypes().remove(JMIX_ORDERED_LIST);
                } else {
                    propertiesEditor.getRemovedTypes().remove(JMIX_ORDERED_LIST);
                    propertiesEditor.getAddedTypes().add(JMIX_ORDERED_LIST);
                }

                // update form components
                for (FieldSet component : propertiesEditor.getOrderingListFieldSet()) {
                    if (useManualRanking.getValue()) {
                        component.setData("addedField", null);
                        component.setEnabled(false);
                        component.collapse();
                    } else {
                        component.setData("addedField", "true");
                        component.setEnabled(true);
                        component.expand();
                    }
                }
                manualListOrderingEditor.setEnabled(useManualRanking.getValue());
                if (useManualRanking.getValue()) {
                    manualListOrderingEditor.expand();
                } else {
                    manualListOrderingEditor.collapse();
                }
            }
        });


        // update form components
        boolean isManual = !propertiesEditor.getNodeTypes().contains(new GWTJahiaNodeType(JMIX_ORDERED_LIST));
        for (FieldSet component : propertiesEditor.getOrderingListFieldSet()) {
            component.setEnabled(!isManual);
            if (isManual) {
                component.collapse();
            }
        }
        useManualRanking.setValue(isManual);
        manualListOrderingEditor.setEnabled(isManual);
        if (!isManual) {
            manualListOrderingEditor.collapse();
        }

        fieldSet.add(useManualRanking);
        fieldSet.add(manualListOrderingEditor);
        tab.add(fieldSet);
    }
View Full Code Here

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

        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

Examples of com.sencha.gxt.widget.core.client.form.FieldSet

    desc=new TextArea();
   
    FlowLayoutContainer centerContainer=new FlowLayoutContainer();
    centerContainer.setScrollMode(ScrollMode.AUTOY);
   
    FieldSet one=new FieldSet();
    one.setHeadingText("基本信息");
    VerticalLayoutContainer p1 = new VerticalLayoutContainer();
    p1.add(new FieldLabel(name, "名称"),new VerticalLayoutContainer.VerticalLayoutData(1, 1));
    p1.add(new FieldLabel(desc, "描述"),new VerticalLayoutContainer.VerticalLayoutData(1, 1));
    one.add(p1);
   
    centerContainer.add(one,new MarginData(5));
   
    final FieldSet two=new FieldSet();
    two.setHeadingText("配置项信息");
    configs=new TextArea();
    configs.setResizable(TextAreaInputCell.Resizable.BOTH);
    configs.addValidator(FormatUtil.propValidator);
    configs.setWidth(800);
    configs.setHeight(150);
    two.add(configs);
   
    centerContainer.add(two,new MarginData(5));
   
    final FieldSet three=new FieldSet();
    three.setHeadingText("资源信息");
    resources=new TextArea();
    resources.setResizable(Resizable.BOTH);
    resources.setWidth(800);
    resources.setHeight(150);
    resources.addValidator(FormatUtil.resourceValidator);
    three.add(resources);
    centerContainer.add(three,new MarginData(5));
   
    setCenter(centerContainer);
   
    addButton(new TextButton("返回", new SelectHandler() {
View Full Code Here

Examples of eu.stratosphere.api.common.operators.util.FieldSet

   */
  protected SingleInputNode(SingleInputOperator<?, ?, ?> pactContract) {
    super(pactContract);
   
    int[] k = pactContract.getKeyColumns(0);
    this.keys = k == null || k.length == 0 ? null : new FieldSet(k);
  }
View Full Code Here

Examples of javango.contrib.admin.FieldSet

  public HttpResponse add(HttpRequest request, String model) throws HttpException {   
    return change(request, model, null);
  }
 
  protected String[] getIncludeFields(Class pc) {
    FieldSet fieldSet = (FieldSet)pc.getAnnotation(FieldSet.class);
    if (fieldSet != null) {
      return fieldSet.fields();
    }
   
    return null;

  }
View Full Code Here

Examples of net.lalotech.struts2.map.components.Fieldset

*/
public class FieldsetTag extends AbstractUITag{      

    @Override
    public Component getBean(ValueStack vs, HttpServletRequest hsr, HttpServletResponse hsr1) {
        return new Fieldset(vs, hsr, hsr1);
    }
View Full Code Here

Examples of org.apache.click.control.FieldSet

        //-------
        // Form 2
        form2.setColumns(2);

        FieldSet fieldSet = new FieldSet("fieldSet", "FieldSet");
        form2.add(fieldSet);

        // Row 1
        fieldSet.add(new TextField("name"));
        fieldSet.add(new TextField("type"));

        // Row 2
        fieldSet.add(new TextArea("description", 39, 3), 2);

        // Row 3
        fieldSet.add(new EmailField("email"), 2);

        // Row 4
        fieldSet.add(new TelephoneField("telephone"));

        fieldSet.add(new Submit("ok", " OK "));
        fieldSet.add(new PageSubmit("cancel", HomePage.class));
    }
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.