Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.NamedObj


            // Propagate.
            Iterator derivedObjects = getDerivedList().iterator();

            while (derivedObjects.hasNext()) {
                NamedObj derived = (NamedObj) derivedObjects.next();
                container = (CompositeEntity) derived.getContainer();
                container._containedEntities.moveDown(derived);
            }

            return result;
        } finally {
View Full Code Here


            // Propagate.
            Iterator derivedObjects = getDerivedList().iterator();

            while (derivedObjects.hasNext()) {
                NamedObj derived = (NamedObj) derivedObjects.next();
                container = (CompositeEntity) derived.getContainer();
                container._containedEntities.moveToFirst(derived);
            }

            return result;
        } finally {
View Full Code Here

        public void createEditor(NamedObj object, Frame parent) {
            try {
                Configuration configuration = ((TableauFrame) parent)
                        .getConfiguration();

                NamedObj container = object.getContainer();

                _taskMap = new HashMap();
                _taskState = new ArrayList();
                plot = new Plot();
                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");

                configuration.createPrimaryTableau(schedulePlotterEffigy);
View Full Code Here

            // Propagate.
            Iterator derivedObjects = getDerivedList().iterator();

            while (derivedObjects.hasNext()) {
                NamedObj derived = (NamedObj) derivedObjects.next();
                container = (CompositeEntity) derived.getContainer();
                container._containedEntities.moveToIndex(derived, index);
            }

            return result;
        } finally {
View Full Code Here

            // Propagate.
            Iterator derivedObjects = getDerivedList().iterator();

            while (derivedObjects.hasNext()) {
                NamedObj derived = (NamedObj) derivedObjects.next();
                container = (CompositeEntity) derived.getContainer();
                container._containedEntities.moveToLast(derived);
            }

            return result;
        } finally {
View Full Code Here

            // Propagate.
            Iterator derivedObjects = getDerivedList().iterator();

            while (derivedObjects.hasNext()) {
                NamedObj derived = (NamedObj) derivedObjects.next();
                container = (CompositeEntity) derived.getContainer();
                container._containedEntities.moveUp(derived);
            }

            return result;
        } finally {
View Full Code Here

    protected void _adjustDeferrals() throws IllegalActionException {
        // Use the class name.
        String className = getClassName();

        // Search upwards in the hierarchy.
        NamedObj context = this;
        int levelsToSearch = getDerivedLevel();
        int aboveLevel = 0;
        ComponentEntity candidate = null;

        // Make sure we get a real candidate, which is a
        // class definition. The second term in the if will
        // cause the search to continue up the hierarchy.
        // NOTE: There is still an oddness, in that
        // the class scoping results in a subtle (and
        // maybe incomprehensible) identification of
        // the base class, particularly when pasting
        // an instance or subclass into a new context.
        while ((aboveLevel < levelsToSearch)
                && ((candidate == null) || !candidate.isClassDefinition())
                && (context != null)) {
            context = context.getContainer();

            if (context instanceof CompositeEntity) {
                candidate = ((CompositeEntity) context).getEntity(className);
            }
View Full Code Here

                // sufficient to just check the length.
                Iterator deferrers = deferred.iterator();

                while (deferrers.hasNext()) {
                    WeakReference deferrer = (WeakReference) deferrers.next();
                    NamedObj deferrerObject = (NamedObj) deferrer.get();

                    if (deferrerObject != null) {
                        hasDeferrals = true;

                        if (names.length() > 0) {
                            names.append(", ");
                        }

                        names.append(deferrerObject.getFullName());
                    }
                }
            }

            if (hasDeferrals) {
View Full Code Here

        // Set the view screen for all the actors.
        Iterator actors = ((TypedCompositeActor)container)
                .deepEntityList().iterator();

        while (actors.hasNext()) {
            NamedObj actor = (NamedObj) actors.next();

            if (actor instanceof GRActor) {
                ((GRActor) actor)._setViewScreen((GRActor) viewScreen);
            }
        }
View Full Code Here

            // The reason to add the code is that a port may not be contained in
            // _containerPortMap if it is encountered the first time here --- Gang
        } else if (_doneProcessingActorWithPortNameChanges
                && attributeName.equals("port")) {
            int lastIndex = attributeValue.lastIndexOf(".");
            NamedObj portContainer = null;
            String portContainerName = null;
            String portName = null;
            if (lastIndex > 0) {
                portContainerName = attributeValue.substring(0, lastIndex);
                portContainer = ((CompositeEntity) container)
                        .getEntity(portContainerName);
                portName = attributeValue.substring(lastIndex + 1);
            } else {
                portContainer = container;
                portName = attributeValue;
            }
            if (portContainer != null) {
                String className = portContainer.getClassName();
                if (_actorsWithPortNameChanges.containsKey(className)) {
                    HashMap portMap = (HashMap) _actorsWithPortNameChanges
                            .get(className);
                    if (portMap.containsKey(portName)) {
                        String newPort = (String) portMap.get(portName);
View Full Code Here

TOP

Related Classes of ptolemy.kernel.util.NamedObj

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.