Revision: 1006
Author: allain.lalo...@gmail.com
Date: Thu Apr 15 19:27:24 2010
Log: Removing Deprecated code
http://code.google.com/p/piccolo2d/source/detail?r=1006

Modified:
 /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCamera.java
 /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java
 /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/event/PBasicInputEventHandler.java /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/util/PPaintContext.java
 /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/util/PUtil.java
/piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/PCameraTest.java /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/PCanvasTest.java
 /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/PNodeTest.java
/piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/nodes/PTextTest.java
 /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/PFrame.java
/piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/event/PNotificationCenter.java /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/nodes/P3DRect.java /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwing.java /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/util/PSemanticStroke.java /piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java

=======================================
--- /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCamera.java Mon Jan 18 16:07:38 2010 +++ /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCamera.java Thu Apr 15 19:27:24 2010
@@ -208,16 +208,6 @@
             repaintFrom(TEMP_REPAINT_RECT, repaintedLayer);
         }
     }
-
-    /**
- * @deprecated by {...@link #repaintFromLayer(PBounds, PLayer)}. Will be removed
-     *    in version 2.0.
- * @param viewBounds bounds that require repainting, in view coordinates
-     * @param repaintedLayer layer dispatching the repaint notification
-     */
- public void repaintFromLayer(final PBounds viewBounds, final PNode repaintedLayer) { - throw new IllegalArgumentException("repaintedLayer not an instance of PLayer");
-    }

     /**
      * Return a reference to the list of layers viewed by this camera.
@@ -744,26 +734,6 @@

         return null;
     }
-
-    /**
- * Pan the camera's view from its current transform when the activity starts - * to a new transform so that the view bounds will contain (if possible, - * intersect if not possible) the new bounds in the camera layers coordinate
-     * system. If the duration is 0 then the view will be transformed
- * immediately, and null will be returned. Else a new PTransformActivity - * will get returned that is set to animate the camera's view transform to
-     * the new bounds.
-     *
-     * @deprecated Renamed to animateViewToPanToBounds
-     *
-     * @param includeBounds the bounds to which the view will animate to
-     * @param duration the duration of the animation given in milliseconds
-     *
-     * @return the scheduled PTransformActivity
-     */
- public PTransformActivity animateViewToIncludeBounds(final Rectangle2D includeBounds, final long duration) {
-        return animateViewToPanToBounds(includeBounds, duration);
-    }

     /**
      * Animate the cameras view transform from its current value when the
=======================================
--- /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java Mon Jan 18 16:07:38 2010 +++ /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java Thu Apr 15 19:27:24 2010
@@ -77,20 +77,6 @@
      */
     private static final long serialVersionUID = 1L;

-    /**
-     * @deprecated this is a typo and clients should change their code to
-     *             reflect the correct spelling
-     */
- public static final String INTERATING_CHANGED_NOTIFICATION = "INTERATING_CHANGED_NOTIFICATION";
-
-    /**
-     * The property name that identifies a change in the interacting state.
-     *
-     * @since 1.3
-     * @deprecated in favor of PROPERTY_INTERACTING
-     */
- public static final String INTERACTING_CHANGED_NOTIFICATION = "INTERACTING_CHANGED_NOTIFICATION";
-
     /**
      * The property name that identifies a change in the interacting state.
      *
@@ -98,14 +84,6 @@
      */
public static final String PROPERTY_INTERACTING = "INTERACTING_CHANGED_NOTIFICATION";

-    /**
-     * Used as a public global to track the current canvas.
-     *
- * @deprecated since it falsely assumes that there is only one PCanvas per
-     *             program
-     */
-    public static PCanvas CURRENT_ZCANVAS = null;
-
     /** The camera though which this Canvas is viewing. */
     private PCamera camera;

