cox.jmatt.java.MathTools.markup.svg
Class RectangleTag

java.lang.Object
  extended by cox.jmatt.java.MathTools.markup.Tag
      extended by cox.jmatt.java.MathTools.markup.svg.StyleTag
          extended by cox.jmatt.java.MathTools.markup.svg.RectangleTag

public class RectangleTag
extends StyleTag

This class provides the SVG <rect> tag: rectangles. Equipment is provided for both sharp-cornered and rounded rectangles. If the corner radii are set they remain in effect until cleared via the reset() method. All coordinates are in user units.


Nested Class Summary
 
Nested classes/interfaces inherited from class cox.jmatt.java.MathTools.markup.svg.StyleTag
StyleTag.TagKeys
 
Field Summary
 
Fields inherited from class cox.jmatt.java.MathTools.markup.Tag
myTagName
 
Constructor Summary
RectangleTag()
          Standard constructor.
RectangleTag(java.lang.Double X1, java.lang.Double Y1, java.lang.Double pWidth, java.lang.Double pHeight)
          Create a square RectangleTag with all data present.
RectangleTag(java.lang.Double X1, java.lang.Double Y1, java.lang.Double pWidth, java.lang.Double pHeight, java.lang.Double radX, java.lang.Double radY)
          Create a rounded RectangleTag with all data.
 
Method Summary
 RectangleTag copyOf()
          Copy this class.
 RectangleTag setData(java.lang.Double X1, java.lang.Double Y1, java.lang.Double pWidth, java.lang.Double pHeight)
          (Re-)Set the corner coordinates, width, and height.
 RectangleTag setData(java.lang.Double X1, java.lang.Double Y1, java.lang.Double pWidth, java.lang.Double pHeight, java.lang.Double radX, java.lang.Double radY)
          Set or reconfigure all rectangle data.
 
Methods inherited from class cox.jmatt.java.MathTools.markup.svg.StyleTag
_configureTag, _enableCopy, canHaveDefs, isInDefs, setDefaultPen, setDefaultStyle, setDefaultTransform, setPen, setStyle, setTransform
 
Methods inherited from class cox.jmatt.java.MathTools.markup.Tag
_addAttribute, _addAttributes, _addNAttribute, _asBoolean, _asDouble, _asInt, _attributes, _clampNAttribute, _clampNAttribute, _content, _fixKey, _setContent, _setEnableXMLTag, badPizza, closeTag, configureTag, configureTagFromGlobalPizza, makeTag, openTag, reset, setID, toString, validString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RectangleTag

public RectangleTag()
Standard constructor. No data set.


RectangleTag

public RectangleTag(java.lang.Double X1,
                    java.lang.Double Y1,
                    java.lang.Double pWidth,
                    java.lang.Double pHeight)
Create a square RectangleTag with all data present.


RectangleTag

public RectangleTag(java.lang.Double X1,
                    java.lang.Double Y1,
                    java.lang.Double pWidth,
                    java.lang.Double pHeight,
                    java.lang.Double radX,
                    java.lang.Double radY)
Create a rounded RectangleTag with all data.

Method Detail

setData

public RectangleTag setData(java.lang.Double X1,
                            java.lang.Double Y1,
                            java.lang.Double pWidth,
                            java.lang.Double pHeight)
(Re-)Set the corner coordinates, width, and height. This does not alter corner radii.


setData

public RectangleTag setData(java.lang.Double X1,
                            java.lang.Double Y1,
                            java.lang.Double pWidth,
                            java.lang.Double pHeight,
                            java.lang.Double radX,
                            java.lang.Double radY)

Set or reconfigure all rectangle data. This method contains all possible data, so all argument descriptions are here. If the values are null they are ignored, so the only way to clear them is the reset() method. If the radii are specified they remain in effect until cleared, and if they are specified the rectangles generated will be rounded at the corners.

Parameters:
X1 - The X-coordinate of the rectangle center.
Y1 - The Y-coordinate of the rectangle center.
pWidth - The width (horizontal size) of the rectangle.
pHeight - The height (vertical size) of the rectangle.
radX - The corner horizontal radius for a rounded rectangle.
radY - The corner vertical radius for a rounded rectangle.

copyOf

public RectangleTag copyOf()
Copy this class.