Class ResizablePolygonAttribute

  • All Implemented Interfaces:
    java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class ResizablePolygonAttribute
    extends FilledShapeAttribute

    This is an attribute that is rendered as a polygon. The vertices parameter is an array of doubles that specify the vertices of the polygon in the form {x1, y1, x2, y2, ... }. The width and height parameters, somewhat awkwardly, are used to specify the overall width and height. The polygon will be scaled to fit the specified width and height.

    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Edward A. Lee
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Yellow (eal)
    • Field Detail

      • vertices

        public Parameter vertices
        The amount of vertices of the corners. This is a double that defaults to 0.0, which indicates no vertices. The default value specifies a rhombus.
    • Constructor Detail

      • ResizablePolygonAttribute

        public ResizablePolygonAttribute​(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.