@@ -165,7 +143,6 @@
      * camera, and layer. Zooming and panning are automatically installed.
      */
     public PCanvas() {
-        CURRENT_ZCANVAS = this;
         cursorStack = new PStack();
         setCamera(createDefaultCamera());
         setDefaultRenderQuality(PPaintContext.HIGH_QUALITY_RENDERING);
@@ -647,17 +624,6 @@
public Timer createTimer(final int delay, final ActionListener listener) {
         return new Timer(delay, listener);
     }
-
-    /**
-     * Returns the quality to use when not animating or interacting.
-     *
-     * @since 1.3
-     * @deprecated in favor or getNormalRenderQuality
-     * @return the render quality to use when not animating or interacting
-     */
-    public int getDefaultRenderQuality() {
-        return normalRenderQuality;
-    }

     /**
      * Returns the quality to use when not animating or interacting.
=======================================
--- /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PNode.java Fri Feb 26 13:55:45 2010 +++ /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PNode.java Thu Apr 15 19:27:24 2010
@@ -830,37 +830,6 @@

         return value.doubleValue();
     }
-
-    /**
-     * @deprecated use getAttribute(Object key)instead.
-     *
-     * @param key name of property to search for
-     * @return value of matching client property
-     */
-    public Object getClientProperty(final Object key) {
-        return getAttribute(key);
-    }
-
-    /**
-     * @deprecated use addAttribute(Object key, Object value)instead.
-     *
-     * @param key name of property to add
-     * @param value value or new attribute
-     */
-    public void addClientProperty(final Object key, final Object value) {
-        addAttribute(key, value);
-    }
-
-    /**
-     * @deprecated use getClientPropertyKeysEnumerator() instead.
-     *
-     * @return iterator for client property keys
-     */
-    public Iterator getClientPropertyKeysIterator() {
-        final Enumeration enumeration = getClientPropertyKeysEnumeration();
-
-        return new ClientPropertyKeyIterator(enumeration);
-    }

     // ****************************************************************
     // Copying - Methods for copying this node and its descendants.
@@ -2417,46 +2386,6 @@
             return animateToTransform(at, millis);
         }
     }
-
-    /**
-     * @deprecated in favor of animateToRelativePosition
-     *
- * It will calculate the necessary transform in order to make - * this node appear at a particular position relative to the - * specified bounding box. The source point specifies a point in - * the unit square (0, 0) - (1, 1) that represents an anchor
-     *             point on the corresponding node to this transform. The
- * destination point specifies an anchor point on the reference - * node. The position method then computes the transform that - * results in transforming this node so that the source anchor - * point coincides with the reference anchor point. This can be
-     *             useful for layout algorithms as it is straightforward to
-     *             position one object relative to another.
-     *             <p>
- * For example, If you have two nodes, A and B, and you call
-     *
-     *             <PRE>
-     * Point2D srcPt = new Point2D.Double(1.0, 0.0);
-     * Point2D destPt = new Point2D.Double(0.0, 0.0);
-     * A.position(srcPt, destPt, B.getGlobalBounds(), 750, null);
-     * </PRE>
-     *
- * The result is that A will move so that its upper-right corner - * is at the same place as the upper-left corner of B, and the - * transition will be smoothly animated over a period of 750
-     *             milliseconds.
-     *
- * @param srcPt The anchor point on this transform's node (normalized to a
-     *            unit square)
- * @param destPt The anchor point on destination bounds (normalized to a
-     *            unit square)
- * @param destBounds The bounds (in global coordinates) used to calculate
-     *            this transform's node
- * @param millis Number of milliseconds over which to perform the animation
-     */
- public void position(final Point2D srcPt, final Point2D destPt, final Rectangle2D destBounds, final int millis) {
-        animateToRelativePosition(srcPt, destPt, destBounds, millis);
-    };

     /**
      * Return a copy of the transform associated with this node.
@@ -3691,15 +3620,6 @@
         in.defaultReadObject();
         parent = (PNode) in.readObject();
     }
-
-    /**
- * @deprecated see http://code.google.com/p/piccolo2d/issues/detail?id=99
-     *
-     * @return a string representation of this node's state
-     */
-    protected String paramString() {
-        return "";
-    }

     /**
* Returns an array of input event listeners that are attached to this node.
=======================================
--- /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PActivity.java Mon Jan 18 16:07:38 2010 +++ /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/activities/PActivity.java Thu Apr 15 19:27:24 2010
@@ -427,15 +427,6 @@
         }
         return startTime + duration;
     }
-
-    /**
- * @deprecated see http://code.google.com/p/piccolo2d/issues/detail?id=99
-     *
-     * @return string representation of this activity
-     */
-    protected String paramString() {
-        return "";
-    }

     /**
* <b>PActivityDelegate</b> is used by classes to learn about and act on the
=======================================
--- /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PBasicInputEventHandler.java Mon Jan 18 16:07:38 2010 +++ /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PBasicInputEventHandler.java Thu Apr 15 19:27:24 2010
@@ -301,13 +301,4 @@
      */
     public void keyboardFocusLost(final PInputEvent event) {
     }
