Revision: 3992
Author: [email protected]
Date: Wed Nov 24 12:21:21 2010
Log: Relationship labels are now positioned consistently with regards to
cardinality.
http://code.google.com/p/power-architect/source/detail?r=3992
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/BasicRelationshipUI.java
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/BasicRelationshipUI.java
Thu Nov 4 14:45:02 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/BasicRelationshipUI.java
Wed Nov 24 12:21:21 2010
@@ -346,8 +346,8 @@
if (lineStart.y < lineEnd.y) {
logger.debug("pk table is at right and
higher");
if (lineEnd.y - lineStart.y > maxStringWidth |
| lineStart.x - lineEnd.x < lineEnd.y - lineStart.y) {
- pkLabelDistance = midx;
- fkLabelDistance = midx + fm.getHeight();
+ pkLabelDistance = midx + fm.getHeight();
+ fkLabelDistance = midx;
rotate = true;
} else {
pkLabelDistance = lineStart.y -
fm.getHeight();
@@ -378,8 +378,8 @@
} else {
logger.debug("pk table is at left and lower");
if (lineStart.y - lineEnd.y > maxStringWidth |
| lineEnd.x - lineStart.x < lineStart.y - lineEnd.y) {
- pkLabelDistance = midx;
- fkLabelDistance = midx + fm.getHeight();
+ pkLabelDistance = midx + fm.getHeight();
+ fkLabelDistance = midx;
rotate = true;
} else {
pkLabelDistance = lineEnd.y -
fm.getHeight();