if (graph.showNodes()) {
max += graph.countNodes();
}
if (graph.showEdges()) {
max += graph.countUnidirectionalEdges() + graph.countBidirectionalEdges();
if (graph.showSelfLoops()) {
max += graph.countSelfLoops();
}
}
Progress.switchToDeterminate(progress, max);