-
-    /**
- * @deprecated see http://code.google.com/p/piccolo2d/issues/detail?id=99
-     *
-     * @return empty string since this method is deprecated
-     */
-    protected String paramString() {
-        return "";
-    }
-}
+}
=======================================
--- /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java Thu Apr 15 18:47:47 2010 +++ /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java Thu Apr 15 19:27:24 2010
@@ -192,25 +192,7 @@
         this();
         setText(text);
     }
-
-    /**
-     * @deprecated by {...@link #getHorizontalAlignment()}
-     *
-     * @return the horizontal alignment value of this node
-     */
-    public float getJustification() {
-        return getHorizontalAlignment();
-    }
-
-    /**
-     * @deprecated by {...@link #setHorizontalAlignment(float)}
-     *
- * @param justification horizontal alignment value to assign to this node
-     */
-    public void setJustification(final float justification) {
-        setHorizontalAlignment(justification);
-    }
-
+
     /**
      * Return the horizontal alignment for this text node. The horizontal
      * alignment will be one of <code>Component.LEFT_ALIGNMENT</code>,
=======================================
--- /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/util/PPaintContext.java Thu Apr 15 18:47:47 2010 +++ /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/util/PPaintContext.java Thu Apr 15 19:27:24 2010
@@ -61,12 +61,6 @@
     /** Font context to use while in high quality rendering. */
public static final FontRenderContext RENDER_QUALITY_HIGH_FRC = new FontRenderContext(null, true, true);

-    /**
- * @deprecated will disappear as soon as possible Global for accessing the
-     *             current paint context while painting.
-     **/
-    public static PPaintContext CURRENT_PAINT_CONTEXT;
-
     /** Used while calculating scale at which rendering is occurring. */
     private static final double[] PTS = new double[4];

@@ -112,8 +106,6 @@
         }

         localClipStack.push(clip.getBounds2D());
