Package ptolemy.actor.gui

Examples of ptolemy.actor.gui.Configuration


     *  _help() method of the superclass.
     *  @see FileParameter
     */
    protected void _help() {
        try {
            Configuration configuration = getConfiguration();
            FileParameter helpAttribute = (FileParameter) configuration
                    .getAttribute("_helpDocViewer", FileParameter.class);
            URL doc;

            if (helpAttribute != null) {
                doc = helpAttribute.asURL();
            } else {
                doc = getClass().getClassLoader().getResource(helpFile);
            }

            configuration.openModel(null, doc, doc.toExternalForm());
        } catch (Exception ex) {
            super._help();
        }
    }
View Full Code Here


        //exclusion attributes can excluse params from the documentation
        //by their name.  an exclusion can be "exact" or "contains".  an "exact"
        //exclusion requires the name on the exclusion list to exactly match
        //the name of the param.  a "contains" exclusion just requires that the
        //name of exclusion is contained in the name of the exclusion.
        Configuration config = getConfiguration();
        Iterator itt = config.attributeList(
                ptolemy.kernel.util.StringAttribute.class).iterator();
        Vector exclusions = new Vector();
        while (itt.hasNext()) {
            NamedObj att = (NamedObj) itt.next();
View Full Code Here

                    + " to contain a FileParameter named "
                    + attributeName.getExpression() + ", but it does not.");
        }

        URL url = ((FileParameter) attribute).asURL();
        Configuration configuration = (Configuration) effigy.toplevel();
        return configuration.openModel(null, url, url.toExternalForm());
    }
View Full Code Here

                try {
                    File file = chooser.getSelectedFile();

                    PtolemyEffigy effigy = (PtolemyEffigy) getTableau()
                            .getContainer();
                    Configuration configuration = (Configuration) effigy
                            .toplevel();
                    UserActorLibrary.openLibrary(configuration, file);

                    _setDirectory(chooser.getCurrentDirectory());
                } catch (Throwable throwable) {
View Full Code Here

                throw new KernelRuntimeException("Could not save in "
                        + "library, '" + object + "' is not an Entity");
            }

            Entity entity = (Entity) object;
            Configuration configuration = (Configuration) effigy.toplevel();
            try {
                UserActorLibrary.saveComponentInLibrary(configuration, entity);
            } catch (Exception ex) {
                // We catch exceptions here because this method used to
                // not throw Exceptions, and we don't want to break
View Full Code Here

        caveatsPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
        caveatsPanel.setLayout(new BoxLayout(caveatsPanel, BoxLayout.X_AXIS));

        // We handle the applicationName specially so that we create
        // only the docs for the app we are running.
        Configuration configuration = getConfiguration();

        try {
            StringAttribute applicationNameAttribute = (StringAttribute) configuration
                    .getAttribute("_applicationName", StringAttribute.class);

            if (applicationNameAttribute != null) {
                _applicationName = applicationNameAttribute.getExpression();
            }
        } catch (Throwable throwable) {
            // Ignore and use the default applicationName
        }

        JTextArea messageArea = new JTextArea(
                "NOTE: Use this tool to build the Java"
                        + " and Actor Documentation"
                        + (_applicationName != null ? "for " + _applicationName
                                : "") + ".");
        messageArea.setEditable(false);
        messageArea.setBorder(BorderFactory.createEtchedBorder());
        messageArea.setLineWrap(true);
        messageArea.setWrapStyleWord(true);
        caveatsPanel.add(messageArea);

        JButton moreInfoButton = new JButton("More Info");
        moreInfoButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                String infoFile = "ptolemy/vergil/actor/docViewerHelp.htm";
                try {
                    Configuration configuration = getConfiguration();

                    // FIXME: Help should bring this up as well.
                    URL infoURL = Thread.currentThread()
                            .getContextClassLoader().getResource(infoFile);
                    configuration.openModel(null, infoURL, infoURL
                            .toExternalForm());
                } catch (Exception ex) {
                    throw new InternalErrorException(docBuilder, ex,
                            "Failed to open " + infoFile);
                }
View Full Code Here

TOP

Related Classes of ptolemy.actor.gui.Configuration

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.