@Override
  protected int getLayer(final Graph2D graph, final Node n) {
    // The drawing order of nodes in the graph depends on the
    // order of the nodes in the drawing order set. Nodes
    // at the beginning of the set are drawn before nodes at
    // the end of the set.

    if (graph.getRealizer(n) instanceof ZyGroupNodeRealizer<?>) {
      // Group nodes are always drawn first so they don't hide
      // their members.

      return super.getLayer(graph, n);
    }

    int counter = 1;

    for (final Node node : m_nodesInDrawingOrder) {
      if (node == n) {
        return counter;
      }

      ++counter;
    }

    return super.getLayer(graph, n);
  }
This set contains the nodes in drawing order. The nodes to be drawn first are in the set early.
The nodes drawn over the earlier nodes are in the set late.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/ZyGraphDefaultRenderer.java