Revision: 747
Author: allain.lalonde
Date: Mon Oct 19 11:14:19 2009
Log: Last CheckStyle fixes possible without breaking compat in SWT.
http://code.google.com/p/piccolo2d/source/detail?r=747

Modified:
   
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java
   
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTShapeManager.java

=======================================
---  
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java
       
Mon Oct 19 10:43:18 2009
+++  
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java
       
Mon Oct 19 11:14:19 2009
@@ -83,6 +83,8 @@
   * @author Lance Good
   */
  public class SWTGraphics2D extends Graphics2D {
+    private static final int DEFAULT_FONT_SIZE = 12;
+
      private static final boolean DEFAULT_STRING_TRANSPARENCY = true;

      /**
@@ -373,7 +375,7 @@

              final String name = fontString.substring(0,  
fontString.indexOf(";"));
              final String size =  
fontString.substring(fontString.lastIndexOf(";") + 1, fontString.length());
-            int sizeInt = 12;
+            int sizeInt = DEFAULT_FONT_SIZE;
              try {
                  sizeInt =  
Integer.parseInt(size.substring(size.indexOf("=") + 1, size.length()));
              }
=======================================
---  
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTShapeManager.java
     
Mon Oct 19 09:11:29 2009
+++  
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTShapeManager.java
     
Mon Oct 19 11:14:19 2009
@@ -128,6 +128,7 @@
                  case PathIterator.SEG_CLOSE:
                      segList.add(new Point2D.Double(aPoint.getX(),  
aPoint.getY()));
                      break;
+                default:
              }
              pi.next();
          }
@@ -146,14 +147,14 @@
       * Transforms the given points by the transform provided, leaving the
       * original points untouched.
       *
-     * @param pts points to transform
+     * @param points points to transform
       * @param at transform to apply
       * @return transformed coordinates given in format x1,y2,x2,y2,...
       */
-    public static int[] transform(final double[] pts, final  
AffineTransform at) {
-        final int[] intPts = new int[pts.length];
-        for (int i = 0; i < pts.length / 2; i++) {
-            aPoint.setLocation(pts[2 * i], pts[2 * i + 1]);
+    public static int[] transform(final double[] points, final  
AffineTransform at) {
+        final int[] intPts = new int[points.length];
+        for (int i = 0; i < points.length / 2; i++) {
+            aPoint.setLocation(points[2 * i], points[2 * i + 1]);
              at.transform(aPoint, aPoint);
              intPts[2 * i] = (int) (aPoint.getX() + 0.5);
              intPts[2 * i + 1] = (int) (aPoint.getY() + 0.5);

--~--~---------~--~----~------------~-------~--~----~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to