Search in sources :

Example 1 with CActionZoomSelected

use of com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionZoomSelected 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");
}
Also used : CActionOrthogonalLayout(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionOrthogonalLayout) CActionColorNodes(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionColorNodes) JButton(javax.swing.JButton) CActionHierarchicLayout(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionHierarchicLayout) CActionCircularLayout(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionCircularLayout) CActionSelectParents(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionSelectParents) CActionDeleteSelectedNodes(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionDeleteSelectedNodes) CActionMagnifyingGlassViewMode(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionMagnifyingGlassViewMode) CActionSelectChildren(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionSelectChildren) CActionInvertSelection(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionInvertSelection) CActionSelectByCriteria(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionSelectByCriteria) CActionZoomIn(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionZoomIn) CActionDeleteSelectedNodesKeep(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionDeleteSelectedNodesKeep) CActionFreezeView(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionFreezeView) CActionZoomOut(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionZoomOut) CActionZoomSelected(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionZoomSelected) CActionZoomFit(com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionZoomFit)

Aggregations

CActionCircularLayout (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionCircularLayout)1 CActionColorNodes (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionColorNodes)1 CActionDeleteSelectedNodes (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionDeleteSelectedNodes)1 CActionDeleteSelectedNodesKeep (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionDeleteSelectedNodesKeep)1 CActionFreezeView (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionFreezeView)1 CActionHierarchicLayout (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionHierarchicLayout)1 CActionInvertSelection (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionInvertSelection)1 CActionMagnifyingGlassViewMode (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionMagnifyingGlassViewMode)1 CActionOrthogonalLayout (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionOrthogonalLayout)1 CActionSelectByCriteria (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionSelectByCriteria)1 CActionSelectChildren (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionSelectChildren)1 CActionSelectParents (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionSelectParents)1 CActionZoomFit (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionZoomFit)1 CActionZoomIn (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionZoomIn)1 CActionZoomOut (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionZoomOut)1 CActionZoomSelected (com.google.security.zynamics.binnavi.Gui.GraphWindows.Actions.CActionZoomSelected)1 JButton (javax.swing.JButton)1