Help us continue to make it better
Usage example:
VisualLabel<String> label= new VisualLabelImpl<String>("label1");
label.setValue("text");
Usage example:
VisualButton button= new VisualButtonImpl("button1", v -> System.out.println("Click"));
Usage example:
VisualCheckbox checkBox= new VisualCheckboxImpl("check1");
checkBox.setValue(true);
Usage example:
VisualTextField<String> textfield= new VisualTextFieldImpl<String>("textfield1");
textfield.setValue("text");
Usage example:
VisualComboBox combobox= new VisualComboBoxImpl<String>("nickname", Arrays.asList("Pelusa", "Burrito", "Bocha", "Bruja"))
Usage example:
VisualPanel panel= new VisualPanelImpl("panel1");
panel.addChild(label);
panel.addChild(button);
panel.addChild(textfield);
Using Builders:
componentBuilder.bindTemplate("givenName").as(VisualTextField.class).toProperty(Person::getGivenName, Person::setGivenName).build();
Using Pectin:
VisualTextFieldImpl<String> textField= new VisualTextFieldImpl<String>("name");
AbstractBeanModelProvider<Person> modelProvider= new ReflectionBeanModelProvider<Person>(Person.class);
FieldModel<String> nameFieldModel= new FormModel().fieldOfType(String.class).boundTo(modelProvider, "name");
FormBinder binder= new FormBinder();
binder.bind(nameFieldModel).to(textField);
Using Builders:
componentBuilder.bindTemplate("nickname").to(new VisualComboBoxImpl<String>("nickname", Arrays.asList("Pelusa", "Burrito", "Bocha", "Bruja"))).toProperty(Person::getNickname, Person::setNickname).build();
Using ModelBinder:
VisualTextField<Integer> ageTextField= new VisualTextFieldImpl<Integer>("age");
binder.bindFormattedMemberToValueHolder("age", ageTextField, Integer.class, new AgeFormat());
As Dragome Form Bindings is based on GWT Pectin Project GWT Pectin, you can use a lot of its great features.
For more info Take a look at: GuideBindingToBeans