Examples of ColorAttribute


Examples of ptolemy.actor.gui.ColorAttribute

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

Examples of ptolemy.actor.gui.ColorAttribute

    private void _addErrorHighlightIfNeeded(Nameable culprit)
            throws IllegalActionException, NameDuplicationException {
        Attribute highlightColor = ((NamedObj) culprit)
                .getAttribute("_highlightColor");
        if (highlightColor == null) {
            highlightColor = new ColorAttribute((NamedObj) culprit,
                    "_highlightColor");
            ((ColorAttribute) highlightColor)
                    .setExpression("{1.0, 0.0, 0.0, 1.0}");
            highlightColor.setPersistent(false);
            ((ColorAttribute) highlightColor).setVisibility(Settable.EXPERT);
View Full Code Here

Examples of ptolemy.actor.gui.ColorAttribute

        textSize.addChoice("14");
        textSize.addChoice("18");
        textSize.addChoice("24");
        textSize.addChoice("32");

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

        // Get font family names from the Font class in Java.
        // This includes logical font names, per Font class in Java:
        // Dialog, DialogInput, Monospaced, Serif, SansSerif, or Symbol.
View Full Code Here

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

Examples of ptolemy.actor.gui.ColorAttribute

     */
    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

Examples of ptolemy.actor.gui.ColorAttribute

    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

Examples of ptolemy.actor.gui.ColorAttribute

                } 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

Examples of ptolemy.actor.gui.ColorAttribute

        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

Examples of ptolemy.actor.gui.ColorAttribute

                } 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

Examples of ptolemy.actor.gui.ColorAttribute

                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
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.