Package ptolemy.vergil.kernel.attributes

Examples of ptolemy.vergil.kernel.attributes.RectangleAttribute


        int columnsValue = ((IntToken) columns.getToken()).intValue();
        int rowsValue = ((IntToken) rows.getToken()).intValue();
        _leds = new RectangleAttribute[rowsValue][columnsValue];
        for (int x = 0; x < rowsValue; x++) {
            for (int y = 0; y < columnsValue; y++) {
                RectangleAttribute rectangle = new RectangleAttribute(
                        _ledArray_icon, "_led_" + x + "_" + y);
                Location location = new Location(rectangle, "_location");
                double[] ledLocationValue = { x * 20, y * 20 };
                location.setLocation(ledLocationValue);
                rectangle.width.setToken("20.0");
View Full Code Here


        // The icon of this actor has 3 LEDs: red, yellow, and green.
        // For each LED, create the corresponding parameter and
        // graphical icon.  Then initialize the LED to the off setting.
        red = new Parameter(this, "red");
        _ledRed = new RectangleAttribute(node_icon, "_ledRed");

        Location ledRedLoc = new Location(_ledRed, "_location");
        double[] ledRedLocVal = { -20.0, 0.0 };
        ledRedLoc.setLocation(ledRedLocVal);
        _ledRed.width.setToken("20.0");
        _ledRed.height.setToken("39.0");
        _ledRed.centered.setToken("true");
        _redOff();

        green = new Parameter(this, "green");
        _ledGreen = new RectangleAttribute(node_icon, "_ledGreen");

        Location ledGreenLoc = new Location(_ledGreen, "_location");
        double[] ledGreenLocVal = { 0.0, 0.0 };
        ledGreenLoc.setLocation(ledGreenLocVal);
        _ledGreen.width.setToken("20.0");
        _ledGreen.height.setToken("39.0");
        _ledGreen.centered.setToken("true");
        _greenOff();

        yellow = new Parameter(this, "yellow");
        _ledYellow = new RectangleAttribute(node_icon, "_ledYellow");

        Location ledYellowLoc = new Location(_ledYellow, "_location");
        double[] ledYellowLocVal = { 20.0, 0.0 };
        ledYellowLoc.setLocation(ledYellowLocVal);
        _ledYellow.width.setToken("20.0");
View Full Code Here

     *  any.  Any attributes that are not recognized will be ignored.
     */
    private void _createAttribute(String type, Map attributes, String content) {
        try {
            if (type.equals("rect")) {
                RectangleAttribute attribute = new RectangleAttribute(this,
                        uniqueName("rect"));

                _processFilledShapeAttributeAttributes(attribute, attributes);
            } else if (type.equals("circle")) {
                EllipseAttribute attribute = new EllipseAttribute(this,
View Full Code Here

        _hideName.setToken(BooleanToken.TRUE);
        _hideName.setVisibility(Settable.EXPERT);

        // The icon.
        EditorIcon _icon = new EditorIcon(this, "_icon");
        RectangleAttribute rectangle = new RectangleAttribute(_icon,
                "rectangle");
        rectangle.width.setExpression("155.0");
        rectangle.height.setExpression("20.0");
        rectangle.fillColor.setExpression("{1.0, 0.7, 0.7, 1.0}");
View Full Code Here

        _showParameters.setExpression("None");
        _showParameters.setDisplayName("Show parameters");

        // The icon.
        EditorIcon _icon = new EditorIcon(this, "_icon");
        RectangleAttribute rectangle = new RectangleAttribute(_icon,
                "rectangle");
        rectangle.width.setExpression("120.0");
        rectangle.height.setExpression("20.0");
        rectangle.fillColor.setExpression("{0.2,1.0,1.0,1.0}");
View Full Code Here

TOP

Related Classes of ptolemy.vergil.kernel.attributes.RectangleAttribute

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.