public static void addCSSClass(Element e,String cssclass){
  String oldval=e.getAttribute(SVGConstants.SVG_CLASS_ATTRIBUTE);
  if (oldval == null || oldval.length() == 0) {
    setAtt(e,SVGConstants.SVG_CLASS_ATTRIBUTE,cssclass);
    return;
  }
  String[] classes=oldval.split(" ");
  for (  String c : classes) {
    if (c.equals(cssclass)) {
      return;
    }
  }
  setAtt(e,SVGConstants.SVG_CLASS_ATTRIBUTE,oldval + " " + cssclass);
}

public static void addCSSClass ( Element e , String cssclass ) { String oldval = e . getAttribute ( SVGConstants . SVG_CLASS_ATTRIBUTE ) ; if ( oldval == null || oldval . length ( ) == 0 ) { setAtt ( e , SVGConstants . SVG_CLASS_ATTRIBUTE , cssclass ) ; return ; } String [ ] classes = oldval . split ( " " ) ; for ( String c : classes ) { if ( c . equals ( cssclass ) ) { return ; } } setAtt ( e , SVGConstants . SVG_CLASS_ATTRIBUTE , oldval + " " + cssclass ) ; }
add a css class to an element .
