18 개의 꼭지점이 있고 가장자리가 많은 그래프가 있습니다. 관련된 요소의 수와 그 구조 때문에 사용 가능한 내장 알고리즘 (예 : 표시된 이미지에 사용 된 mxHierarchicalLayout)이 예상대로 작동하지 않아 그림이 Current status sample과 같이 설명이있는 대부분의 가장자리가 겹쳐집니다.JGraphX : 정점의 가장자리 터미널 위치 변경
- 에지 lable가
- 제어 포인트
그러나 : 소스 코드의 일부 테스트 및 검사를 수행
나는 여물에게 가장자리에 mxCell의 형상을 단 몇 가지 변경 관리 원본 및 대상 터미널 지점을 조작 할 방법을 찾지 못했습니다. 누구나 터미널을 연결해야하는 곳을 제어하는 데 사용되는 적절한 클래스/메서드를 제안 해 줄 수 있습니까?
도움/정보를 제공해 주시면 감사하겠습니다. 세포와의 형상에 따라
..
Arrays.asList(edges).stream().map(edge -> (mxCell) edge).forEach(edge -> {
mxGeometry newGeo = (mxGeometry) edge.getGeometry().clone();
// TODO calculate condition
// This code actually move the label from the default
// position
mxPoint offset = new mxPoint(edge.getGeometry().getPoint().getX() + EDGE_OFFSET,
edge.getGeometry().getPoint().getY() + EDGE_OFFSET);
newGeo.setOffset(offset);
newGeo.setX(newGeo.getX() + 1);
if (newGeo.getPoints() != null) {
newGeo.getPoints().forEach(point -> {
point.setX(point.getX() + 200);
point.setY(point.getY() + 200);
});
}
model.setGeometry(edge,newGeo);
});
감사 안부