Package ptolemy.kernel

Examples of ptolemy.kernel.ComponentEntity


        _createInsideBufferReferences();

        // Loop over all the _model instance classes.
        for (Iterator entities = _model.deepEntityList().iterator(); entities
                .hasNext();) {
            ComponentEntity entity = (ComponentEntity) entities.next();
            String className = ModelTransformer.getInstanceClassName(entity,
                    _options);
            SootClass entityClass = Scene.v().loadClassAndSupport(className);

            _createBufferReferences(entity, entityClass);
View Full Code Here


        /**
         * Return the rendered visual representation of this node.
         */
        public Figure render(Object n) {
            ComponentEntity actor = (ComponentEntity) _controller
                    .getGraphModel().getSemanticObject(n);

            boolean isEllipse = actor instanceof Controller
                    || actor instanceof Memory
                    || actor instanceof ContentionAlarm;

            BasicFigure f;

            if (isEllipse) {
                f = new BasicEllipse(0, 0, _size, _size);
            } else {
                f = new BasicRectangle(0, 0, _size, _size);
                f.setFillPaint(Color.blue);
            }

            String label = actor.getName();
            LabelWrapper w = new LabelWrapper(f, label);
            w.setAnchor(SwingConstants.SOUTH);
            w.getLabel().setAnchor(SwingConstants.NORTH);
            return w;
        }
View Full Code Here

    // Produce the links on ports contained by contained entities.
    private void _linksOnPortsContainedByContainedEntities(JimpleBody body,
            CompositeEntity composite) {
        for (Iterator entities = composite.entityList().iterator(); entities
                .hasNext();) {
            ComponentEntity entity = (ComponentEntity) entities.next();
            Iterator ports = entity.portList().iterator();

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

                Local portLocal;
View Full Code Here

        if (actor instanceof CompositeEntity && !(actor instanceof FSMActor)) {
            CompositeEntity model = (CompositeEntity) actor;

            // Loop over all the entity classes and replace getAttribute calls.
            for (Iterator i = model.deepEntityList().iterator(); i.hasNext();) {
                ComponentEntity entity = (ComponentEntity) i.next();
                String className = ModelTransformer.getInstanceClassName(
                        entity, _options);
                SootClass entityClass = Scene.v()
                        .loadClassAndSupport(className);
                _replaceAttributeCalls(entityClass, entity);
View Full Code Here

        if (actor instanceof CompositeEntity && !(actor instanceof FSMActor)) {
            // Then recurse
            CompositeEntity model = (CompositeEntity) actor;

            for (Iterator i = model.deepEntityList().iterator(); i.hasNext();) {
                ComponentEntity entity = (ComponentEntity) i.next();
                String className = ModelTransformer.getInstanceClassName(
                        entity, _options);
                SootClass entityClass = Scene.v()
                        .loadClassAndSupport(className);
                _indexExistingFields(entityClass, entity);
View Full Code Here

                color = "red";
            }

            if (source instanceof IOPort) {
                IOPort port = (IOPort) source;
                ComponentEntity actor = (ComponentEntity) (port.getContainer());
                moml.append("<entity name=\"" + actor.getName() + "\">"
                        + _momlAnnotate(port, color, expression) + "</entity>");
            } else if (source instanceof IORelation) {
                IORelation relation = (IORelation) source;
                moml.append(_momlAnnotate(relation, color, expression));
            } else if (source instanceof ComponentEntity) {
                ComponentEntity componentEntity = (ComponentEntity) source;
                moml.append(_momlAnnotate(componentEntity, color, expression));
            }
        }

        if (moml.length() > 0) {
View Full Code Here

        if (actor instanceof CompositeEntity && !(actor instanceof FSMActor)) {
            CompositeEntity model = (CompositeEntity) actor;

            // Loop over all the entity classes and replace getPort calls.
            for (Iterator i = model.deepEntityList().iterator(); i.hasNext();) {
                ComponentEntity entity = (ComponentEntity) i.next();
                String className = ModelTransformer.getInstanceClassName(
                        entity, _options);
                SootClass entityClass = Scene.v()
                        .loadClassAndSupport(className);
                _replacePortCalls(entityClass, entity);
View Full Code Here

        if (actor instanceof CompositeEntity && !(actor instanceof FSMActor)) {
            // Then recurse
            CompositeEntity model = (CompositeEntity) actor;

            for (Iterator i = model.deepEntityList().iterator(); i.hasNext();) {
                ComponentEntity entity = (ComponentEntity) i.next();
                String className = ModelTransformer.getInstanceClassName(
                        entity, _options);
                SootClass entityClass = Scene.v()
                        .loadClassAndSupport(className);
                _indexExistingFields(entityClass, entity);
View Full Code Here

            _entity = entity;
            _container = container;
        }

        protected void _execute() throws Exception {
            ComponentEntity actor = (ComponentEntity) _container.entityList()
                    .get(0);

            _removeEditorIcons(_entity);

            ConfigurableAttribute actorAttribute = (ConfigurableAttribute) actor
                    .getAttribute("_iconDescription");
            String iconDescription = actorAttribute.getConfigureText();
            _setIconDescription(_entity, iconDescription);

            List<?> editorIconList = actor.attributeList(EditorIcon.class);

            for (Object editorIconObject : editorIconList) {
                EditorIcon editorIcon = (EditorIcon) editorIconObject;
                EditorIcon icon = (EditorIcon) editorIcon.clone(
                        ((NamedObj) _entity).workspace());
View Full Code Here

TOP

Related Classes of ptolemy.kernel.ComponentEntity

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.