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

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

public class TSpanTag
extends TextTag

The TSpanTag class encapsulates the <tspan> tag, which is basically a <text> tag within another <text> tag. This is a very loose analogy but good enough for MathTools' purposes. In function this tag allows some text within a <text> tag to be styled differently from the rest. To that end it provides three methods and two constructors for the extra goodies the <tspan> tag possesses.

Although this class inherits set-default methods from TextTag for style and transforms these should not be used! Each TSpanTag should set these options individually! Or, when possible, rely on those set on the enclosing tag.


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
TSpanTag()
          Build a blank tag.
TSpanTag(java.lang.String pText)
          Build a tag with text in-place.
 
Method Summary
 TSpanTag copyOf()
          Copy this class.
 TSpanTag setBaselineShift(java.lang.Double pShift)
          This is used for super- and sub-scripting text.
 TSpanTag setDelta(java.lang.Double dx, java.lang.Double dy)
          Set the <tspan> 'dx=' and 'dy=' attributes.
 TSpanTag setRotate(java.lang.Double pDegrees)
          This sets the 'rotate=' attribute for this tag.
 
Methods inherited from class cox.jmatt.java.MathTools.markup.svg.TextTag
_content, _setContent, addText, addText, addTextPath, setData, setLengthAdjust, setLocation, setTextLength
 
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, reset, setID, toString, validString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TSpanTag

public TSpanTag()
Build a blank tag.


TSpanTag

public TSpanTag(java.lang.String pText)
Build a tag with text in-place.

Method Detail

copyOf

public TSpanTag copyOf()
Copy this class.

Overrides:
copyOf in class TextTag

setDelta

public TSpanTag setDelta(java.lang.Double dx,
                         java.lang.Double dy)
Set the <tspan> 'dx=' and 'dy=' attributes. Null or blank values are ignored. A self-reference is returned for method chaining.


setBaselineShift

public TSpanTag setBaselineShift(java.lang.Double pShift)
This is used for super- and sub-scripting text. Although it can appear in the style attribute it is treated here as structure rather than presentation.


setRotate

public TSpanTag setRotate(java.lang.Double pDegrees)
This sets the 'rotate=' attribute for this tag. The value is an angle in degrees. Setting null clears the attribute and disables it.