/** * Return the mapping between JTree's input map and JGraph's actions. */ protected ActionMap createActionMap() { ActionMap map = (ActionMap) UIManager.get("ScrollPane.actionMap"); map.put("edit", mxGraphActions.getEditAction()); map.put("delete", mxGraphActions.getDeleteAction()); map.put("home", mxGraphActions.getHomeAction()); map.put("enterGroup", mxGraphActions.getEnterGroupAction()); map.put("exitGroup", mxGraphActions.getExitGroupAction()); map.put("collapse", mxGraphActions.getCollapseAction()); map.put("expand", mxGraphActions.getExpandAction()); map.put("toBack", mxGraphActions.getToBackAction()); map.put("toFront", mxGraphActions.getToFrontAction()); map.put("selectNone", mxGraphActions.getSelectNoneAction()); map.put("selectAll", mxGraphActions.getSelectAllAction()); map.put("selectNext", mxGraphActions.getSelectNextAction()); map.put("selectPrevious", mxGraphActions.getSelectPreviousAction()); map.put("selectParent", mxGraphActions.getSelectParentAction()); map.put("selectChild", mxGraphActions.getSelectChildAction()); map.put("cut", TransferHandler.getCutAction()); map.put("copy", TransferHandler.getCopyAction()); map.put("paste", TransferHandler.getPasteAction()); map.put("group", mxGraphActions.getGroupAction()); map.put("ungroup", mxGraphActions.getUngroupAction()); map.put("zoomIn", mxGraphActions.getZoomInAction()); map.put("zoomOut", mxGraphActions.getZoomOutAction()); return map; }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { graph.removeCells(); } }
public static Action getSelectAllAction() { return mxGraphActions.getSelectAllAction(); }
public static Action getSelectNoneAction() { return mxGraphActions.getSelectNoneAction(); }
map.put( "delete", mxGraphActions.getDeleteAction() );
public static Action getSelectAllAction() { return mxGraphActions.getSelectAllAction(); }
public static Action getSelectNoneAction() { return mxGraphActions.getSelectNoneAction(); }
map.put( "delete", mxGraphActions.getDeleteAction() );
/** * Return the mapping between JTree's input map and JGraph's actions. */ protected ActionMap createActionMap() { ActionMap map = (ActionMap) UIManager.get("ScrollPane.actionMap"); map.put("edit", mxGraphActions.getEditAction()); map.put("delete", mxGraphActions.getDeleteAction()); map.put("home", mxGraphActions.getHomeAction()); map.put("enterGroup", mxGraphActions.getEnterGroupAction()); map.put("exitGroup", mxGraphActions.getExitGroupAction()); map.put("collapse", mxGraphActions.getCollapseAction()); map.put("expand", mxGraphActions.getExpandAction()); map.put("toBack", mxGraphActions.getToBackAction()); map.put("toFront", mxGraphActions.getToFrontAction()); map.put("selectNone", mxGraphActions.getSelectNoneAction()); map.put("selectAll", mxGraphActions.getSelectAllAction()); map.put("selectNext", mxGraphActions.getSelectNextAction()); map.put("selectPrevious", mxGraphActions.getSelectPreviousAction()); map.put("selectParent", mxGraphActions.getSelectParentAction()); map.put("selectChild", mxGraphActions.getSelectChildAction()); map.put("cut", TransferHandler.getCutAction()); map.put("copy", TransferHandler.getCopyAction()); map.put("paste", TransferHandler.getPasteAction()); map.put("group", mxGraphActions.getGroupAction()); map.put("ungroup", mxGraphActions.getUngroupAction()); map.put("zoomIn", mxGraphActions.getZoomInAction()); map.put("zoomOut", mxGraphActions.getZoomOutAction()); return map; }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { graph.removeCellsFromParent(); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { graph.removeCells(); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { graph.removeCellsFromParent(); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { boolean toBack = getValue(Action.NAME).toString() .equalsIgnoreCase("toBack"); graph.orderCells(toBack); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { boolean collapse = getValue(Action.NAME).toString() .equalsIgnoreCase("collapse"); graph.foldCells(collapse); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { boolean toBack = getValue(Action.NAME).toString() .equalsIgnoreCase("toBack"); graph.orderCells(toBack); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { boolean collapse = getValue(Action.NAME).toString() .equalsIgnoreCase("collapse"); graph.foldCells(collapse); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { graph.setSelectionCells(graph.ungroupCells()); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { graph.setSelectionCells(graph.ungroupCells()); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { graph.updateGroupBounds(null, getGroupBorder(graph)); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { graph.updateGroupBounds(null, getGroupBorder(graph)); } }