Package ptolemy.actor.gui

Examples of ptolemy.actor.gui.ColorAttribute


        centered = new Parameter(this, "centered");
        centered.setTypeEquals(BaseType.BOOLEAN);
        centered.setExpression("false");

        fillColor = new ColorAttribute(this, "fillColor");
        fillColor.setExpression("none");

        // Create a custom controller.
        new ResizableAttributeControllerFactory(this, "_controllerFactory");
    }
View Full Code Here


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

        boxColor = new ColorAttribute(this, "boxColor");
        boxColor.setExpression("{1.0, 1.0, 1.0, 1.0}");
    }
View Full Code Here

    protected Figure _createDefaultBackgroundFigure() {
        Color color = Color.black;
        List colorAttributes = attributeList(ColorAttribute.class);

        if (colorAttributes.size() > 0) {
            ColorAttribute colorAttribute = (ColorAttribute) colorAttributes
                    .get(0);
            color = colorAttribute.asColor();
        }

        return new BasicEllipse(-10, -6, 6, 6, color, 1);
    }
View Full Code Here

                } catch (IllegalActionException e) {
                    // Ignore.
                }
                // New way to set the color
                try {
                    ColorAttribute colorAttr = (ColorAttribute) (relation
                            .getAttribute("_color", ColorAttribute.class));
                    if (colorAttr != null) {
                        Color color = colorAttr.asColor();
                        ((BasicFigure) figure).setFillPaint(color);
                    }
                } catch (IllegalActionException e) {
                    // Ignore.
                }
View Full Code Here

        lineWidth = new Parameter(this, "lineWidth");
        lineWidth.setTypeEquals(BaseType.DOUBLE);
        lineWidth.setExpression("1.0");

        lineColor = new ColorAttribute(this, "lineColor");
        lineColor.setExpression("{0.0, 0.0, 0.0, 1.0}");

        dashArray = new Parameter(this, "dashArray");
        dashArray.setTypeEquals(new ArrayType(BaseType.DOUBLE));
    }
View Full Code Here

                } 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;
                }
View Full Code Here

                figure = new TerminalFigure(figure, tsite);
            }

            // New way to specify a highlight color.
            try {
                ColorAttribute highlightAttribute = (ColorAttribute) (port
                        .getAttribute("_highlightColor", ColorAttribute.class));
                if (highlightAttribute != null
                        && !highlightAttribute.getExpression().trim()
                                .equals("")) {
                    Color color = highlightAttribute.asColor();
                    AnimationRenderer animationRenderer = new AnimationRenderer(
                            color);
                    animationRenderer.renderSelected(figure);
                }
            } catch (IllegalActionException e) {
View Full Code Here

TOP

Related Classes of ptolemy.actor.gui.ColorAttribute

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.