public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {

    if (client.updateComponent(this, uidl, true)) {
      return;
    }

    m_client = client;
    m_paintableId = uidl.getId();

    setScale(
        uidl.getDoubleAttribute("scale"),
        uidl.getIntAttribute("clientX"),
        uidl.getIntAttribute("clientY"));
    setSemanticZoomLevel(uidl.getIntAttribute("semanticZoomLevel"));
    setActionKeys(uidl.getStringArrayAttribute("backgroundActions"));

    UIDL graph = uidl.getChildByTagName("graph");
    Iterator<?> children = graph.getChildIterator();

    GWTGraph graphConverted = GWTGraph.create();
    while (children.hasNext()) {
      UIDL child = (UIDL) children.next();

      if (child.getTag().equals("group")) {
        GWTGroup group =
            GWTGroup.create(
                child.getStringAttribute("key"),
                child.getIntAttribute("x"),
                child.getIntAttribute("y"));
        boolean booleanAttribute = child.getBooleanAttribute("selected");
        String[] actionKeys = child.getStringArrayAttribute("actionKeys");

        group.setActionKeys(actionKeys);

        group.setSelected(booleanAttribute);
        group.setIcon(child.getStringAttribute("iconUrl"));
        group.setSemanticZoomLevel(child.getIntAttribute("semanticZoomLevel"));
        graphConverted.addGroup(group);

        if (m_client != null) {
          TooltipInfo ttInfo = new TooltipInfo(group.getTooltipText());
          m_client.registerTooltip(this, group, ttInfo);
        }

      } else if (child.getTag().equals("vertex")) {

        GWTVertex vertex =
            GWTVertex.create(
                child.getStringAttribute("id"),
                child.getIntAttribute("x"),
                child.getIntAttribute("y"));
        boolean booleanAttribute = child.getBooleanAttribute("selected");
        String[] actionKeys = child.getStringArrayAttribute("actionKeys");
        vertex.setSemanticZoomLevel(child.getIntAttribute("semanticZoomLevel"));

        vertex.setActionKeys(actionKeys);

        if (child.hasAttribute("groupKey")) {
          String groupKey = child.getStringAttribute("groupKey");
          GWTGroup group = graphConverted.getGroup(groupKey);
          vertex.setParent(group);
        }

        vertex.setSelected(booleanAttribute);
        vertex.setIcon(child.getStringAttribute("iconUrl"));
        graphConverted.addVertex(vertex);

        if (m_client != null) {
          TooltipInfo ttInfo = new TooltipInfo(vertex.getTooltipText());
          m_client.registerTooltip(this, vertex, ttInfo);
        }

      } else if (child.getTag().equals("edge")) {
        GWTEdge edge =
            GWTEdge.create(
                graphConverted.findVertexById(child.getStringAttribute("source")),
                graphConverted.findVertexById(child.getStringAttribute("target")));
        String[] actionKeys = child.getStringArrayAttribute("actionKeys");
        edge.setActionKeys(actionKeys);
        graphConverted.addEdge(edge);

        if (m_client != null) {
          TooltipInfo edgeInfo = new TooltipInfo("Edge: " + edge.getId());
          m_client.registerTooltip(this, edge, edgeInfo);
        }
      } else if (child.getTag().equals("groupParent")) {
        String groupKey = child.getStringAttribute("key");
        String parentKey = child.getStringAttribute("parentKey");
        GWTGroup group = graphConverted.getGroup(groupKey);
        GWTGroup parentGroup = graphConverted.getGroup(parentKey);

        group.setParent(parentGroup);
      }
    }

    UIDL actions = uidl.getChildByTagName("actions");
    if (actions != null) {
      updateActionMap(actions);
    }

    setGraph(graphConverted);
  }