Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.StringAttribute


        } else {
            commands = new LinkedList();
            String applicationName = null;

            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


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

        // Don't use StringParameter here because variable
        // substitution would be strange.
        text = new StringAttribute(this, "text");
        text.setExpression("Double click to edit text.");

        TextStyle style = new TextStyle(text, "_style");
        style.height.setExpression("20");
        style.width.setExpression("80");
View Full Code Here

        // conflict error messages and have to change this
        // to match.
        control.setExpression("true");
        ParameterPort port = control.getPort();
        // Put the control input on the bottom of the actor.
        StringAttribute controlCardinal = new StringAttribute(port, "_cardinal");
        controlCardinal.setExpression("SOUTH");

        // Create the default refinement.
        // NOTE: We do not use a TransitionRefinement because we don't
        // want the sibling input ports that come with output ports.
        _default = new Refinement(this, "default");
View Full Code Here

        address.setTypeEquals(BaseType.INT);
        data = new TypedIOPort(this, "data", true, false);
        data.setMultiport(true);
        data.setTypeEquals(BaseType.DOUBLE);

        pathName = new StringAttribute(this, "pathName");
        pathName.setExpression("outfile.wav");

        sampleRate = new Parameter(this, "sampleRate", new IntToken(8000));
        sampleRate.setTypeEquals(BaseType.INT);
View Full Code Here

    public AudioWriter(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        input.setTypeEquals(BaseType.DOUBLE);

        pathName = new StringAttribute(this, "pathName");
        pathName.setExpression("outfile.wav");

        sampleRate = new Parameter(this, "sampleRate", new IntToken(8000));
        sampleRate.setTypeEquals(BaseType.INT);
View Full Code Here

    public Comparator(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        // Parameters
        comparison = new StringAttribute(this, "comparison");
        comparison.setExpression(">");

        tolerance = new Parameter(this, "tolerance");
        tolerance.setExpression("0.0");
View Full Code Here

    public LogicFunction(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        // Parameters
        function = new StringAttribute(this, "function");
        function.setExpression("and");
        _function = _AND;
        _negate = false;

        // Ports
View Full Code Here

    public AudioReadBuffer(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);
        output.setTypeEquals(BaseType.DOUBLE);
        output.setMultiport(true);
        sourceURL = new StringAttribute(this, "sourceURL");
        bufferLength = new Parameter(this, "bufferLength", new IntToken(8000));
        sourceURL.setExpression("file:///tmp/test.wav");
    }
View Full Code Here

        control = new TypedIOPort(this, "control", true, false);
        control.setTypeEquals(BaseType.INT);

        // Put the control input on the bottom of the actor.
        StringAttribute controlCardinal = new StringAttribute(control,
                "_cardinal");
        controlCardinal.setExpression("SOUTH");
    }
View Full Code Here

    public Expression(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        output = new TypedIOPort(this, "output", false, true);
        expression = new StringAttribute(this, "expression");
        expression.setExpression("");

        Parameter hide = new Parameter(expression, "_hide");
        hide.setExpression("true");
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.