0
A
回答
0
解決方案:
mxIGraphModel model = graph.getModel();
// start to change model
model.beginUpdate();
mxGeometry geo = new mxGeometry(0, 0.5, PORT_DIAMETER,
PORT_DIAMETER);
// Because the origin is at upper left corner, need to translate to
// position the center of port correctly
geo.setOffset(new mxPoint(-PORT_RADIUS, -PORT_RADIUS));
geo.setRelative(true);
mxCell port = new mxCell(cell.getAttribute("label"), geo,
style);
port.setVertex(true);
//is not a port!!!!!!!!
port.setConnectable(false);
graph.addCell(port, cell);
//send to back!
graph.cellsOrdered(new Object[]{cell}, true);
// end changes, generate the events and update UndoManager
model.endUpdate();
Att, Alexandre。
相關問題
- 1. jgraphx頂線頂點標籤
- 2. 更改頂點樣式的錯誤
- 3. 獲取父頂點一個JGraphX樹
- 4. (JGraphX)如何添加一個額外的標籤到頂點?
- 5. 如何在JGraphx中製作一個平行四邊形頂點?
- 6. 如何在JGraphX通過右擊鼠標增加一個頂點
- 7. 如何添加一個mouselistener到頂點 - jgraphx
- 8. Jgraphx樣式適用於circleLayout
- 9. 點擊更改樣式
- 10. 更改節點樣式
- 11. 如何更改OpenLayers樣式?
- 12. DataGridComboBoxColumn樣式如何更改?
- 13. graph-tool:如何更改頂點顏色?
- 14. 更改點擊元素的樣式
- 15. jquery更改div的樣式點擊
- 16. 將包含自定義頂點組件的JGraphX圖導出爲圖像
- 17. 更改組合框的下拉式樣
- 18. 如何改變primefaces組件的樣式
- 19. 如何以編程方式更改樣式組件
- 20. JGraphX:重新定位頂點上的邊緣終端
- 21. 如何更改連接時的邊緣樣式,而不更改連接點
- 22. 如何更改tkinter ttk的焦點樣式.Treeview cell
- 23. 如何更改高圖中選定點的樣式?
- 24. 如何更改表格中點擊的樣式
- 25. 如何在點擊時更改ListItem的樣式?
- 26. 如何更改Highcharts中選定的點樣式?
- 27. 如何更改NSOutlineView中節點的樣式?
- 28. 如何在Morris.js線圖中更改點的顏色和樣式?
- 29. 如何在焦點上更改IE7中輸入框的樣式?
- 30. 更改樣式