Package ptolemy.kernel.util

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


         @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

     *  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

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

            Nameable container = getContainer();

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

View Full Code Here

        _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

                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

     @see #setContainerToBe(NamedObj)
     @return The container of this object, if there is one, or
     *  if not hte container specified by setContainerToBe().
     */
    public Nameable getContainerOrContainerToBe() {
        Nameable container = getContainer();

        if (container != null) {
            return container;
        } else {
            return _containerToBe;
View Full Code Here

     @return A new CompositeFigure consisting of the label.
     */
    public Figure createFigure() {
        CompositeFigure background = new CompositeFigure(super
                .createBackgroundFigure());
        Nameable container = getContainer();

        if (container instanceof Settable) {
            String name = container.getDisplayName();
            String value = ((Settable) container).getExpression();
            LabelFigure label = new LabelFigure(name + ": " + value,
                    _labelFont, 1.0, SwingConstants.SOUTH_WEST);
            background.add(label);
            return background;
        } else {
            String name = container.getName();
            LabelFigure label = new LabelFigure(name, _labelFont, 1.0,
                    SwingConstants.SOUTH_WEST);
            background.add(label);
            return background;
        }
View Full Code Here

    public void fire() throws IllegalActionException {
        if (_debugging) {
            _debug("Director: Called fire().");
        }

        Nameable container = getContainer();

        if (container instanceof CompositeActor) {
            Iterator actors = ((CompositeActor) container).deepEntityList()
                    .iterator();
            int iterationCount = 1;
View Full Code Here

            }
        }

        _actorsFinishedExecution = new HashSet();

        Nameable container = getContainer();
        if (container instanceof CompositeActor) {
            Nameable containersContainer = container.getContainer();

            // Initialize the current time.
            if (containersContainer instanceof CompositeActor) {
                // The container is an embedded model.
                Time currentTime = ((CompositeActor) containersContainer)
View Full Code Here

TOP

Related Classes of ptolemy.kernel.util.Nameable

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.