Examples of asColor()


Examples of ptolemy.actor.gui.ColorAttribute.asColor()

                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.asColor()

        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.asColor()

                // 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.asColor()

                    // 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.asColor()

                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

Examples of ptolemy.kernel.util.StringAttribute.asColor()

                // 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.kernel.util.StringAttribute.asColor()

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