Package org.apache.cayenne.pref

Examples of org.apache.cayenne.pref.Domain


        DataDomain domain = projectController.getCurrentDataDomain();

        DataDomain matchingDomain = configuration.getDomain(newName);

        if (matchingDomain == null) {
            Domain prefs = projectController.getPreferenceDomainForDataDomain();

            DomainEvent e = new DomainEvent(this, domain, domain.getName());
            ProjectUtil.setDataDomainName(configuration, domain, newName);
            prefs.rename(newName);
            projectController.fireDomainEvent(e);
        }
        else if (matchingDomain != domain) {
            throw new ValidationException("There is another DataDomain named '"
                    + newName
View Full Code Here


        return view;
    }

    protected void initBindings() {
        // init model objects
        Domain classGeneratorDomain = editor.editableInstance(getApplication()
                .getPreferenceDomain()).getSubdomain(DefaultClassGenerator.class);
        this.classGeneratorPreferences = classGeneratorDomain
                .getDetail(ENCODING_PREFERENCE, true);

        // build child controllers...
        EncodingSelector encodingSelector = new EncodingSelector(this, view
                .getEncodingSelector());
View Full Code Here

    public Component getView() {
        return view;
    }

    protected Domain getTemplateDomain() {
        Domain domain = CodeTemplateManager.getTemplateDomain(getApplication());
        return editor.editableInstance(domain);
    }
View Full Code Here

     */
    protected boolean saveAll() throws Exception {
        Project p = getCurrentProject();

        // obtain preference object before save, when the project path may change.....
        Domain preference = getProjectController().getPreferenceDomainForProject();

        if (!chooseDestination(p)) {
            return false;
        }

        p.save();

        // update preferences domain key
        preference.rename(p.getMainFile().getAbsolutePath());

        getApplication().getFrameController().addToLastProjListAction(
                p.getMainFile().getAbsolutePath());
        return true;
    }
View Full Code Here

                ((ExitAction) getApplication().getAction(ExitAction.getActionName()))
                        .exit();
            }
        });

        Domain prefDomain = application.getPreferenceDomain().getSubdomain(
                frame.getClass());
        ComponentGeometry geometry = ComponentGeometry.getPreference(prefDomain);
        geometry.bind(frame, 650, 550, 30);
    }
View Full Code Here

        DataDomain domain = projectController.getCurrentDataDomain();

        DataDomain matchingDomain = configuration.getDomain(newName);

        if (matchingDomain == null) {
            Domain prefs = projectController.getPreferenceDomainForDataDomain();

            DomainEvent e = new DomainEvent(this, domain, domain.getName());
            ProjectUtil.setDataDomainName(configuration, domain, newName);
            prefs.rename(newName);
            projectController.fireDomainEvent(e);
        }
        else if (matchingDomain != domain) {
            throw new ValidationException("There is another DataDomain named '"
                    + newName
View Full Code Here

     */
    public void initClassLoader() {
        final FileClassLoadingService classLoader = new FileClassLoadingService();

        // init from preferences...
        Domain classLoaderDomain = getPreferenceDomain().getSubdomain(
                FileClassLoadingService.class);

        Collection details = classLoaderDomain.getPreferences();
        if (details.size() > 0) {

            // transform preference to file...
            Transformer transformer = new Transformer() {

View Full Code Here

        eventController.addObjEntityDisplayListener(this);
        eventController.addDbEntityDisplayListener(this);
        eventController.addProcedureDisplayListener(this);
        eventController.addQueryDisplayListener(this);

        Domain domain = eventController.getApplicationPreferenceDomain().getSubdomain(
                this.getClass());
        ComponentGeometry geometry = (ComponentGeometry) domain.getDetail(
                "splitPane.divider",
                ComponentGeometry.class,
                true);

        geometry.bindIntProperty(splitPane, JSplitPane.DIVIDER_LOCATION_PROPERTY, 150);
View Full Code Here

        DefaultClassGenerator generator = new DefaultClassGenerator(getParentController()
                .getDataMap(), getParentController().getSelectedEntities());

        // configure encoding from preferences
        Domain generatorPrefs = Application
                .getInstance()
                .getPreferenceDomain()
                .getSubdomain(DefaultClassGenerator.class);

        PreferenceDetail detail = generatorPrefs.getDetail(
                GeneralPreferences.ENCODING_PREFERENCE,
                false);
        if (detail != null) {
            generator.setEncoding(detail
                    .getProperty(GeneralPreferences.ENCODING_PREFERENCE));
View Full Code Here

        DataDomain domain = projectController.getCurrentDataDomain();

        DataDomain matchingDomain = configuration.getDomain(newName);

        if (matchingDomain == null) {
            Domain prefs = projectController.getPreferenceDomainForDataDomain();

            DomainEvent e = new DomainEvent(this, domain, domain.getName());
            ProjectUtil.setDataDomainName(configuration, domain, newName);
            prefs.rename(newName);
            projectController.fireDomainEvent(e);
        }
        else if (matchingDomain != domain) {
            throw new ValidationException("There is another DataDomain named '"
                    + newName
View Full Code Here

TOP

Related Classes of org.apache.cayenne.pref.Domain

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.