Author: jfuerth
Date: Tue Sep 30 08:38:08 2008
New Revision: 2733

Modified:
   trunk/src/ca/sqlpower/architect/swingui/BasicRelationshipUI.java

Log:
Code cleanup:
 -removed dead commented code
 -removed ANSI colour codes in logging
 -fixed formatting/conventions in a few places


Modified: trunk/src/ca/sqlpower/architect/swingui/BasicRelationshipUI.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/BasicRelationshipUI.java (original) +++ trunk/src/ca/sqlpower/architect/swingui/BasicRelationshipUI.java Tue Sep 30 08:38:08 2008
@@ -606,7 +606,6 @@
         * time allows.
         */
        public boolean isOrientationLegal() {
-               boolean answer;
                if (relationship.getPkTable() == relationship.getFkTable()) {
                        return (orientation == (PARENT_FACES_BOTTOM | 
CHILD_FACES_LEFT));
                } else {
@@ -653,9 +652,7 @@

                }

- //answer = (orientation == getFacingEdges(relationship.getPkTable().getBounds(), relationship.getFkTable().getBounds()));
-
-               logger.debug("isOrientationLegal() returning false");
+               logger.debug("OrientationLegal() returning false");
                return false;
        }

@@ -943,7 +940,7 @@
        public Dimension getPreferredSize(PlayPenComponent c) {
                //computeBounds();
                if (logger.isDebugEnabled()) {
- logger.debug("Computed size is ["+computedBounds.width+","+computedBounds.height+"]"); + logger.debug("Computed size is ["+computedBounds.width+","+computedBounds.height+"]");
                }
                return new Dimension(computedBounds.width, 
computedBounds.height);
        }
@@ -951,7 +948,7 @@
        public Point getPreferredLocation() {
                //computeBounds();
                if (logger.isDebugEnabled()) {
- logger.debug("Computed locn is ["+computedBounds.x+","+computedBounds.y+"]"); + logger.debug("Computed locn is ["+computedBounds.x+","+computedBounds.y+"]");
                }
                return new Point(computedBounds.x, computedBounds.y);
        }
@@ -1098,9 +1095,7 @@
                }
                
                List <Point2D.Double> list = getIntersectPoints(s);
-               if ( list.size() > 0 )
-                       return true;
-               return false;
+               return (list.size() > 0);
        }

        private List<Point2D.Double> getIntersectPoints(Shape s) {

Reply via email to