Examples of Nameable


Examples of ptolemy.kernel.util.Nameable

            }

            Entity container = (Entity) getContainer();

            // Superclass assures that the container is not null.
            Nameable relationContainer = relation.getContainer();

            if ((container != relationContainer)
                    && (container.getContainer() != relationContainer)) {
                throw new IllegalActionException(this, relation,
                        "Link crosses levels of the hierarchy");
View Full Code Here

Examples of ptolemy.kernel.util.Nameable

     */
    protected boolean _isInsideLinkable(Nameable entity) {
        try {
            _workspace.getReadAccess();

            Nameable portContainer = getContainer();

            while (entity != null) {
                if (portContainer == entity) {
                    return true;
                }
View Full Code Here

Examples of ptolemy.kernel.util.Nameable

                return null;
            }

            _refinement = new TypedActor[size];

            Nameable container = getContainer();
            TypedCompositeActor containerContainer = (TypedCompositeActor) container
                    .getContainer();
            int index = 0;

            while (tokenizer.hasMoreTokens()) {
                String name = tokenizer.nextToken().trim();
View Full Code Here

Examples of ptolemy.kernel.util.Nameable

            _debug(getFullName(), "preinitializing.");
        }

        // Verify that this director resides in an appropriate level
        // of hierarchy.
        Nameable nameable = getContainer();

        if (!(nameable instanceof CompositeActor)) {
            throw new IllegalActionException(this,
                    "has no CompositeActor container.");
        }
View Full Code Here

Examples of ptolemy.kernel.util.Nameable

     *  behaves like the base class.
     *  @return A new figure.
     */
    public Figure createBackgroundFigure() {
        Figure result = null;
        Nameable container = getContainer();

        if (container instanceof CompositeEntity) {
            CompositeEntity myContainer = ((CompositeEntity) container);
            ComponentEntity entity = null;
            Iterator entities = myContainer.entityList().iterator();
View Full Code Here

Examples of ptolemy.kernel.util.Nameable

         @return An iterator over the ports contained in the container
         *   of the icon.
         */
        public Iterator nodes(Object composite) {
            Locatable location = (Locatable) composite;
            Nameable container = location.getContainer();

            if (container instanceof ComponentEntity) {
                ComponentEntity entity = (ComponentEntity) container;
                return entity.portList().iterator();
            } else {
View Full Code Here

Examples of ptolemy.kernel.util.Nameable

     *  Return null if either there is no container or the container has no
     *  director.
     *  @return The director that invokes this actor.
     */
    public Director getDirector() {
        Nameable container = getContainer();

        if (container instanceof Actor) {
            return ((Actor) container).getDirector();
        }

View Full Code Here

Examples of ptolemy.kernel.util.Nameable

     */
    public Manager getManager() {
        try {
            _workspace.getReadAccess();

            Nameable container = getContainer();

            if (container instanceof Actor) {
                return ((Actor) container).getManager();
            }

View Full Code Here

Examples of ptolemy.kernel.util.Nameable

        _branchID = branchID;
        _guard = guard;
        _controller = controller;
        _port = port;
        if (_controller == null) {
            Nameable portContainer = port.getContainer();
            if (!(portContainer instanceof BranchActor)) {
                throw new IllegalActionException(port,
                        "A conditional branch can only be created"
                                + "with a port contained by BranchActor.");
            }
View Full Code Here

Examples of ptolemy.kernel.util.Nameable

                for (int i = 0; i < branches.length; i++) {
                    // If the guard is false, then the branch is not enabled.
                    if (branches[i].getGuard()) {
                        // Create a thread for this enabled branch
                        Nameable actor = branches[i].getController()
                                .getParent();
                        String name = actor.getName() + branches[i].getID();
                        if (_debugging) {
                            _debug("** Creating branch: " + name);
                        }
                        Thread thread = new Thread((Runnable) branches[i], name);
                        _threadList.add(0, thread);
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.