org.uqbar.arena.tests.nestedCombos.EditProvinceDialog Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of arena-examples Show documentation
Show all versions of arena-examples Show documentation
Ejemplos básicos y tests del framework Arena
The newest version!
package org.uqbar.arena.tests.nestedCombos;
import org.uqbar.arena.aop.windows.TransactionalDialog;
import org.uqbar.arena.widgets.Button;
import org.uqbar.arena.widgets.Panel;
import org.uqbar.arena.widgets.TextBox;
import org.uqbar.arena.windows.WindowOwner;
public class EditProvinceDialog extends TransactionalDialog {
public EditProvinceDialog(WindowOwner owner, Province model) {
super(owner, model);
}
@Override
protected void createFormPanel(Panel mainPanel) {
new TextBox(mainPanel).bindValueToProperty("name");
}
@Override
protected void addActions(Panel actionsPanel) {
new Button(actionsPanel)
.setCaption("Accept")
.onClick(() -> this.accept())
.setAsDefault()
.disableOnError();
new Button(actionsPanel).setCaption("Cancel").onClick(() -> this.cancel());
}
}