Examples of Effigy


Examples of ptolemy.actor.gui.Effigy

                plot.setTitle("TM Schedule");
                plot.setButtons(true);

                // We put the plotter as a sub-effigy of the toplevel effigy,
                // so that it closes when the model is closed.
                Effigy effigy = Configuration.findEffigy(toplevel());
                PlotEffigy schedulePlotterEffigy = new PlotEffigy(effigy,
                        container.uniqueName("schedulePlotterEffigy"));
                schedulePlotterEffigy.setPlot(plot);
                schedulePlotterEffigy.identifier.setExpression("TM Schedule");
View Full Code Here

Examples of ptolemy.actor.gui.Effigy

            if (in == null) {
                return null;
            }

            // Always return an effigy
            Effigy effigy = newStandardOutEffigy(container, base, in);
            return effigy;
        }
View Full Code Here

Examples of ptolemy.actor.gui.Effigy

         @param object The object to configure.
         *  @param parent The parent window, or null if there is none.
         */
        public void createEditor(NamedObj object, Frame parent) {
            try {
                Effigy effigy = ((TableauFrame) parent).getEffigy();
                Tableau tableau = _tableauFactory.createTableau(effigy);
                if (tableau == null) {
                    throw new Exception("Tableau factory returns null.");
                }
                tableau.setEditable(effigy.isModifiable());
                tableau.show();
            } catch (Exception ex) {
                throw new InternalErrorException(object, ex,
                        "Cannot generate code. Perhaps outside Vergil?");
            }
View Full Code Here

Examples of ptolemy.actor.gui.Effigy

        String titleValue = ((StringToken) title.getToken()).stringValue();
        for (int i = 0; i < input.getWidth(); i++) {
            if (input.hasToken(i)) {
                synchronized (this) {
                    Entity model = ((ActorToken) input.get(0)).getEntity();
                    Effigy effigy = Configuration.findEffigy(toplevel());
                    Configuration configuration = (Configuration) effigy
                            .toplevel();
                    try {
                        _parser.reset();
                        // Export the model into moml string and then import it
                        // again. Needed b some models with unnoticeable state.
View Full Code Here

Examples of ptolemy.actor.gui.Effigy

                    .get(docAttributes.size() - 1);
            showDocAttributeTableau(docAttribute, target);
        } else {
            // No doc attribute. Try for a doc file.
            String className = target.getClass().getName();
            Effigy context = Configuration.findEffigy(target);
            NamedObj container = target.getContainer();
            while (context == null && container != null) {
                context = Configuration.findEffigy(container);
                container = container.getContainer();
            }
View Full Code Here

Examples of ptolemy.actor.gui.Effigy

     */
    private void showDocAttributeTableau(DocAttribute docAttribute,
            NamedObj target) {
        // Need to create an effigy and tableau.
        ComponentEntity effigy = null;
        Effigy context = Configuration.findEffigy(target);
        if (_effigy == null) {
            if (context == null) {
                context = Configuration.findEffigy(target.getContainer());
                if (context == null) {
                    MessageHandler.error("Cannot find an effigy for "
                            + target.getFullName());
                }
                effigy = context.getEntity("DocEffigy");
            }
        } else {
            effigy = _effigy;
        }

View Full Code Here

Examples of ptolemy.actor.gui.Effigy

            }
            DocAttribute doc = (DocAttribute) docAttributes.get(0);
            if (!(parent instanceof TableauFrame)) {
                MessageHandler.error("Cannot display documentation!");
            }
            Effigy effigy = ((TableauFrame) parent).getEffigy();
            try {
                DocEffigy newEffigy = new DocEffigy((CompositeEntity) effigy
                        .getContainer(), effigy.getContainer().uniqueName(
                        "parentClass"));
                newEffigy.setDocAttribute(doc);
                DocTableau tableau = new DocTableau(newEffigy, "docTableau");
                tableau.show();
            } catch (KernelException e) {
View Full Code Here

Examples of ptolemy.actor.gui.Effigy

        }

        public void createEditor(NamedObj object, Frame parent) {
            Configuration configuration = ((TableauFrame) parent)
                    .getConfiguration();
            Effigy effigy = ((TableauFrame) parent).getEffigy();
            DialogTableau dialogTableau = DialogTableau.createDialog(parent,
                    configuration, effigy, GTIngredientsEditor.class,
                    (Entity) object);
            if (dialogTableau != null) {
                dialogTableau.show();
View Full Code Here

Examples of ptolemy.actor.gui.Effigy

            JMenuItem target = (JMenuItem) e.getSource();
            String actionCommand = target.getActionCommand();

            try {
                if (actionCommand.equals("Listen to Director")) {
                    Effigy effigy = (Effigy) getTableau().getContainer();

                    // Create a new text effigy inside this one.
                    Effigy textEffigy = new TextEffigy(effigy, effigy
                            .uniqueName("debug listener"));
                    DebugListenerTableau tableau = new DebugListenerTableau(
                            textEffigy, textEffigy.uniqueName("debugListener"));
                    tableau
                            .setDebuggable(((FSMActor) getModel())
                                    .getDirector());
                } else if (actionCommand.equals("Listen to State Machine")) {
                    Effigy effigy = (Effigy) getTableau().getContainer();

                    // Create a new text effigy inside this one.
                    Effigy textEffigy = new TextEffigy(effigy, effigy
                            .uniqueName("debug listener"));
                    DebugListenerTableau tableau = new DebugListenerTableau(
                            textEffigy, textEffigy.uniqueName("debugListener"));
                    tableau.setDebuggable(getModel());
                } else if (actionCommand.equals("Animate States")) {
                    // Dialog to ask for a delay time.
                    Query query = new Query();
                    query.addLine("delay", "Time (in ms) to hold highlight",
View Full Code Here

Examples of ptolemy.actor.gui.Effigy

            try {
                BasicGraphFrame frame = _controller.getFrame();
                Tableau tableau = frame.getTableau();

                // effigy is the whole model.
                Effigy effigy = (Effigy) tableau.getContainer();

                // We want to open a new window that behaves as a
                // child of the model window.  So, we create a new text
                // effigy inside this one.  Specify model's effigy as
                // a container for this new effigy.
                Effigy textEffigy = new TextEffigy(effigy, effigy
                        .uniqueName("debugListener" + object.getName()));

                DebugListenerTableau debugTableau = new DebugListenerTableau(
                        textEffigy, textEffigy.uniqueName("debugListener"
                                + object.getName()));
                debugTableau.setDebuggable(object);
            } catch (KernelException ex) {
                MessageHandler.error("Failed to create debug listener.", ex);
            }
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.