Search in sources :

Example 1 with CSaveProgress

use of com.google.security.zynamics.binnavi.Gui.GraphWindows.Implementations.CSaveProgress in project binnavi by google.

the class CPanelCloser method saveNativeGraph.

/**
   * Saves a native graph.
   *
   * @param parent The parent window of the panel.
   * @param panel The panel to be closed.
   */
private static void saveNativeGraph(final JFrame parent, final IGraphPanel panel) {
    final ZyGraph graph = panel.getModel().getGraph();
    final CSaveProgress progress = CGraphSaver.saveAs(parent, graph, panel.getModel().getViewContainer());
    while (!progress.isDone()) {
        try {
            Thread.sleep(100);
        } catch (final InterruptedException e) {
            // restore the interrupted status of the thread.
            // http://www.ibm.com/developerworks/java/library/j-jtp05236/index.html
            java.lang.Thread.currentThread().interrupt();
        }
    }
}
Also used : ZyGraph(com.google.security.zynamics.binnavi.yfileswrap.zygraph.ZyGraph) CSaveProgress(com.google.security.zynamics.binnavi.Gui.GraphWindows.Implementations.CSaveProgress)

Aggregations

CSaveProgress (com.google.security.zynamics.binnavi.Gui.GraphWindows.Implementations.CSaveProgress)1 ZyGraph (com.google.security.zynamics.binnavi.yfileswrap.zygraph.ZyGraph)1