Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.Nameable


     @exception NameDuplicationException If the container already has
     *   an attribute with the name of this attribute.
     */
    public void setContainer(NamedObj container) throws IllegalActionException,
            NameDuplicationException {
        Nameable oldContainer = getContainer();
        super.setContainer(container);

        if (oldContainer != container) {
            // Every variable in the new scope that may be shadowed by
            // a variable inside this attribute must be invalidated.
View Full Code Here


                // If we are within a class definition, then we should
                // not create any links.  The links should only exist
                // within instances. Otherwise, we could end up creating
                // a link between a class definition and an instance.
                if (!isWithinClassDefinition()) {
                    Nameable container = getContainer();
                    if ((container instanceof TypedCompositeActor)) {
                        // NOTE: There used to be some logic here to call
                        // _updateLinks() only if the manager indicates we
                        // are running, and otherwise to set _updatedLinks
                        // to false. This is no longer necessary as
View Full Code Here

            }

            State state = (State) target;

            // Check that all these containers exist.
            Nameable immediateContainer = state.getContainer();

            if (immediateContainer == null) {
                MessageHandler.error("State has no container!");
                return;
            }

            final CompositeEntity container = (CompositeEntity) immediateContainer
                    .getContainer();

            if (container == null) {
                MessageHandler.error("State container has no container!");
                return;
View Full Code Here

    public void setContainer(NamedObj container) throws IllegalActionException,
            NameDuplicationException {
        try {
            _workspace.getWriteAccess();

            Nameable oldContainer = getContainer();

            if (oldContainer instanceof Director && (oldContainer != container)) {
                // Need to remove this scheduler as the active one of the
                // old container. Search for another scheduler contained
                // by the composite.  If it contains more than one,
View Full Code Here

        return replacementAbbrev + name;
    }

    public static CompositeActorMatcher getContainingPatternOrReplacement(
            NamedObj entity) {
        Nameable parent = entity.getContainer();
        while (parent != null && !(parent instanceof Pattern)
                && !(parent instanceof Replacement)) {
            parent = parent.getContainer();
        }
        return (CompositeActorMatcher) parent;
    }
View Full Code Here

            }

            Transition transition = (Transition) target;

            // Check that all these containers exist.
            Nameable immediateContainer = transition.getContainer();

            if (immediateContainer == null) {
                MessageHandler.error("Transition has no container!");
                return;
            }

            final CompositeEntity container = (CompositeEntity) immediateContainer
                    .getContainer();

            if (container == null) {
                MessageHandler.error("Transition container has no container!");
                return;
View Full Code Here

     *   one of the associated actors throws it.
     */
    public void initialize() throws IllegalActionException {
        super.initialize();

        Nameable container = getContainer();

        if (container instanceof CompositeActor) {
            Iterator actors = ((CompositeActor) container).deepEntityList()
                    .iterator();

View Full Code Here

            if (frame instanceof NavigableActorGraphFrame) {
                NavigableActorGraphFrame navFrame = (NavigableActorGraphFrame) frame;
                NavigationPTree aTree = navFrame.getTree();

                Nameable effigy = tab.getContainer();

                if (effigy instanceof NavigableEffigy) {
                    NavigableEffigy navEff = (NavigableEffigy) effigy;
                    navEff.getNavigationModel().unRegister(aTree);
                }
View Full Code Here

     */
    public boolean reOpenGraph(Tableau tableau) {
        boolean answer = false;

        if (tableau != null) {
            Nameable effigy = tableau.getContainer();

            if (effigy instanceof PtolemyEffigy) {
                NamedObj toReOpen = ((PtolemyEffigy) effigy).getModel();
                tableau.close();
                tableau.getFrame().dispose();
View Full Code Here

    /**
     * @return a NavigationModel.
     */
    public NavigationTreeModel getNavigationModel() {
        Nameable container = getContainer();

        if (container instanceof NavigableEffigy) {
            return ((NavigableEffigy) container).getNavigationModel();
        } else {
            if (_navigModel == null) {
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.