JHotDraw 7.0.6

org.jhotdraw.samples.svg
Class SVGUtil

java.lang.Object
  extended by org.jhotdraw.samples.svg.SVGUtil

public class SVGUtil
extends java.lang.Object

SVGUtils.


Field Summary
static java.util.Map<java.lang.String,java.awt.Color> SVG_COLORS
           
 
Method Summary
static java.util.List<BezierPath> fromPathData(java.lang.String str)
           
static java.awt.Color getColor(java.lang.String value)
           
static double getDimension(DOMInput in, java.lang.String attributeName)
           
static double getDimensionValue(DOMInput in, java.lang.String str)
           
static java.lang.String getInheritedAttribute(java.lang.String name, DOMInput in, java.util.List<java.util.Map<java.lang.String,java.lang.String>> styles)
           
static java.util.List<BezierPath> getPath(DOMInput in, java.lang.String attributeName)
           
static java.util.Map<java.lang.String,java.lang.String> getStyles(java.lang.String str)
           
static java.awt.geom.AffineTransform getTransform(DOMInput in, java.lang.String attributeName)
           
static java.awt.geom.AffineTransform getTransform(java.lang.String str)
           
static void readAttributes(Figure f, DOMInput in)
          Reads the attributes from the specified DOMInput and assigns them to the figure.
static void setDefaults(Figure f)
           
static void setPath(DOMOutput out, java.lang.String attributeName, BezierPath path)
           
static java.lang.String toPathData(BezierPath path)
           
static void writeAttributes(Figure f, DOMOutput out)
          Writes the attributes of the figure into the specified DOMOutput.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SVG_COLORS

public static final java.util.Map<java.lang.String,java.awt.Color> SVG_COLORS
Method Detail

getTransform

public static java.awt.geom.AffineTransform getTransform(DOMInput in,
                                                         java.lang.String attributeName)
                                                  throws java.io.IOException
Throws:
java.io.IOException

getTransform

public static java.awt.geom.AffineTransform getTransform(java.lang.String str)
                                                  throws java.io.IOException
Throws:
java.io.IOException

getDimension

public static double getDimension(DOMInput in,
                                  java.lang.String attributeName)
                           throws java.io.IOException
Throws:
java.io.IOException

getDimensionValue

public static double getDimensionValue(DOMInput in,
                                       java.lang.String str)
                                throws java.io.IOException
Throws:
java.io.IOException

getPath

public static java.util.List<BezierPath> getPath(DOMInput in,
                                                 java.lang.String attributeName)
                                          throws java.io.IOException
Throws:
java.io.IOException

setPath

public static void setPath(DOMOutput out,
                           java.lang.String attributeName,
                           BezierPath path)

toPathData

public static java.lang.String toPathData(BezierPath path)

fromPathData

public static java.util.List<BezierPath> fromPathData(java.lang.String str)
                                               throws java.io.IOException
Throws:
java.io.IOException

getInheritedAttribute

public static java.lang.String getInheritedAttribute(java.lang.String name,
                                                     DOMInput in,
                                                     java.util.List<java.util.Map<java.lang.String,java.lang.String>> styles)

readAttributes

public static void readAttributes(Figure f,
                                  DOMInput in)
                           throws java.io.IOException
Reads the attributes from the specified DOMInput and assigns them to the figure.

Throws:
java.io.IOException

getStyles

public static java.util.Map<java.lang.String,java.lang.String> getStyles(java.lang.String str)
                                                                  throws java.io.IOException
Throws:
java.io.IOException

getColor

public static java.awt.Color getColor(java.lang.String value)

setDefaults

public static void setDefaults(Figure f)

writeAttributes

public static void writeAttributes(Figure f,
                                   DOMOutput out)
                            throws java.io.IOException
Writes the attributes of the figure into the specified DOMOutput.

Throws:
java.io.IOException

Copyright 1996-2006 © JHotDraw.org