Search in sources :

Example 1 with TableBindingBuilder

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");
}
Also used : BindingBuilder(org.apache.cayenne.swing.BindingBuilder) TableBindingBuilder(org.apache.cayenne.swing.TableBindingBuilder) TableBindingBuilder(org.apache.cayenne.swing.TableBindingBuilder)

Example 2 with TableBindingBuilder

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());
}
Also used : BindingBuilder(org.apache.cayenne.swing.BindingBuilder) TableBindingBuilder(org.apache.cayenne.swing.TableBindingBuilder) TableBindingBuilder(org.apache.cayenne.swing.TableBindingBuilder) ImageRendererColumn(org.apache.cayenne.swing.ImageRendererColumn)

Example 3 with TableBindingBuilder

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");
}
Also used : BindingBuilder(org.apache.cayenne.swing.BindingBuilder) TableBindingBuilder(org.apache.cayenne.swing.TableBindingBuilder) TableBindingBuilder(org.apache.cayenne.swing.TableBindingBuilder)

Example 4 with TableBindingBuilder

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();
}
Also used : BindingBuilder(org.apache.cayenne.swing.BindingBuilder) TableBindingBuilder(org.apache.cayenne.swing.TableBindingBuilder) TableBindingBuilder(org.apache.cayenne.swing.TableBindingBuilder)

Aggregations

BindingBuilder (org.apache.cayenne.swing.BindingBuilder)4 TableBindingBuilder (org.apache.cayenne.swing.TableBindingBuilder)4 ImageRendererColumn (org.apache.cayenne.swing.ImageRendererColumn)1