use of org.apache.cayenne.swing.TableBindingBuilder in project cayenne by apache.
the class InferRelationshipsTabController method initBindings.
protected void initBindings() {
BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), this);
builder.bindToAction(view.getCheckAll(), "checkAllAction()");
TableBindingBuilder tableBuilder = new TableBindingBuilder(builder);
tableBuilder.addColumn("", "parent.setCurrentEntity(#item), selected", Boolean.class, true, Boolean.TRUE);
tableBuilder.addColumn("Source", "#item.getSource().getName()", String.class, false, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
tableBuilder.addColumn("Target", "#item.getTarget().getName()", String.class, false, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
tableBuilder.addColumn("Join", "parent.getJoin(#item)", String.class, false, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
tableBuilder.addColumn("Name", "#item.getName()", String.class, false, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
tableBuilder.addColumn("To Many", "parent.getToMany(#item)", String.class, false, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
this.tableBinding = tableBuilder.bindToTable(view.getTable(), "parent.entities");
}
use of org.apache.cayenne.swing.TableBindingBuilder in project cayenne by apache.
the class ClassesTabController method initBindings.
protected void initBindings() {
BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), this);
builder.bindToAction(view.getCheckAll(), "checkAllAction()");
TableBindingBuilder tableBuilder = new TableBindingBuilder(builder);
tableBuilder.addColumn("", "parent.setCurrentClass(#item), selected", Boolean.class, true, Boolean.TRUE);
tableBuilder.addColumn("Class", "parent.getItemName(#item)", JLabel.class, false, "XXXXXXXXXXXXXX");
tableBuilder.addColumn("Comments, Warnings", "parent.getProblem(#item)", String.class, false, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
this.tableBinding = tableBuilder.bindToTable(view.getTable(), "parent.classes");
view.getTable().getColumnModel().getColumn(1).setCellRenderer(new ImageRendererColumn());
}
use of org.apache.cayenne.swing.TableBindingBuilder in project cayenne by apache.
the class TableSelectorController method initController.
// ------ other stuff ------
protected void initController() {
BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), this);
builder.bindToAction(view.getCheckAll(), "checkAllAction()");
TableBindingBuilder tableBuilder = new TableBindingBuilder(builder);
tableBuilder.addColumn("", "setTable(#item), included", Boolean.class, true, Boolean.TRUE);
tableBuilder.addColumn("Table", "#item.name", String.class, false, "XXXXXXXXXXXXXXXX");
tableBuilder.addColumn("Problems", "setTable(#item), problem", String.class, false, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
this.tableBinding = tableBuilder.bindToTable(view.getTables(), "tables");
}
use of org.apache.cayenne.swing.TableBindingBuilder 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();
}
Aggregations