Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.Attribute


        }

        // Handle tool tips.  This is almost certainly an instance
        // of NamedObj, but check to be sure.
        if (attribute instanceof NamedObj) {
            Attribute tooltipAttribute = ((NamedObj) attribute)
                    .getAttribute("tooltip");

            if ((tooltipAttribute != null)
                    && tooltipAttribute instanceof Documentation) {
                setToolTip(entryName, ((Documentation) tooltipAttribute)
View Full Code Here


        while (names.hasNext() && values.hasNext()) {
            String name = (String) names.next();
            String value = (String) values.next();

            Attribute attribute = model.getAttribute(name);
            if (attribute instanceof Settable) {
                // Use a MoMLChangeRequest so that visual rendition (if
                // any) is updated and listeners are notified.
                String moml = "<property name=\"" + name + "\" value=\""
                        + value + "\"/>";
View Full Code Here

                    }
                }
            } else if (SootUtilities.derivesFrom(baseClass,
                    PtolemyUtilities.attributeClass)) {
                // If we are invoking a method on a port.
                Attribute attribute = InlineParameterTransformer
                        .getAttributeValue(method, (Local) r.getBase(), unit,
                                localDefs, localUses);

                if (attribute == null) {
                    // A method invocation with a null base is bogus,
View Full Code Here

                        .uniqueName("effigy"));

                // If this factory contains an entity called "blank", then
                // clone that.
                NamedObj entity = getEntity("blank");
                Attribute attribute = getAttribute("blank");
                NamedObj newModel;

                if (entity != null) {
                    newModel = (NamedObj) entity.clone(new Workspace());

                    // The cloning process results an object that defers change
                    // requests.  By default, we do not want to defer change
                    // requests, but more importantly, we need to execute
                    // any change requests that may have been queued
                    // during cloning. The following call does that.
                    newModel.setDeferringChangeRequests(false);
                } else if (attribute != null) {
                    newModel = (NamedObj) attribute.clone(new Workspace());

                    // The cloning process results an object that defers change
                    // requests.  By default, we do not want to defer change
                    // requests, but more importantly, we need to execute
                    // any change requests that may have been queued
View Full Code Here

     * @return A list of variables.
     * @exception IllegalActionException If the list of modified
     * variables cannot be returned.
     */
    public List getModifiedVariables() throws IllegalActionException {
        Attribute attribute = getModifiedVariable();
        List list = new ArrayList(1);

        if (attribute instanceof Variable) {
            list.add(attribute);
        }
View Full Code Here

     *   or if there is no container.
     */
    public void preinitialize() throws IllegalActionException {
        super.preinitialize();

        Attribute attribute = getModifiedVariable();

        if (attribute instanceof Variable) {
            ((Variable) attribute).setTypeAtLeast(input);
        }

View Full Code Here

    /** Set the value of the associated container's variable.
     *  @param value The new value.
     */
    private void _setValue(Token value) throws IllegalActionException {
        Attribute variable = getModifiedVariable();

        if (variable instanceof Variable) {
            ((Variable) variable).setToken(value);

            // NOTE: If we don't call validate(), then the
View Full Code Here

                if (effigy instanceof PtolemyEffigy) {
                    NamedObj model = ((PtolemyEffigy) effigy).getModel();

                    // System.out.println("model = " + model.getFullName());
                    Attribute attribute = model.getAttribute(name);

                    if (attribute instanceof Settable) {
                        match = true;

                        // Use a MoMLChangeRequest so that visual rendition (if
View Full Code Here

    protected void _exportMoMLContents(Writer output, int depth)
            throws IOException {
        try {
            for (Object att : attributeList()) {
                if (!(att instanceof Parameter)) {
                    Attribute attribute = (Attribute) att;
                    attribute.exportMoML(output, depth);
                }
            }
            if (_astCreated) {
                // Get the name of the Ptalon file.
                String filename;
View Full Code Here

        _constructDetailedDependencyGraph();

        // get associated actor
        Actor actor = (Actor) getContainer();

        Attribute attribute = getContainer().getAttribute("Atomic");

        if (attribute != null) {
            super._constructDependencyGraph();
        } else {
            // Initialize the dependency graph
View Full Code Here

TOP

Related Classes of ptolemy.kernel.util.Attribute

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.