Search in sources :

Example 1 with CGraphSettingsDialog

use of com.google.security.zynamics.binnavi.Gui.GraphSettings.CGraphSettingsDialog in project binnavi by google.

the class CGraphDialogs method showGraphSettingsDialog.

/**
   * Shows the graph settings dialog for a given graph.
   *
   * @param parent Parent window of the dialog.
   * @param graph Graph whose settings are edited in the dialog.
   */
public static void showGraphSettingsDialog(final JFrame parent, final ZyGraph graph) {
    final CGraphSettingsDialog dlg = new CGraphSettingsDialog(parent, "Graph Settings", graph.getSettings(), false, false);
    dlg.setVisible(true);
    if (!dlg.wasCanceled()) {
        if (graph.getSettings().getLayoutSettings().getCurrentLayouter() instanceof CircularLayouter) {
            graph.getSettings().getLayoutSettings().setDefaultGraphLayout(LayoutStyle.CIRCULAR);
        } else if (graph.getSettings().getLayoutSettings().getCurrentLayouter() instanceof IncrementalHierarchicLayouter) {
            graph.getSettings().getLayoutSettings().setDefaultGraphLayout(LayoutStyle.HIERARCHIC);
        } else if (graph.getSettings().getLayoutSettings().getCurrentLayouter() instanceof OrthogonalLayouter) {
            graph.getSettings().getLayoutSettings().setDefaultGraphLayout(LayoutStyle.ORTHOGONAL);
        }
        if (dlg.needsLayouting()) {
            CGraphLayouter.refreshLayout(parent, graph);
        }
    }
}
Also used : CircularLayouter(y.layout.circular.CircularLayouter) IncrementalHierarchicLayouter(y.layout.hierarchic.IncrementalHierarchicLayouter) OrthogonalLayouter(y.layout.orthogonal.OrthogonalLayouter) CGraphSettingsDialog(com.google.security.zynamics.binnavi.Gui.GraphSettings.CGraphSettingsDialog)

Example 2 with CGraphSettingsDialog

use of com.google.security.zynamics.binnavi.Gui.GraphSettings.CGraphSettingsDialog in project binnavi by google.

the class CSettingsDialogFunctions method showFlowgraphSettingsDialog.

/**
   * Shows the initial flow graph settings dialog.
   * 
   * @param parent Parent window used for dialogs.
   */
public static void showFlowgraphSettingsDialog(final JFrame parent) {
    final ZyGraphViewSettings settings = ConfigManager.instance().getDefaultFlowGraphSettings();
    final CGraphSettingsDialog dlg = new CGraphSettingsDialog(parent, "Initial Flow graph Settings", settings, true, false);
    dlg.setVisible(true);
    ConfigManager.instance().updateFlowgraphSettings(settings);
    ConfigManager.instance().saveSettings(parent);
}
Also used : ZyGraphViewSettings(com.google.security.zynamics.binnavi.ZyGraph.ZyGraphViewSettings) CGraphSettingsDialog(com.google.security.zynamics.binnavi.Gui.GraphSettings.CGraphSettingsDialog)

Example 3 with CGraphSettingsDialog

use of com.google.security.zynamics.binnavi.Gui.GraphSettings.CGraphSettingsDialog in project binnavi by google.

the class CSettingsDialogFunctions method showCallgraphSettingsDialog.

/**
   * Shows the initial call graph settings dialog.
   * 
   * @param parent Parent window used for dialogs.
   */
public static void showCallgraphSettingsDialog(final JFrame parent) {
    final ZyGraphViewSettings settings = ConfigManager.instance().getDefaultCallGraphSettings();
    final CGraphSettingsDialog dlg = new CGraphSettingsDialog(parent, "Initial Call graph Settings", settings, true, true);
    dlg.setVisible(true);
    ConfigManager.instance().updateCallgraphSettings(settings);
    ConfigManager.instance().saveSettings(parent);
}
Also used : ZyGraphViewSettings(com.google.security.zynamics.binnavi.ZyGraph.ZyGraphViewSettings) CGraphSettingsDialog(com.google.security.zynamics.binnavi.Gui.GraphSettings.CGraphSettingsDialog)

Aggregations

CGraphSettingsDialog (com.google.security.zynamics.binnavi.Gui.GraphSettings.CGraphSettingsDialog)3 ZyGraphViewSettings (com.google.security.zynamics.binnavi.ZyGraph.ZyGraphViewSettings)2 CircularLayouter (y.layout.circular.CircularLayouter)1 IncrementalHierarchicLayouter (y.layout.hierarchic.IncrementalHierarchicLayouter)1 OrthogonalLayouter (y.layout.orthogonal.OrthogonalLayouter)1