Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.StringAttribute


     *   actor with this name.
     */
    public CalInterpreter(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);
        calCode = new StringAttribute(this, "calCode");
        calCode.setExpression(defaultActorText);
        calCode.setVisibility(Settable.EXPERT);
        _attachActorIcon(name);
    }
View Full Code Here


            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        input.setTypeEquals(BaseType.BOOLEAN);

        message = new StringAttribute(this, "message");
        message.setExpression("Model triggered an exception.");
    }
View Full Code Here

     */
    public HTMLViewerTableau(Effigy container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        url = new StringAttribute(this, "url");
        // Set the tableau so that we can get the Configuration and Kepler icon.
        HTMLViewer frame = new HTMLViewer(this);
        setFrame(frame);
        frame.setTableau(this);

View Full Code Here

        sleepTime = new PortParameter(this, "sleepTime");
        sleepTime.setExpression("0L");
        sleepTime.setTypeEquals(BaseType.LONG);

        Port sleepPort = sleepTime.getPort();
        StringAttribute sleepCardinal = new StringAttribute(sleepPort,
                "_cardinal");
        sleepCardinal.setExpression("SOUTH");

        // Data type polymorphic, multiports.
        input.setMultiport(true);
        output.setMultiport(true);
        output.setTypeAtLeast(input);
View Full Code Here

        super(container, name);

        input = new TypedIOPort(this, "input", true, false);
        output = new TypedIOPort(this, "output", false, true);

        variableName = new StringAttribute(this, "variableName");
        variableName.setExpression("parameter");

        delayed = new Parameter(this, "delayed");
        delayed.setTypeEquals(BaseType.BOOLEAN);
        delayed.setExpression("true");
View Full Code Here

        if (libraryContainer == null) {
            return;
        }

        StringAttribute alternateLibraryBuilderAttribute = (StringAttribute) libraryContainer
                .getAttribute("_alternateLibraryBuilder");

        // If the _alternateLibraryBuilder attribute is present,
        // then we use the specified class to build the library
        // instead of just reading the moml.

        if (alternateLibraryBuilderAttribute != null) {
            // Get the class that will build the library from the plugins
            String libraryBuilderClassName = alternateLibraryBuilderAttribute
                    .getExpression();

            // Dynamically load the library builder and build the library
            Class libraryBuilderClass = Class.forName(libraryBuilderClassName);
            LibraryBuilder libraryBuilder = (LibraryBuilder) libraryBuilderClass
                    .newInstance();

            // Set the attributes defined in the moml to the attributes of the
            // LibraryBuilder
            libraryBuilder.addAttributes(alternateLibraryBuilderAttribute
                    .attributeList());

            try {
                library = libraryBuilder.buildLibrary(libraryContainer
                        .workspace());
View Full Code Here

                }
                connector.setToolTipText(tipText);

                try {
                    // FIXME: This isn't quite right for relation groups.
                    StringAttribute colorAttribute = (StringAttribute) (relation
                            .getAttribute("_color", StringAttribute.class));

                    if (colorAttribute != null) {
                        String color = colorAttribute.getExpression();
                        if (color != null && !color.trim().equals("")) {
                            connector.setStrokePaint(SVGUtilities
                                    .getColor(color));
                        }
                    }
                } catch (IllegalActionException e) {
                    // Ignore;
                }
                try {
                    // FIXME: This isn't quite right for relation groups.
                    ColorAttribute colorAttribute = (ColorAttribute) (relation
                            .getAttribute("color", ColorAttribute.class));

                    if (colorAttribute != null) {
                        Color color = colorAttribute.asColor();
                        connector.setStrokePaint(color);
                    }
                } catch (IllegalActionException e) {
                    // Ignore;
                }

                StringAttribute _explAttr = (StringAttribute) (relation
                        .getAttribute("_explanation"));

                if (_explAttr != null) {
                    connector.setToolTipText(_explAttr.getExpression());
                }

                // NOTE: The preferences mechanism may set this.
                Token radiusValue = PtolemyPreferences.preferenceValue(
                        relation, "_linkBendRadius");
View Full Code Here

     */
    public TextEditorTableauFactory(NamedObj container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        attributeName = new StringAttribute(this, "attributeName");

        columnsDisplayed = new Parameter(this, "columnsDisplayed");
        columnsDisplayed.setTypeEquals(BaseType.INT);
        columnsDisplayed.setExpression("80");

View Full Code Here

            String applicationName = "";

            // We handle the applicationName specially so that we open
            // only the docs for the app we are running.
            try {
                StringAttribute applicationNameAttribute = (StringAttribute) configuration
                        .getAttribute("_applicationName", StringAttribute.class);

                if (applicationNameAttribute != null) {
                    applicationName = applicationNameAttribute.getExpression();
                }
            } catch (Throwable throwable) {
                // Ignore and use the default applicationName: "",
                // which means we look in doc.codeDoc.
            }
View Full Code Here

     */
    public TextEditorConfigureFactory(NamedObj container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        attributeName = new StringAttribute(this, "attributeName");

        columnsDisplayed = new Parameter(this, "columnsDisplayed");
        columnsDisplayed.setTypeEquals(BaseType.INT);
        columnsDisplayed.setExpression("80");

View Full Code Here

TOP

Related Classes of ptolemy.kernel.util.StringAttribute

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.