Search in sources :

Example 1 with CayenneProjectPreferences

use of org.apache.cayenne.pref.CayenneProjectPreferences in project cayenne by apache.

the class GeneratorTabController method initBindings.

protected void initBindings() {
    // bind actions
    BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), this);
    builder.bindToAction(view.getGenerationMode(), "updateModeAction()");
    CayenneProjectPreferences cayPrPref = application.getCayenneProjectPreferences();
    this.preferences = (PreferenceDetail) cayPrPref.getProjectDetailObject(PreferenceDetail.class, getViewPreferences().node("controller"));
    if (Util.isEmptyString(preferences.getProperty("mode"))) {
        preferences.setProperty("mode", STANDARD_OBJECTS_MODE);
    }
    builder.bindToComboSelection(view.getGenerationMode(), "preferences.property['mode']").updateView();
    updateModeAction();
}
Also used : BindingBuilder(org.apache.cayenne.swing.BindingBuilder) CayenneProjectPreferences(org.apache.cayenne.pref.CayenneProjectPreferences)

Aggregations

CayenneProjectPreferences (org.apache.cayenne.pref.CayenneProjectPreferences)1 BindingBuilder (org.apache.cayenne.swing.BindingBuilder)1