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

java.lang.Object
  extended by cox.jmatt.java.MathTools.markup.StyleInfo
      extended by cox.jmatt.java.MathTools.markup.svg.StylePen
Direct Known Subclasses:
MarkerPen, TextPen

public class StylePen
extends StyleInfo

This is the SVG class used to encapsulate CSS rules and 'style=' attributes.


Constructor Summary
StylePen()
           
 
Method Summary
 StylePen copyOf()
          Create a copy of this pen, including the name! Change it with setPen().
 StylePen setClipURL(java.lang.String pURL)
          Set a clip-path URL to the style specified.
 StylePen setFill(java.lang.String pValue)
          Set the fill color.
 StylePen setFillNonzero(boolean pNonZero)
          Set the fill-rule for this style.
 StylePen setFillOpacity(java.lang.Double pValue)
          Set the fill opacity.
 StylePen setFillURL(java.lang.String pURL)
          Set the 'fill:' to an URL value.
 StylePen setMaskURL(java.lang.String pURL)
          Set a mask URL to the style specified.
 void setName(java.lang.String ignored)
          StylePens are tracked by number; the name is handled automatically.
 StylePen setOpacity(java.lang.Double pValue)
          Set the stroke opacity.
 StylePen setPen(int pPen)
          Set the pen number used to reference this style, if it is to be a CSS 'pen' style.
 StylePen setStroke(java.lang.String pValue)
          Set the stroke color.
 StylePen setStrokeDasharray(java.lang.String pValue)
          Set the stroke dash array.
 StylePen setStrokeDashOffset(java.lang.String pValue)
          Set the stroke dasharray offset.
 StylePen setStrokeLinecap(char pValue)
          Set the stroke linecap attribute.
 StylePen setStrokeLinejoin(char pValue)
          Set the stroke linejoin attribute.
 StylePen setStrokeMiterlimit(java.lang.String pValue)
          Set the stroke miter limit.
 StylePen setStrokeWidth(java.lang.Double pValue)
          Set the width of the stroke.
 
Methods inherited from class cox.jmatt.java.MathTools.markup.StyleInfo
_addDeclaration, _addNDeclaration, _addNDeclaration, _declarations, _enableCopy, _uniqueName, configurate, configurateGlobalPizza, reset, toAttribute, toAttribute, toCSS, toRawCSS, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StylePen

public StylePen()
Method Detail

setName

public void setName(java.lang.String ignored)
StylePens are tracked by number; the name is handled automatically. This method does nothing.

Overrides:
setName in class StyleInfo

copyOf

public StylePen copyOf()
Create a copy of this pen, including the name! Change it with setPen().

Overrides:
copyOf in class StyleInfo

setPen

public StylePen setPen(int pPen)
Set the pen number used to reference this style, if it is to be a CSS 'pen' style. If the pen number is negative nothing is set.


setStroke

public StylePen setStroke(java.lang.String pValue)
Set the stroke color.


setFill

public StylePen setFill(java.lang.String pValue)
Set the fill color.


setFillURL

public StylePen setFillURL(java.lang.String pURL)
Set the 'fill:' to an URL value. The value itself is set to 'url(pURL)'. The 'url' and parentheses are supplied, but if it is a local URL it must still be prepended with the '#'. Setting null or blank clears the 'fill' setting.


setClipURL

public StylePen setClipURL(java.lang.String pURL)
Set a clip-path URL to the style specified. The 'url()' is supplied but the leading '#' for local URLs is not. Setting null clears the value.


setMaskURL

public StylePen setMaskURL(java.lang.String pURL)
Set a mask URL to the style specified. The 'url()' is supplied but the leading '#' for local URLs is not. Setting null clears the value.


setOpacity

public StylePen setOpacity(java.lang.Double pValue)
Set the stroke opacity. The value must be between 0.0 and 1.0


setStrokeWidth

public StylePen setStrokeWidth(java.lang.Double pValue)
Set the width of the stroke.


setFillOpacity

public StylePen setFillOpacity(java.lang.Double pValue)
Set the fill opacity.


setStrokeDasharray

public StylePen setStrokeDasharray(java.lang.String pValue)
Set the stroke dash array.


setStrokeDashOffset

public StylePen setStrokeDashOffset(java.lang.String pValue)
Set the stroke dasharray offset.


setStrokeLinecap

public StylePen setStrokeLinecap(char pValue)

Set the stroke linecap attribute. The argument uses one char as there are limited valid values:


setStrokeLinejoin

public StylePen setStrokeLinejoin(char pValue)

Set the stroke linejoin attribute. The argument uses one char as there are limited valid values:


setStrokeMiterlimit

public StylePen setStrokeMiterlimit(java.lang.String pValue)
Set the stroke miter limit.


setFillNonzero

public StylePen setFillNonzero(boolean pNonZero)
Set the fill-rule for this style. Since nonzero is the default and there are only two values, this method is named accordingly and takes a boolean argument. If pNonZero is false, the fill-rule is evenodd.