Examples of attributeList()


Examples of ptolemy.kernel.util.NamedObj.attributeList()

        final NamedObj target = getTarget();

        // If the object does not contain an attribute of class
        // DocAttribute, then do nothing. Otherwise, remove it.
        if (target != null) {
            List docAttributeList = target.attributeList(DocAttribute.class);
            if (docAttributeList.size() != 0) {
                // Remove the doc attribute.
                String moml = "<deleteProperty name=\""
                        + ((DocAttribute) docAttributeList.get(0)).getName()
                        + "\"/>";
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.attributeList()

            EditorIcon icon;

            try {
                // In theory, there shouldn't be more than one
                // icon, but if there are, use the last one.
                List icons = object.attributeList(EditorIcon.class);

                // Check to see whether there is an icon that has been created,
                // but not inserted.
                if (icons.size() == 0) {
                    XMLIcon alreadyCreated = (XMLIcon) _iconsPendingContainer
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.attributeList()

                            .getDocumentationAttributeClassName();
                    Class docAttributeClass = Class
                            .forName(docAttributeClassName);
                    if (docApplicationSpecializerClass != null
                            && docAttributeClass != null) {
                        docAttributeList = target
                                .attributeList(docAttributeClass);
                    }

                    if (docAttributeList.size() == 0) {
                        docApplicationSpecializer
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.attributeList()

            }

            if (!done) {
                //assign the docAttributeList the default DocAttribute if it
                //wasn't assigned by the specializer
                docAttributeList = target.attributeList(DocAttribute.class);
                if (docAttributeList.size() == 0) {
                    // Create a doc attribute, then edit its parameters.
                    String moml = "<property name=\""
                            + "DocAttribute"
                            + "\" class=\"ptolemy.vergil.basic.DocAttribute\"/>";
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.attributeList()

                            + "\" class=\"ptolemy.vergil.basic.DocAttribute\"/>";
                    MoMLChangeRequest request = new MoMLChangeRequest(this,
                            target, moml) {
                        protected void _execute() throws Exception {
                            super._execute();
                            List docAttributes = target
                                    .attributeList(DocAttribute.class);

                            // There shouldn't be more than one of
                            // these, but if there are, the new one is
                            // the last one.
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.attributeList()

    protected String _displayString() {
        NamedObj container = getContainer();

        if (container != null) {
            StringBuffer buffer = new StringBuffer();
            Iterator settables = container.attributeList(Settable.class)
                    .iterator();

            while (settables.hasNext()) {
                Settable settable = (Settable) settables.next();
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.attributeList()

            // because this will trigger evaluation, defeating deferred
            // evaluation.
            if (!(object instanceof EntityLibrary)) {
                // Only if an object has an icon, an icon description, or
                // a small icon description is it rendered in the tree.
                List iconList = object.attributeList(EditorIcon.class);

                if ((iconList.size() > 0)
                        || (object.getAttribute("_iconDescription") != null)
                        || (object.getAttribute("_smallIconDescription") != null)) {
                    // NOTE: this code is similar to that in IconController.
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.attributeList()

            if (container != null) {
                Attribute attribute = container.getAttribute(preferenceName);
                if (attribute instanceof Variable) {
                    return ((Variable) attribute).getToken();
                }
                Iterator preferences = container.attributeList(
                        PtolemyPreferences.class).iterator();
                while (preferences.hasNext()) {
                    PtolemyPreferences preference = (PtolemyPreferences) preferences
                            .next();
                    attribute = preference.getAttribute(preferenceName);
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.attributeList()

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

            if (model != null) {
                Iterator factories = model.attributeList(TableauFactory.class)
                        .iterator();

                // If there are more than one of these, use the first
                // one that agrees to open the model.
                while (factories.hasNext() && (factory == null)) {
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.attributeList()

        // Do this as a change request since it may add a new icon.
        ChangeRequest request = new ChangeRequest(this, "Edit Custom Icon") {
            protected void _execute() throws Exception {
                EditorIcon icon = null;
                List iconList = object.attributeList(EditorIcon.class);

                if (iconList.size() > 0) {
                    // Get the last icon.
                    icon = (EditorIcon) iconList.get(iconList.size() - 1);
                }
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.