Author: dazarov
Date: 2007-08-01 07:53:06 -0400 (Wed, 01 Aug 2007)
New Revision: 2801
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/RoundPolylineConnection.java
Log:
http://jira.jboss.com/jira/browse/EXIN-365
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/RoundPolylineConnection.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/RoundPolylineConnection.java 2007-07-31
23:58:34 UTC (rev 2800)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/RoundPolylineConnection.java 2007-08-01
11:53:06 UTC (rev 2801)
@@ -31,6 +31,21 @@
super.outlineShape(g);
return;
}
+ if (Math.abs(points.getFirstPoint().y - points.getLastPoint().y) < 4) {
+ int delta = Math.abs(points.getFirstPoint().y - points.getLastPoint().y);
+ if(points.size() == 4){
+ Point point1 = points.getPoint(0);
+ Point point2 = points.getPoint(1);
+ point2.x -= delta/2;
+ Point point3 = points.getPoint(2);
+ point3.x += delta/2;
+ Point point4 = points.getPoint(3);
+ g.drawLine(point1, point2);
+ g.drawLine(point2, point3);
+ g.drawLine(point3, point4);
+ return;
+ }
+ }
for (int i = 1; i < points.size(); i++) {
point = points.getPoint(i);