Package ptolemy.kernel.util

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


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