Package org.apache.cayenne.pref

Examples of org.apache.cayenne.pref.Domain


            view.getDockButton().setText("Dock");
           
            if (logWindow == null) {
                logWindow = new LogConsoleWindow(this);
           
                Domain prefDomain = getDomain();
                ComponentGeometry geometry = ComponentGeometry.getPreference(prefDomain);
                geometry.bind(logWindow, 600, 300, 0);
            }
           
            logWindow.setContentPane(view);
View Full Code Here


        return view;
    }

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

        this.autoLoadProjectPreference = editor.editableInstance(getApplication().getPreferenceDomain())
                .getDetail(AUTO_LOAD_PROJECT_PREFERENCE, true);
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

        generator.addEntities(entities);
        generator.addEmbeddables(getParentController().getSelectedEmbeddables());
        generator.addQueries(getParentController().getDataMap().getQueries());

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

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

        /**
         * Moving this to try-catch block per CAY-940.
         * Exception will be stack-traced 
         */
        try {
            Domain domain = Application.getInstance().getPreferenceDomain().getSubdomain(
                this.getClass());
            ComponentGeometry geometry = (ComponentGeometry) domain.getDetail(
                "splitPane.divider",
                ComponentGeometry.class,
                true);
            geometry.bindIntProperty(splitPane, JSplitPane.DIVIDER_LOCATION_PROPERTY, 400);
        }
View Full Code Here

    @SuppressWarnings("unchecked")
    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

     */
    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;
        }
       
        if (p.getMainFile().exists() && !p.getMainFile().canWrite()) {
            JOptionPane.showMessageDialog(Application.getFrame(),
                    "Can't save project - unable to write to file \"" + p.getMainFile().getPath() + "\"",
                    "Can't Save Project", JOptionPane.OK_OPTION);
            return false;
        }
       
        getProjectController().getProjectWatcher().pauseWatching();
       
        p.save();

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

        getApplication().getFrameController().addToLastProjListAction(
                p.getMainFile().getAbsolutePath());
        Application.getFrame().fireRecentFileListChanged();

View Full Code Here

                Transferable transferable = dtde.getTransferable();
                dtde.dropComplete(processDropAction(transferable));
            }
        });

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

        /**
         * Moving this to try-catch block per CAY-940. Exception will be stack-traced
         */
        try {
            Domain domain = eventController
                    .getApplicationPreferenceDomain()
                    .getSubdomain(this.getClass());
            ComponentGeometry geometry = (ComponentGeometry) domain.getDetail(
                    "splitPane.divider",
                    ComponentGeometry.class,
                    true);

            geometry
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.