Package ptolemy.actor.gui

Examples of ptolemy.actor.gui.ColorAttribute


        entityNames.setTypeEquals(new ArrayType(BaseType.STRING));

        // NOTE: The name of the this parameter violates the
        // naming conventions so that it is recorgnized as a highlight
        // color for this icon.
        _highlightColor = new ColorAttribute(this, "_highlightColor");
        // Yellow default.
        _highlightColor.setExpression("{1.0, 1.0, 0.0, 1.0}");

        label = new StringParameter(this, "label");
        label.setExpression("HighlightEntities");
View Full Code Here


        iterationSynchronized = new Parameter(this, "iterationSynchronized",
                new BooleanToken(false));
        iterationSynchronized.setTypeEquals(BaseType.BOOLEAN);

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

        _lastTransform = new Transform3D();
    }
View Full Code Here

        sceneGraphOut = new TypedIOPort(this, "sceneGraphOut");
        sceneGraphOut.setOutput(true);
        sceneGraphOut.setTypeEquals(Scene2DToken.TYPE);

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

        lineWidth = new Parameter(this, "lineWidth", new DoubleToken(1.0));
        lineWidth.setTypeEquals(BaseType.DOUBLE);
View Full Code Here

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

        highlightColor = new ColorAttribute(this, "highlightColor");
        // Red default.
        highlightColor.setExpression("{1.0, 0.0, 0.0, 1.0}");
    }
View Full Code Here

        super(container, name);
        sceneGraphOut = new TypedIOPort(this, "sceneGraphOut");
        sceneGraphOut.setOutput(true);
        sceneGraphOut.setTypeEquals(Scene2DToken.TYPE);

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

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

        outlineWidth = new Parameter(this, "outlineWidth", new DoubleToken(1.0));
        outlineWidth.setTypeEquals(BaseType.DOUBLE);
    }
View Full Code Here

        translatable = new Parameter(this, "translatable", new BooleanToken(
                false));
        translatable.setTypeEquals(BaseType.BOOLEAN);

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

        _originRelocatable = false;
    }
View Full Code Here

        super(container, name);
        sceneGraphOut = new TypedIOPort(this, "sceneGraphOut");
        sceneGraphOut.setOutput(true);
        sceneGraphOut.setTypeEquals(SceneGraphToken.TYPE);

        diffuseColor = new ColorAttribute(this, "diffuseColor");
        diffuseColor.setExpression("{0.7, 0.7, 0.7, 1.0}");

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

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

        texture = new FileParameter(this, "texture");

        // The following ensures that revert to defaults works properly.
View Full Code Here

            } 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

    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

        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

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.