Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.NamedObj.uniqueName()


        if (container instanceof TypedCompositeActor) {
            // If the container is not a typed composite actor, then don't create
            // a relation. Probably the container is a library.
            try {
                _relation = new TypedIORelation(
                        (TypedCompositeActor) container, container
                                .uniqueName("publisherRelation"));
                // Prevent the relation and its links from being exported.
                _relation.setPersistent(false);
                // Prevent the relation from showing up in vergil.
                new Parameter(_relation, "_hide", BooleanToken.TRUE);
View Full Code Here


                // 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");

                configuration.createPrimaryTableau(schedulePlotterEffigy);
View Full Code Here

                    ComponentPort headPort = (ComponentPort) head;
                    ComponentPort tailPort = (ComponentPort) tail;
                    NamedObj ptolemyModel = getPtolemyModel();

                    // Linking two ports with a new relation.
                    String relationName = ptolemyModel.uniqueName("relation");

                    // If the context is not the entity that we're editing,
                    // then we need to set the context correctly.
                    if (ptolemyModel != container) {
                        String contextString = "<entity name=\""
View Full Code Here

                throw new InternalErrorException(
                        "Cannot invoke NewRelationAction on an object "
                                + "that is not a CompositeEntity.");
            }

            final String relationName = toplevel.uniqueName("relation");
            final String vertexName = "vertex1";

            // Create the relation.
            StringBuffer moml = new StringBuffer();
            moml.append("<relation name=\"" + relationName + "\">\n");
View Full Code Here

                List<?> ingredientsAttributes = target
                        .attributeList(GTIngredientsAttribute.class);
                try {
                    if (ingredientsAttributes.isEmpty()) {
                        Attribute attribute = new GTIngredientsAttribute(
                                target, target.uniqueName("operations"));
                        attribute.setPersistent(false);
                    }

                    EditorFactory factory = new GTIngredientsEditor.Factory(
                            target, target
View Full Code Here

                                target, target.uniqueName("operations"));
                        attribute.setPersistent(false);
                    }

                    EditorFactory factory = new GTIngredientsEditor.Factory(
                            target, target
                                    .uniqueName("ingredientsEditorFactory"));
                    factory.setPersistent(false);
                    factory.createEditor(target, frame);
                    factory.setContainer(null);
                } catch (KernelException e) {
View Full Code Here

                // provide access to this functionality.
                throw new InternalErrorException(
                        "Cannot create hierarchy if the container is not a CompositeEntity.");
            }

            String compositeActorName = container.uniqueName("CompositeActor");

            double[] location = new double[2];
            boolean gotLocation = false;

            for (int i = 0; i < selection.length; i++) {
View Full Code Here

                        relationName = linkRelation.getName(ptolemyModel);
                    } else {
                        createdNewRelation = true;

                        // Linking two ports with a new relation.
                        relationName = ptolemyModel.uniqueName("relation");

                        // Set the exitAngle based on other relations.
                        // Count the number of connections between the
                        // headPort and the tailPort.
                        Iterator ports = tailPort.deepConnectedPortList()
View Full Code Here

                        relationName = linkRelation.getName(ptolemyModel);
                    } else {
                        createdNewRelation = true;

                        // Linking two ports with a new relation.
                        relationName = ptolemyModel.uniqueName("relation");

                        // Note that we specify no class so that we use the
                        // container's factory method when this gets parsed
                        moml.append("<relation name=\"" + relationName
                                + "\"/>\n");
View Full Code Here

                throw new InternalErrorException(
                        "Cannot invoke NewPortAction on an object "
                                + "that is not an instance of Entity.");
            }

            final String portName = toplevel.uniqueName("port");
            final String locationName = "_location";

            // Create the port.
            StringBuffer moml = new StringBuffer();
            moml.append("<port name=\"" + portName + "\">\n");
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.