Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.ConfigurableAttribute


    public void createInstanceFromExisting(KeplerDocumentationAttribute da) {
        //System.out.println("da att list: " + da.attributeList());
        //need to get: description, author, version, userleveldocumentation, ports, properties
        Iterator itt = da.attributeList().iterator();
        while (itt.hasNext()) {
            ConfigurableAttribute att = (ConfigurableAttribute) itt.next();
            String attName = att.getName();
            if (attName.equals("description")) {
                this.description = att.getConfigureText();
            } else if (attName.equals("author")) {
                this.author = att.getConfigureText();
            } else if (attName.equals("version")) {
                this.version = att.getConfigureText();
            } else if (attName.equals("userLevelDocumentation")) {
                this.userLevelDocumentation = att.getConfigureText();
            } else if (attName.indexOf("port:") != -1) { //add to the port hash
                String portName = attName.substring(attName.indexOf(":") + 1,
                        attName.length());
                String portDesc = att.getConfigureText();
                if (portName != null) {
                    if (portDesc == null) {
                        portDesc = "";
                    }
                    portHash.put(portName, portDesc);
                }

            } else if (attName.indexOf("prop:") != -1) { //add to the prop hash
                String propName = attName.substring(attName.indexOf(":") + 1,
                        attName.length());
                String propDesc = att.getConfigureText();
                if (propName != null) {
                    if (propDesc == null) {
                        propDesc = "";
                    }
                    propertyHash.put(propName, propDesc);
View Full Code Here


     * params or ports that exist in the target
     * @param target the namedobj to create the empty attributes for
     */
    public void createEmptyFields(NamedObj target) {
        try {
            ConfigurableAttribute authorAtt = new ConfigurableAttribute(this,
                    "author");
            ConfigurableAttribute versionAtt = new ConfigurableAttribute(this,
                    "version");
            ConfigurableAttribute descriptionAtt = new ConfigurableAttribute(
                    this, "description");
            ConfigurableAttribute uldAtt = new ConfigurableAttribute(this,
                    "userLevelDocumentation");

            this.author = "";
            this.version = "";
            this.description = "";
View Full Code Here

     @param value A String representing the port.
     */
    public void addPort(String name, String value)
            throws IllegalActionException, NameDuplicationException {
        portHash.put(name, value);
        ConfigurableAttribute port = new ConfigurableAttribute(this, "port:"
                + name);
    }
View Full Code Here

     @param value A string representing the propety.
     */
    public void addProperty(String name, String value)
            throws NameDuplicationException, IllegalActionException {
        propertyHash.put(name, value);
        ConfigurableAttribute ca = new ConfigurableAttribute(this, "prop:"
                + name);
    }
View Full Code Here

     *  named "_iconDescription" and "_smallIconDescription" in the
     *  specified container.
     */
    private void _bindToContainer(NamedObj container) {
        // Get the description.
        ConfigurableAttribute description = (ConfigurableAttribute) container
                .getAttribute("_iconDescription");

        // If the description has changed...
        if (_description != description) {
            if (_description != null) {
View Full Code Here

     @return A figure for this icon.
     */
    public Figure createBackgroundFigure() {
        // Get the description.
        NamedObj container = (NamedObj) getContainerOrContainerToBe();
        ConfigurableAttribute description = (ConfigurableAttribute) container
                .getAttribute("_iconDescription");

        // If the description has changed...
        if (_description != description) {
            if (_description != null) {
View Full Code Here

        }

        // No cached object, so rerender the icon.
        // Get the description.
        NamedObj container = (NamedObj) getContainerOrContainerToBe();
        ConfigurableAttribute description = (ConfigurableAttribute) container
                .getAttribute("_smallIconDescription");

        // If there is no separate small icon description, return
        // a scaled version of the background figure, as done by the base
        // class.
View Full Code Here

            ComponentEntity actor = (ComponentEntity) _container.entityList()
                    .get(0);

            _removeEditorIcons(_entity);

            ConfigurableAttribute actorAttribute = (ConfigurableAttribute) actor
                    .getAttribute("_iconDescription");
            String iconDescription = actorAttribute.getConfigureText();
            _setIconDescription(_entity, iconDescription);

            List<?> editorIconList = actor.attributeList(EditorIcon.class);

            for (Object editorIconObject : editorIconList) {
View Full Code Here

TOP

Related Classes of ptolemy.kernel.util.ConfigurableAttribute

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.