Package org.apache.cayenne.swing

Examples of org.apache.cayenne.swing.BindingBuilder


        view.setVisible(true);

    }

    protected void initBindings() {
        BindingBuilder builder = new BindingBuilder(
                getApplication().getBindingFactory(),
                this);

        builder.bindToAction(view.getCancelButton(), "cancelAction()");
        builder.bindToAction(view.getGenerateButton(), "generateAction()");
        builder.bindToAction(this, "entitySelectedAction()", SELECTED_PROPERTY);
        builder.bindToAction(view.getStrategyCombo(), "strategyComboAction()");
    }
View Full Code Here


        DefaultComboBoxModel adapterModel = new DefaultComboBoxModel(DbAdapterInfo
                .getStandardAdapters());
        view.getAdapters().setModel(adapterModel);
        view.getAdapters().setSelectedIndex(0);

        BindingBuilder builder = new BindingBuilder(
                getApplication().getBindingFactory(),
                this);

        bindings = new ObjectBinding[5];

        bindings[0] = builder.bindToTextField(
                view.getUserName(),
                "connectionInfo.userName");
        bindings[1] = builder.bindToTextField(
                view.getPassword(),
                "connectionInfo.password");
        bindings[2] = builder.bindToTextField(
                view.getDriver(),
                "connectionInfo.jdbcDriver");
        bindings[3] = builder.bindToTextField(view.getUrl(), "connectionInfo.url");

        bindings[4] = builder.bindToComboSelection(
                view.getAdapters(),
                "connectionInfo.dbAdapter", "Automatic");
    }
View Full Code Here

    public GeneratorController(CodeGeneratorControllerBase parent) {
        super(parent);

        createDefaults();
        createView();
        initBindings(new BindingBuilder(getApplication().getBindingFactory(), this));
    }
View Full Code Here

        return view;
    }

    protected void initBindings() {

        BindingBuilder builder = new BindingBuilder(
                getApplication().getBindingFactory(),
                this);
        builder.bindToAction(view.getCheckAll(), "checkAllAction()");

        TableBindingBuilder tableBuilder = new TableBindingBuilder(builder);

        tableBuilder.addColumn(
                "",
View Full Code Here

    }

    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();
    }
View Full Code Here

        view.getEncodingChoices().setModel(new DefaultComboBoxModel(allEncodings));
        view.getDefaultEncodingLabel().setText("Default (" + systemEncoding + ")");
        view.getDefaultEncoding().setSelected(true);

        // create bindings...
        BindingBuilder builder = new BindingBuilder(
                getApplication().getBindingFactory(),
                this);

        this.defaultEncodingBinding = builder
                .bindToStateChange(view.getDefaultEncoding(), "defaultEncoding");

        this.otherEncodingBinding = builder.bindToStateChange(view.getOtherEncoding(),
                "otherEncoding");

        this.selectedEncodingBinding = builder.bindToComboSelection(view
                .getEncodingChoices(), "encoding");
    }
View Full Code Here

                CodeTemplateManager.class,
                CodeTemplateManager.NODE_NAME);
    }

    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",
View Full Code Here

    public Component getView() {
        return view;
    }

    protected void initBindings() {
        BindingBuilder builder = new BindingBuilder(
                getApplication().getBindingFactory(),
                this);
        builder.bindToAction(view.getCancelButton(), "cancelAction()");
        builder.bindToAction(view.getOkButton(), "okAction()");
    }
View Full Code Here

        return view;
    }

    protected void initBindings() {

        BindingBuilder builder = new BindingBuilder(
                getApplication().getBindingFactory(),
                this);

        builder.bindToAction(view.getCheckAll(), "checkAllAction()");

        TableBindingBuilder tableBuilder = new TableBindingBuilder(builder);
       
        tableBuilder.addColumn(
                "",
View Full Code Here

        return path;
    }

    protected void initBindings() {
        BindingBuilder builder = new BindingBuilder(
                getApplication().getBindingFactory(),
                this);

        builder.bindToAction(view.getCancelButton(), "cancelAction()");
        builder.bindToAction(view.getOkButton(), "okAction()");

        final FSPath path = getLastTemplateDirectory();
        view.getTemplateChooser().setCurrentDirectory(path.getExistingDirectory(false));
        view.getTemplateChooser().addPropertyChangeListener(
                FileChooser.CURRENT_DIRECTORY_PROPERTY,
View Full Code Here

TOP

Related Classes of org.apache.cayenne.swing.BindingBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.