Search in sources :

Example 31 with BindingBuilder

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();
}
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)31 DefaultComboBoxModel (javax.swing.DefaultComboBoxModel)4 TableBindingBuilder (org.apache.cayenne.swing.TableBindingBuilder)4 ComponentAdapter (java.awt.event.ComponentAdapter)3 ComponentEvent (java.awt.event.ComponentEvent)3 Entry (java.util.Map.Entry)3 DataMap (org.apache.cayenne.map.DataMap)3 ProjectController (org.apache.cayenne.modeler.ProjectController)3 DataMapDefaults (org.apache.cayenne.modeler.pref.DataMapDefaults)3 ChangeEvent (javax.swing.event.ChangeEvent)2 ChangeListener (javax.swing.event.ChangeListener)2 DataNodeDisplayEvent (org.apache.cayenne.modeler.event.DataNodeDisplayEvent)2 DataNodeDisplayListener (org.apache.cayenne.modeler.event.DataNodeDisplayListener)2 CardLayout (java.awt.CardLayout)1 Component (java.awt.Component)1 KeyEvent (java.awt.event.KeyEvent)1 KeyListener (java.awt.event.KeyListener)1 File (java.io.File)1 Iterator (java.util.Iterator)1 Vector (java.util.Vector)1