Class FilledShapeAttribute

    • Field Detail

      • centered

        public Parameter centered
        Indicator of whether the shape should be centered on the location. This is a boolean that defaults to false, which means that the location is the upper left corner.
      • fillColor

        public ColorAttribute fillColor
        The line color. This is a string representing an array with four elements, red, green, blue, and alpha, where alpha is transparency. The default is "{0.0, 0.0, 0.0, 1.0}", which represents an opaque black.
      • height

        public Parameter height
        The vertical extent. This is a double that defaults to 100.0.
      • width

        public Parameter width
        The horizontal extent. This is a double that defaults to 100.0.
      • _centeredValue

        protected boolean _centeredValue
        Most recently set value of the centered parameter.
      • _heightValue

        protected double _heightValue
        Most recently set value of the height parameter.
      • _inAttributeChanged

        protected transient boolean _inAttributeChanged
        Variable used to prevent re-entry into attributeChanged().
      • _widthValue

        protected double _widthValue
        Most recently set value of the width parameter.
    • Constructor Detail

      • FilledShapeAttribute

        public FilledShapeAttribute​(NamedObj container,
                                    java.lang.String name)
                             throws IllegalActionException,
                                    NameDuplicationException
        Construct an attribute with the given name contained by the specified container. The container argument must not be null, or a NullPointerException will be thrown. This attribute will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string. Increment the version of the workspace.
        Parameters:
        container - The container.
        name - The name of this attribute.
        Throws:
        IllegalActionException - If the attribute is not of an acceptable class for the container, or if the name contains a period.
        NameDuplicationException - If the name coincides with an attribute already in the container.
    • Method Detail

      • clone

        public java.lang.Object clone​(Workspace workspace)
                               throws java.lang.CloneNotSupportedException
        Clone the object into the specified workspace. The new object is not added to the directory of that workspace (you must do this yourself if you want it there). The result is an object with no container.
        Overrides:
        clone in class ShapeAttribute
        Parameters:
        workspace - The workspace for the cloned object.
        Returns:
        The new Attribute.
        Throws:
        java.lang.CloneNotSupportedException - Not thrown in this base class
        See Also:
        NamedObj.exportMoML(Writer, int, String), NamedObj.setDeferringChangeRequests(boolean)
      • _newShape

        protected abstract java.awt.Shape _newShape()
        Return the a new shape given a new width and height. This class guarantees that the protected variables _centeredValue, _widthValue, and _heightValue are up to date when this method is called. Derived classes should override this to return an appropriate shape.
        Returns:
        A new shape.