Revision: 602
Author: mr0...@mro.name
Date: Tue Jul 28 13:58:25 2009
Log: issue#99 deprecate paramString and remove toString
http://code.google.com/p/piccolo2d/source/detail?r=602

Modified:
  /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PNode.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PActivity.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PColorActivity.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PInterpolatingActivity.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PTransformActivity.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PBasicInputEventHandler.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PDragEventHandler.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PDragSequenceEventHandler.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PPanEventHandler.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PZoomEventHandler.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PImage.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PPath.java
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java
   
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/PSWTImage.java
   
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/PSWTPath.java

=======================================
--- /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PNode.java      
 
Tue Jul 28 13:41:36 2009
+++ /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PNode.java      
 
Tue Jul 28 13:58:25 2009
@@ -3213,54 +3213,12 @@
          in.defaultReadObject();
          parent = (PNode) in.readObject();
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************

      /**
-     * Returns a string representation of this object for debugging  
purposes.
-     */
-    public String toString() {
-        final String result = super.toString().replaceAll(".*\\.", "");
-        return result + "[" + paramString() + "]";
-    }
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
+     * @deprecated see  
http://code.google.com/p/piccolo2d/issues/detail?id=99
       */
      protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("bounds=" + (bounds == null ? "null" :  
bounds.toString()));
-        result.append(",fullBounds=" + (fullBoundsCache == null ? "null" :  
fullBoundsCache.toString()));
-        result.append(",transform=" + (transform == null ? "null" :  
transform.toString()));
-        result.append(",paint=" + (paint == null ? "null" :  
paint.toString()));
-        result.append(",transparency=" + transparency);
-        result.append(",childrenCount=" + getChildrenCount());
-
-        if (fullBoundsInvalid) {
-            result.append(",fullBoundsInvalid");
-        }
-
-        if (pickable) {
-            result.append(",pickable");
-        }
-
-        if (childrenPickable) {
-            result.append(",childrenPickable");
-        }
-
-        if (visible) {
-            result.append(",visible");
-        }
-
-        return result.toString();
+        return "";
      }

      public PInputEventListener[] getInputEventListeners() {
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PActivity.java
    
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PActivity.java
    
Tue Jul 28 13:58:25 2009
@@ -364,38 +364,11 @@
          }
          return startTime + duration;
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************

      /**
-     * Returns a string representation of this object for debugging  
purposes.
-     */
-    public String toString() {
-        final String result = super.toString().replaceAll(".*\\.", "");
-        return result + "[" + paramString() + "]";
-    }
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
+     * @deprecated see  
http://code.google.com/p/piccolo2d/issues/detail?id=99
       */
      protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("startTime=" + startTime);
-        result.append(",duration=" + duration);
-        result.append(",stepRate=" + stepRate);
-        if (stepping) {
-            result.append(",stepping");
-        }
-        result.append(",nextStepTime=" + nextStepTime);
-
-        return result.toString();
+        return "";
      }
  }
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PColorActivity.java
       
Tue Jul 28 13:41:36 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PColorActivity.java
       
Tue Jul 28 13:58:25 2009
@@ -127,27 +127,4 @@
          final float alpha = source.getAlpha() + zeroToOne *  
(destination.getAlpha() - source.getAlpha());
          target.setColor(new Color(red / 255, green / 255, blue / 255,  
alpha / 255));
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************
-
-    /**
-     * Returns a string representing the state of this object. This method  
is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this object's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("source=" + (source == null ? "null" :  
source.toString()));
-        result.append(",destination=" + (destination == null ? "null" :  
destination.toString()));
-        result.append(',');
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-}
+}
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PInterpolatingActivity.java
       
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PInterpolatingActivity.java
       
Tue Jul 28 13:58:25 2009
@@ -247,28 +247,4 @@

          setRelativeTargetValue(zeroToOne);
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        if (slowInSlowOut) {
-            result.append("slowinSlowOut,");
-        }
-
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-}
+}
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PTransformActivity.java
   
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PTransformActivity.java
   
Tue Jul 28 13:58:25 2009
@@ -139,41 +139,4 @@

          target.setTransform(STATIC_TRANSFORM);
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************
-
-    /**
-     * Returns a string representing the state of this activity. This  
method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this activity's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("source=" + (source == null ? "null" :  
toString(source)));
-        result.append(",destination=" + (destination == null ? "null" :  
toString(destination)));
-        result.append(',');
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-
-    // here since 1.4 doesn't support Arrays.toString(double[] ...)
-    // should be removed when we migrate to 1.5
-    private String toString(final double[] array) {
-        final StringBuffer result = new StringBuffer('[');
-        for (int i = 0; i < array.length; i++) {
-            result.append(array[i]);
-            result.append(',');
-        }
-        result.deleteCharAt(result.length() - 1);
-        result.append(']');
-
-        return result.toString();
-    }
-}
+}
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PBasicInputEventHandler.java
   
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PBasicInputEventHandler.java
   
Tue Jul 28 13:58:25 2009
@@ -184,30 +184,11 @@

      public void keyboardFocusLost(final PInputEvent event) {
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************

      /**
-     * Returns a string representation of this object for debugging  
purposes.
-     */
-    public String toString() {
-        final String result = super.toString().replaceAll(".*\\.", "");
-        return result + "[" + paramString() + "]";
-    }
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
+     * @deprecated see  
http://code.google.com/p/piccolo2d/issues/detail?id=99
       */
      protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-        result.append("eventFilter=" + eventFilter == null ? "null" :  
eventFilter.toString());
-        return result.toString();
+        return "";
      }
  }
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PDragEventHandler.java
         
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PDragEventHandler.java
         
