/** * The API method used to exercise the layout upon the facade description * and produce a separate description of the vertex position and edge * routing changes made. It first builds a representation of the tree using * the inner tree class by doing a depth first search of the graph from the * root. It then lays out the graph using the obtained data * * @param graph * the facade describing the graph and its configuration */ public void run(JGraphFacade graph) { super.run(graph); }
private void initializeJPanel() { initiate = true; graph.setGraphLayoutCache(new GraphLayoutCache(new DefaultGraphModel(), new DefaultCellViewFactory(), true)); graph.setEditable(false); for (K key : stateKeys) stateCells.put(key, createCell(key, new Point2D(0, 0))); for (K key : stateKeys) createStateTransitionDiagram(key); graph.getGraphLayoutCache().insert(stateCells.values().toArray()); JGraphFacade facade = new JGraphFacade(graph.getGraphLayoutCache()); facade.setEdgePromotion(false); JGraphTreeLayout layout = new JGraphTreeLayout(); layout.run(facade); Map<?, ?> map = facade.createNestedMap(true, true); graph.getGraphLayoutCache().edit(map); }
private void initializeJPanel() { initiate = true; graph.setGraphLayoutCache(new GraphLayoutCache(new DefaultGraphModel(), new DefaultCellViewFactory(), true)); graph.setEditable(false); for (int i = 0; i < numberOfStates; i++) { isStateEmpty(stateMachine.states.get(i)); } stateCells = new DefaultGraphCell[numberOfStates]; State<E> parent = getParentState(); stateCells[stateCellIndex] = createCell(parent.getStateEnum().toString(), new Point2d(0, 0), stateCellIndex); stateCellIndex++; createStateMachineDiagram(parent); graph.getGraphLayoutCache().insert(stateCells); JGraphFacade facade = new JGraphFacade(graph.getGraphLayoutCache()); facade.setEdgePromotion(false); JGraphTreeLayout layout = new JGraphTreeLayout(); layout.run(facade); Map<?, ?> map = facade.createNestedMap(true, true); graph.getGraphLayoutCache().edit(map); createDefaultArrows(); createArrowsForStateTransitions(); }
private void initializeJPanel() { initiate = true; graph.setGraphLayoutCache(new GraphLayoutCache(new DefaultGraphModel(), new DefaultCellViewFactory(), true)); graph.setEditable(false); for (int i = 0; i < numberOfStates; i++) { isStateEmpty(stateMachine.states.get(i)); } stateCells = new DefaultGraphCell[numberOfStates]; State<E> parent = getParentState(); stateCells[stateCellIndex] = createCell(parent.getStateEnum().toString(), new Point2D(0, 0), stateCellIndex); stateCellIndex++; createStateMachineDiagram(parent); graph.getGraphLayoutCache().insert(stateCells); JGraphFacade facade = new JGraphFacade(graph.getGraphLayoutCache()); facade.setEdgePromotion(false); JGraphTreeLayout layout = new JGraphTreeLayout(); layout.run(facade); Map<?, ?> map = facade.createNestedMap(true, true); graph.getGraphLayoutCache().edit(map); createDefaultArrows(); createArrowsForStateTransitions(); }