-
-        CURRENT_PAINT_CONTEXT = this;
     }

     /**
@@ -161,15 +153,6 @@
     public void pushCamera(final PCamera aCamera) {
         cameraStack.push(aCamera);
     }
-
-    /**
-     * @deprecated in favor of popCamera()
-     *
-     * @param aCamera absolute not used in any way
-     */
-    public void popCamera(final PCamera aCamera) {
-        cameraStack.pop();
-    }

     /**
      * Removes the camera at the top of the camera stack.
=======================================
--- /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/util/PUtil.java Thu Apr 15 18:47:47 2010 +++ /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/util/PUtil.java Thu Apr 15 19:27:24 2010
@@ -35,7 +35,6 @@
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.io.OutputStream;
 import java.io.Serializable;
 import java.util.Collections;
 import java.util.Enumeration;
@@ -82,27 +81,6 @@
         }
     };

-    /**
-     * @deprecated This has been moved into a private static class of
-     *             PObjectOutputStream
-     */
- public static final OutputStream NULL_OUTPUT_STREAM = new OutputStream() {
-        public void close() {
-        }
-
-        public void flush() {
-        }
-
-        public void write(final byte[] b) {
-        }
-
-        public void write(final byte[] b, final int off, final int len) {
-        }
-
-        public void write(final int b) {
-        }
-    };
-
     /**
      * Creates the simplest possible scene graph. 1 Camera, 1 Layer, 1 Root
      *
=======================================
--- /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/PCameraTest.java Mon Jan 18 16:07:38 2010 +++ /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/PCameraTest.java Thu Apr 15 19:27:24 2010
@@ -470,16 +470,6 @@
// todo: layer is not contained in list of layers viewed by camera, should complain
         camera.repaintFromLayer(new PBounds(0, 0, 1, 1), layer);
     }
-
-    public void testRepaintFromLayerNotALayer() {
-        try {
-            camera.repaintFromLayer(new PBounds(0, 0, 1, 1), new PNode());
- fail("repaintFromLayer(PBounds, PNode) expected IllegalArgumentException");
-        }
-        catch (IllegalArgumentException e) {
-            // expected
-        }
-    }

     public void testRemoveLayerAtIndex() {
         PLayer layer = new PLayer();
=======================================
--- /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/PCanvasTest.java Mon Jan 18 16:07:38 2010 +++ /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/PCanvasTest.java Thu Apr 15 19:27:24 2010
@@ -69,17 +69,6 @@
         canvas.setInteracting(true);
         assertTrue(canvas.getInteracting());
     }
-
-    public void testSetInteractingFiresChangeEvent() {
- final MockPropertyChangeListener mockListener = new MockPropertyChangeListener(); - canvas.addPropertyChangeListener(PCanvas.INTERACTING_CHANGED_NOTIFICATION, mockListener);
-        canvas.setInteracting(true);
-        assertEquals(1, mockListener.getPropertyChangeCount());
-    }
-
-    public void testDefaultRenderQualityIsHigh() {
- assertEquals(PPaintContext.HIGH_QUALITY_RENDERING, canvas.getDefaultRenderQuality());
-    }

     public void testDefaultAnimatingRenderQualityIsLow() {
assertEquals(PPaintContext.LOW_QUALITY_RENDERING, canvas.getAnimatingRenderQuality());
=======================================
--- /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/PNodeTest.java Mon Jan 18 16:07:38 2010 +++ /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/PNodeTest.java Thu Apr 15 19:27:24 2010
@@ -41,7 +41,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Enumeration;
-import java.util.Iterator;
 import java.util.ListIterator;

 import javax.swing.text.MutableAttributeSet;
@@ -592,30 +591,6 @@
         node.addAttribute("Found", new Double(5));
         assertEquals(5, node.getIntegerAttribute("Found", 10), 0.001);
     }
-
-    public void testGetAddClienProperty() {
-        assertNull(node.getClientProperty("Testing"));
-        node.addClientProperty("Testing", "Hello");
-        assertEquals("Hello", node.getClientProperty("Testing"));
-    }
-
- public void testGetClientPropertyKeysIteratorIsNotNullOnEmptyClientProperties() {
-        final Iterator iterator = node.getClientPropertyKeysIterator();
-        assertNotNull(iterator);
-        assertFalse(iterator.hasNext());
-    }
-
- public void testGetClientPropertyKeysIteratorReturnsValidIteraotOnPropertiesExist() {
-        node.addClientProperty("A", "Aval");
-        node.addClientProperty("B", "Bval");
-        final Iterator iterator = node.getClientPropertyKeysIterator();
-        assertNotNull(iterator);
-        assertTrue(iterator.hasNext());
-        assertEquals("A", iterator.next());
-        assertTrue(iterator.hasNext());
-        assertEquals("B", iterator.next());
-        assertFalse(iterator.hasNext());
-    }

     public void testLocalToParentModifiesGivenPoint() {
         final PNode parent = new PNode();
=======================================
--- /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/nodes/PTextTest.java Mon Jan 18 16:07:38 2010 +++ /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/nodes/PTextTest.java Thu Apr 15 19:27:24 2010
@@ -98,15 +98,6 @@
         textNode.setText("hello world");
         assertNotNull(textNode.toString());
     }
-
-    public void testJustificationIsLeftByDefault() {
- assertEquals(Component.LEFT_ALIGNMENT, textNode.getJustification(), 0.000001);
-    }
-
-    public void testSetJustificationPersists() {
-        textNode.setJustification(Component.RIGHT_ALIGNMENT);
- assertEquals(Component.RIGHT_ALIGNMENT, textNode.getJustification(), 0.000001);
-    }

     public void testHorizontalAlignmentIsLeftByDefault() {
assertEquals(Component.LEFT_ALIGNMENT, textNode.getHorizontalAlignment(), 0.000001);
=======================================
--- /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/PFrame.java Mon Jan 18 16:07:38 2010 +++ /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/PFrame.java Thu Apr 15 19:27:24 2010
@@ -329,15 +329,4 @@
      */
     public void initialize() {
     }