Tue Jul 28 13:58:25 2009
@@ -90,29 +90,4 @@
      public void setMoveToFrontOnPress(final boolean moveToFrontOnPress) {
          this.moveToFrontOnPress = moveToFrontOnPress;
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("draggedNode=" + draggedNode == null ? "null" :  
draggedNode.toString());
-        if (moveToFrontOnPress) {
-            result.append(",moveToFrontOnPress");
-        }
-        result.append(',');
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-}
+}
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PDragSequenceEventHandler.java
         
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PDragSequenceEventHandler.java
         
Tue Jul 28 13:58:25 2009
@@ -236,32 +236,4 @@
              sequenceInitiatedButton = MouseEvent.NOBUTTON;
          }
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("minDragStartDistance=" + minDragStartDistance);
-        result.append(",mousePressedCanvasPoint="
-                + (mousePressedCanvasPoint == null ? "null" :  
mousePressedCanvasPoint.toString()));
-        result.append(",sequenceInitiatedButton=" +  
sequenceInitiatedButton);
-        if (isDragging) {
-            result.append(",dragging");
-        }
-        result.append(',');
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-}
+}
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PPanEventHandler.java
  
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PPanEventHandler.java
  
Tue Jul 28 13:58:25 2009
@@ -173,30 +173,4 @@
          }
          return delta;
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("minAutopanSpeed=" + minAutopanSpeed);
-        result.append(",maxAutopanSpeed=" + maxAutopanSpeed);
-        if (autopan) {
-            result.append(",autopan");
-        }
-        result.append(',');
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-}
+}
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PZoomEventHandler.java
         
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PZoomEventHandler.java
         
Tue Jul 28 13:58:25 2009
@@ -140,28 +140,4 @@

          camera.scaleViewAboutPoint(scaleDelta, viewZoomPoint.getX(),  
viewZoomPoint.getY());
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("minScale=" + minScale);
-        result.append(",maxScale=" + maxScale);
-        result.append(",viewZoomPoint=" + (viewZoomPoint ==  
null ? "null" : viewZoomPoint.toString()));
-        result.append(',');
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-}
+}
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PImage.java   
 
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PImage.java   
 
Tue Jul 28 13:58:25 2009
@@ -242,22 +242,4 @@
          g2.dispose();
          return result;
      }
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("image=" + (image == null ? "null" :  
image.toString()));
-        result.append(',');
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-}
+}
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PPath.java    
 
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PPath.java    
 
Tue Jul 28 13:58:25 2009
@@ -426,28 +426,4 @@
          stroke = PUtil.readStroke(in);
          path = PUtil.readPath(in);
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("path=" + (path == null ? "null" : path.toString()));
-        result.append(",stroke=" + (stroke == null ? "null" :  
stroke.toString()));
-        result.append(",strokePaint=" + (strokePaint == null ? "null" :  
strokePaint.toString()));
-        result.append(',');
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-}
+}
=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java    
 
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java    
 
Tue Jul 28 13:58:25 2009
@@ -338,27 +338,4 @@
      protected void internalUpdateBounds(final double x, final double y,  
final double width, final double height) {
          recomputeLayout();
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("text=" + (text == null ? "null" : text));
-        result.append(",font=" + (font == null ? "null" :  
font.toString()));
-        result.append(',');
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-}
+}
=======================================
---  
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/PSWTImage.java  
 
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/PSWTImage.java  
 
Tue Jul 28 13:58:25 2009
@@ -146,27 +146,4 @@
              }
          }
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("image=" + (image == null ? "null" :  
image.toString()));
-
-        result.append(',');
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-}
+}
=======================================
---  
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/PSWTPath.java   
 
Tue Jul 28 13:41:36 2009
+++  
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/PSWTPath.java   
 
Tue Jul 28 13:58:25 2009
@@ -433,27 +433,4 @@
          }
          setShape(path);
      }
-
-    // ****************************************************************
-    // Debugging - methods for debugging
-    // ****************************************************************
-
-    /**
-     * Returns a string representing the state of this node. This method is
-     * intended to be used only for debugging purposes, and the content and
-     * format of the returned string may vary between implementations. The
-     * returned string may be empty but may not be <code>null</code>.
-     *
-     * @return a string representation of this node's state
-     */
-    protected String paramString() {
-        final StringBuffer result = new StringBuffer();
-
-        result.append("path=" + (shape == null ? "null" :  
shape.toString()));
-        result.append(",strokePaint=" + (strokePaint == null ? "null" :  
strokePaint.toString()));
-        result.append(',');
-        result.append(super.paramString());
-
-        return result.toString();
-    }
-}
+}

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

Reply via email to