changeset 870:28fbe39ed5cc 2.2-b06

Automated merge with ssh://jpgodine@jfxsrc.us.oracle.com//javafx/2.2/MASTER/jfx//rt
author jpgodine@JPGODINE-LAP.st-users.us.oracle.com
date Tue, 24 Apr 2012 09:10:29 -0700
parents e037c4143dea afeaebc43716
children a5ed33820281 8cb18dcf8b2c
files javafx-ui-common/src/javafx/scene/Node.java
diffstat 59 files changed, 970 insertions(+), 974 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/com/sun/javafx/tk/TKDropTargetListener.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/com/sun/javafx/tk/TKDropTargetListener.java	Tue Apr 24 09:10:29 2012 -0700
@@ -49,7 +49,7 @@
 /**
  * Listens for drop target events on a TKScene.
  * Event objects are passed transparently as java.lang.Object and are expected
- * to be converted to {@link javafx.scene.transfer.DragEvent}s by the implemtation
+ * to be converted to {@link javafx.scene.transfer.DragEvent}s by the implementation
  * of this interface through the use of
  * {@link Toolkit#convertDropTargetEventToFX(Object):javafx.scene.transfer.DragEvent}
  * as necessary.
@@ -80,8 +80,8 @@
 
     /**
      * Called if the user has modified the intended 
-     * {@link javafx.scene.transfer.TransferMode} of the drag gesture.
-     * This ususally happens as a result of different keys being pressed/released
+     * {@link javafx.scene.input.TransferMode} of the drag gesture.
+     * This usually happens as a result of different keys being pressed/released
      * during the gesture (alt, shift, ctrl, etc.)
      *
      * @param dropTargetDragEvent a drop target drag event
--- a/javafx-ui-common/src/javafx/scene/Node.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/Node.java	Tue Apr 24 09:10:29 2012 -0700
@@ -1178,7 +1178,7 @@
      * little benefit to caching Nodes as bitmaps when blurs and other effects
      * are used since they are very fast to render on the GPU.
      *
-     * The {@link cacheHint} variable provides additional options for enabling
+     * The {@link #cacheHintProperty} variable provides additional options for enabling
      * more aggressive bitmap caching.
      *
      * <p>
@@ -1724,7 +1724,7 @@
      * event handler. More detail about dragging gestures can be found
      * in the overview of {@link MouseEvent} and {@link MouseDragEvent}.
      *
-     * @see MosueEvent
+     * @see MouseEvent
      * @see MouseDragEvent
      * @throws IllegalStateException if the full press-drag-release gesture
      * cannot be started at this moment (it's called outside of
@@ -1870,7 +1870,7 @@
      * If the node is unmanaged, its parent will ignore the child in both preferred
      * size computations and layout.   Changes in layoutBounds will not trigger
      * relayout above it.   If an unmanaged node is of type {@link javafx.scene.Parent Parent},
-     * it will act as a "layout root", meaning that calls to {@link requestLayout()}
+     * it will act as a "layout root", meaning that calls to {@link Parent#requestLayout()}
      * beneath it will cause only the branch rooted by the node to be relayed out,
      * thereby isolating layout changes to that root and below.  It's the application's
      * responsibility to set the size and position of an unmanaged node.
@@ -1927,7 +1927,7 @@
      *
      * <p>For example, if {@code textnode} should be positioned at {@code finalX}
      * <code><pre>
-     *     textnode.setLayoutX(finalX - textnode.getLayoutBounds().getMinX();
+     *     textnode.setLayoutX(finalX - textnode.getLayoutBounds().getMinX());
      * </pre></code>
      * <p>
      * Failure to subtract {@code layoutBounds minX} may result in misplacement
@@ -5752,7 +5752,7 @@
      * Indicates whether this {@code Node} currently has the input focus.
      * To have the input focus, a node must be the {@code Scene}'s focus
      * owner, and the scene must be in a {@code Stage} that is visible
-     * and active. See {@link requestFocus()} for more information.
+     * and active. See {@link #requestFocus()} for more information.
      *
      * @see #requestFocus()
      * @defaultValue false
@@ -5793,7 +5793,7 @@
      * {@code Node} whose {@code focusTraversable} variable is true
      * and that is eligible to receive the focus,
      * unless the focus had been set explicitly via a call
-     * to {@link requestFocus()}.
+     * to {@link #requestFocus()}.
      *
      * @see #requestFocus()
      * @defaultValue false
--- a/javafx-ui-common/src/javafx/scene/Parent.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/Parent.java	Tue Apr 24 09:10:29 2012 -0700
@@ -1083,7 +1083,7 @@
      * with the scene graph, see the <a href="doc-files/cssref.html">CSS Reference
      * Guide</a>.
      *
-     * @returns the list of stylesheets to use with this Parent
+     * @return the list of stylesheets to use with this Parent
      */
     public final ObservableList<String> getStylesheets() { return stylesheets; }
     
--- a/javafx-ui-common/src/javafx/scene/Scene.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/Scene.java	Tue Apr 24 09:10:29 2012 -0700
@@ -624,12 +624,6 @@
         impl_peer.setScene(this);
         PerformanceTracker.logEvent("Scene.initPeer TKScene set");
         impl_peer.setRoot(getRoot().impl_getPGNode());
-        if (!sizeInitialized) {
-            // content may have been added after scene was constructed, so
-            // try again to set size based on content if the scene or window
-            // weren't explicitly sized;
-            preferredSize();
-        }
         impl_peer.setFillPaint(getFill() == null ? null : tk.getPaint(getFill()));
         impl_peer.setCamera(getCamera() == null ? null : getCamera().getPlatformCamera());
         pickingCamera = getCamera();
@@ -976,10 +970,6 @@
                         _value.getStyleClass().add(0, "root");
                         _value.setScene(Scene.this);
                         markDirty(DirtyBits.ROOT_DIRTY);
-                        if (impl_peer != null && !sizeInitialized) {
-                            // Root was set after scene was initialized and peer created
-                            preferredSize();
-                        }
                         _value.resize(getWidth(), getHeight()); // maybe no-op if root is not resizable
                         _value.requestLayout();
                     }
@@ -1162,7 +1152,7 @@
      * with the scene graph, see the <a href="doc-files/cssref.html">CSS Reference
      * Guide</a>.
      *
-     * @returns the list of stylesheets to use with this scene
+     * @return the list of stylesheets to use with this scene
      */
     public final ObservableList<String> getStylesheets() { return stylesheets; }
 
--- a/javafx-ui-common/src/javafx/scene/effect/Blend.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/Blend.java	Tue Apr 24 09:10:29 2012 -0700
@@ -44,44 +44,42 @@
  * An effect that blends the two inputs together using one of the
  * pre-defined {@link BlendMode}s.
  *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.effect.*;
