|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.visualization.svg.SVGUtil
public final class SVGUtil
Utility class for SVG processing. Much of the classes are to allow easier attribute setting (conversion to string) and Namespace handling
Field Summary | |
---|---|
static NumberFormat |
FMT
Formatter to output numbers in a valid SVG number format. |
Constructor Summary | |
---|---|
SVGUtil()
|
Method Summary | |
---|---|
static void |
addCSSClass(Element e,
String cssclass)
Add a CSS class to an Element. |
static String |
fmt(double x)
Format a double according to the SVG specs. |
static Element |
makeStyleElement(Document document)
Make a new CSS style element for the given Document. |
static void |
removeCSSClass(Element e,
String cssclass)
Remove a CSS class from an Element. |
static void |
setAtt(Element el,
String name,
double d)
Set a SVG attribute |
static void |
setAtt(Element el,
String name,
int d)
Set a SVG attribute |
static void |
setAtt(Element el,
String name,
String d)
Set a SVG attribute |
static Element |
svgElement(Document document,
String name)
Create a SVG element in appropriate namespace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final NumberFormat FMT
Constructor Detail |
---|
public SVGUtil()
Method Detail |
---|
public static String fmt(double x)
x
- number to format
public static Element svgElement(Document document, String name)
document
- containing documentname
- node name
public static void setAtt(Element el, String name, double d)
el
- elementname
- attribute named
- double valuepublic static void setAtt(Element el, String name, int d)
el
- elementname
- attribute named
- integer valuepublic static void setAtt(Element el, String name, String d)
el
- elementname
- attribute named
- string valuepublic static void addCSSClass(Element e, String cssclass)
e
- Elementcssclass
- class to add.public static void removeCSSClass(Element e, String cssclass)
e
- Elementcssclass
- class to remove.public static Element makeStyleElement(Document document)
document
- document (factory)
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |