diff --git a/src/org/ntlab/deltaViewer/MagnetRONViewer.java b/src/org/ntlab/deltaViewer/MagnetRONViewer.java index 19d0852..5107805 100644 --- a/src/org/ntlab/deltaViewer/MagnetRONViewer.java +++ b/src/org/ntlab/deltaViewer/MagnetRONViewer.java @@ -251,7 +251,9 @@ targetCell.getGeometry().setX(absolutePointTargetCell.getX()); targetCell.getGeometry().setY(absolutePointTargetCell.getY()); Object edge = mxgraph.insertDeltaEdge(mxDefaultParent, fieldUpdateStatement.getFieldName(), fieldName, objectToVertexMap.get(sourceObjectId).getCell(), objectToVertexMap.get(targetObjectId).getCell()); - ((mxCell)edge).setStyle("exitX=0;exitY=0.5;exitPerimeter=1;entryX=1;entryY=0.5;entryPerimeter=1;"); +// ((mxCell)edge).setStyle("exitX=0;exitY=0.5;exitPerimeter=1;entryX=1;entryY=0.5;entryPerimeter=1;strokeColor=red;"); + ((mxCell)edge).setStyle("strokeColor=red;"); +// mxgraph.orderCells(true, new Object[] {edge}); edgeMap.put(fieldUpdateStatement.getFieldName(), new Edge(fieldName, TypeName.Reference, edge)); // System.out.println("last" + objectToVertexMap.get(targetObjectId).getInitialX() + ", " + objectToVertexMap.get(targetObjectId).getInitialY()); deltaAnimation.setVertexAnimation(targetCell, new mxPoint(objectToVertexMap.get(targetObjectId).getInitialX(), objectToVertexMap.get(targetObjectId).getInitialY())); @@ -278,7 +280,9 @@ targetCell.getGeometry().setX(absolutePointTargetCell.getX()); targetCell.getGeometry().setY(absolutePointTargetCell.getY()); Object edge = mxgraph.insertDeltaEdge(mxDefaultParent, tgtObjId, null, objectToVertexMap.get(srcObjId).getCell(), objectToVertexMap.get(tgtObjId).getCell()); - ((mxCell)edge).setStyle("exitX=0;exitY=0.5;exitPerimeter=1;entryX=1;entryY=0.5;entryPerimeter=1;"); +// ((mxCell)edge).setStyle("exitX=0;exitY=0.5;exitPerimeter=1;entryX=1;entryY=0.5;entryPerimeter=1;strokeColor=red;"); + ((mxCell)edge).setStyle("strokeColor=red;"); +// mxgraph.orderCells(true, new Object[] {edge}); edgeMap.put(tgtObjId, new Edge(null, TypeName.Reference, edge)); // System.out.println("last" + objectToVertexMap.get(targetObjectId).getInitialX() + ", " + objectToVertexMap.get(targetObjectId).getInitialY()); deltaAnimation.setVertexAnimation(targetCell, new mxPoint(objectToVertexMap.get(tgtObjId).getInitialX(), objectToVertexMap.get(tgtObjId).getInitialY())); @@ -981,15 +985,15 @@ } protected void setEdgePoint(mxICell edge, Point absPtSrcCell, Point absPtTgtCell) { - if(absPtSrcCell.getX() < absPtTgtCell.getX()) { - // if(isSrcSideChanged) { - // �E�����獶��փG�b�W������ - edge.setStyle("exitX=1;exitY=1;exitPerimeter=1;entryX=0;entryY=0;entryPerimeter=1;"); - } else { - // ��������E��փG�b�W������ - edge.setStyle("exitX=0;exitY=1;exitPerimeter=1;entryX=1;entryY=0;entryPerimeter=1;"); - } - } +// mxgraph.orderCells(true, new Object[] {edge}); +// if(absPtSrcCell.getX() <= absPtTgtCell.getX()) { +// // �E�����獶��փG�b�W������ +// edge.setStyle("exitX=0.5;exitY=0.5;exitPerimeter=1;entryX=0;entryY=0.5;entryPerimeter=1;"); +// } else { +// // ��������E��փG�b�W������ +// edge.setStyle("exitX=0.5;exitY=0.5;exitPerimeter=1;entryX=1;entryY=0.5;entryPerimeter=1;"); +// } + } /** Set style of All cells. */ protected void setCellsStyle() {