private void createArrow(K source, K target) { if (!arrowAlreadyExist(source, target)) { DefaultGraphCell[] arrowCell = new DefaultGraphCell[1]; DefaultEdge edge = new DefaultEdge(); edge.setSource(stateCells.get(source).getChildAt(0)); edge.setTarget(stateCells.get(target).getChildAt(0)); arrowCell[0] = edge; int arrow = GraphConstants.ARROW_TECHNICAL; GraphConstants.setLineEnd(edge.getAttributes(), arrow); GraphConstants.setEndFill(edge.getAttributes(), true); graph.getGraphLayoutCache().insert(arrowCell); Set<K> targetSet = arrows.get(source); if (targetSet == null) { targetSet = EnumSet.noneOf(keyType); arrows.put(source, targetSet); } targetSet.add(target); } }
private void createArrow(int source, int target) { if (!arrowAlreadyExist(source, target)) { DefaultGraphCell[] arrowCell = new DefaultGraphCell[1]; DefaultEdge edge = new DefaultEdge(); edge.setSource(stateCells[source].getChildAt(0)); edge.setTarget(stateCells[target].getChildAt(0)); arrowCell[0] = edge; int arrow = GraphConstants.ARROW_TECHNICAL; GraphConstants.setLineEnd(edge.getAttributes(), arrow); GraphConstants.setEndFill(edge.getAttributes(), true); graph.getGraphLayoutCache().insert(arrowCell); sourceArrows[sourceArrowIndex] = source; sourceArrowIndex++; targetArrows[targetArrowIndex] = target; targetArrowIndex++; } }
private void createArrow(int source, int target) { if (!arrowAlreadyExist(source, target)) { DefaultGraphCell[] arrowCell = new DefaultGraphCell[1]; DefaultEdge edge = new DefaultEdge(); edge.setSource(stateCells[source].getChildAt(0)); edge.setTarget(stateCells[target].getChildAt(0)); arrowCell[0] = edge; int arrow = GraphConstants.ARROW_TECHNICAL; GraphConstants.setLineEnd(edge.getAttributes(), arrow); GraphConstants.setEndFill(edge.getAttributes(), true); graph.getGraphLayoutCache().insert(arrowCell); sourceArrows[sourceArrowIndex] = source; sourceArrowIndex++; targetArrows[targetArrowIndex] = target; targetArrowIndex++; } }
GraphConstants.setEndFill(map, true); GraphConstants.setLineStyle(map, GraphConstants.STYLE_SPLINE); GraphConstants.setDisconnectable(map, false); GraphConstants.setEndFill(map, false); GraphConstants.setEndSize(map, 6); GraphConstants.setLineColor(map, Color.LIGHT_GRAY);