-import javafx.scene.paint.*;
-import javafx.scene.shape.*;
-import javafx.scene.text.*;
-
-Blend blend = new Blend();
-blend.setMode(BlendMode.MULTIPLY);
-
-ColorInput colorInput = new ColorInput();
-colorInput.setPaint(Color.BLUE);
-colorInput.setX(10);
-colorInput.setY(10);
-colorInput.setWidth(160);
-colorInput.setHeight(80);
-
-blend.setTopInput(colorInput);
-
-Rectangle r = new Rectangle();
-r.setWidth(180);
-r.setHeight(100);
-Stop[] stops = new Stop[] {new Stop(0, Color.RED), new Stop(1, Color.YELLOW)};
-LinearGradient lg = new LinearGradient(0, 0, 0.25, 0.25, true, CycleMethod.REFLECT, stops);
-r.setFill(lg);
-
-Text t = new Text();
-t.setEffect(blend);
-t.setX(25);
-t.setY(65);
-t.setFill(Color.RED);
-t.setText("SrcOut");
-t.setFont(Font.font(null, FontWeight.BOLD, 36));
-
-Group g = new Group();
-g.getChildren().add(r);
-g.getChildren().add(t);
-</PRE>
+ * <p>
+ * Example:
+ * <pre><code>
+ * Blend blend = new Blend();
+ * blend.setMode(BlendMode.COLOR_BURN);
+ *
+ * ColorInput colorInput = new ColorInput();
+ * colorInput.setPaint(Color.STEELBLUE);
+ * colorInput.setX(10);
+ * colorInput.setY(10);
+ * colorInput.setWidth(100);
+ * colorInput.setHeight(180);
+ *
+ * blend.setTopInput(colorInput);
+ *
+ * Rectangle rect = new Rectangle();
+ * rect.setWidth(220);
+ * rect.setHeight(100);
+ * Stop[] stops = new Stop[]{new Stop(0, Color.LIGHTSTEELBLUE), new Stop(1, Color.PALEGREEN)};
+ * LinearGradient lg = new LinearGradient(0, 0, 0.25, 0.25, true, CycleMethod.REFLECT, stops);
+ * rect.setFill(lg);
+ *
+ * Text text = new Text();
+ * text.setX(15);
+ * text.setY(65);
+ * text.setFill(Color.PALEVIOLETRED);
+ * text.setText("COLOR_BURN");
+ * text.setFont(Font.font(null, FontWeight.BOLD, 30));
+ *
+ * Group g = new Group();
+ * g.setEffect(blend);
+ * g.getChildren().addAll(rect, text);
+ * </pre></code>
+ *
+ * <p> The code above produces the following: </p> 
+ * <p> <img src="doc-files/blend.png"/> </p>
  */
 public class Blend extends Effect {
 
--- a/javafx-ui-common/src/javafx/scene/effect/Bloom.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/Bloom.java	Tue Apr 24 09:10:29 2012 -0700
@@ -42,34 +42,32 @@
  * A high-level effect that makes brighter portions of the input image
  * appear to glow, based on a configurable threshold.
  *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.shape.*;
-import javafx.scene.text.*;
-import javafx.scene.paint.*;
-import javafx.scene.effect.*;
-
-Group g = new Group();
-
-Rectangle r = new Rectangle();
-r.setX(10);
-r.setY(10);
-r.setWidth(160);
-r.setHeight(80);
-r.setFill(Color.DARKBLUE);
-
-Text t = new Text();
-t.setText("Bloom!");
-t.setFill(Color.YELLOW);
-t.setFont(Font.font(null, FontWeight.BOLD, 36));
-t.setX(25);
-t.setY(65);
-
-g.setCache(true);
-g.setEffect(new Bloom());
-g.getChildren().add(r);
-g.getChildren().add(t);
-</PRE>
+ * <p>
+ * Example:
+ * <pre><code>
+ * Bloom bloom = new Bloom();
+ * bloom.setThreshold(0.1);
+ * 
+ * Rectangle rect = new Rectangle();
+ * rect.setX(10);
+ * rect.setY(10);
+ * rect.setWidth(160);
+ * rect.setHeight(80);
+ * rect.setFill(Color.DARKSLATEBLUE);
+ *
+ * Text text = new Text();
+ * text.setText("Bloom!");
+ * text.setFill(Color.ALICEBLUE);
+ * text.setFont(Font.font(null, FontWeight.BOLD, 40));
+ * text.setX(25);
+ * text.setY(65);
+ * text.setEffect(bloom);
+ * </pre></code>
+ *
+ * <p> The code above produces the following: </p>
+ * <p>
+ * <img src="doc-files/bloom.png"/>
+ * </p>
  */
 public class Bloom extends Effect {
     /**
--- a/javafx-ui-common/src/javafx/scene/effect/BoxBlur.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/BoxBlur.java	Tue Apr 24 09:10:29 2012 -0700
@@ -43,29 +43,30 @@
 /**
  * A blur effect using a simple box filter kernel, with separately
  * configurable sizes in both dimensions, and an iteration parameter
- * that contols the quality of the resulting blur.
+ * that controls the quality of the resulting blur.
  *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.text.*;
-import javafx.scene.paint.*;
-import javafx.scene.effect.*;
-
-Text t = new Text();
-t.setText("Blurry Text!");
-t.setFill(Color.RED);
-t.setFont(Font.font(null, FontWeight.BOLD, 36));
-t.setX(10);
-t.setY(40);
-
-BoxBlur bb = new BoxBlur();
-bb.setWidth(15);
-bb.setHeight(15);
-bb.setIterations(3);
-
-t.setEffect(bb);
-
-</PRE>
+ * <p>
+ * Example:
+ * <pre><code>
+ * BoxBlur boxBlur = new BoxBlur();
+ * boxBlur.setWidth(10);
+ * boxBlur.setHeight(3);
+ * boxBlur.setIterations(3);
+ *
+ * Text text = new Text();
+ * text.setText("Blurry Text!");
+ * text.setFill(Color.web("0x3b596d"));
+ * text.setFont(Font.font(null, FontWeight.BOLD, 50));
+ * text.setX(10);
+ * text.setY(50);
+ * text.setEffect(boxBlur);
+ * </pre></code>
+ * <p>
+ * The code above produces the following:
+ * </p>
+ * <p>
+ * <img src="doc-files/boxblur.png"/>
+ * </p>
  */
 public class BoxBlur extends Effect {
 
--- a/javafx-ui-common/src/javafx/scene/effect/ColorAdjust.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/ColorAdjust.java	Tue Apr 24 09:10:29 2012 -0700
@@ -41,6 +41,30 @@
 /**
  * An effect that allows for per-pixel adjustments of hue, saturation,
  * brightness, and contrast.
+ *  
+ * <p>
+ * Example:
+ * <pre><code>
+ * ColorAdjust colorAdjust = new ColorAdjust();
+ * colorAdjust.setContrast(0.1);
+ * colorAdjust.setHue(-0.05);
+ * colorAdjust.setBrightness(0.1);
+ * colorAdjust.setSaturation(0.2);
+ * 
+ * Image image = new Image("boat.jpg");
+ * ImageView imageView = new ImageView(image);
+ * imageView.setFitWidth(200);
+ * imageView.setPreserveRatio(true);
+ * imageView.setEffect(colorAdjust);
+ * </pre></code> 
+ * <p> The code above applied on this image: </p>
+ * <p>
+ * <img src="doc-files/photo.png"/>
+ * </p>
+ * <p> produces the following: </p>
+ * <p>
+ * <img src="doc-files/coloradjust.png"/>
+ * </p>
  */
 public class ColorAdjust extends Effect {
     /**
--- a/javafx-ui-common/src/javafx/scene/effect/DisplacementMap.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/DisplacementMap.java	Tue Apr 24 09:10:29 2012 -0700
@@ -67,51 +67,38 @@
  * The results of mouse picking and the containment methods are undefined
  * when a {@code Node} has a {@code DisplacementMap} effect in place.
  *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.text.*;
-import javafx.scene.shape.*;
-import javafx.scene.paint.*;
-import javafx.scene.effect.*;
-
-int w = 220;
-int h = 100;
-FloatMap map = new FloatMap();
-map.setWidth(w);
-map.setHeight(h);
-
-for (int i = 0; i < w; i++) {
-    double v = (Math.sin(i/50.0*Math.PI)-0.5)/40.0;
-    for (int j = 0; j < h; j++) {
-        map.setSamples(i, j, 0.0f,(float) v);
-    }
-}
-
-Group g = new Group();
-DisplacementMap dm = new DisplacementMap();
-dm.setMapData(map);
-
-g.setEffect(dm);
-g.setCache(true);
-
-Rectangle r = new Rectangle();
-r.setX(20.0);
-r.setY(20.0);
-r.setWidth(w);
-r.setHeight(h);
-r.setFill(Color.BLUE);
-
-g.getChildren().add(r);
-
-Text t = new Text();
-t.setX(40.0);
-t.setY(80.0);
-t.setText("Wavy Text");
-t.setFill(Color.YELLOW);
-t.setFont(Font.font(null, FontWeight.BOLD, 36));
-
-g.getChildren().add(t);
-</PRE>
+ * <p>
+ * Example:
+ * <pre><code>
+ * int width = 220;
+ * int height = 100;
+ * 
+ * FloatMap floatMap = new FloatMap();
+ * floatMap.setWidth(width);
+ * floatMap.setHeight(height);
+ *
+ * for (int i = 0; i < width; i++) {
+ *     double v = (Math.sin(i / 20.0 * Math.PI) - 0.5) / 40.0;
+ *     for (int j = 0; j < height; j++) {
+ *         floatMap.setSamples(i, j, 0.0f, (float) v);
+ *     }
+ * }
+ *
+ * DisplacementMap displacementMap = new DisplacementMap();
+ * displacementMap.setMapData(floatMap);
+ *
+ * Text text = new Text();
+ * text.setX(40.0);
+ * text.setY(80.0);
+ * text.setText("Wavy Text");
+ * text.setFill(Color.web("0x3b596d"));
+ * text.setFont(Font.font(null, FontWeight.BOLD, 50));
+ * text.setEffect(displacementMap);
+ *
+ * </pre></code>
+ *
+ * <p> The code above produces the following: </p>
+ * <p> <img src="doc-files/displacementmap.png"/> </p>
  */
 public class DisplacementMap extends Effect {
     @Override
--- a/javafx-ui-common/src/javafx/scene/effect/DropShadow.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/DropShadow.java	Tue Apr 24 09:10:29 2012 -0700
@@ -45,41 +45,44 @@
  * A high-level effect that renders a shadow of the given content behind
  * the content with the specified color, radius, and offset.
  *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.effect.*;
-import javafx.scene.paint.*;
-import javafx.scene.shape.*;
-import javafx.scene.text.*;
+ * <p>
+ * Example:
+ * <pre><code>
 
-Group g = new Group();
-DropShadow ds = new DropShadow();
-ds.setOffsetY(3.0);
-ds.setColor(Color.color(0.4, 0.4, 0.4));
-
-Text t = new Text();
-t.setEffect(ds);
-t.setCache(true);
-t.setX(10.0);
-t.setY(70.0);
-t.setFill(Color.RED);
-t.setText("JavaFX drop shadow...");
-t.setFont(Font.font(null, FontWeight.BOLD, 32));
-
-DropShadow ds1 = new DropShadow();
-ds1.setOffsetY(4.0);
-
-Circle c = new Circle();
-c.setEffect(ds1);
-c.setCenterX(50.0);
-c.setCenterY(125.0);
-c.setRadius(30.0);
-c.setFill(Color.ORANGE);
-c.setCache(true);
-
-g.getChildren().add(t);
-g.getChildren().add(c);
-</PRE>
+ * DropShadow dropShadow = new DropShadow();
+ * dropShadow.setRadius(5.0);
+ * dropShadow.setOffsetX(3.0);
+ * dropShadow.setOffsetY(3.0);
+ * dropShadow.setColor(Color.color(0.4, 0.5, 0.5));  *
+ * 
+ * Text text = new Text();
+ * text.setEffect(dropShadow);
+ * text.setCache(true);
+ * text.setX(10.0);
+ * text.setY(70.0);
+ * text.setFill(Color.web("0x3b596d"));
+ * text.setText("JavaFX drop shadow...");
+ * text.setFont(Font.font(null, FontWeight.BOLD, 40));
+ *
+ * DropShadow dropShadow2 = new DropShadow();
+ * dropShadow2.setOffsetX(6.0);
+ * dropShadow2.setOffsetY(4.0);
+ *
+ * Circle circle = new Circle();
+ * circle.setEffect(dropShadow2);
+ * circle.setCenterX(50.0);
+ * circle.setCenterY(125.0);
+ * circle.setRadius(30.0);
+ * circle.setFill(Color.STEELBLUE);
+ * circle.setCache(true);
+ * </pre></code>
+ *
+ * <p>
+ * The code above produces the following:
+ * </p>
+ * <p>
+ * <img src="doc-files/dropshadow.png"/>
+ * </p>
  */
 public class DropShadow extends Effect {
     private boolean changeIsLocal;
--- a/javafx-ui-common/src/javafx/scene/effect/GaussianBlur.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/GaussianBlur.java	Tue Apr 24 09:10:29 2012 -0700
@@ -42,22 +42,24 @@
  * A blur effect using a Gaussian convolution kernel, with a configurable
  * radius.
  *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.text.*;
-import javafx.scene.paint.*;
-import javafx.scene.effect.*;
-
-Text t = new Text();
-t.setX(10.0);
-t.setY(40.0);
-t.setCache(true);
-t.setText("Blurry Text");
-t.setFill(Color.RED);
-t.setFont(Font.font(null, FontWeight.BOLD, 36));
-
-t.setEffect(new GaussianBlur());
-</PRE>
+ * <p>
+ * Example:
+ * <pre><code>
+ * Text text = new Text();
+ * text.setText("Blurry Text!");
+ * text.setFill(Color.web("0x3b596d"));
+ * text.setFont(Font.font(null, FontWeight.BOLD, 50));
+ * text.setX(10);
+ * text.setY(50);
+ *
+ * text.setEffect(new GaussianBlur());
+ * </pre></code>
+ * <p>
+ * The code above produces the following:
+ * </p>
+ * <p>
+ * <img src="doc-files/gaussianblur.png"/>
+ * </p>
  */
 public class GaussianBlur extends Effect {
     /**
--- a/javafx-ui-common/src/javafx/scene/effect/Glow.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/Glow.java	Tue Apr 24 09:10:29 2012 -0700
@@ -41,6 +41,26 @@
 /**
  * A high-level effect that makes the input image appear to glow,
  * based on a configurable threshold.
+ * 
+ * <p>
+ * Example:
+ * <pre><code>
+ * Image image = new Image("boat.jpg");
+ * ImageView imageView = new ImageView(image);
+ * imageView.setFitWidth(200);
+ * imageView.setPreserveRatio(true);
+ *
+ * imageView.setEffect(new Glow(0.8));
+ * </pre></code>
+ * <p>
+ * <p> The code above applied on this image: </p>
+ * <p>
+ * <img src="doc-files/photo.png"/>
+ * </p>
+ * <p> produces the following: </p>
+ * <p>
+ * <img src="doc-files/glow.png"/>
+ * </p>
  */
 public class Glow extends Effect {
     /**
--- a/javafx-ui-common/src/javafx/scene/effect/InnerShadow.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/InnerShadow.java	Tue Apr 24 09:10:29 2012 -0700
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javafx.scene.effect;
 
 import javafx.beans.property.DoubleProperty;
@@ -45,24 +44,26 @@
  * A high-level effect that renders a shadow inside the edges of the
  * given content with the specified color, radius, and offset.
  *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.text.*;
-import javafx.scene.paint.*;
-import javafx.scene.effect.*;
-
-InnerShadow is = new InnerShadow();
-is.setOffsetX(4.0);
-is.setOffsetY(4.0);
-
-Text t = new Text();
-t.setEffect(is);
-t.setX(20);
-t.setY(100);
-t.setText("InnerShadow");
-t.setFill(Color.YELLOW);
-t.setFont(Font.font(null, FontWeight.BOLD, 80));
-</PRE>
+ * <p>
+ * Example:
+ * <pre><code>
+ * InnerShadow innerShadow = new InnerShadow();
+ * innerShadow.setOffsetX(4);
+ * innerShadow.setOffsetY(4);
+ * innerShadow.setColor(Color.web("0x3b596d"));
+ *
+ * Text text = new Text();
+ * text.setEffect(innerShadow);
+ * text.setX(20);
+ * text.setY(100);
+ * text.setText("InnerShadow");
+ * text.setFill(Color.ALICEBLUE);
+ * text.setFont(Font.font(null, FontWeight.BOLD, 50));
+ * </pre></code>
+ * <p> The code above produces the following: </p>
+ * <p>
+ * <img * src="doc-files/innershadow.png"/>
+ * </p>
  */
 public class InnerShadow extends Effect {
     private boolean changeIsLocal;
@@ -96,7 +97,7 @@
         setOffsetY(offsetY);
         setColor(color);
     }
-    
+
     /**
      * Creates a new instance of InnerShadow with the specified blurType, color,
      * radius, spread, offsetX and offsetY.
@@ -108,7 +109,7 @@
      * @param offsetX the shadow offset in the x direction
      * @param offsetY the shadow offset in the y direction
      */
-    public InnerShadow(BlurType blurType, Color color, double radius, double choke, 
+    public InnerShadow(BlurType blurType, Color color, double radius, double choke,
             double offsetX, double offsetY) {
         setBlurType(blurType);
         setColor(color);
--- a/javafx-ui-common/src/javafx/scene/effect/Light.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/Light.java	Tue Apr 24 09:10:29 2012 -0700
@@ -139,42 +139,33 @@
     /**
      * Represents a distant light source.
      *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.effect.*;
-import javafx.scene.paint.*;
-import javafx.scene.shape.*;
-import javafx.scene.text.*;
-import javafx.geometry.*;
-
-Light.Distant light = new Light.Distant();
-light.setAzimuth(-135.0);
-light.setElevation(30.0);
-
-Lighting l = new Lighting();
-l.setLight(light);
-l.setSurfaceScale(5.0);
-
-final Text t = new Text();
-t.setText("Distant");
-t.setFill(Color.RED);
-t.setFont(Font.font("null", FontWeight.BOLD, 90));
-t.setX(10.0f);
-t.setY(10.0f);
-t.setTextOrigin(VPos.TOP);
-
-t.setEffect(l);
-
-final Rectangle r = new Rectangle();
-r.setFill(Color.BLACK);
-
-Group g = new Group();
-g.getChildren().add(r);
-g.getChildren().add(t);
-
-r.setWidth(t.getLayoutBounds().getWidth() + 30);
-r.setHeight(t.getLayoutBounds().getHeight() + 20);
-</PRE>
+     * <p>
+     * Example:
+     * <pre><code>
+     * Light.Distant light = new Light.Distant();
+     * light.setAzimuth(45.0);
+     * light.setElevation(30.0);
+     *
+     * Lighting lighting = new Lighting();
+     * lighting.setLight(light);
+     * lighting.setSurfaceScale(5.0);
+     *
+     * Text text = new Text();
+     * text.setText("Distant");
+     * text.setFill(Color.STEELBLUE);
+     * text.setFont(Font.font("null", FontWeight.BOLD, 80));
+     * text.setX(10.0f);
+     * text.setY(10.0f);
+     * text.setTextOrigin(VPos.TOP);
+     * text.setEffect(lighting);
+     *
+     * Rectangle rect = new Rectangle(300,150);
+     * rect.setFill(Color.ALICEBLUE);
+     * rect.setEffect(lighting);
+     * </pre></code>
+     *
+     * <p> The code above produces the following: </p> 
+     * <p> <img src="doc-files/lightdistant.png"/> </p>
      */
     public static class Distant extends Light {
        /**
@@ -299,43 +290,34 @@
     /**
      * Represents a light source at a given position in 3D space.
      *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.effect.*;
-import javafx.scene.paint.*;
-import javafx.scene.shape.*;
-import javafx.scene.text.*;
-import javafx.geometry.*;
-
-Light.Point light = new Light.Point();
-light.setX(-100);
-light.setY(-100);
-light.setZ(50);
-
-Lighting l = new Lighting();
-l.setLight(light);
-l.setSurfaceScale(5.0);
-
-Text t = new Text();
-t.setText("Point");
-t.setFill(Color.RED);
-t.setFont(Font.font(null, FontWeight.BOLD, 90));
-t.setX(10.0);
-t.setY(10.0);
-t.setTextOrigin(VPos.TOP);
-
-t.setEffect(l);
-
-Rectangle r = new Rectangle();
-r.setFill(Color.BLACK);
-
-Group g = new Group();
-g.getChildren().add(r);
-g.getChildren().add(t);
-
-r.setWidth(t.getLayoutBounds().getWidth() + 30);
-r.setHeight(t.getLayoutBounds().getHeight() + 20);
-</PRE>
+     * <p>
+     * Example:
+     * <pre><code>
+     * Light.Point light = new Light.Point();
+     * light.setX(100);
+     * light.setY(100);
+     * light.setZ(50);
+     *
+     * Lighting lighting = new Lighting();
+     * lighting.setLight(light);
+     * lighting.setSurfaceScale(5.0);
+     *
+     * Text text = new Text();
+     * text.setText("Point");
+     * text.setFill(Color.STEELBLUE);
+     * text.setFont(Font.font(null, FontWeight.BOLD, 80));
+     * text.setX(10.0);
+     * text.setY(10.0);
+     * text.setTextOrigin(VPos.TOP);
+     *
+     * Rectangle rect = new Rectangle(250, 150);
+     * rect.setFill(Color.ALICEBLUE);
+     * rect.setEffect(lighting);
+     * text.setEffect(lighting);
+     * </pre></code>
+     *
+     * <p> The code above produces the following: </p> 
+     * <p> <img src="doc-files/lightpoint.png"/> </p>
      */
     public static class Point extends Light {
        /**
@@ -509,47 +491,38 @@
      * Represents a spot light source at a given position in 3D space, with
      * configurable direction and focus.
      *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.effect.*;
-import javafx.scene.paint.*;
-import javafx.scene.shape.*;
-import javafx.scene.text.*;
-import javafx.geometry.*;
-
-Light.Spot light = new Light.Spot();
-light.setX(0);
-light.setY(100);
-light.setZ(50);
-light.setPointsAtX(400);
-light.setPointsAtY(0);
-light.setPointsAtZ(0);
-light.setSpecularExponent(2);
-
-Lighting l = new Lighting();
-l.setLight(light);
-l.setSurfaceScale(5.0);
-
-Text t = new Text();
-t.setText("Spot");
-t.setFill(Color.RED);
-t.setFont(Font.font(null, FontWeight.BOLD, 90));
-t.setX(10.0);
-t.setY(10.0);
-t.setTextOrigin(VPos.TOP);
-
-t.setEffect(l);
-
-Rectangle r = new Rectangle();
-r.setFill(Color.BLACK);
-
-Group g = new Group();
-g.getChildren().add(r);
-g.getChildren().add(t);
-
-r.setWidth(t.getLayoutBounds().getWidth() + 30);
-r.setHeight(t.getLayoutBounds().getHeight() + 20);
-</PRE>
+     * <p>
+     * Example:
+     * <pre><code>        
+     * Light.Spot light = new Light.Spot();
+     * light.setX(150);
+     * light.setY(100);
+     * light.setZ(80);
+     * light.setPointsAtX(0);
+     * light.setPointsAtY(0);
+     * light.setPointsAtZ(-50);
+     * light.setSpecularExponent(2);
+     *
+     * Lighting lighting = new Lighting();
+     * lighting.setLight(light);
+     * lighting.setSurfaceScale(5.0);
+     *
+     * Text text = new Text();
+     * text.setText("Spot");
+     * text.setFill(Color.STEELBLUE);
+     * text.setFont(Font.font(null, FontWeight.BOLD, 80));
+     * text.setX(10.0);
+     * text.setY(10.0);
+     * text.setTextOrigin(VPos.TOP);
+     * text.setEffect(lighting);
+     *
+     * Rectangle rect = new Rectangle(200, 150);
+     * rect.setFill(Color.ALICEBLUE);
+     * rect.setEffect(lighting);
+     * </pre></code>
+     *
+     * <p> The code above produces the following: </p> 
+     * <p> <img src="doc-files/lightspot.png"/> </p>
      *
      */
     public static class Spot extends Light.Point {
--- a/javafx-ui-common/src/javafx/scene/effect/Lighting.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/Lighting.java	Tue Apr 24 09:10:29 2012 -0700
@@ -45,30 +45,30 @@
  * which can be used to give flat objects a more realistic, three-dimensional
  * appearance.
  *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.text.*;
-import javafx.scene.paint.*;
-import javafx.scene.effect.*;
-import javafx.geometry.*;
-
-Light.Distant light = new Light.Distant();
-light.setAzimuth(-135.0);
-
-Lighting l = new Lighting();
-l.setLight(light);
-l.setSurfaceScale(5.0);
-
-Text t = new Text();
-t.setText("JavaFX!");
-t.setFill(Color.RED);
-t.setFont(Font.font(null, FontWeight.BOLD, 90));
-t.setX(10.0);
-t.setY(10.0);
-t.setTextOrigin(VPos.TOP);
-
-t.setEffect(l);
-</PRE>
+ * <p>
+ * Example:
+ * <pre><code>
+ * Light.Distant light = new Light.Distant();
+ * light.setAzimuth(-135.0);
+ *
+ * Lighting lighting = new Lighting();
+ * lighting.setLight(light);
+ * lighting.setSurfaceScale(5.0);
+ *
+ * Text text = new Text();
+ * text.setText("JavaFX!");
+ * text.setFill(Color.STEELBLUE);
+ * text.setFont(Font.font(null, FontWeight.BOLD, 60));
+ * text.setX(10.0);
+ * text.setY(10.0);
+ * text.setTextOrigin(VPos.TOP);
+ *
+ * text.setEffect(lighting);
+ * </pre></code>
+ * <p> The code above produces the following: </p>
+ * <p>
+ * <img * src="doc-files/lighting.png"/>
+ * </p>
  */
 public class Lighting extends Effect {
     @Override
--- a/javafx-ui-common/src/javafx/scene/effect/MotionBlur.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/MotionBlur.java	Tue Apr 24 09:10:29 2012 -0700
@@ -42,25 +42,27 @@
  * A motion blur effect using a Gaussian convolution kernel, with a
  * configurable radius and angle.
  *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.text.*;
-import javafx.scene.paint.*;
-import javafx.scene.effect.*;
-
-Text t = new Text();
-t.setX(20.0);
-t.setY(100.0);
-t.setText("Motion");
-t.setFill(Color.RED);
-t.setFont(Font.font(null, FontWeight.BOLD, 60));
-
-MotionBlur mb = new MotionBlur();
-mb.setRadius(15.0);
-mb.setAngle(-30.0);
-
-t.setEffect(mb);
-</PRE>
+ * <p>
+ * Example:
+ * <pre><code>
+ * MotionBlur motionBlur = new MotionBlur();
+ * motionBlur.setRadius(30);
+ * motionBlur.setAngle(-15.0);
+ *
+ * Text text = new Text();
+ * text.setX(20.0);
+ * text.setY(100.0);
+ * text.setText("Motion!");
+ * text.setFill(Color.web("0x3b596d"));
+ * text.setFont(Font.font(null, FontWeight.BOLD, 60));
+ * text.setEffect(motionBlur);
+ * </pre></code>
+ * <p>
+ * The code above produces the following:
+ * </p>
+ * <p>
+ * <img src="doc-files/motionblur.png"/>
+ * </p>
  */
 public class MotionBlur extends Effect {
     /**
--- a/javafx-ui-common/src/javafx/scene/effect/PerspectiveTransform.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/PerspectiveTransform.java	Tue Apr 24 09:10:29 2012 -0700
@@ -54,44 +54,43 @@
  * The results of mouse picking and the containment methods are undefined
  * when a {@code Node} has a {@code PerspectiveTransform} effect in place.
  *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.shape.*;
-import javafx.scene.text.*;
-import javafx.scene.paint.*;
-import javafx.scene.effect.*;
-
-Group g = new Group();
-PerspectiveTransform pt = new PerspectiveTransform();
-pt.setUlx(10.0);
-pt.setUly(10.0);
-pt.setUrx(310.0);
-pt.setUry(40.0);
-pt.setLrx(310.0);
-pt.setLry(60.0);
-pt.setLlx(10.0);
-pt.setLly(90.0);
-
-g.setEffect(pt);
-g.setCache(true);
-
-Rectangle r = new Rectangle();
-r.setX(10.0);
-r.setY(10.0);
-r.setWidth(280.0);
-r.setHeight(80.0);
-r.setFill(Color.BLUE);
-
-Text t = new Text();
-t.setX(20.0);
-t.setY(65.0);
-t.setText("Perspective");
-t.setFill(Color.YELLOW);
-t.setFont(Font.font(null, FontWeight.BOLD, 36));
-
-g.getChildren().add(r);
-g.getChildren().add(t);
-</PRE>
+ * <p>
+ * Example:
+ * <pre><code>
+ * PerspectiveTransform perspectiveTrasform = new PerspectiveTransform();
+ * perspectiveTrasform.setUlx(10.0);
+ * perspectiveTrasform.setUly(10.0);
+ * perspectiveTrasform.setUrx(310.0);
+ * perspectiveTrasform.setUry(40.0);
+ * perspectiveTrasform.setLrx(310.0);
+ * perspectiveTrasform.setLry(60.0);
+ * perspectiveTrasform.setLlx(10.0);
+ * perspectiveTrasform.setLly(90.0);
+ *
+ * Group g = new Group();
+ * g.setEffect(perspectiveTrasform);
+ * g.setCache(true);
+ *
+ * Rectangle rect = new Rectangle();
+ * rect.setX(10.0);
+ * rect.setY(10.0);
+ * rect.setWidth(280.0);
+ * rect.setHeight(80.0);
+ * rect.setFill(Color.web("0x3b596d"));
+ *
+ * Text text = new Text();
+ * text.setX(20.0);
+ * text.setY(65.0);
+ * text.setText("Perspective");
+ * text.setFill(Color.ALICEBLUE);
+ * text.setFont(Font.font(null, FontWeight.BOLD, 36));
+ *
+ * g.getChildren().addAll(rect, text);
+ * </pre></code>
+ * <p> The code above produces the following: </p>
+ * <p>
+ * <img src="doc-files/perspectivetransform.png"/>
+ * </p>
  */
 public class PerspectiveTransform extends Effect {
     /**
--- a/javafx-ui-common/src/javafx/scene/effect/Reflection.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/Reflection.java	Tue Apr 24 09:10:29 2012 -0700
@@ -45,26 +45,26 @@
  * Note that the reflection of a {@code Node} with a {@code Reflection}
  * effect installed will not respond to mouse events or the containment
  * methods on the {@code Node}.
- *
-<PRE>
-import javafx.scene.*;
-import javafx.scene.text.*;
-import javafx.scene.paint.*;
-import javafx.scene.effect.*;
-
-Text t = new Text();
-t.setX(10.0);
-t.setY(50.0);
-t.setCache(true);
-t.setText("Reflections on JavaFX...");
-t.setFill(Color.RED);
-t.setFont(Font.font(null, FontWeight.BOLD, 30));
-
-Reflection r = new Reflection();
-r.setFraction(0.7);
-
-t.setEffect(r);
-</PRE>
+ * 
+ * <p>
+ * Example:
+ * <pre><code>
+ * Reflection reflection = new Reflection();
+ * reflection.setFraction(0.7);
+ * 
+ * Text text = new Text();
+ * text.setX(10.0);
+ * text.setY(50.0);
+ * text.setCache(true);
+ * text.setText("Reflections on JavaFX...");
+ * text.setFill(Color.web("0x3b596d"));
+ * text.setFont(Font.font(null, FontWeight.BOLD, 40));
+ * text.setEffect(reflection);
+ * </pre></code> 
+ * <p> The code above produces the following: </p>
+ * <p>
+ * <img src="doc-files/reflection.png"/>
+ * </p>
  */
 public class Reflection extends Effect {
     /**
--- a/javafx-ui-common/src/javafx/scene/effect/SepiaTone.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/effect/SepiaTone.java	Tue Apr 24 09:10:29 2012 -0700
@@ -41,6 +41,27 @@
 
 /**
  * A filter that produces a sepia tone effect, similar to antique photographs.
+ * 
+ * <p>
+ * Example:
+ * <pre><code>
+ * SepiaTone sepiaTone = new SepiaTone();
+ * sepiaTone.setLevel(0.7);
+ *
+ * Image image = new Image("boat.jpg");
+ * ImageView imageView = new ImageView(image);
+ * imageView.setFitWidth(200);
+ * imageView.setPreserveRatio(true);
+ * imageView.setEffect(sepiaTone);
+ * </pre></code> 
+ * <p> The code above applied on this image: </p>
+ * <p>
+ * <img src="doc-files/photo.png"/>
+ * </p>
+ * <p> produces the following: </p>
+ * <p>
+ * <img src="doc-files/sepiatone.png"/>
+ * </p>
  */
 public class SepiaTone extends Effect {
     /**
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/blend.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/bloom.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/boxblur.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/coloradjust.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/displacementmap.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/dropshadow.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/gaussianblur.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/glow.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/innershadow.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/lightdistant.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/lighting.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/lightpoint.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/lightspot.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/motionblur.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/perspectivetransform.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/photo.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/reflection.png has changed
Binary file javafx-ui-common/src/javafx/scene/effect/doc-files/sepiatone.png has changed
--- a/javafx-ui-common/src/javafx/scene/image/Image.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/image/Image.java	Tue Apr 24 09:10:29 2012 -0700
@@ -340,7 +340,7 @@
      * </ul>
      * </p>
      *
-     * @returns true if the aspect ratio of the original image is to be
+     * @return true if the aspect ratio of the original image is to be
      *               preserved when scaling to fit the image within the bounding
      *               box provided by {@code width} and {@code height}.
      */
--- a/javafx-ui-common/src/javafx/scene/input/KeyCombination.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/input/KeyCombination.java	Tue Apr 24 09:10:29 2012 -0700
@@ -321,7 +321,7 @@
      * section string and creates a {@code KeyCodeCombination} for it. If this
      * can't be done, it falls back to the {@code KeyCharacterCombination}.
      *
-     * @param name the string which represents the requested key combination
+     * @param value the string which represents the requested key combination
      * @return the constructed {@code KeyCombination}
      */
     public static KeyCombination valueOf(String value) {
--- a/javafx-ui-common/src/javafx/scene/layout/Region.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/layout/Region.java	Tue Apr 24 09:10:29 2012 -0700
@@ -96,8 +96,8 @@
  * region subclass.
  * <p>
  * Region subclasses which layout their children will position nodes by setting
- * {@link setLayoutX(double) layoutX}/{@link setLayoutY(double) layoutY} and do not alter
- * {@link setTranslateX(double) translateX}/{@link setTranslateY(double) translateY}, which are reserved for
+ * {@link #setLayoutX(double) layoutX}/{@link #setLayoutY(double) layoutY} and do not alter
+ * {@link #setTranslateX(double) translateX}/{@link #setTranslateY(double) translateY}, which are reserved for
  * adjustments and animation.
  *
  */
--- a/javafx-ui-common/src/javafx/scene/layout/TilePane.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/layout/TilePane.java	Tue Apr 24 09:10:29 2012 -0700
@@ -71,7 +71,7 @@
  * The alignment property controls how the rows and columns are aligned
  * within the bounds of the tilepane and defaults to Pos.TOP_LEFT.  It is also possible
  * to control the alignment of nodes within the individual tiles by setting
- * {@link tileAlignment}, which defaults to Pos.CENTER.
+ * {@link #tileAlignmentProperty() tileAlignment}, which defaults to Pos.CENTER.
  * <p>
  * A horizontal tilepane example:
  * <pre><code>
--- a/javafx-ui-common/src/javafx/scene/layout/package.html	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/layout/package.html	Tue Apr 24 09:10:29 2012 -0700
@@ -171,7 +171,7 @@
 <p>
 So for example, if a {@link javafx.scene.effect.DropShadow DropShadow} is added to a shape,
 that shadow will <em>not</em>  be factored into layout by default.  Or, if a
-{@link javafx.scene.animation.ScaleTransition ScaleTransition} is used to
+{@link javafx.animation.ScaleTransition ScaleTransition} is used to
 pulse the size of a button, that pulse animation will not disturb layout around
 that button.  If an application wishes to have the effect, clip, or transform
 factored into the layout of a node, it should wrap that node in a Group.
--- a/javafx-ui-common/src/javafx/scene/shape/Arc.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/Arc.java	Tue Apr 24 09:10:29 2012 -0700
@@ -110,10 +110,10 @@
      */
     private DoubleProperty centerX;
 
-
-
     public final void setCenterX(double value) {
-        centerXProperty().set(value);
+        if (centerX != null || value != 0.0) {
+            centerXProperty().set(value);
+        }
     }
 
     public final double getCenterX() {
@@ -151,10 +151,10 @@
      */
     private DoubleProperty centerY;
 
-
-
     public final void setCenterY(double value) {
-        centerYProperty().set(value);
+        if (centerY != null || value != 0.0) {
+            centerYProperty().set(value);
+        }
     }
 
     public final double getCenterY() {
@@ -191,81 +191,71 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty radiusX;
+    private DoubleProperty radiusX = new DoublePropertyBase() {
 
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
 
+        @Override
+        public Object getBean() {
+            return Arc.this;
+        }
+
+        @Override
+        public String getName() {
+            return "radiusX";
+        }
+    };
 
     public final void setRadiusX(double value) {
-        radiusXProperty().set(value);
+        radiusX.set(value);
     }
 
     public final double getRadiusX() {
-        return radiusX == null ? 0.0 : radiusX.get();
+        return radiusX.get();
     }
 
     public final DoubleProperty radiusXProperty() {
-        if (radiusX == null) {
-            radiusX = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
-
-                @Override
-                public Object getBean() {
-                    return Arc.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "radiusX";
-                }
-            };
-        }
         return radiusX;
     }
 
     /**
-     * Defines the overall height (veritcal radius) of the full ellipse
+     * Defines the overall height (vertical radius) of the full ellipse
      * of which this arc is a partial section.
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty radiusY;
+    private DoubleProperty radiusY = new DoublePropertyBase() {
 
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
 
+        @Override
+        public Object getBean() {
+            return Arc.this;
+        }
+
+        @Override
+        public String getName() {
+            return "radiusY";
+        }
+    };
 
     public final void setRadiusY(double value) {
-        radiusYProperty().set(value);
+        radiusY.set(value);
     }
 
     public final double getRadiusY() {
-        return radiusY == null ? 0.0 : radiusY.get();
+        return radiusY.get();
     }
 
     public final DoubleProperty radiusYProperty() {
-        if (radiusY == null) {
-            radiusY = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
-
-                @Override
-                public Object getBean() {
-                    return Arc.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "radiusY";
-                }
-            };
-        }
         return radiusY;
     }
 
@@ -276,10 +266,10 @@
      */
     private DoubleProperty startAngle;
 
-
-
     public final void setStartAngle(double value) {
-        startAngleProperty().set(value);
+        if (startAngle != null || value != 0.0) {
+            startAngleProperty().set(value);
+        }
     }
 
     public final double getStartAngle() {
@@ -315,39 +305,34 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty length;
+    private DoubleProperty length = new DoublePropertyBase() {
 
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
 
+        @Override
+        public Object getBean() {
+            return Arc.this;
+        }
+
+        @Override
+        public String getName() {
+            return "length";
+        }
+    };
 
     public final void setLength(double value) {
-        lengthProperty().set(value);
+        length.set(value);
     }
 
     public final double getLength() {
-        return length == null ? 0.0 : length.get();
+        return length.get();
     }
 
     public final DoubleProperty lengthProperty() {
-        if (length == null) {
-            length = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
-
-                @Override
-                public Object getBean() {
-                    return Arc.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "length";
-                }
-            };
-        }
         return length;
     }
 
@@ -362,7 +347,9 @@
 
 
     public final void setType(ArcType value) {
-        typeProperty().set(value);
+        if (type != null || value != ArcType.OPEN) {
+            typeProperty().set(value);
+        }
     }
 
     public final ArcType getType() {
--- a/javafx-ui-common/src/javafx/scene/shape/ArcTo.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/ArcTo.java	Tue Apr 24 09:10:29 2012 -0700
@@ -103,38 +103,33 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty radiusX;
+    private DoubleProperty radiusX = new DoublePropertyBase() {
 
+        @Override
+        public void invalidated() {
+            u();
+        }
 
+        @Override
+        public Object getBean() {
+            return ArcTo.this;
+        }
+
+        @Override
+        public String getName() {
+            return "radiusX";
+        }
+    };
 
     public final void setRadiusX(double value) {
-        radiusXProperty().set(value);
+        radiusX.set(value);
     }
 
     public final double getRadiusX() {
-        return radiusX == null ? 0.0 : radiusX.get();
+        return radiusX.get();
     }
 
     public final DoubleProperty radiusXProperty() {
-        if (radiusX == null) {
-            radiusX = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    u();
-                }
-
-                @Override
-                public Object getBean() {
-                    return ArcTo.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "radiusX";
-                }
-            };
-        }
         return radiusX;
     }
 
@@ -143,38 +138,33 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty radiusY;
+    private DoubleProperty radiusY = new DoublePropertyBase() {
 
+        @Override
+        public void invalidated() {
+            u();
+        }
 
+        @Override
+        public Object getBean() {
+            return ArcTo.this;
+        }
+
+        @Override
+        public String getName() {
+            return "radiusY";
+        }
+    };
 
     public final void setRadiusY(double value) {
-        radiusYProperty().set(value);
+        radiusY.set(value);
     }
 
     public final double getRadiusY() {
-        return radiusY == null ? 0.0 : radiusY.get();
+        return radiusY.get();
     }
 
     public final DoubleProperty radiusYProperty() {
-        if (radiusY == null) {
-            radiusY = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    u();
-                }
-
-                @Override
-                public Object getBean() {
-                    return ArcTo.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "radiusY";
-                }
-            };
-        }
         return radiusY;
     }
 
@@ -190,7 +180,9 @@
      * @param value the x-axis rotation in degrees.
      */
     public final void setXAxisRotation(double value) {
-        XAxisRotationProperty().set(value);
+        if (xAxisRotation != null || value != 0.0) {
+            XAxisRotationProperty().set(value);
+        }
     }
 
     /**
@@ -235,10 +227,10 @@
      */
     private BooleanProperty largeArcFlag;
 
-
-
     public final void setLargeArcFlag(boolean value) {
-        largeArcFlagProperty().set(value);
+        if (largeArcFlag != null || value != false) {
+            largeArcFlagProperty().set(value);
+        }
     }
 
     public final boolean isLargeArcFlag() {
@@ -275,10 +267,10 @@
      */
     private BooleanProperty sweepFlag;
 
-
-
     public final void setSweepFlag(boolean value) {
-        sweepFlagProperty().set(value);
+        if (sweepFlag != null || value != false) {
+            sweepFlagProperty().set(value);
+        }
     }
 
     public final boolean isSweepFlag() {
@@ -318,7 +310,9 @@
 
 
     public final void setX(double value) {
-        xProperty().set(value);
+        if (x != null || value != 0.0) {
+            xProperty().set(value);
+        }
     }
 
     public final double getX() {
@@ -358,7 +352,9 @@
 
 
     public final void setY(double value) {
-        yProperty().set(value);
+        if (y != null || value != 0.0) {
+            yProperty().set(value);
+        }
     }
 
     public final double getY() {
--- a/javafx-ui-common/src/javafx/scene/shape/Circle.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/Circle.java	Tue Apr 24 09:10:29 2012 -0700
@@ -128,7 +128,9 @@
 
 
     public final void setCenterX(double value) {
-        centerXProperty().set(value);
+        if (centerX != null || value != 0.0) {
+            centerXProperty().set(value);
+        }
     }
 
     public final double getCenterX() {
@@ -169,7 +171,9 @@
 
 
     public final void setCenterY(double value) {
-        centerYProperty().set(value);
+        if (centerY != null || value != 0.0) {
+            centerYProperty().set(value);
+        }
     }
 
     public final double getCenterY() {
@@ -205,48 +209,34 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty radius;
+    private DoubleProperty radius = new DoublePropertyBase() {
 
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
 
+        @Override
+        public Object getBean() {
+            return Circle.this;
+        }
+
+        @Override
+        public String getName() {
+            return "radius";
+        }
+    };
 
     public final void setRadius(double value) {
-        radiusProperty().set(value);
+        radius.set(value);
     }
 
     public final double getRadius() {
-        return radius == null ? 0.0 : radius.get();
+        return radius.get();
     }
 
-    //used in Magnetism app
-    /**
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
-     */
-    @Deprecated
-    protected void impl_radiusChanged() {}
-
     public final DoubleProperty radiusProperty() {
-        if (radius == null) {
-            radius = new DoublePropertyBase(0.0) {
-
-                @Override
-                public void invalidated() {
-                    impl_radiusChanged();
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
-
-                @Override
-                public Object getBean() {
-                    return Circle.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "radius";
-                }
-            };
-        }
         return radius;
     }
 
--- a/javafx-ui-common/src/javafx/scene/shape/CubicCurve.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/CubicCurve.java	Tue Apr 24 09:10:29 2012 -0700
@@ -82,8 +82,8 @@
      * @param startY the Y coordinate of the start point
      * @param controlX1 the X coordinate of the first control point
      * @param controlY1 the Y coordinate of the first control point
-     * @param controlX1 the X coordinate of the second control point
-     * @param controlY1 the Y coordinate of the second control point
+     * @param controlX2 the X coordinate of the second control point
+     * @param controlY2 the Y coordinate of the second control point
      * @param endX the X coordinate of the end point
      * @param endY the Y coordinate of the end point
      */
@@ -101,7 +101,9 @@
     }
 
     public final void setStartX(double value) {
-        startXProperty().set(value);
+        if (startX != null || value != 0.0) {
+            startXProperty().set(value);
+        }
     }
 
     public final double getStartX() {
@@ -139,10 +141,10 @@
      */
     private DoubleProperty startY;
 
-
-
     public final void setStartY(double value) {
-        startYProperty().set(value);
+        if (startY != null || value != 0.0) {
+            startYProperty().set(value);
+        }
     }
 
     public final double getStartY() {
@@ -181,10 +183,10 @@
      */
     private DoubleProperty controlX1;
 
-
-
     public final void setControlX1(double value) {
-        controlX1Property().set(value);
+        if (controlX1 != null || value != 0.0) {
+            controlX1Property().set(value);
+        }
     }
 
     public final double getControlX1() {
@@ -223,10 +225,10 @@
      */
     private DoubleProperty controlY1;
 
-
-
     public final void setControlY1(double value) {
-        controlY1Property().set(value);
+        if (controlY1 != null || value != 0.0) {
+            controlY1Property().set(value);
+        }
     }
 
     public final double getControlY1() {
@@ -265,10 +267,10 @@
      */
     private DoubleProperty controlX2;
 
-
-
     public final void setControlX2(double value) {
-        controlX2Property().set(value);
+        if (controlX2 != null || value != 0.0) {
+            controlX2Property().set(value);
+        }
     }
 
     public final double getControlX2() {
@@ -307,10 +309,10 @@
      */
     private DoubleProperty controlY2;
 
-
-
     public final void setControlY2(double value) {
-        controlY2Property().set(value);
+        if (controlY2 != null || value != 0.0) {
+            controlY2Property().set(value);
+        }
     }
 
     public final double getControlY2() {
@@ -348,9 +350,10 @@
      */
     private DoubleProperty endX;
 
-
     public final void setEndX(double value) {
-        endXProperty().set(value);
+        if (endX != null || value != 0.0) {
+            endXProperty().set(value);
+        }
     }
 
     public final double getEndX() {
@@ -388,10 +391,10 @@
      */
     private DoubleProperty endY;
 
-
-
     public final void setEndY(double value) {
-        endYProperty().set(value);
+        if (endY != null || value != 0.0) {
+            endYProperty().set(value);
+        }
     }
 
     public final double getEndY() {
--- a/javafx-ui-common/src/javafx/scene/shape/CubicCurveTo.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/CubicCurveTo.java	Tue Apr 24 09:10:29 2012 -0700
@@ -104,7 +104,9 @@
 
 
     public final void setControlX1(double value) {
-        controlX1Property().set(value);
+        if (controlX1 != null || value != 0.0) {
+            controlX1Property().set(value);
+        }
     }
 
     public final double getControlX1() {
@@ -143,7 +145,9 @@
 
 
     public final void setControlY1(double value) {
-        controlY1Property().set(value);
+        if (controlY1 != null || value != 0.0) {
+            controlY1Property().set(value);
+        }
     }
 
     public final double getControlY1() {
@@ -182,7 +186,9 @@
 
 
     public final void setControlX2(double value) {
-        controlX2Property().set(value);
+        if (controlX2 != null || value != 0.0) {
+            controlX2Property().set(value);
+        }
     }
 
     public final double getControlX2() {
@@ -221,7 +227,9 @@
 
 
     public final void setControlY2(double value) {
-        controlY2Property().set(value);
+        if (controlY2 != null || value != 0.0) {
+            controlY2Property().set(value);
+        }
     }
 
     public final double getControlY2() {
@@ -258,9 +266,10 @@
      */
     private DoubleProperty x;
 
-
     public final void setX(double value) {
-        xProperty().set(value);
+        if (x != null || value != 0.0) {
+            xProperty().set(value);
+        }
     }
 
     public final double getX() {
@@ -299,7 +308,9 @@
 
 
     public final void setY(double value) {
-        yProperty().set(value);
+        if (y != null || value != 0.0) {
+            yProperty().set(value);
+        }
     }
 
     public final double getY() {
--- a/javafx-ui-common/src/javafx/scene/shape/Ellipse.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/Ellipse.java	Tue Apr 24 09:10:29 2012 -0700
@@ -100,10 +100,10 @@
      */
     private DoubleProperty centerX;
 
-
-
     public final void setCenterX(double value) {
-        centerXProperty().set(value);
+        if (centerX != null || value != 0.0) {
+            centerXProperty().set(value);
+        }
     }
 
     public final double getCenterX() {
@@ -141,9 +141,10 @@
      */
     private DoubleProperty centerY;
 
-
     public final void setCenterY(double value) {
-        centerYProperty().set(value);
+        if (centerY != null || value != 0.0) {
+            centerYProperty().set(value);
+        }
     }
 
     public final double getCenterY() {
@@ -179,39 +180,34 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty radiusX;
+    private DoubleProperty radiusX = new DoublePropertyBase() {
 
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
 
+        @Override
+        public Object getBean() {
+            return Ellipse.this;
+        }
+
+        @Override
+        public String getName() {
+            return "radiusX";
+        }
+    };
 
     public final void setRadiusX(double value) {
-        radiusXProperty().set(value);
+        radiusX.set(value);
     }
 
     public final double getRadiusX() {
-        return radiusX == null ? 0.0 : radiusX.get();
+        return radiusX.get();
     }
 
     public final DoubleProperty radiusXProperty() {
-        if (radiusX == null) {
-            radiusX = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
-
-                @Override
-                public Object getBean() {
-                    return Ellipse.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "radiusX";
-                }
-            };
-        }
         return radiusX;
     }
 
@@ -220,39 +216,34 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty radiusY;
+    private DoubleProperty radiusY = new DoublePropertyBase() {
 
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
 
+        @Override
+        public Object getBean() {
+            return Ellipse.this;
+        }
+
+        @Override
+        public String getName() {
+            return "radiusY";
+        }
+    };
 
     public final void setRadiusY(double value) {
-        radiusYProperty().set(value);
+        radiusY.set(value);
     }
 
     public final double getRadiusY() {
-        return radiusY == null ? 0.0 : radiusY.get();
+        return radiusY.get();
     }
 
     public final DoubleProperty radiusYProperty() {
-        if (radiusY == null) {
-            radiusY = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
-
-                @Override
-                public Object getBean() {
-                    return Ellipse.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "radiusY";
-                }
-            };
-        }
         return radiusY;
     }
 
--- a/javafx-ui-common/src/javafx/scene/shape/HLineTo.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/HLineTo.java	Tue Apr 24 09:10:29 2012 -0700
@@ -71,37 +71,34 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty x;
+    private DoubleProperty x = new DoublePropertyBase() {
+
+        @Override
+        public void invalidated() {
+            u();
+        }
+
+        @Override
+        public Object getBean() {
+            return HLineTo.this;
+        }
+
+        @Override
+        public String getName() {
+            return "x";
+        }
+    };
 
 
     public final void setX(double value) {
-        xProperty().set(value);
+        x.set(value);
     }
 
     public final double getX() {
-        return x == null ? 0.0 : x.get();
+        return x.get();
     }
 
     public final DoubleProperty xProperty() {
-        if (x == null) {
-            x = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    u();
-                }
-
-                @Override
-                public Object getBean() {
-                    return HLineTo.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "x";
-                }
-            };
-        }
         return x;
     }
 
--- a/javafx-ui-common/src/javafx/scene/shape/Line.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/Line.java	Tue Apr 24 09:10:29 2012 -0700
@@ -104,7 +104,9 @@
 
 
     public final void setStartX(double value) {
-        startXProperty().set(value);
+        if (startX != null || value != 0.0) {
+            startXProperty().set(value);
+        }
     }
 
     public final double getStartX() {
@@ -145,7 +147,9 @@
 
 
     public final void setStartY(double value) {
-        startYProperty().set(value);
+        if (startY != null || value != 0.0) {
+            startYProperty().set(value);
+        }
     }
 
     public final double getStartY() {
@@ -186,7 +190,9 @@
 
 
     public final void setEndX(double value) {
-        endXProperty().set(value);
+        if (endX != null || value != 0.0) {
+            endXProperty().set(value);
+        }
     }
 
     public final double getEndX() {
@@ -197,23 +203,23 @@
         if (endX == null) {
             endX = new DoublePropertyBase() {
 
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
 
-                @Override
-                public Object getBean() {
-                    return Line.this;
-                }
+        @Override
+        public Object getBean() {
+            return Line.this;
+        }
 
-                @Override
-                public String getName() {
-                    return "endX";
-                }
-            };
+        @Override
+        public String getName() {
+            return "endX";
         }
+    };
+    }
         return endX;
     }
 
@@ -224,10 +230,10 @@
      */
     private DoubleProperty endY;
 
-
-
     public final void setEndY(double value) {
-        endYProperty().set(value);
+        if (endY != null || value != 0.0) {
+            endYProperty().set(value);
+        }
     }
 
     public final double getEndY() {
@@ -238,23 +244,23 @@
         if (endY == null) {
             endY = new DoublePropertyBase() {
 
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
 
-                @Override
-                public Object getBean() {
-                    return Line.this;
-                }
+        @Override
+        public Object getBean() {
+            return Line.this;
+        }
 
-                @Override
-                public String getName() {
-                    return "endY";
-                }
-            };
+        @Override
+        public String getName() {
+            return "endY";
         }
+    };
+    }
         return endY;
     }
 
--- a/javafx-ui-common/src/javafx/scene/shape/LineTo.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/LineTo.java	Tue Apr 24 09:10:29 2012 -0700
@@ -79,7 +79,9 @@
 
 
     public final void setX(double value) {
-        xProperty().set(value);
+        if (x != null || value != 0.0) {
+            xProperty().set(value);
+        }
     }
 
     public final double getX() {
@@ -116,10 +118,10 @@
      */
     private DoubleProperty y;
 
-
-
     public final void setY(double value) {
-        yProperty().set(value);
+        if (y != null || value != 0.0) {
+            yProperty().set(value);
+        }
     }
 
     public final double getY() {
--- a/javafx-ui-common/src/javafx/scene/shape/MoveTo.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/MoveTo.java	Tue Apr 24 09:10:29 2012 -0700
@@ -76,10 +76,10 @@
      */
     private DoubleProperty x;
 
-
-
     public final void setX(double value) {
-        xProperty().set(value);
+        if (x != null || value != 0.0) {
+            xProperty().set(value);
+        }
     }
 
     public final double getX() {
@@ -116,10 +116,10 @@
      */
     private DoubleProperty y;
 
-
-
     public final void setY(double value) {
-        yProperty().set(value);
+        if (y != null || value != 0.0) {
+            yProperty().set(value);
+        }
     }
 
     public final double getY() {
--- a/javafx-ui-common/src/javafx/scene/shape/Path.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/Path.java	Tue Apr 24 09:10:29 2012 -0700
@@ -146,10 +146,10 @@
      */
     private ObjectProperty<FillRule> fillRule;
 
-
-
     public final void setFillRule(FillRule value) {
-        fillRuleProperty().set(value);
+        if (fillRule != null || value != FillRule.NON_ZERO) {
+            fillRuleProperty().set(value);
+        }
     }
 
     public final FillRule getFillRule() {
--- a/javafx-ui-common/src/javafx/scene/shape/QuadCurve.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/QuadCurve.java	Tue Apr 24 09:10:29 2012 -0700
@@ -93,10 +93,10 @@
      */
     private DoubleProperty startX;
 
-
-
     public final void setStartX(double value) {
-        startXProperty().set(value);
+        if (startX != null || value != 0.0) {
+            startXProperty().set(value);
+        }
     }
 
     public final double getStartX() {
@@ -135,10 +135,10 @@
      */
     private DoubleProperty startY;
 
-
-
     public final void setStartY(double value) {
-        startYProperty().set(value);
+        if (startY != null || value != 0.0) {
+            startYProperty().set(value);
+        }
     }
 
     public final double getStartY() {
@@ -175,39 +175,34 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty controlX;
+    private DoubleProperty controlX = new DoublePropertyBase() {
 
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
 
+        @Override
+        public Object getBean() {
+            return QuadCurve.this;
+        }
+
+        @Override
+        public String getName() {
+            return "controlX";
+        }
+    };
 
     public final void setControlX(double value) {
-        controlXProperty().set(value);
+        controlX.set(value);
     }
 
     public final double getControlX() {
-        return controlX == null ? 0.0 : controlX.get();
+        return controlX.get();
     }
 
     public final DoubleProperty controlXProperty() {
-        if (controlX == null) {
-            controlX = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
-
-                @Override
-                public Object getBean() {
-                    return QuadCurve.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "controlX";
-                }
-            };
-        }
         return controlX;
     }
 
@@ -217,38 +212,35 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty controlY;
+    private DoubleProperty controlY = new DoublePropertyBase() {
+
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
+
+        @Override
+        public Object getBean() {
+            return QuadCurve.this;
+        }
+
+        @Override
+        public String getName() {
+            return "controlY";
+        }
+    };
 
 
     public final void setControlY(double value) {
-        controlYProperty().set(value);
+        controlY.set(value);
     }
 
     public final double getControlY() {
-        return controlY == null ? 0.0 : controlY.get();
+        return controlY.get();
     }
 
     public final DoubleProperty controlYProperty() {
-        if (controlY == null) {
-            controlY = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
-
-                @Override
-                public Object getBean() {
-                    return QuadCurve.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "controlY";
-                }
-            };
-        }
         return controlY;
     }
 
@@ -262,7 +254,9 @@
 
 
     public final void setEndX(double value) {
-        endXProperty().set(value);
+        if (endX != null || value != 0.0) {
+            endXProperty().set(value);
+        }
     }
 
     public final double getEndX() {
@@ -273,23 +267,23 @@
         if (endX == null) {
             endX = new DoublePropertyBase() {
 
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
 
-                @Override
-                public Object getBean() {
-                    return QuadCurve.this;
-                }
+        @Override
+        public Object getBean() {
+            return QuadCurve.this;
+        }
 
-                @Override
-                public String getName() {
-                    return "endX";
-                }
-            };
+        @Override
+        public String getName() {
+            return "endX";
         }
+    };
+    }
         return endX;
     }
 
@@ -301,9 +295,10 @@
      */
     private DoubleProperty endY;
 
-
     public final void setEndY(double value) {
-        endYProperty().set(value);
+        if (endY != null || value != 0.0) {
+            endYProperty().set(value);
+        }
     }
 
     public final double getEndY() {
@@ -314,23 +309,23 @@
         if (endY == null) {
             endY = new DoublePropertyBase() {
 
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
 
-                @Override
-                public Object getBean() {
-                    return QuadCurve.this;
-                }
+        @Override
+        public Object getBean() {
+            return QuadCurve.this;
+        }
 
-                @Override
-                public String getName() {
-                    return "endY";
-                }
-            };
+        @Override
+        public String getName() {
+            return "endY";
         }
+    };
+    }
         return endY;
     }
 
--- a/javafx-ui-common/src/javafx/scene/shape/QuadCurveTo.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/QuadCurveTo.java	Tue Apr 24 09:10:29 2012 -0700
@@ -94,37 +94,34 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty controlX;
+    private DoubleProperty controlX = new DoublePropertyBase() {
+
+        @Override
+        public void invalidated() {
+            u();
+        }
+
+        @Override
+        public Object getBean() {
+            return QuadCurveTo.this;
+        }
+
+        @Override
+        public String getName() {
+            return "controlX";
+        }
+    };
 
 
     public final void setControlX(double value) {
-        controlXProperty().set(value);
+        controlX.set(value);
     }
 
     public final double getControlX() {
-        return controlX == null ? 0.0 : controlX.get();
+        return controlX.get();
     }
 
     public final DoubleProperty controlXProperty() {
-        if (controlX == null) {
-            controlX = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    u();
-                }
-
-                @Override
-                public Object getBean() {
-                    return QuadCurveTo.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "controlX";
-                }
-            };
-        }
         return controlX;
     }
 
@@ -133,37 +130,34 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty controlY;
+    private DoubleProperty controlY = new DoublePropertyBase() {
+
+        @Override
+        public void invalidated() {
+            u();
+        }
+
+        @Override
+        public Object getBean() {
+            return QuadCurveTo.this;
+        }
+
+        @Override
+        public String getName() {
+            return "controlY";
+        }
+    };
 
 
     public final void setControlY(double value) {
-        controlYProperty().set(value);
+        controlY.set(value);
     }
 
     public final double getControlY() {
-        return controlY == null ? 0.0 : controlY.get();
+        return controlY.get();
     }
 
     public final DoubleProperty controlYProperty() {
-        if (controlY == null) {
-            controlY = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    u();
-                }
-
-                @Override
-                public Object getBean() {
-                    return QuadCurveTo.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "controlY";
-                }
-            };
-        }
         return controlY;
     }
 
@@ -174,9 +168,10 @@
      */
     private DoubleProperty x;
 
-
     public final void setX(double value) {
-        xProperty().set(value);
+        if (x != null || value != 0.0) {
+            xProperty().set(value);
+        }
     }
 
     public final double getX() {
@@ -205,7 +200,7 @@
         }
         return x;
     }
-
+    
     /**
      * Defines the Y coordinate of the final end point.
      *
@@ -213,9 +208,10 @@
      */
     private DoubleProperty y;
 
-
     public final void setY(double value) {
-        yProperty().set(value);
+        if (y != null || value != 0.0) {
+            yProperty().set(value);
+        }
     }
 
     public final double getY() {
--- a/javafx-ui-common/src/javafx/scene/shape/Rectangle.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/Rectangle.java	Tue Apr 24 09:10:29 2012 -0700
@@ -130,7 +130,9 @@
 
 
     public final void setX(double value) {
-        xProperty().set(value);
+        if (x != null || value != 0.0) {
+            xProperty().set(value);
+        }
     }
 
     public final double getX() {
@@ -168,9 +170,10 @@
      */
     private DoubleProperty y;
 
-
     public final void setY(double value) {
-        yProperty().set(value);
+        if (y != null || value != 0.0) {
+            yProperty().set(value);
+        }
     }
 
     public final double getY() {
@@ -206,38 +209,34 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty width;
+    private DoubleProperty width = new DoublePropertyBase() {
 
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
+
+        @Override
+        public Object getBean() {
+            return Rectangle.this;
+        }
+
+        @Override
+        public String getName() {
+            return "width";
+        }
+    };
 
     public final void setWidth(double value) {
-        widthProperty().set(value);
+        width.set(value);
     }
 
     public final double getWidth() {
-        return width == null ? 0.0 : width.get();
+        return width.get();
     }
 
     public final DoubleProperty widthProperty() {
-        if (width == null) {
-            width = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
-
-                @Override
-                public Object getBean() {
-                    return Rectangle.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "width";
-                }
-            };
-        }
         return width;
     }
 
@@ -246,38 +245,35 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty height;
+    private DoubleProperty height = new DoublePropertyBase() {
+
+        @Override
+        public void invalidated() {
+            impl_markDirty(DirtyBits.NODE_GEOMETRY);
+            impl_geomChanged();
+        }
+
+        @Override
+        public Object getBean() {
+            return Rectangle.this;
+        }
+
+        @Override
+        public String getName() {
+            return "height";
+        }
+    };
 
 
     public final void setHeight(double value) {
-        heightProperty().set(value);
+        height.set(value);
     }
 
     public final double getHeight() {
-        return height == null ? 0.0 : height.get();
+        return height.get();
     }
 
     public final DoubleProperty heightProperty() {
-        if (height == null) {
-            height = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    impl_markDirty(DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
-                }
-
-                @Override
-                public Object getBean() {
-                    return Rectangle.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "height";
-                }
-            };
-        }
         return height;
     }
 
@@ -291,7 +287,9 @@
 
 
     public final void setArcWidth(double value) {
-	arcWidthProperty().set(value);
+        if (arcWidth != null || value != 0.0) {
+            arcWidthProperty().set(value);
+        }
     }
 
     public final double getArcWidth() {
@@ -336,7 +334,9 @@
 
 
     public final void setArcHeight(double value) {
- 	arcHeightProperty().set(value);
+        if (arcHeight != null || value != 0.0) {
+            arcHeightProperty().set(value);
+        }
     }
 
     public final double getArcHeight() {
--- a/javafx-ui-common/src/javafx/scene/shape/SVGPath.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/SVGPath.java	Tue Apr 24 09:10:29 2012 -0700
@@ -66,7 +66,9 @@
     private Path2D path2d;
 
     public final void setFillRule(FillRule value) {
-        fillRuleProperty().set(value);
+        if (fillRule != null || value != FillRule.NON_ZERO) {
+            fillRuleProperty().set(value);
+        }
     }
 
     public final FillRule getFillRule() {
--- a/javafx-ui-common/src/javafx/scene/shape/VLineTo.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/scene/shape/VLineTo.java	Tue Apr 24 09:10:29 2012 -0700
@@ -71,37 +71,34 @@
      *
      * @defaultValue 0.0
      */
-    private DoubleProperty y;
+    private DoubleProperty y = new DoublePropertyBase() {
+
+        @Override
+        public void invalidated() {
+            u();
+        }
+
+        @Override
+        public Object getBean() {
+            return VLineTo.this;
+        }
+
+        @Override
+        public String getName() {
+            return "y";
+        }
+    };
 
 
     public final void setY(double value) {
-        yProperty().set(value);
+        y.set(value);
     }
 
     public final double getY() {
-        return y == null ? 0.0 : y.get();
+        return y.get();
     }
 
     public final DoubleProperty yProperty() {
-        if (y == null) {
-            y = new DoublePropertyBase() {
-
-                @Override
-                public void invalidated() {
-                    u();
-                }
-
-                @Override
-                public Object getBean() {
-                    return VLineTo.this;
-                }
-
-                @Override
-                public String getName() {
-                    return "y";
-                }
-            };
-        }
         return y;
     }
 
--- a/javafx-ui-common/src/javafx/stage/Window.java	Mon Apr 23 18:44:24 2012 -0400
+++ b/javafx-ui-common/src/javafx/stage/Window.java	Tue Apr 24 09:10:29 2012 -0700
@@ -174,7 +174,10 @@
      * of this Window's Scene.
      */
     public void sizeToScene() {
-        adjustSize(false);
+        if (getScene() != null && impl_peer != null) {
+            getScene().impl_preferredSize();
+            adjustSize(false);
+        }
     }
 
     private void adjustSize(boolean selfSizePriority) {
@@ -182,7 +185,6 @@
             return;
         }
         if (impl_peer != null) {
-            getScene().impl_preferredSize();
             double sceneWidth = getScene().getWidth();
             double cw = (sceneWidth > 0) ? sceneWidth : -1;
             double w = -1;
@@ -416,10 +418,11 @@
                     if (isShowing()) {
                         StyleManager.getInstance().updateStylesheets(newScene);
                         newScene.getRoot().impl_reapplyCSS();
-                    }
+                        getScene().impl_preferredSize();
 
-                    if (!widthExplicit || !heightExplicit) {
-                        adjustSize(true);
+                        if (!widthExplicit || !heightExplicit) {
+                            adjustSize(true);
+                        }
                     }
                 } else {
                     updatePeerStage(null);
@@ -713,6 +716,7 @@
                     if (getScene() != null) {
                         getScene().impl_initPeer();
                         impl_peer.setScene(getScene().impl_getPeer());
+                        getScene().impl_preferredSize();
                     }
 
                     // Set peer bounds