1
저는 eclipse를 편집기 및 jgraphx v1.1로 사용하고 있습니다. 사이드 스타일을 가장자리 스타일로 변경하려고합니다. 어떤 이유로 나는 setStyle에서 오류가 계속 발생합니다. 나는 또한 edgeStyle [mxConstants.STYLE_EDGE] = mxEdgeStyle.SideToSide 시도했지만 아직 아무것도. 내가 뭘 잘못했는지 알고 싶습니까? 사전에JGraphX - 가장자리 루팅 스타일 변경
감사
public Design() {
super("Path Followed");
AAA aaa = new AAA() ;
mxGraph graph = new mxGraph();
Object parent = graph.getDefaultParent();
Object edgeStyle = graph.getStylesheet().getDefaultEdgeStyle() ;
graph.setStyle(edgeStyle=mxEdgeStyle.SideToSide, parent) ;
graph.getModel().beginUpdate();
int k = 0 ;
while(ontoq.path[k][0] != null) {
try
{
Object v1 = graph.insertVertex(parent, null, aaa.path[k][0], 20, 20, 80, 30);
Object v2 = graph.insertVertex(parent, null, aaa.path[k+1][0], 20, 20, 80, 30);
graph.insertEdge(parent, null, " ", v1, v2);
graph.insertEdge(parent, null, " ", v1, v1);
k++ ;
}
finally
{
graph.getModel().endUpdate();
}
}
mxGraphComponent graphComponent = new mxGraphComponent(graph);
add(graphComponent);
}
public static void main(String[] args)
{
Design frame = new Design();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 320);
frame.setVisible(true);
}
}