use of org.apache.cayenne.swing.BindingBuilder in project cayenne by apache.
the class DBConnectionInfoEditor method initBindings.
protected void initBindings() {
this.view.setEnabled(false);
DefaultComboBoxModel adapterModel = new DefaultComboBoxModel(DbAdapterInfo.getStandardAdapters());
view.getAdapters().setModel(adapterModel);
view.getAdapters().setSelectedIndex(0);
BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), this);
bindings = new ObjectBinding[5];
bindings[0] = builder.bindToTextField(view.getUserName(), "connectionInfo.userName");
bindings[1] = builder.bindToTextField(view.getPassword(), "connectionInfo.password");
bindings[2] = builder.bindToTextField(view.getDriver(), "connectionInfo.jdbcDriver");
bindings[3] = builder.bindToTextField(view.getUrl(), "connectionInfo.url");
bindings[4] = builder.bindToComboSelection(view.getAdapters(), "connectionInfo.dbAdapter", "Automatic");
}
use of org.apache.cayenne.swing.BindingBuilder in project cayenne by apache.
the class DataSourceDuplicator method initBindings.
protected void initBindings() {
BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), this);
builder.bindToAction(view.getCancelButton(), "cancelAction()");
builder.bindToAction(view.getOkButton(), "okAction()");
}
use of org.apache.cayenne.swing.BindingBuilder in project cayenne by apache.
the class TemplatePreferences method initBindings.
protected void initBindings() {
BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), this);
builder.bindToAction(view.getAddButton(), "addTemplateAction()");
builder.bindToAction(view.getRemoveButton(), "removeTemplateAction()");
TableBindingBuilder tableBuilder = new TableBindingBuilder(builder);
tableBuilder.addColumn("Name", "#item.key", String.class, false, "XXXXXXXXXXXXXXX");
tableBuilder.addColumn("Path", "#item.path", String.class, false, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
tableBuilder.bindToTable(view.getTable(), "templateEntries").updateView();
}
use of org.apache.cayenne.swing.BindingBuilder in project cayenne by apache.
the class ValidationResultBrowser method initController.
protected void initController() {
BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), this);
builder.bindToAction(view.getCloseButton(), "closeDialogAction()");
}
Aggregations