Examples of SingletonParameter


Examples of ptolemy.data.expr.SingletonParameter

        String contributorsNames = "";
        contributors.setExpression(contributorsNames);
        author.setPersistent(true);

        // Hide the name of this ID attribute.
        SingletonParameter hide = new SingletonParameter(this, "_hideName");
        hide.setToken(BooleanToken.TRUE);
        hide.setVisibility(Settable.EXPERT);

        BoxedValuesIcon icon = new BoxedValuesIcon(this, "_icon");
        icon.setPersistent(false);

        // No need to display any parameters when the "_showParameters"
View Full Code Here

Examples of ptolemy.data.expr.SingletonParameter

        output.setTypeEquals(BaseType.DOUBLE);

        mode = new PortParameter(this, "mode", new DoubleToken(0.5));
        mode.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(mode.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        min = new PortParameter(this, "min", new DoubleToken(0.0));
        min.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(min.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        max = new PortParameter(this, "max", new DoubleToken(1.0));
        max.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(max.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);
    }
View Full Code Here

Examples of ptolemy.data.expr.SingletonParameter

        dim = new TypedIOPort(this, "dim", true, false);
        on = new TypedIOPort(this, "on", true, false);
        off = new TypedIOPort(this, "off", true, false);

        // Add attributes to indicate that names should be shown.
        (new SingletonParameter(bright, "_showName"))
                .setToken(BooleanToken.TRUE);
        (new SingletonParameter(dim, "_showName")).setToken(BooleanToken.TRUE);
        (new SingletonParameter(on, "_showName")).setToken(BooleanToken.TRUE);
        (new SingletonParameter(off, "_showName")).setToken(BooleanToken.TRUE);

        bright.setTypeEquals(BaseType.INT);
        dim.setTypeEquals(BaseType.INT);
        on.setTypeEquals(BaseType.BOOLEAN);
        on.setMultiport(true);
View Full Code Here

Examples of ptolemy.data.expr.SingletonParameter

        highlightColor = new ColorAttribute(this, "highlightColor");
        // Red default.
        highlightColor.setExpression("{1.0, 0.0, 0.0, 1.0}");

        // Hide the name.
        SingletonParameter _hideName = new SingletonParameter(this, "_hideName");
        _hideName.setToken(BooleanToken.TRUE);
        _hideName.setVisibility(Settable.EXPERT);

        // The icon.
        EditorIcon _icon = new EditorIcon(this, "_icon");
        RectangleAttribute rectangle = new RectangleAttribute(_icon,
                "rectangle");
View Full Code Here

Examples of ptolemy.data.expr.SingletonParameter

        super(container, name);

        searchFor = new PortParameter(this, "searchFor");
        searchFor.setStringMode(true);
        searchFor.setExpression("");
        (new SingletonParameter(searchFor.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

        inText = new PortParameter(this, "inText");
        inText.setStringMode(true);
        inText.setExpression("");
        (new SingletonParameter(inText.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

        ignoreCase = new Parameter(this, "ignoreCase");
        ignoreCase.setTypeEquals(BaseType.BOOLEAN);
        ignoreCase.setToken(new BooleanToken(false));

        startIndex = new PortParameter(this, "startIndex");
        startIndex.setTypeEquals(BaseType.INT);
        startIndex.setExpression("0");
        (new SingletonParameter(startIndex.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

        // Create new parameters and ports, then set default values and/or
        // types of parameters and ports.
        searchForwards = new Parameter(this, "searchForwards");
View Full Code Here

Examples of ptolemy.data.expr.SingletonParameter

        // Create new parameters and ports.
        // Set default values of the parameters and type constraints.
        start = new PortParameter(this, "start");
        start.setExpression("0");
        start.setTypeEquals(BaseType.INT);
        (new SingletonParameter(start.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

        stop = new PortParameter(this, "stop");
        stop.setExpression("0");
        stop.setTypeEquals(BaseType.INT);
        (new SingletonParameter(start.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

        input.setTypeEquals(BaseType.STRING);
        output.setTypeEquals(BaseType.STRING);
    }
View Full Code Here

Examples of ptolemy.data.expr.SingletonParameter

        // Create input ports, each one is a multiport.
        on = new TypedIOPort(this, "on", true, false);
        off = new TypedIOPort(this, "off", true, false);

        // Create attributes that force the names to be shown.
        (new SingletonParameter(on, "_showName")).setToken(BooleanToken.TRUE);
        (new SingletonParameter(off, "_showName")).setToken(BooleanToken.TRUE);

        // Will output true if movement is detected.
        on.setTypeEquals(BaseType.BOOLEAN);
        on.setMultiport(true);
        off.setTypeEquals(BaseType.BOOLEAN);
View Full Code Here

Examples of ptolemy.data.expr.SingletonParameter

                + "<text x=\"-15\" y=\"4\""
                + "style=\"font-size:11; fill:white; font-family:SansSerif\">"
                + "STOP</text>\n" + "</svg>\n");

        // Hide the name because the name is in the icon.
        _hideName = new SingletonParameter(this, "_hideName");
        _hideName.setToken(BooleanToken.TRUE);
        _hideName.setVisibility(Settable.EXPERT);
    }
View Full Code Here

Examples of ptolemy.data.expr.SingletonParameter

        // Ports.
        input = new TypedIOPort(this, "input", true, false);
        peakValues = new TypedIOPort(this, "peakValues", false, true);
        peakIndices = new TypedIOPort(this, "peakIndices", false, true);

        (new SingletonParameter(peakValues, "_showName"))
                .setToken(BooleanToken.TRUE);
        (new SingletonParameter(peakIndices, "_showName"))
                .setToken(BooleanToken.TRUE);

        // Set Type Constraints.
        input.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        peakValues.setTypeAtLeast(input);
View Full Code Here

Examples of ptolemy.data.expr.SingletonParameter

        // Create one matchString portParameter, one matchString port,
        // and one output port.
        pattern = new PortParameter(this, "pattern");
        pattern.setStringMode(true);
        pattern.setExpression("");
        (new SingletonParameter(pattern.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

        matchString = new PortParameter(this, "matchString");
        matchString.setStringMode(true);
        matchString.setExpression("");
        (new SingletonParameter(matchString.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

        output = new TypedIOPort(this, "output", false, true);
        output.setTypeEquals(BaseType.BOOLEAN);
    }
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.