mxGraph Swing 循环取得所有面板上的Cell节点

来源:互联网 发布:免流端口 编辑:程序博客网 时间:2024/06/07 14:56
能得到顶级节点之后,再循环判断下面的小节点就方便多了。
public void updateGraphstatus(String id,String status){mxCell cells = null; mxCell cell =  (mxCell) graphComponent.getGraph().getModel().getRoot();int count = cell.getChildCount();for(int i=0;i<count;i++){cells =  (mxCell) cell.getChildAt(i);int counts = cells.getChildCount();mxCell cellss=null;for(int j=0;j<counts;j++){cellss = (mxCell) cells.getChildAt(j);}}}

0 0
原创粉丝点击