diff --git a/core/src/main/java/edu/umd/cs/piccolo/PCamera.java b/core/src/main/java/edu/umd/cs/piccolo/PCamera.java index 2aa9191..96c5737 100644 --- a/core/src/main/java/edu/umd/cs/piccolo/PCamera.java +++ b/core/src/main/java/edu/umd/cs/piccolo/PCamera.java @@ -210,16 +210,6 @@ } /** - * @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. * * @return the list of layers viewed by this camera @@ -746,26 +736,6 @@ } /** - * 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 * activity starts to the new destination transform value. * diff --git a/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java b/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java index a749cc5..ae44506 100644 --- a/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java +++ b/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java @@ -78,34 +78,12 @@ 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. * * @since 1.3 */ 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); @@ -652,17 +629,6 @@ * 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. - * - * @since 1.3 * @return the render quality to use when not animating or interacting */ public int getNormalRenderQuality() { diff --git a/core/src/main/java/edu/umd/cs/piccolo/PNode.java b/core/src/main/java/edu/umd/cs/piccolo/PNode.java index e8e702f..3277d56 100644 --- a/core/src/main/java/edu/umd/cs/piccolo/PNode.java +++ b/core/src/main/java/edu/umd/cs/piccolo/PNode.java @@ -831,37 +831,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. // Copying is implemented in terms of serialization. @@ -2419,46 +2388,6 @@ } /** - * @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. - *
- * For example, If you have two nodes, A and B, and you call - * - *
- * 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); - *- * - * 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. * * @return copy of this node's transform @@ -3693,15 +3622,6 @@ } /** - * @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. * * @since 1.3 diff --git a/core/src/main/java/edu/umd/cs/piccolo/activities/PActivity.java b/core/src/main/java/edu/umd/cs/piccolo/activities/PActivity.java index ee4c13b..c890c4c 100644 --- a/core/src/main/java/edu/umd/cs/piccolo/activities/PActivity.java +++ b/core/src/main/java/edu/umd/cs/piccolo/activities/PActivity.java @@ -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 ""; - } /** * PActivityDelegate is used by classes to learn about and act on the diff --git a/core/src/main/java/edu/umd/cs/piccolo/event/PBasicInputEventHandler.java b/core/src/main/java/edu/umd/cs/piccolo/event/PBasicInputEventHandler.java index 5b0a9a3..4e1da54 100644 --- a/core/src/main/java/edu/umd/cs/piccolo/event/PBasicInputEventHandler.java +++ b/core/src/main/java/edu/umd/cs/piccolo/event/PBasicInputEventHandler.java @@ -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 ""; - } } diff --git a/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java b/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java index ad43dbf..30c8098 100644 --- a/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java +++ b/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java @@ -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
Component.LEFT_ALIGNMENT
,
diff --git a/core/src/main/java/edu/umd/cs/piccolo/util/PPaintContext.java b/core/src/main/java/edu/umd/cs/piccolo/util/PPaintContext.java
index 19e45dc..d5d103a 100644
--- a/core/src/main/java/edu/umd/cs/piccolo/util/PPaintContext.java
+++ b/core/src/main/java/edu/umd/cs/piccolo/util/PPaintContext.java
@@ -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;
}
/**
@@ -163,15 +155,6 @@
}
/**
- * @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.
*
* @since 1.3
diff --git a/core/src/main/java/edu/umd/cs/piccolo/util/PUtil.java b/core/src/main/java/edu/umd/cs/piccolo/util/PUtil.java
index 004d9b0..a5634be 100644
--- a/core/src/main/java/edu/umd/cs/piccolo/util/PUtil.java
+++ b/core/src/main/java/edu/umd/cs/piccolo/util/PUtil.java
@@ -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;
@@ -83,27 +82,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
*
* @return a basic scene with 1 camera, layer and root
diff --git a/core/src/test/java/edu/umd/cs/piccolo/PCameraTest.java b/core/src/test/java/edu/umd/cs/piccolo/PCameraTest.java
index 33545ce..2f5a988 100644
--- a/core/src/test/java/edu/umd/cs/piccolo/PCameraTest.java
+++ b/core/src/test/java/edu/umd/cs/piccolo/PCameraTest.java
@@ -471,16 +471,6 @@
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();
camera.addLayer(layer);
diff --git a/core/src/test/java/edu/umd/cs/piccolo/PCanvasTest.java b/core/src/test/java/edu/umd/cs/piccolo/PCanvasTest.java
index 718b491..a4099d0 100644
--- a/core/src/test/java/edu/umd/cs/piccolo/PCanvasTest.java
+++ b/core/src/test/java/edu/umd/cs/piccolo/PCanvasTest.java
@@ -70,17 +70,6 @@
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());
}
diff --git a/core/src/test/java/edu/umd/cs/piccolo/PNodeTest.java b/core/src/test/java/edu/umd/cs/piccolo/PNodeTest.java
index dd231e1..ea19f9a 100644
--- a/core/src/test/java/edu/umd/cs/piccolo/PNodeTest.java
+++ b/core/src/test/java/edu/umd/cs/piccolo/PNodeTest.java
@@ -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;
@@ -593,30 +592,6 @@
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();
parent.addChild(node);
diff --git a/core/src/test/java/edu/umd/cs/piccolo/nodes/PTextTest.java b/core/src/test/java/edu/umd/cs/piccolo/nodes/PTextTest.java
index 089fa06..fbf9c9d 100644
--- a/core/src/test/java/edu/umd/cs/piccolo/nodes/PTextTest.java
+++ b/core/src/test/java/edu/umd/cs/piccolo/nodes/PTextTest.java
@@ -99,15 +99,6 @@
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);
}
diff --git a/extras/src/main/java/edu/umd/cs/piccolox/PFrame.java b/extras/src/main/java/edu/umd/cs/piccolox/PFrame.java
index 7243a9b..762ee5c 100644
--- a/extras/src/main/java/edu/umd/cs/piccolox/PFrame.java
+++ b/extras/src/main/java/edu/umd/cs/piccolox/PFrame.java
@@ -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();
- }
}
diff --git a/extras/src/main/java/edu/umd/cs/piccolox/event/PNotificationCenter.java b/extras/src/main/java/edu/umd/cs/piccolox/event/PNotificationCenter.java
index bd697e9..c1c96a9 100644
--- a/extras/src/main/java/edu/umd/cs/piccolox/event/PNotificationCenter.java
+++ b/extras/src/main/java/edu/umd/cs/piccolox/event/PNotificationCenter.java
@@ -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;
diff --git a/extras/src/main/java/edu/umd/cs/piccolox/nodes/P3DRect.java b/extras/src/main/java/edu/umd/cs/piccolox/nodes/P3DRect.java
index d3eaecf..ef0e649 100644
--- a/extras/src/main/java/edu/umd/cs/piccolox/nodes/P3DRect.java
+++ b/extras/src/main/java/edu/umd/cs/piccolox/nodes/P3DRect.java
@@ -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) {
- }
}
diff --git a/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwing.java b/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwing.java
index f62e5de..5011d58 100644
--- a/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwing.java
+++ b/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwing.java
@@ -331,16 +331,6 @@
}
/**
- * @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
* bounds of this PNode.
*/
diff --git a/extras/src/main/java/edu/umd/cs/piccolox/util/PSemanticStroke.java b/extras/src/main/java/edu/umd/cs/piccolox/util/PSemanticStroke.java
index ca45154..e031018 100644
--- a/extras/src/main/java/edu/umd/cs/piccolox/util/PSemanticStroke.java
+++ b/extras/src/main/java/edu/umd/cs/piccolox/util/PSemanticStroke.java
@@ -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();
- }
+ if (PPickPath.CURRENT_PICK_PATH != null) {
+ return (float) PPickPath.CURRENT_PICK_PATH.getScale();
}
- else {
- if (PPickPath.CURRENT_PICK_PATH != null) {
- return (float) PPickPath.CURRENT_PICK_PATH.getScale();
- }
- }
+
return 1.0f;
}
diff --git a/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java b/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java
index 26d0b00..0e34a9e 100644
--- a/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java
+++ b/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java
@@ -395,27 +395,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
// /////////////////////////
@@ -1203,14 +1182,6 @@
}
/**
- * @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.
*
* @param ch character to calculate the advance width of.