Package ptolemy.kernel

Examples of ptolemy.kernel.Entity.portList()


            // Clear all of the contained actor's input ports.
            for (Iterator actors = deepEntityList().iterator(); actors
                    .hasNext();) {
                Entity actor = (Entity) actors.next();
                Iterator ports = actor.portList().iterator();

                while (ports.hasNext()) {
                    IOPort port = (IOPort) ports.next();

                    if (port.isInput()) {
View Full Code Here


            TypeListener typeListener = new PortTypeListener();
            Iterator entities = toplevel.entityList().iterator();

            while (entities.hasNext()) {
                Entity entity = (Entity) entities.next();
                Iterator ports = entity.portList().iterator();

                while (ports.hasNext()) {
                    TypedIOPort port = (TypedIOPort) ports.next();
                    port.addTypeListener(typeListener);
                }
View Full Code Here

            CompositeEntity toplevel = (CompositeEntity) _toplevel;
            Iterator entities = toplevel.entityList().iterator();

            while (entities.hasNext()) {
                Entity entity = (Entity) entities.next();
                Iterator ports = entity.portList().iterator();

                while (ports.hasNext()) {
                    TypedIOPort port = (TypedIOPort) ports.next();
                    _updateTypeDisplay(port);
                }
View Full Code Here

        if (includeAttributes) {
            collection.addAll((Collection<?>) object.attributeList());
        }
        if (includePorts && object instanceof Entity) {
            Entity entity = (Entity) object;
            collection.addAll((Collection<?>) entity.portList());
        }
        if (object instanceof CompositeEntity) {
            CompositeEntity entity = (CompositeEntity) object;
            if (includeEntities) {
                collection.addAll((Collection<?>) entity.entityList());
View Full Code Here

        }

        if (object instanceof Entity) {
            Entity entity = (Entity) object;

            for (Iterator ports = entity.portList().iterator(); ports.hasNext();) {
                Port port = (Port) ports.next();
                _updateCreatedSet(prefix, context, port, set);
            }
        }
View Full Code Here

            _patternToReplacement.put(pattern, replacement);
            if (pattern instanceof Entity && replacement instanceof Entity) {
                Entity patternEntity = (Entity) pattern;
                Entity replacementEntity = (Entity) replacement;
                List<?> patternPortList = patternEntity.portList();
                List<?> replacementPortList = replacementEntity.portList();
                for (int i = 0; i < patternPortList.size(); i++) {
                    Port patternPort = (Port) patternPortList.get(i);
                    Port replacementPort = (Port) replacementPortList.get(i);
                    _patternToReplacement.put(patternPort, replacementPort);
                }
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.