public static <
          NodeType extends ISelectableNode,
          GraphType extends ISelectableGraph<NodeType> & IZoomableGraph<NodeType>>
      void zoomToSelected(final GraphType graph) {
    final List<NodeType> selectedNodes = getSelectedNodes(graph);

    if (selectedNodes.size() == 0) {
      throw new IllegalStateException("Error: There are no selected nodes");
    }

    graph.zoomToNodes(selectedNodes);
  }
Zooms so far into the graph that all selected nodes are displayed as big as possible.

@param <NodeType> The type of the nodes in the graph.
@param <GraphType> The type of the graph.
@param graph The graph in question.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/helpers/GraphHelpers.java