FormLayout layout = new FormLayout(); mParent.setLayout(layout);
composite.setLayout(new FormLayout()); composite.setBackgroundMode(SWT.INHERIT_DEFAULT);
@Override public Component createLayout(DefaultLayoutDefinition definition, Map<String, Component> mappings) { final FormLayout formLayout = new FormLayout(); mappings.values().forEach(formLayout::addComponent); return formLayout; } }
Composite inputs = new Composite(shell, SWT.NONE); inputs.setLayout(new FormLayout()); FormData fd1 = new FormData(); fd1.left = new FormAttachment(0, 0); fd1.right = new FormAttachment(100,0); inputs.setLayoutData(fd1);
private Form createFormField(FormWidgetElement fwe) { FormLayout layout = new FormLayout(); processOrderedLayout(fwe, layout); Form form = new Form(layout); return form; }
@Override protected void addContent(VerticalLayout layout) { if (this.titleComponent != null) layout.addComponent(this.titleComponent); final FormLayout formLayout = new FormLayout(); for (Field<?> field : this.fieldMap.values()) formLayout.addComponent(field); layout.addComponent(formLayout); }
private Component createComponent(VertexRef ref) { final FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false); final BusinessService businessService = businessServiceManager.getBusinessServiceById(((BusinessServiceVertex) ref).getServiceId()); for (Map.Entry<String, String> e : businessService.getAttributes().entrySet()) { formLayout.addComponent(createLabel(e.getKey(), e.getValue())); } return formLayout; }
/** * Refreshes the item detail. * This method is triggered by {@link ItemPreviewComponent#onValueChange(Object)} in case of value changes. */ protected Component refreshItemDetail(T item) { FormLayout itemDetail = new FormLayout(); itemDetail.addStyleName("file-details"); getPropertySet().getProperties() .map(property -> this.createDetailComponent(property.getName(), property.getGetter().apply(item))) .forEach(itemDetail::addComponent); return itemDetail; }
public void view4() { // tag::view4[] PropertyViewForm viewForm = Components.view.form(new FormLayout()).properties(PROPERTIES) // .propertyCaption(DESCRIPTION, "My caption") // <1> .hidePropertyCaption(ID) // <2> .build(); // end::view4[] }
public PropertiesForm() { super(); mainLayout = new FormLayout(); mainLayout.setMargin(true); mainLayout.setSpacing(true); mainLayout.setSizeUndefined(); mainLayout.setWidth(100, Sizeable.UNITS_PERCENTAGE); setLayout(mainLayout); }
public void form3() { // tag::form3[] PropertyInputForm form = Components.input.form(new FormLayout()) // <1> .properties(PROPERTIES).composer((layout, source) -> { // <2> source.getValueComponents().forEach(c -> layout.addComponent(c.getComponent())); }).build(); // end::form3[] }
private void buildLayout() { setSizeUndefined(); formLayout = new FormLayout(); formLayout.addComponent(controllerIDTextField); formLayout.addComponent(nameTextField); formLayout.addComponent(descTextArea); controllerIDTextField.focus(); }
private void buildLayout() { setSizeUndefined(); formLayout = new FormLayout(); formLayout.addComponent(controllerIDTextField); formLayout.addComponent(nameTextField); formLayout.addComponent(descTextArea); controllerIDTextField.focus(); }
public DefaultFormLayoutBuilder() { super(new FormLayout()); getInstance().setSizeUndefined(); getInstance().setMargin(false); getInstance().setSpacing(false); }
private Component createComponent(BusinessServiceEdge ref) { FormLayout formLayout = new FormLayout(); formLayout.setMargin(false); formLayout.setSpacing(false); formLayout.addComponent(createLabel("Map Function", describeMapFunction(ref.getMapFunction()))); formLayout.addComponent(createLabel("Weight", Float.toString(ref.getWeight()))); return formLayout; }
public void form4() { // tag::form4[] PropertyInputForm form = Components.input.form(new FormLayout()).properties(PROPERTIES) // .composer((layout, source) -> { source.getValueComponents().forEach(c -> layout.addComponent(c.getComponent())); }).composeOnAttach(false) // <1> .build(); form.compose(); // <2> // end::form4[] }
public void view3() { // tag::view3[] PropertyViewForm viewForm = Components.view.form(new FormLayout()).properties(PROPERTIES) // .initializer(layout -> layout.setMargin(true)) // <1> .composer((layout, source) -> { // <2> source.getValueComponents().forEach(c -> layout.addComponent(c.getComponent())); }) // .componentConfigurator(DESCRIPTION, cfg -> cfg.styleName("my-style")) // <3> .componentsWidthMode(ComponentsWidthMode.FULL) // <4> .build(); // end::view3[] }
private void buildLayout() { addStyleName("lay-color"); setSizeUndefined(); formLayout = new FormLayout(); formLayout.addComponent(distsetTypeNameComboBox); formLayout.addComponent(distNameTextField); formLayout.addComponent(distVersionTextField); formLayout.addComponent(descTextArea); formLayout.addComponent(reqMigStepCheckbox); setCompositionRoot(formLayout); distNameTextField.focus(); }
private Component createComponent(EdgeRef ref) { FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false); if (ref instanceof AbstractEdge) { AbstractEdge edge = (AbstractEdge) ref; formLayout.addComponent(createLabel("Source", edge.getSource().getVertex().getLabel())); formLayout.addComponent(createLabel("Target", edge.getTarget().getVertex().getLabel())); } return formLayout; }
private Component createComponent(EdgeRef ref) { FormLayout formLayout = new FormLayout(); formLayout.setSpacing(false); formLayout.setMargin(false); if (ref instanceof AbstractEdge) { AbstractEdge edge = (AbstractEdge) ref; formLayout.addComponent(createLabel("Source", edge.getSource().getVertex().getLabel())); formLayout.addComponent(createLabel("Target", edge.getTarget().getVertex().getLabel())); } return formLayout; }