-
-    /**
-     * Method for testing the creating of PFrame.
-     *
-     * @deprecated since it's not terribly useful
-     *
-     * @param argv command line arguments
-     */
-    public static void main(final String[] argv) {
-        new PFrame();
-    }
-}
+}
=======================================
--- /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/event/PNotificationCenter.java Thu Apr 15 19:04:33 2010 +++ /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/event/PNotificationCenter.java Thu Apr 15 19:27:24 2010
@@ -66,13 +66,13 @@
     public static final Object NULL_MARKER = new Object();

     /** Singleton instance of the notification center. */
-    protected  static volatile PNotificationCenter DEFAULT_CENTER;
+    private  static volatile PNotificationCenter DEFAULT_CENTER;

     /** A map of listeners keyed by NotificationKey objects. */
-    protected HashMap listenersMap;
+    private HashMap listenersMap;

/** A queue of NotificationKeys that are available to be garbage collected. */
-    protected ReferenceQueue keyQueue;
+    private ReferenceQueue keyQueue;

     /**
      * Singleton accessor for the PNotificationCenter.
@@ -328,7 +328,7 @@
      *
      * @return list of matching keys
      */
-    protected List matchingKeys(final String name, final Object object) {
+    private List matchingKeys(final String name, final Object object) {
         final List result = new LinkedList();

final NotificationKey searchKey = new NotificationKey(name, object);
@@ -350,7 +350,7 @@
      * @param listener the listener being unregistered
      * @param key the key that identifies the listener
      */
- protected void removeListener(final Object listener, final Object key) {
+    private void removeListener(final Object listener, final Object key) {
         if (listener == null) {
             listenersMap.remove(key);
             return;
@@ -378,7 +378,7 @@
* Iterates over available keys in the key queue and removes the queue from
      * the listener map.
      */
-    protected void processKeyQueue() {
+    private void processKeyQueue() {
         NotificationKey key;
         while ((key = (NotificationKey) keyQueue.poll()) != null) {
             listenersMap.remove(key);
@@ -388,7 +388,7 @@
     /**
      * Represents a notification type from a particular object.
      */
-    protected static class NotificationKey extends WeakReference {
+    private static class NotificationKey extends WeakReference {
         private final Object name;
         private final int hashCode;

@@ -478,7 +478,7 @@
      * A NotificationTarget is a method on a particular object that can be
      * invoked.
      */
-    protected static class NotificationTarget extends WeakReference {
+    private static class NotificationTarget extends WeakReference {
         /** Cached hashcode value computed at construction time. */
         protected int hashCode;

=======================================
--- /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/nodes/P3DRect.java Mon Jan 18 16:07:38 2010 +++ /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/nodes/P3DRect.java Thu Apr 15 19:27:24 2010
@@ -212,14 +212,4 @@
         bottomRightInnerColor = color.brighter();
         bottomRightOuterColor = bottomRightInnerColor.brighter();
     }
-
-    /**
-     * TODO can we remove this?
-     *
-     * @deprecated since it has been moved to P3DRectExample.
-     *
-     * @param args Command line arguments
-     */
-    public static void main(final String[] args) {
-    }
-}
+}
=======================================
--- /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwing.java Mon Mar 8 16:36:20 2010 +++ /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwing.java Thu Apr 15 19:27:24 2010
@@ -329,16 +329,6 @@
         updateBounds();
         listenForCanvas(this);
     }
-
-    /**
-     * @deprecated by {...@link #PSwing(JComponent)}
-     *
-     * @param swingCanvas canvas on which the PSwing node will be embedded
-     * @param component not used
-     */
- public PSwing(final PSwingCanvas swingCanvas, final JComponent component) {
-        this(component);
-    }

     /**
* Ensures the bounds of the underlying component are accurate, and sets the
=======================================
--- /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/util/PSemanticStroke.java Mon Jan 18 16:07:38 2010 +++ /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/util/PSemanticStroke.java Thu Apr 15 19:27:24 2010
@@ -30,8 +30,6 @@
 import java.awt.Shape;
 import java.awt.Stroke;

-import edu.umd.cs.piccolo.util.PDebug;
-import edu.umd.cs.piccolo.util.PPaintContext;
 import edu.umd.cs.piccolo.util.PPickPath;

 /**
@@ -102,19 +100,10 @@
      * re-implementations.
      */
     protected float getActiveScale() {
- // FIXME Honestly I don't understand this distinction - shouldn't it
-        // always be PPaintContext.CURRENT_PAINT_CONTEXT regardless of the
-        // debugging flag?
-        if (PDebug.getProcessingOutput()) {
-            if (PPaintContext.CURRENT_PAINT_CONTEXT != null) {
- return (float) PPaintContext.CURRENT_PAINT_CONTEXT.getScale();
-            }
-        }
-        else {
-            if (PPickPath.CURRENT_PICK_PATH != null) {
-                return (float) PPickPath.CURRENT_PICK_PATH.getScale();
-            }
-        }
+        if (PPickPath.CURRENT_PICK_PATH != null) {
+            return (float) PPickPath.CURRENT_PICK_PATH.getScale();
+        }
+
         return 1.0f;
     }

=======================================
--- /piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java Thu Apr 15 18:47:47 2010 +++ /piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java Thu Apr 15 19:27:24 2010
@@ -394,27 +394,6 @@
         }
         return cachedFont;
     }
-
-    /**
-     * Deprecated since SWT now handles this.
-     *
-     * @deprecated
-     * @return font that's been transformed by the current transform
-     */
-    protected org.eclipse.swt.graphics.Font getTransformedFont() {
-        if (curFont != null) {
-            final FontData fontData = curFont.getFontData()[0];
-            int height = fontData.getHeight();
-            TEMP_RECT.setRect(0, 0, height, height);
-            SWTShapeManager.transform(TEMP_RECT, transform);
-            height = (int) (TEMP_RECT.getHeight() + 0.5);
-
- final String fontString = "name=" + fontData.getName() + ";bold=" + ((fontData.getStyle() & SWT.BOLD) != 0) - + ";italic=" + ((fontData.getStyle() & SWT.ITALIC) != 0) + ";size=" + height;
-            return getFont(fontString);
-        }
-        return null;
-    }

     // /////////////////////////
     // AFFINE TRANSFORM METHODS
@@ -1201,14 +1180,6 @@

gc.fillGradientRectangle(SWT_RECT.x, SWT_RECT.y, SWT_RECT.width, SWT_RECT.height, vertical);
     }
-
-    /**
-     * @deprecated since underlying method has been deprecated
-     * @param xOr whether to be in xOr mode
-     */
-    public void setXORMode(final boolean xOr) {
-        gc.setXORMode(xOr);
-    }

     /**
* Returns the advance width of the character provided in the current font.

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

Reply via email to