Examples of FSPath


Examples of org.apache.cayenne.modeler.pref.FSPath

    }

    public FSPath getLastEOModelDirectory() {
        // find start directory in preferences

        FSPath path = (FSPath) application
                .getCayenneProjectPreferences()
                .getProjectDetailObject(
                        FSPath.class,
                        getViewPreferences().node("lastEOMDir"));

        if (path.getPath() == null) {
            path.setPath(getLastDirectory().getPath());
        }

        return path;
    }
View Full Code Here

Examples of org.apache.cayenne.modeler.pref.FSPath

        int status = fileChooser.showOpenDialog(Application.getFrame());

        if (status == JFileChooser.APPROVE_OPTION) {

            // save preferences
            FSPath lastDir = getApplication()
                    .getFrameController()
                    .getLastEOModelDirectory();
            lastDir.updateFromChooser(fileChooser);

            File file = fileChooser.getSelectedFile();
            if (file.isFile()) {
                file = file.getParentFile();
            }
View Full Code Here

Examples of org.apache.cayenne.modeler.pref.FSPath

        if (eoModelChooser == null) {
            eoModelChooser = new EOModelChooser("Select EOModel");
        }

        FSPath lastDir = getApplication().getFrameController().getLastEOModelDirectory();
        lastDir.updateChooser(eoModelChooser);

        return eoModelChooser;
    }
View Full Code Here

Examples of org.apache.cayenne.modeler.pref.FSPath

     * no such directory set up in the preferences, creates a new object, setting its path
     * to the parent last directory or to the user HOME directory.
     */
    public FSPath getLastDirectory() {
        // find start directory in preferences
        FSPath path = (FSPath) application
                .getCayenneProjectPreferences()
                .getProjectDetailObject(
                        FSPath.class,
                        getViewPreferences().node("lastDir"));

        if (path.getPath() == null) {

            String pathString = (getParent() != null) ? getParent()
                    .getLastDirectory()
                    .getPath() : System.getProperty("user.home");
            path.setPath(pathString);
        }

        return path;
    }
View Full Code Here

Examples of org.apache.cayenne.modeler.pref.FSPath

        return editor;
    }

    public void addTemplateAction() {

        FSPath path = new TemplateCreator(this).startupAction();

        if (path != null) {
            int len = templateEntries.size();
            templateEntries.add(path);
            ((AbstractTableModel) view.getTable().getModel()).fireTableRowsInserted(
View Full Code Here

Examples of org.apache.cayenne.modeler.pref.FSPath

        int status = fileChooser.showOpenDialog(Application.getFrame());

        if (status == JFileChooser.APPROVE_OPTION) {

            // save preferences
            FSPath lastDir = getApplication()
                    .getFrameController()
                    .getLastEOModelDirectory();
            lastDir.updateFromChooser(fileChooser);

            File file = fileChooser.getSelectedFile();
            if (file.isFile()) {
                file = file.getParentFile();
            }
View Full Code Here

Examples of org.apache.cayenne.modeler.pref.FSPath

        if (eoModelChooser == null) {
            eoModelChooser = new EOModelChooser("Select EOModel");
        }

        FSPath lastDir = getApplication().getFrameController().getLastEOModelDirectory();
        lastDir.updateChooser(eoModelChooser);

        return eoModelChooser;
    }
View Full Code Here

Examples of org.apache.cayenne.modeler.pref.FSPath

    }

    FSPath getLastTemplateDirectory() {
        // find start directory in preferences

        FSPath path = (FSPath) getViewDomain().getDetail(
                "lastTemplate",
                FSPath.class,
                true);

        if (path.getPath() == null) {
            path.setPath(getLastDirectory().getPath());
        }

        return path;
    }
View Full Code Here

Examples of org.apache.cayenne.modeler.pref.FSPath

                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,
                new PropertyChangeListener() {

                    public void propertyChange(PropertyChangeEvent evt) {
                        File directory = view.getTemplateChooser().getCurrentDirectory();
                        path.setDirectory(directory);
                    }
                });
    }
View Full Code Here

Examples of org.apache.cayenne.modeler.pref.FSPath

            return null;
        }

        String key = view.getTemplateName().getText();
        File file = view.getTemplateChooser().getFile();
        FSPath path = (FSPath) editor.createDetail(domain, key, FSPath.class);
        path.setPath(file != null ? file.getAbsolutePath() : null);
        return path;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.