public void parseElement(String tagName,Map<String,Object> attrs){
  if (canvas == null && tagName.equalsIgnoreCase("GRAPH")) {
    scale=mxUtils.getDouble(attrs,"scale",1);
    canvas=createCanvas(attrs);
    if (canvas != null) {
      canvas.setScale(scale);
    }
  }
 else   if (canvas != null) {
    boolean drawLabel=false;
    if (tagName.equalsIgnoreCase("VERTEX") || tagName.equalsIgnoreCase("GROUP")) {
      drawVertex(attrs);
      drawLabel=true;
    }
 else     if (tagName.equalsIgnoreCase("EDGE")) {
      drawEdge(attrs);
      drawLabel=true;
    }
    if (drawLabel) {
      drawLabel(tagName.equalsIgnoreCase("EDGE"),attrs);
    }
  }
}

public void parseElement ( String tagName , Map < String , Object > attrs ) { if ( canvas == null && tagName . equalsIgnoreCase ( "GRAPH" ) ) { scale = mxUtils . getDouble ( attrs , "scale" , 1 ) ; canvas = createCanvas ( attrs ) ; if ( canvas != null ) { canvas . setScale ( scale ) ; } } else if ( canvas != null ) { boolean drawLabel = false ; if ( tagName . equalsIgnoreCase ( "VERTEX" ) || tagName . equalsIgnoreCase ( "GROUP" ) ) { drawVertex ( attrs ) ; drawLabel = true ; } else if ( tagName . equalsIgnoreCase ( "EDGE" ) ) { drawEdge ( attrs ) ; drawLabel = true ; } if ( drawLabel ) { drawLabel ( tagName . equalsIgnoreCase ( "EDGE" ) , attrs ) ; } } }
parses the given element and paints it onto the canvas .
