use of com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionCircularLayout in project binnavi by google.
the class CGraphToolBar method createButtons.
/**
* Creates the toolbar.
*
* @param parent Parent window used for dialogws.
* @param graph The graph the toolbar is for.
* @param graphPanel Panel in which the graph is shown.
*/
private void createButtons(final JFrame parent, final ZyGraph graph, final CGraphPanel graphPanel) {
final CActionZoomIn zoomInAction = new CActionZoomIn(graph);
final JButton zoomInButton = addButton(zoomInAction, "data/magnify_hover.jpg", "data/magnify_down.jpg");
addHotkey(zoomInButton, HotKeys.GRAPH_TOOLBAR_ZOOM_IN.getKeyStroke(), zoomInAction, "Zoom In");
final CActionZoomOut zoomOutAction = new CActionZoomOut(graph);
final JButton zoomOutButton = addButton(zoomOutAction, "data/reduce_hover.jpg", "data/reduce_down.jpg");
addHotkey(zoomOutButton, HotKeys.GRAPH_TOOLBAR_ZOOM_OUT.getKeyStroke(), zoomOutAction, "Zoom Out");
final CActionZoomSelected zoomSelectedAction = new CActionZoomSelected(graph);
final JButton zoomSelectedButton = addButton(zoomSelectedAction, "data/frameall_hover.jpg", "data/frameall_down.jpg");
addHotkey(zoomSelectedButton, HotKeys.GRAPH_TOOLBAR_ZOOM_SELECTED.getKeyStroke(), zoomSelectedAction, "Zoom Selected");
final CActionZoomFit zoomFitAction = new CActionZoomFit(graph);
final JButton zoomFitButton = addButton(zoomFitAction, "data/centerview_hover.jpg", "data/centerview_down.jpg");
addHotkey(zoomFitButton, HotKeys.GRAPH_TOOLBAR_ZOOM_FIT.getKeyStroke(), zoomFitAction, "Fit Graph to Screen");
m_magnifierModeAction = new CActionMagnifyingGlassViewMode(graph);
final JButton magnifierModeButton = addButton(m_magnifierModeAction, "data/nomagnifieingglass_hover.jpg", "data/nomagnifieingglass_down.jpg");
m_magnifierModeAction.setButton(magnifierModeButton);
addHotkey(magnifierModeButton, HotKeys.GRAPH_TOOLBAR_TOGGLE_MAGNIFY.getKeyStroke(), m_magnifierModeAction, "Magnifying Glass");
final CActionFreezeView freezeAction = new CActionFreezeView(graph);
final JButton freezeButton = addButton(freezeAction, "data/viewnavi_hover.jpg", "data/viewnavi_down.jpg");
freezeAction.setButton(freezeButton);
addHotkey(freezeButton, HotKeys.GRAPH_TOOLBAR_FREEZE.getKeyStroke(), freezeAction, "Freeze view");
final CActionCircularLayout circularAction = new CActionCircularLayout(parent, graph);
final JButton circularButton = addButton(circularAction, "data/laycirc_hover.jpg", "data/laycirc_down.jpg");
addHotkey(circularButton, HotKeys.GRAPH_TOOLBAR_CIRCULAR_LAYOUT.getKeyStroke(), circularAction, "Circular Layout");
final CActionOrthogonalLayout orthogonalAction = new CActionOrthogonalLayout(parent, graph);
final JButton orthogonalButton = addButton(orthogonalAction, "data/layorth_hover.jpg", "data/layorth_down.jpg");
addHotkey(orthogonalButton, HotKeys.GRAPH_TOOLBAR_ORTHOGONAL_LAYOUT.getKeyStroke(), orthogonalAction, "Orthogonal Layout");
final CActionHierarchicLayout hierarchicAction = new CActionHierarchicLayout(parent, graph);
final JButton hierarchicButton = addButton(hierarchicAction, "data/layhier_hover.jpg", "data/layhier_down.jpg");
addHotkey(hierarchicButton, HotKeys.GRAPH_TOOLBAR_HIERARCHIC_LAYOUT.getKeyStroke(), hierarchicAction, "Hierarchical Layout");
addButton(new CActionSelectChildren(graph, true), "data/selallchild_hover.jpg", "data/selallchild_down.jpg");
addButton(new CActionSelectParents(graph, true), "data/selparent_hover.jpg", "data/selparent_down.jpg");
addButton(new CActionInvertSelection(graph, true), "data/selinvert_hover.jpg", "data/selinvert_down.jpg");
addButton(new CActionSelectByCriteria(graphPanel, true), "data/selcriteria_hover.jpg", "data/selcriteria_down.jpg");
final CActionDeleteSelectedNodes deleteSelectedAction = new CActionDeleteSelectedNodes(graph, true);
final JButton deletedSelectedButton = addButton(deleteSelectedAction, "data/deleteselectednodes_hover.png", "data/deleteselectednodes_down.png");
addHotkey(deletedSelectedButton, HotKeys.GRAPH_TOOLBAR_DELETE_SELECTED.getKeyStroke(), deleteSelectedAction, HotKeys.GRAPH_TOOLBAR_DELETE_SELECTED.getDescription());
final CActionDeleteSelectedNodesKeep deleteSelectedKeepAction = new CActionDeleteSelectedNodesKeep(graph);
final JButton deletedSelectedKeepButton = addButton(deleteSelectedKeepAction, "data/deleteselectednodeskeepedges_hover.png", "data/deleteselectednodeskeepedges_down.png");
addHotkey(deletedSelectedKeepButton, HotKeys.GRAPH_TOOLBAR_DELETE_SELECTED_KEEP_EDGES.getKeyStroke(), deleteSelectedKeepAction, HotKeys.GRAPH_TOOLBAR_DELETE_SELECTED_KEEP_EDGES.getDescription());
addButton(new CActionColorNodes(graphPanel), "data/nodecolor_hover.jpg", "data/nodecolor_down.jpg");
}
Aggregations