use of org.apache.cayenne.swing.BindingBuilder 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.BindingBuilder in project cayenne by apache.
the class ClientModeController method createView.
protected GeneratorControllerPanel createView() {
this.view = new StandardModePanel();
Set<Entry<DataMap, DataMapDefaults>> entities = getMapPreferences().entrySet();
for (Entry<DataMap, DataMapDefaults> entry : entities) {
StandardPanelComponent dataMapLine = createDataMapLineBy(entry.getKey(), entry.getValue());
dataMapLine.getDataMapName().setText(dataMapLine.getDataMap().getName());
BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), dataMapLine);
builder.bindToTextField(dataMapLine.getSuperclassPackage(), "preferences.superclassPackage").updateView();
this.view.addDataMapLine(dataMapLine);
}
return view;
}
use of org.apache.cayenne.swing.BindingBuilder in project cayenne by apache.
the class CodeGeneratorController method initBindings.
protected void initBindings() {
BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), this);
builder.bindToAction(view.getCancelButton(), "cancelAction()");
builder.bindToAction(view.getGenerateButton(), "generateAction()");
builder.bindToAction(this, "classesSelectedAction()", SELECTED_PROPERTY);
builder.bindToAction(generatorSelector, "generatorSelectedAction()", GeneratorTabController.GENERATOR_PROPERTY);
generatorSelectedAction();
}
use of org.apache.cayenne.swing.BindingBuilder in project cayenne by apache.
the class CustomModeController method createView.
protected GeneratorControllerPanel createView() {
this.view = new CustomModePanel();
Set<Entry<DataMap, DataMapDefaults>> entities = getMapPreferences().entrySet();
for (Entry<DataMap, DataMapDefaults> entry : entities) {
StandardPanelComponent dataMapLine = createDataMapLineBy(entry.getKey(), entry.getValue());
dataMapLine.getDataMapName().setText(dataMapLine.getDataMap().getName());
BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), dataMapLine);
builder.bindToTextField(dataMapLine.getSuperclassPackage(), "preferences.superclassPackage").updateView();
this.view.addDataMapLine(dataMapLine);
}
return view;
}
use of org.apache.cayenne.swing.BindingBuilder in project cayenne by apache.
the class StandardModeController method createView.
protected GeneratorControllerPanel createView() {
this.view = new StandardModePanel();
Set<Entry<DataMap, DataMapDefaults>> entities = getMapPreferences().entrySet();
for (Entry<DataMap, DataMapDefaults> entry : entities) {
StandardPanelComponent dataMapLine = createDataMapLineBy(entry.getKey(), entry.getValue());
dataMapLine.getDataMapName().setText(dataMapLine.getDataMap().getName());
BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), dataMapLine);
builder.bindToTextField(dataMapLine.getSuperclassPackage(), "preferences.superclassPackage").updateView();
this.view.addDataMapLine(dataMapLine);
}
return view;
}
Aggregations