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

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.DrawableContainerTag
              extended by cox.jmatt.java.MathTools.markup.svg.MarkerTag

public class MarkerTag
extends DrawableContainerTag

This class implements the <marker> tag. It is a <defs> defs-block element used to place markers along a path or line of some type. A valid ID is mandatory. There is no public constructor and the factory method will NOT build a tag around a null or blank ID.


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
 
Method Summary
static MarkerTag newInstance(java.lang.String pTagID)
          This is the only way to construct an instance of this class.
 void reset()
          Overridden to preserve the ID.
 void reset(java.lang.String newID)
          Call this method to clear data and re-set the ID in one fell swoop.
 void setID(java.lang.String pID)
          Overridden to ensure the ID set is valid.
 MarkerTag setOrient(java.lang.String pValue)
          Set the orientation of the marker.
 MarkerTag setPAR(java.lang.String pRatio)
          Set the 'preserveAspectRatio' value for this tag.
 MarkerTag setRererencePoint(java.lang.Double pStartX, java.lang.Double pStartY)
          Set the relative starting point for the marker.
 MarkerTag setUnits(boolean pStrokeWidth)
          Set the scaling of the marker.
 MarkerTag setViewBox(java.lang.String pBox)
          Provide viewbox configuration for this class and SVGTag.
 
Methods inherited from class cox.jmatt.java.MathTools.markup.svg.DrawableContainerTag
_addContent, _addCSS, _addDef, _content, _setContent, _setDesc, _setOBUS, _setPAR, _setTitle, _setViewBox, add, addRaw, drawCircle, drawEllipse, drawLine, drawPath, drawPoint, drawPolygon, drawPolyline, drawRectangle, drawRectangle, drawText
 
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, _fixKey, _setEnableXMLTag, badPizza, closeTag, configureTag, configureTagFromGlobalPizza, makeTag, openTag, toString, validString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

newInstance

public static MarkerTag newInstance(java.lang.String pTagID)
This is the only way to construct an instance of this class. If the ID argument is null or blank the return value is null!


setID

public void setID(java.lang.String pID)
Overridden to ensure the ID set is valid.

Overrides:
setID in class Tag

reset

public void reset()
Overridden to preserve the ID. To change it use reset(String) or re-set manually afterward.

Overrides:
reset in class Tag

reset

public void reset(java.lang.String newID)
Call this method to clear data and re-set the ID in one fell swoop.


setRererencePoint

public MarkerTag setRererencePoint(java.lang.Double pStartX,
                                   java.lang.Double pStartY)
Set the relative starting point for the marker. This point is given in reference to the marker's coordinate system and is the point that should be used for the starting point in the external coordinate system. If either argument is null or blank it is ignored.


setOrient

public MarkerTag setOrient(java.lang.String pValue)
Set the orientation of the marker. Setting 'auto' makes it rotate to point along the path/line segment it is on. Setting a number rotates it that many degrees, period. Setting null or blank clears the property.

Parameters:
pValue - The word 'auto' or a number of degrees to rotate.

setUnits

public MarkerTag setUnits(boolean pStrokeWidth)
Set the scaling of the marker. If pStrokeWidth is true it sets the marker's coordinate system so that one unit equals the stroke width. If false, the units are those of the external object referencing the marker ('userSpaceOnUse').

Parameters:
pStrokeWidth - true to set the coordinates to 'strokeWidth', false for 'userSpaceOnUse'.

setViewBox

public MarkerTag setViewBox(java.lang.String pBox)
Provide viewbox configuration for this class and SVGTag.

See Also:
DrawableContainerTag._setViewBox(java.lang.String)

setPAR

public MarkerTag setPAR(java.lang.String pRatio)
Set the 'preserveAspectRatio' value for this tag.

See Also:
DrawableContainerTag._setPAR(java.lang.String)