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);
}
}
}
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);
}
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);
}
Aggregations