Package ptolemy.actor.gui

Examples of ptolemy.actor.gui.Configuration.openModel()


                    Configuration configuration = getConfiguration();
                    URL infoURL = getClass().getResource(
                            "../../../doc/codegen.htm");

                    try {
                        configuration.openModel(null, infoURL, infoURL
                                .toExternalForm());
                    } catch (Exception ex) {
                        throw new InternalErrorException(model, ex,
                                "Failed to open doc/codegen.htm: ");
                    }
View Full Code Here


                    try {
                        _parser.reset();
                        // Export the model into moml string and then import it
                        // again. Needed b some models with unnoticeable state.
                        NamedObj newModel = _parser.parse(model.exportMoML());
                        Tableau tableau = configuration.openModel(newModel,
                                effigy);
                        if (_tableaus[i] != null) {
                            _tableaus[i].close();
                        }
                        _tableaus[i] = tableau;
View Full Code Here

                    }
                }

                try {
                    Configuration configuration = _owner.getConfiguration();
                    configuration
                            .openModel(null, _help, _help.toExternalForm());
                } catch (Exception e1) {
                    HTMLViewer viewer = new HTMLViewer();
                    try {
                        viewer.setPage(_help);
View Full Code Here

                }

                if (docAttribute != null) {
                    URL doc = MoMLApplication.specToURL(docAttribute
                            .getExpression());
                    configuration.openModel(doc, doc, doc.toExternalForm());
                } else {
                    NamedObj container = object.getContainer();

                    if (container == null) {
                        container = object;
View Full Code Here

                getFrameController().getConfiguration();
            if (configuration == null) {
                throw new InternalErrorException("Cannot get configuration.");
            }

            Tableau tableau = configuration.openModel(model);
            MatchResultViewer viewer = (MatchResultViewer) tableau.getFrame();
            viewer.setMatchResult(results);
            viewer.setSourceFileName(sourceFileName);
            viewer.setTransformationRule(
                    getFrameController().getTransformationRule());
View Full Code Here

            if (toOpen != null) {
                Configuration configuration = SingleWindowApplication._mainFrame
                        .getConfiguration();

                try {
                    configuration.openModel(toOpen);
                } catch (IllegalActionException e1) {
                    e1.printStackTrace();
                } catch (NameDuplicationException e1) {
                    e1.printStackTrace();
                }
View Full Code Here

    public Tableau createTableau(Effigy effigy) throws Exception {
        Configuration configuration = (Configuration) effigy.toplevel();
        ModalModel model = (ModalModel) ((PtolemyEffigy) effigy).getModel();
        FSMActor controller = ((FSMDirector) model.getDirector())
                .getController();
        return configuration.openModel(controller);
    }
}
View Full Code Here

                                try {
                                    // NOTE: Executing this in the event thread averts
                                    // a race condition... Previous close(), which was
                                    // deferred to the UI thread, will have completed.
                                    _exception = null;
                                    _tableau = configuration.openModel(_model,
                                            myEffigy);

                                    // Set this tableau to be a master so that when it
                                    // gets closed, all its subwindows get closed.
                                    _tableau.setMaster(true);
View Full Code Here

                    // work under WebStart.
                    URL infoURL = Thread.currentThread()
                            .getContextClassLoader().getResource(
                                    "ptolemy/codegen/README.html");

                    configuration.openModel(null, infoURL, infoURL
                            .toExternalForm());
                } catch (Exception ex) {
                    throw new InternalErrorException(codeGenerator, ex,
                            "Failed to open doc/codegen.htm: ");
                }
View Full Code Here

                        URL codeURL = new File(codeFileNameWritten).toURI()
                                .toURL();
                        // Use Thread.currentThread() so that this code will
                        // work under WebStart.
                        configuration.openModel(null, codeURL, codeURL
                                .toExternalForm());

                    }
                    // Don't write the file to the window
                    //exec.updateStatusBar(code.toString());
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.