changeset 1423:1eadff96bc2b

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/2.2/MASTER/jfx/rt
author Kinsley Wong
date Mon, 09 Jul 2012 13:16:34 -0700
parents 554e78523bab a8bd152f64ad
children 1d8c6251f243 9b69d1047d82
files javafx-ui-common/src/javafx/scene/Scene.java javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java
diffstat 34 files changed, 655 insertions(+), 435 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/com/sun/javafx/css/CompoundSelector.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/com/sun/javafx/css/CompoundSelector.java	Mon Jul 09 13:16:34 2012 -0700
@@ -247,7 +247,7 @@
             if (selectors.get(index-1).applies(parent)) {
                 final StyleHelper parentStyleHelper = parent.impl_getStyleHelper();
                 if (parentStyleHelper == null) return false;
-                long parentStates = parentStyleHelper.getPseudoClassState(parent);
+                long parentStates = parentStyleHelper.getPseudoClassState();
                 // If this call succeeds, then all preceding selectors will have
                 // matched due to the recursive nature of the call
                 return stateMatches(parent, parentStates, index - 1);
@@ -258,7 +258,7 @@
                 if (selectors.get(index-1).applies(parent)) { 
                     final StyleHelper parentStyleHelper = parent.impl_getStyleHelper();
                     if (parentStyleHelper != null) {
-                        long parentStates = parentStyleHelper.getPseudoClassState(parent);
+                        long parentStates = parentStyleHelper.getPseudoClassState();
                         return stateMatches(parent, parentStates, index - 1);
                     } else {
                         // What does it mean for a parent to have a null StyleHelper? 
--- a/javafx-ui-common/src/com/sun/javafx/css/StyleHelper.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/com/sun/javafx/css/StyleHelper.java	Mon Jul 09 13:16:34 2012 -0700
@@ -44,13 +44,10 @@
 import java.lang.ref.WeakReference;
 import java.util.*;
 import java.util.Map.Entry;
-import javafx.beans.property.BooleanProperty;
-import javafx.beans.property.ReadOnlyObjectProperty;
-import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.value.WritableValue;
+import javafx.scene.Parent;
 import javafx.scene.text.FontPosture;
 import javafx.scene.text.FontWeight;
-import javafx.scene.text.Text;
 
 /**
  * The StyleHelper is a helper class used for applying CSS information to Nodes.
@@ -618,48 +615,72 @@
     }
 
     /**
-     * Reusable list for pseudoclass states
+     * dynamic pseudoclass state for this helper - only valid during a pulse 
+     * Set in setPseudoClassStatesForTransition which is called upon entering 
+     * transitionToState. 
      */
-//    private List<String> pseudoClassStates = null;
+    private long[] pseudoClassStates;
 
     // cache pseudoclass state. cleared on each pulse.
     final static Map<Node,Long> pseudoclassMasksByNode = new HashMap<Node,Long>();
 
-    /** 
-     * Get pseudoclass states for the given node
-     */
-    long getPseudoClassState(Node node) {
-
-        if (pseudoclassMasksByNode.containsKey(node)) {
-            Long cachedMask = pseudoclassMasksByNode.get(node);
-            return cachedMask.longValue();
+    // get pseudoclass state for the node (set at StyleHelper creation)
+    long getPseudoClassState() {
+        return pseudoClassStates != null && pseudoClassStates.length > 0 ? pseudoClassStates[0] : 0;
     }
     
-        long stateMask = 0;
-        if (pseudoclassStateMask != 0) {
-            stateMask = node.impl_getPseudoClassState();
+    private long[] getPseudoClassStates() {
+        return pseudoClassStates;
+    }
+    
+    /* 
+     * Called from transitionToState to set the pseudoClassStates member. This method
+     * gets the pseudoClassStates from the first non-null StyleHelper of a Parent and
+     * fills in the gaps with zeros (no state) for those parents that have no StyleHelper.
+     * This works because styles are applied from the top-down. So the StyleHelper of
+     * the parent will already have pseudoClassStates set to the correct value.
+     * 
+     * Note Well: The array runs from leaf to root. That is 
+     * pseudoClassStates[0] is the states for node and 
+     * pseudoClassStates[1..(pseudoClassStates.length-1)] is the states for the 
+     * node's parents. This is how the code was written when the pseudoClassState
+     * was looked up recursively, so we'll leave it that way for now.
+     */ 
+    private static void setPseudoClassStatesForTransition(Node node, StyleHelper styleHelper) {
+    
+        
+        long[] parentStates = null;
+        // count up parents that don't have a stylehelper until we get to 
+        // the first parent with a stylehelper. The state for the missing
+        // stylehelpers will be zero. 
+        int nMissing = 0; 
+        
+        Parent parent = node.getParent();
+        while (parent != null && parentStates == null) {
+            final StyleHelper helper = parent.impl_getStyleHelper();
+            if (helper != null) {
+                parentStates = helper.pseudoClassStates; 
+            } else {
+                parent = parent.getParent();
+                nMissing += 1;
+            }
         }
-
-        pseudoclassMasksByNode.put(node, Long.valueOf(stateMask));
-
-        return stateMask;
+        
+        final long nodeState = node.impl_getPseudoClassState();
+        final int nParents = parentStates != null ? parentStates.length + nMissing : nMissing;
+        // do we need to init pseudoClassStates or can we reuse?
+        if (styleHelper.pseudoClassStates == null || styleHelper.pseudoClassStates.length < nParents) {
+            styleHelper.pseudoClassStates = new long[nParents + 1];            
+        }
+        Arrays.fill(styleHelper.pseudoClassStates, 0);
+        styleHelper.pseudoClassStates[0] = nodeState;
+        
+        if (parentStates != null) {
+            System.arraycopy(parentStates, 0, styleHelper.pseudoClassStates, nMissing+1, parentStates.length);
+        }
+        
     }
-
-    private static long[] getAllPseudoClassStates(Node node, int count) {
-        if (node == null) return new long[count];
-        long[] states = getAllPseudoClassStates(node.getParent(), ++count);
-        StyleHelper sh = node.impl_getStyleHelper();
-        states[count-1] = (sh != null) ? sh.getPseudoClassState(node) : 0;
-        
-        if (LOGGER.isLoggable(PlatformLogger.FINE)) {
-            LOGGER.fine(node + ": states[" + Integer.toString(count-1) + "] = " + 
-                    StyleManager.getInstance().getPseudoclassStrings(states[count-1]));
-        }
-
-        
-        return states;
-    }
-
+    
     /* 
      * The lookup function return an Object but also
      * needs to return whether or not the value is cacheable.
@@ -700,12 +721,10 @@
         // the state of its parents. Without the parent state, the fact that
         // this node in this state matched foo:blah bar { } is lost.
         //
-        final long[] allstates = getAllPseudoClassStates(node, 0);
-        
+        setPseudoClassStatesForTransition(node, this);
+
         // allstates[0] is this node's state
-        final long states = 
-            (allstates != null && allstates.length > 0) ? allstates[0] : 0;
-        
+        long states = pseudoClassStates[0];
         //
         // inlineStyles is this node's Node.style. This is passed along and is
         // used in getStyle. Importance being the same, an author style will
@@ -718,8 +737,15 @@
         // are from Node.style.
         //
                 
-        final CacheEntry cacheEntry = getCacheEntry(node, allstates);
-        if (cacheEntry == null) return;
+        final CacheEntry cacheEntry = getCacheEntry(node, pseudoClassStates);
+        if (cacheEntry == null) {
+            // If cacheEntry is null, then the StyleManager Cache from which
+            // this StyleHelper was created has been blown away and this
+            // StyleHelper is no good. If this is the case, we need to tell
+            // this node to reapply CSS
+            node.impl_reapplyCSS();
+            return;
+        }
 
         //
         // if this node has a style map, then we'll populate it.
@@ -782,8 +808,6 @@
                     ? new ArrayList<Style>() 
                     : null;
 
-            boolean isUserSet = isUserSetProperty(node, styleable);
-            
             //
             // if there are userStyles, then we cannot (at this time) use
             // the cached value since the userStyles may contain a mapping for
@@ -824,6 +848,9 @@
             }
 
             if (calculatedValue == null) {
+
+                boolean isUserSet = isUserSetProperty(node, styleable);            
+
                 calculatedValue = lookup(node, styleable, isUserSet, states, 
                         inlineStyles, node, cacheEntry, styleList);
 
@@ -1174,7 +1201,7 @@
             return SKIP;
         }
         return parentStyleHelper.lookup(parent, styleable, false,
-                parentStyleHelper.getPseudoClassState(parent),
+                parentStyleHelper.getPseudoClassState(),
                 getInlineStyleMap(parent), originatingNode, cacheEntry, styleList);
     }
 
@@ -1210,7 +1237,7 @@
                     return null;
                 }
                 return parentStyleHelper.resolveRef(parent, property,
-                        parentStyleHelper.getPseudoClassState(parent),
+                        parentStyleHelper.getPseudoClassState(),
                         getInlineStyleMap(parent));
             }
         }
@@ -1566,7 +1593,7 @@
 
         CacheEntry parentCacheEntry = null;
         if (parent != null && parentHelper != null) {
-            final long[] pstates = getAllPseudoClassStates(parent,0);
+            final long[] pstates = parentHelper.getPseudoClassStates();
             parentCacheEntry = parentHelper.getCacheEntry(parent, pstates);
 //            assert(parentCacheEntry.font != null);
         }
@@ -1704,7 +1731,7 @@
         
         while (parent != null && nlooks <= distance) {
             
-            final long states = helper.getPseudoClassState(parent);
+            final long states = helper.getPseudoClassState();
             final Map<String,CascadingStyle> inlineStyles = helper.getInlineStyleMap(parent);
             
             cascadingStyle = 
@@ -1826,7 +1853,7 @@
         CascadingStyle csShorthand = null;
         while (parent != null) {
             
-            final long states = helper.getPseudoClassState(parent);
+            final long states = helper.getPseudoClassState();
             final Map<String,CascadingStyle> inlineStyles = helper.getInlineStyleMap(parent);
             
             final CascadingStyle cascadingStyle =
@@ -1873,7 +1900,7 @@
             }
         }
         
-        final long states = getPseudoClassState(node);
+        final long states = pseudoClassStates[0];
         final Map<String,CascadingStyle> inlineStyles = getInlineStyleMap(node);
 
         String family = null;
--- a/javafx-ui-common/src/com/sun/javafx/css/StyleManager.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/com/sun/javafx/css/StyleManager.java	Mon Jul 09 13:16:34 2012 -0700
@@ -94,27 +94,6 @@
     private Stylesheet defaultUserAgentStylesheet;
 
     /**
-     * User agent stylesheets from Control.getUserAgentStylesheet.
-     * This does not include the default ua styleheet.
-     */
-    private ObservableMap<String,Stylesheet> userAgentStylesheetMap = FXCollections.observableHashMap();
-    private void addUserAgentStylesheet(String fname, Stylesheet stylesheet) {
-
-        if (stylesheet != null) {
-            stylesheet.setOrigin(Stylesheet.Origin.USER_AGENT);
-            userAgentStylesheetMap.put(fname, stylesheet);
-        } else {
-            userAgentStylesheetMap.remove(fname);
-        }
-        
-    }
-    private Stylesheet getUserAgentStylesheet(String fname) {
-
-            return userAgentStylesheetMap.get(fname);
-            
-    }
-
-    /**
      * A map from String => Stylesheet. If a stylesheet for the given URL has
      * already been loaded then we'll simply reuse the stylesheet rather than
      * loading a duplicate.
@@ -648,6 +627,13 @@
         return null;
     }
 
+    
+    /**
+     * User agent stylesheets from Control.getUserAgentStylesheet.
+     */
+    private Map<String,Stylesheet> userAgentStylesheetMap = new HashMap<String,Stylesheet>();
+
+    
     /**
      * Add a user agent stylesheet, possibly overriding styles in the default
      * user agent stylesheet. The node argument must be an instance of Control.
@@ -659,9 +645,15 @@
         // nothing to add
         if (fname == null ||  fname.trim().isEmpty()) return;
 
-        Stylesheet ua_stylesheet = loadStylesheet(fname);
-
-        addUserAgentStylesheet(fname, ua_stylesheet);
+        if (userAgentStylesheetMap.containsKey(fname) == false) {
+            Stylesheet ua_stylesheet = loadStylesheet(fname);
+            ua_stylesheet.setOrigin(Stylesheet.Origin.USER_AGENT);
+            userAgentStylesheetMap.put(fname, ua_stylesheet);
+            
+            if (ua_stylesheet != null) {
+                userAgentStylesheetsChanged();                
+            }
+        }
 
     }
 
@@ -692,6 +684,10 @@
         if (defaultUserAgentStylesheet != null) {
             defaultUserAgentStylesheet.setOrigin(Stylesheet.Origin.USER_AGENT);
         }
+        userAgentStylesheetsChanged();
+    }
+    
+    private void userAgentStylesheetsChanged() {
         if (defaultContainer != null) {
             //
             // RT-21563 if default ua stylesheet is set, then the default 
@@ -720,12 +716,6 @@
         }        
     }
 
-    public void clearCachedValues(Scene scene) {
-
-        // Psuedoclass state for the nodes is only valid for a pulse. 
-        StyleHelper.pseudoclassMasksByNode.clear();
-    }
-
     /** 
      * Force the author stylesheets associated with the given scene to be re-parsed.
      * The author stylesheets are the stylesheets specified in
@@ -1014,8 +1004,6 @@
          */
         private final Key key;
 
-        private final MapChangeListener<String,Stylesheet> mapChangeListener;
-
         // The StyleHelper's cached values are relevant only for a given scene.
         // Since a StylesheetContainer is created for a Scene with stylesheets,
         // it makes sense that the container should own the valueCache. This
@@ -1034,31 +1022,19 @@
             if (StyleManager.getInstance().defaultUserAgentStylesheet != null) {
                 stylesheets.add(StyleManager.getInstance().defaultUserAgentStylesheet);
             }            
-            stylesheets.addAll(StyleManager.getInstance().userAgentStylesheetMap.values());
+
+            if (StyleManager.getInstance().userAgentStylesheetMap != null &&
+                   StyleManager.getInstance().userAgentStylesheetMap.isEmpty() == false) {
+                stylesheets.addAll(StyleManager.getInstance().userAgentStylesheetMap.values());
+            }            
+            
             if (authorStylesheets != null) stylesheets.addAll(authorStylesheets);
             
-            mapChangeListener = new MapChangeListener<String,Stylesheet>() {
-
-                @Override
-                public void onChanged(Change<? extends String,? extends Stylesheet> change) {
-                    if (change.wasAdded()) {
-                        stylesheets.add(change.getValueAdded());
-                        clearCaches();
-                    } else if (change.wasRemoved()) {
-                        stylesheets.remove(change.getValueRemoved());
-                        clearCaches();
-                    }
-                }
-            };
-
-            StyleManager.getInstance().userAgentStylesheetMap.addListener(mapChangeListener);
-
             styleCache = new HashMap<StyleCacheKey, StyleCacheBucket>();
             smapCount = 0;
         }
 
         private void destroy() {
-            StyleManager.getInstance().userAgentStylesheetMap.removeListener(mapChangeListener);
             stylesheets.clear();
             clearCaches();
         }
--- a/javafx-ui-common/src/com/sun/javafx/scene/traversal/ContainerTabOrder.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/com/sun/javafx/scene/traversal/ContainerTabOrder.java	Mon Jul 09 13:16:34 2012 -0700
@@ -157,7 +157,7 @@
         for (int i = startIndex ; i < nodeList.size() ; i++) {
 
             Node nextNode = nodeList.get(i);
-            if (nextNode.isFocusTraversable() == true && nextNode.isDisabled() == false && nextNode.isVisible() == true) {
+            if (nextNode.isFocusTraversable() == true && nextNode.isDisabled() == false && nextNode.impl_isTreeVisible() == true) {
                 newNode = nextNode;
                 break;
             }
@@ -233,7 +233,7 @@
 
         for (int i = startIndex ; i >= 0 ; i--) {
             Node prevNode = nodeList.get(i);
-            if (prevNode.isFocusTraversable() == true && prevNode.isDisabled() == false && prevNode.isVisible() == true) {
+            if (prevNode.isFocusTraversable() == true && prevNode.isDisabled() == false && prevNode.impl_isTreeVisible() == true) {
                 newNode = prevNode;
                 break;
             }
--- a/javafx-ui-common/src/javafx/scene/Scene.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/Scene.java	Mon Jul 09 13:16:34 2012 -0700
@@ -419,7 +419,6 @@
     }
 
     private void doCSSPass() {
-        StyleManager.getInstance().clearCachedValues(this);
         final Parent sceneRoot = getRoot();
         //
         // RT-17547: when the tree is synchronized, the dirty bits are
--- a/javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java	Mon Jul 09 13:16:34 2012 -0700
@@ -517,12 +517,7 @@
      * Sets the current transform ignoring any 3D transform by grabbing the 2x3
      * of the matrix. 3D transforms are not supported in a 2D GraphicsContext.
      * 
-     * @param mxx 
-     * @param myx
-     * @param mxy 
-     * @param myy 
-     * @param mxt
-     * @param myt  
+     * @param xform
      */
     public void setTransform(Affine xform) {
         curState.transform.setTransform(xform.getMxx(), xform.getMyx(),
@@ -654,7 +649,7 @@
     /**
      * gets the current state's stroke.
      * 
-     * @param p The Paint to be used as the stroke Paint.
+     * @return The Paint to be used as the stroke Paint.
      */
     public Paint getStroke() {
         return curState.stroke;
@@ -765,7 +760,7 @@
     /**
      * Gets the current miter limit attribute.
      * 
-     * @param miter limit value between 0 and positive infinity with 
+     * @return limit value between 0 and positive infinity with 
      * any other value being ignored and leaving the value unchanged.
      */
     public double getMiterLimit() {
--- a/javafx-ui-common/src/javafx/scene/image/PixelFormat.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/image/PixelFormat.java	Mon Jul 09 13:16:34 2012 -0700
@@ -155,10 +155,10 @@
      * The buffer should be positioned to the start of the pixel data such
      * that {@code buf.get(0)} would return the pixel information for the
      * pixel at coordinates {@code (0, 0)}.
-     * The {@scanlineStride} parameter defines the distance from the pixel
+     * The {@code scanlineStride} parameter defines the distance from the pixel
      * data at the start of one row to the pixel data at the start of the
      * immediately following row at the next higher Y coordinate.  Usually,
-     * {@scanlineStride} is the same as the width of the image multiplied
+     * {@code scanlineStride} is the same as the width of the image multiplied
      * by the number of data elements per pixel (1 for the case of the
      * integer and indexed formats, or 3 or 4 in the case of the byte
      * formats), but some images may have further padding between rows for
--- a/javafx-ui-common/src/javafx/scene/image/WritablePixelFormat.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/image/WritablePixelFormat.java	Mon Jul 09 13:16:34 2012 -0700
@@ -55,10 +55,10 @@
      * The buffer should be positioned to the start of the pixel data such
      * that {@code buf.get(0)} would return the pixel information for the
      * pixel at coordinates {@code (0, 0)}.
-     * The {@scanlineStride} parameter defines the distance from the pixel
+     * The {@code scanlineStride} parameter defines the distance from the pixel
      * data at the start of one row to the pixel data at the start of the
      * immediately following row at the next higher Y coordinate.  Usually,
-     * {@scanlineStride} is the same as the width of the image multiplied
+     * {@code scanlineStride} is the same as the width of the image multiplied
      * by the number of data elements per pixel (1 for the case of the
      * integer and indexed formats, or 3 or 4 in the case of the byte
      * formats), but some images may have further padding between rows for
--- a/javafx-ui-common/src/javafx/scene/input/InputMethodEvent.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/input/InputMethodEvent.java	Mon Jul 09 13:16:34 2012 -0700
@@ -55,8 +55,8 @@
  * text change in a {@link Node}.
  * <p>
  * This event is delivered to the {@link Node} object that extends 
- * {@link javafx.scene.control.TextInput}, when the text under composition (composed text) is
- * generated/changed/removed, the input method commits
+ * {@link javafx.scene.control.TextInputControl}, when the text under composition 
+ * (composed text) is generated/changed/removed, the input method commits
  * the result text, or the input method caret position changes.
  * <p>
  * On receiving this event, the application is supposed to display
--- a/javafx-ui-common/src/javafx/scene/input/MouseEvent.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/input/MouseEvent.java	Mon Jul 09 13:16:34 2012 -0700
@@ -758,8 +758,8 @@
 
     /**
      * {@code true} if primary button (button 1, usually the left) is currently
-     * pressed. Note that this is different from the {@link button} variable in
-     * that the {@code button} variable indicates which button press was
+     * pressed. Note that this is different from the {@link #getButton() button}
+     * variable in that the {@code button} variable indicates which button press was
      * responsible for this event while this variable indicates whether the
      * primary button is depressed.
      */
@@ -781,8 +781,8 @@
 
     /**
      * {@code true} if secondary button (button 3, usually the right) is currently
-     * pressed. Note that this is different from the {@link button} variable in
-     * that the {@code button} variable indicates which button press was
+     * pressed. Note that this is different from the {@link #getButton() button} 
+     * variable in that the {@code button} variable indicates which button press was
      * responsible for this event while this variable indicates whether the
      * primary button is depressed.
      */
@@ -804,7 +804,7 @@
 
     /**
      * {@code true} if middle button (button 2) is currently pressed.
-     * Note that this is different from the {@link button} variable in
+     * Note that this is different from the {@link #getButton() button} variable in
      * that the {@code button} variable indicates which button press was
      * responsible for this event while this variable indicates whether the
      * middle button is depressed.
--- a/javafx-ui-common/src/javafx/scene/paint/ImagePattern.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/paint/ImagePattern.java	Mon Jul 09 13:16:34 2012 -0700
@@ -144,7 +144,7 @@
     /**
      * Gets the x origin of the anchor rectangle.
      *
-     * @default 0.0
+     * @defaultValue 0.0
      * @return The x origin of the anchor rectangle.
      */
     public final double getX() {
@@ -156,7 +156,7 @@
     /**
      * Gets the y origin of the anchor rectangle.
      *
-     * @default 0.0
+     * @defaultValue 0.0
      * @return The y origin of the anchor rectangle.
      */
     public final double getY() {
@@ -169,7 +169,7 @@
     /**
      * Gets the width of the anchor rectangle.
      *
-     * @default 1.0
+     * @defaultValue 1.0
      * @return The width of the anchor rectangle.
      */
     public final double getWidth() {
@@ -182,7 +182,7 @@
     /**
      * Gets the height of the anchor rectangle.
      *
-     * @default 1.0
+     * @defaultValue 1.0
      * @return The height of the anchor rectangle.
      */
     public final double getHeight() {
--- a/javafx-ui-common/src/javafx/stage/Stage.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-common/src/javafx/stage/Stage.java	Mon Jul 09 13:16:34 2012 -0700
@@ -223,7 +223,7 @@
     }
     
     /**
-     * @InheritDoc
+     * @inheritDoc
      */
     @Override public final void show() {
         super.show();
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/BehaviorBase.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/BehaviorBase.java	Mon Jul 09 13:16:34 2012 -0700
@@ -130,7 +130,7 @@
      * @return a non-null list of key bindings.
      */
     protected List<KeyBinding> createKeyBindings() {
-        return Collections.emptyList();
+        return TRAVERSAL_BINDINGS;
     }
 
     /***************************************************************************
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TabPaneBehavior.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TabPaneBehavior.java	Mon Jul 09 13:16:34 2012 -0700
@@ -27,7 +27,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import javafx.collections.ObservableList;
 import javafx.event.Event;
+import javafx.scene.Parent;
+import javafx.scene.Node;
 import javafx.scene.control.Tab;
 import javafx.scene.control.TabPane;
 import javafx.scene.input.KeyCode;
@@ -80,7 +83,26 @@
             if (tps.getSelectedTabContentRegion() != null) {
                 tps.getSelectedTabContentRegion().getImpl_traversalEngine().getTopLeftFocusableNode();
                 if (tps.getSelectedTabContentRegion().getImpl_traversalEngine().registeredNodes.isEmpty()) {
-                    super.callAction(name);
+
+                    Parent traversableParent = null;
+                    traversableParent = getFirstPopulatedInnerTraversalEngine(tps.getSelectedTabContentRegion().getChildren());
+                    if (traversableParent != null) {
+                        boolean nodeFound = false;
+                        for (Node n : traversableParent.getImpl_traversalEngine().registeredNodes) {
+                            if (!n.isFocused() && n.impl_isTreeVisible() && !n.isDisabled()) {
+                                n.requestFocus();
+                                nodeFound = true;
+                                break;
+                            }
+                        }
+                        if (nodeFound == false) {
+                            super.callAction(name);
+                        }
+                    }
+                    else {
+                        super.callAction(name);
+                    }
+
                 }
             } else {
                 super.callAction(name);
@@ -114,6 +136,27 @@
         }
     }
 
+
+    public static Parent getFirstPopulatedInnerTraversalEngine(ObservableList<Node> root) {
+        Parent firstPopulatedEngine = null;
+        for (Node node : root) {
+            if (node instanceof Parent) {
+                if (((Parent)node).getImpl_traversalEngine() != null && !((Parent)node).getImpl_traversalEngine().registeredNodes.isEmpty()) {
+                    firstPopulatedEngine = (Parent)node;
+                    break;
+                }
+                else {
+                    firstPopulatedEngine = getFirstPopulatedInnerTraversalEngine(((Parent)node).getChildrenUnmodifiable());
+                    if (firstPopulatedEngine != null) {
+                        break;
+                    }
+                }
+            }
+        }
+        return firstPopulatedEngine;
+    }
+
+
     /***************************************************************************
      *                                                                         *
      * Mouse event handling                                                    *
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/NestedTableColumnHeader.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/NestedTableColumnHeader.java	Mon Jul 09 13:16:34 2012 -0700
@@ -209,6 +209,10 @@
             header.dispose();
         }
         
+        for (int i = 0; i < dragRects.size(); i++) {
+            Rectangle rect = dragRects.get(i);
+            rect.visibleProperty().unbind();
+        }
         dragRects.clear();
         getChildren().clear();
     }
@@ -348,7 +352,7 @@
             rect.setWidth(DRAG_RECT_WIDTH);
             rect.setHeight(getHeight() - label.getHeight());
             rect.setFill(Color.TRANSPARENT);
-            rect.setVisible(false);
+            rect.visibleProperty().bind(c.visibleProperty());
             rect.setSmooth(false);
             rect.setOnMousePressed(rectMousePressed);
             rect.setOnMouseDragged(rectMouseDragged);
@@ -439,7 +443,6 @@
             // position drag overlay to intercept column resize requests
             if (dragRects != null && i < dragRects.size()) {
                 Rectangle dragRect = dragRects.get(i++);
-                dragRect.setVisible(true);
                 dragRect.setHeight(getHeight() - label.getHeight());
                 dragRect.relocate(x - DRAG_RECT_WIDTH / 2, getInsets().getTop() + labelHeight);
             }
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/PaginationSkin.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/PaginationSkin.java	Mon Jul 09 13:16:34 2012 -0700
@@ -164,142 +164,140 @@
     private int direction;
 
     private void initializeSwipeAndTouchHandlers() {
-        if (PlatformUtil.isEmbedded()) {
-            setOnTouchPressed(new EventHandler<TouchEvent>() {
-                @Override public void handle(TouchEvent e) {
-                    if (touchEventId == -1) {
-                        touchEventId = e.getTouchPoint().getId();
+        setOnTouchPressed(new EventHandler<TouchEvent>() {
+            @Override public void handle(TouchEvent e) {
+                if (touchEventId == -1) {
+                    touchEventId = e.getTouchPoint().getId();
+                }
+                if (touchEventId != e.getTouchPoint().getId()) {
+                    return;
+                }
+                lastTouchPos = startTouchPos = e.getTouchPoint().getX();
+                lastTouchTime = startTouchTime = System.currentTimeMillis();
+                touchThresholdBroken = false;
+                e.consume();
+            }
+        });
+
+        setOnTouchMoved(new EventHandler<TouchEvent>() {
+            @Override public void handle(TouchEvent e) {
+                if (touchEventId != e.getTouchPoint().getId()) {
+                    return;
+                }
+
+                double drag = e.getTouchPoint().getX() - lastTouchPos;
+                long time = System.currentTimeMillis() - lastTouchTime;
+                touchVelocity = drag/time;
+                lastTouchPos = e.getTouchPoint().getX();
+                lastTouchTime = System.currentTimeMillis();
+                double delta = e.getTouchPoint().getX() - startTouchPos;
+
+                if (!touchThresholdBroken && Math.abs(delta) > TOUCH_THRESHOLD) {
+                    touchThresholdBroken = true;
+                }
+
+                if (touchThresholdBroken) {
+                    double width = getWidth() - (getInsets().getLeft() + getInsets().getRight());
+                    double currentPaneX;
+                    double nextPaneX;
+
+                    if (!setInitialDirection) {
+                        // Remember the direction travelled so we can
+                        // load the next or previous page if the touch is not released.
+                        setInitialDirection = true;
+                        direction = delta < 0 ? 1 : -1;
                     }
-                    if (touchEventId != e.getTouchPoint().getId()) {
-                        return;
-                    }
-                    lastTouchPos = startTouchPos = e.getTouchPoint().getX();
-                    lastTouchTime = startTouchTime = System.currentTimeMillis();
-                    touchThresholdBroken = false;
-                    e.consume();
-                }
-            });
-
-            setOnTouchMoved(new EventHandler<TouchEvent>() {
-                @Override public void handle(TouchEvent e) {
-                    if (touchEventId != e.getTouchPoint().getId()) {
-                        return;
-                    }
-
-                    double drag = e.getTouchPoint().getX() - lastTouchPos;
-                    long time = System.currentTimeMillis() - lastTouchTime;
-                    touchVelocity = drag/time;
-                    lastTouchPos = e.getTouchPoint().getX();
-                    lastTouchTime = System.currentTimeMillis();
-                    double delta = e.getTouchPoint().getX() - startTouchPos;
-
-                    if (!touchThresholdBroken && Math.abs(delta) > TOUCH_THRESHOLD) {
-                        touchThresholdBroken = true;
-                    }
-
-                    if (touchThresholdBroken) {
-                        double width = getWidth() - (getInsets().getLeft() + getInsets().getRight());
-                        double currentPaneX;
-                        double nextPaneX;
-
-                        if (!setInitialDirection) {
-                            // Remember the direction travelled so we can
-                            // load the next or previous page if the touch is not released.
-                            setInitialDirection = true;
-                            direction = delta < 0 ? 1 : -1;
+                    if (delta < 0) {
+                        if (direction == -1) {
+                            nextStackPane.getChildren().clear();
+                            direction = 1;
                         }
-                        if (delta < 0) {
-                            if (direction == -1) {
-                                nextStackPane.getChildren().clear();
-                                direction = 1;
-                            }
-                            // right to left
-                            if (Math.abs(delta) <= width) {
-                                currentPaneX = delta;
-                                nextPaneX = width + delta;
-                                nextPageReached = false;
-                            } else {
-                                currentPaneX = -width;
-                                nextPaneX = 0;
-                                nextPageReached = true;
-                            }
-                            currentStackPane.setTranslateX(currentPaneX);
-                            if (getCurrentPageIndex() < getPageCount() - 1) {
-                                createPage(nextStackPane, currentIndex + 1);
-                                nextStackPane.setVisible(true);
-                                nextStackPane.setTranslateX(nextPaneX);
-                            } else {
-                                currentStackPane.setTranslateX(0);
-                            }
+                        // right to left
+                        if (Math.abs(delta) <= width) {
+                            currentPaneX = delta;
+                            nextPaneX = width + delta;
+                            nextPageReached = false;
                         } else {
-                            // left to right
-                            if (direction == 1) {
-                                nextStackPane.getChildren().clear();
-                                direction = -1;
-                            }
-                            if (Math.abs(delta) <= width) {
-                                currentPaneX = delta;
-                                nextPaneX = -width + delta;
-                                nextPageReached = false;
-                            } else {
-                                currentPaneX = width;
-                                nextPaneX = 0;
-                                nextPageReached = true;
-                            }
-                            currentStackPane.setTranslateX(currentPaneX);
-                            if (getCurrentPageIndex() != 0) {
-                                createPage(nextStackPane, currentIndex - 1);
-                                nextStackPane.setVisible(true);
-                                nextStackPane.setTranslateX(nextPaneX);
-                            } else {
-                                currentStackPane.setTranslateX(0);
-                            }
+                            currentPaneX = -width;
+                            nextPaneX = 0;
+                            nextPageReached = true;
+                        }
+                        currentStackPane.setTranslateX(currentPaneX);
+                        if (getCurrentPageIndex() < getPageCount() - 1) {
+                            createPage(nextStackPane, currentIndex + 1);
+                            nextStackPane.setVisible(true);
+                            nextStackPane.setTranslateX(nextPaneX);
+                        } else {
+                            currentStackPane.setTranslateX(0);
+                        }
+                    } else {
+                        // left to right
+                        if (direction == 1) {
+                            nextStackPane.getChildren().clear();
+                            direction = -1;
+                        }
+                        if (Math.abs(delta) <= width) {
+                            currentPaneX = delta;
+                            nextPaneX = -width + delta;
+                            nextPageReached = false;
+                        } else {
+                            currentPaneX = width;
+                            nextPaneX = 0;
+                            nextPageReached = true;
+                        }
+                        currentStackPane.setTranslateX(currentPaneX);
+                        if (getCurrentPageIndex() != 0) {
+                            createPage(nextStackPane, currentIndex - 1);
+                            nextStackPane.setVisible(true);
+                            nextStackPane.setTranslateX(nextPaneX);
+                        } else {
+                            currentStackPane.setTranslateX(0);
                         }
                     }
-                    e.consume();
                 }
-            });
+                e.consume();
+            }
+        });
 
-            setOnTouchReleased(new EventHandler<TouchEvent>() {
-                @Override public void handle(TouchEvent e) {
-                    if (touchEventId != e.getTouchPoint().getId()) {
-                        return;
+        setOnTouchReleased(new EventHandler<TouchEvent>() {
+            @Override public void handle(TouchEvent e) {
+                if (touchEventId != e.getTouchPoint().getId()) {
+                    return;
+                } else {
+                    touchEventId = -1;
+                    setInitialDirection = false;
+                }
+
+                if (touchThresholdBroken) {
+                    // determin if click or swipe
+                    final double drag = e.getTouchPoint().getX() - startTouchPos;
+                    // calculate complete time from start to end of drag
+                    final long time = System.currentTimeMillis() - startTouchTime;
+                    // if time is less than 300ms then considered a quick swipe and whole time is used
+                    final boolean quick = time < 300;
+                    // calculate velocity
+                    final double velocity = quick ? (double)drag / time : touchVelocity; // pixels/ms
+                    // calculate distance we would travel at this speed for 500ms of travel
+                    final double distance = (velocity * 500);
+                    final double width = getWidth() - (getInsets().getLeft() + getInsets().getRight());
+
+                    // The swipe distance travelled.
+                    final double threshold = Math.abs(distance/width);
+                    // The touch and dragged distance travelled.
+                    final double delta = Math.abs(drag/width);
+                    if (threshold > SWIPE_THRESHOLD || delta > SWIPE_THRESHOLD) {
+                        if (startTouchPos > e.getTouchPoint().getX()) {
+                            selectNext();
+                        } else {
+                            selectPrevious();
+                        }
                     } else {
-                        touchEventId = -1;
-                        setInitialDirection = false;
+                        animateClamping(startTouchPos > e.getTouchPoint().getSceneX());
                     }
-
-                    if (touchThresholdBroken) {
-                        // determin if click or swipe
-                        final double drag = e.getTouchPoint().getX() - startTouchPos;
-                        // calculate complete time from start to end of drag
-                        final long time = System.currentTimeMillis() - startTouchTime;
-                        // if time is less than 300ms then considered a quick swipe and whole time is used
-                        final boolean quick = time < 300;
-                        // calculate velocity
-                        final double velocity = quick ? (double)drag / time : touchVelocity; // pixels/ms
-                        // calculate distance we would travel at this speed for 500ms of travel
-                        final double distance = (velocity * 500);
-                        final double width = getWidth() - (getInsets().getLeft() + getInsets().getRight());
-
-                        // The swipe distance travelled.
-                        final double threshold = Math.abs(distance/width);
-                        // The touch and dragged distance travelled.
-                        final double delta = Math.abs(drag/width);
-                        if (threshold > SWIPE_THRESHOLD || delta > SWIPE_THRESHOLD) {
-                            if (startTouchPos > e.getTouchPoint().getX()) {
-                                selectNext();
-                            } else {
-                                selectPrevious();
-                            }
-                        } else {
-                            animateClamping(startTouchPos > e.getTouchPoint().getSceneX());
-                        }
-                    }
-                    e.consume();
                 }
-            });
-        }
+                e.consume();
+            }
+        });
     }
 
     private void resetIndexes(boolean usePageIndex) {
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/SplitPaneSkin.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/SplitPaneSkin.java	Mon Jul 09 13:16:34 2012 -0700
@@ -115,19 +115,95 @@
             }
         });
     }
-
+          
     // This listener is to be removed from 'removed' dividers and added to 'added' dividers
-    private final ChangeListener posPropertyListener = new ChangeListener() {
-        @Override
-        public void changed(ObservableValue observable, Object oldValue, Object newValue) {
+    class PosPropertyListener implements ChangeListener<Double> {
+        ContentDivider divider;
+        
+        public PosPropertyListener(ContentDivider divider) {
+            this.divider = divider;
+        }
+        
+        @Override public void changed(ObservableValue observable, Double oldValue, Double newValue) {  
+            // If we already know the dividers are in the correct position.  We do not
+            // need to recheck their values.
+            if (checkDividerPos) {
+                checkDividerPosition(divider, posToDividerPos(divider, newValue), posToDividerPos(divider, oldValue));                
+            }
             requestLayout();
         }
-    };
+    }
+       
+    private void checkDividerPosition(ContentDivider divider, double newPos, double oldPos) {
+        double dividerWidth = divider.prefWidth(-1);
+        Content left = getLeft(divider);
+        Content right = getRight(divider);
+        double minLeft = left == null ? 0 : (horizontal) ? left.minWidth(-1) : left.minHeight(-1);
+        double minRight = right == null ? 0 : (horizontal) ? right.minWidth(-1) : right.minHeight(-1);
+        double maxLeft = left == null ? 0 :
+            left.getContent() != null ? (horizontal) ? left.getContent().maxWidth(-1) : left.getContent().maxHeight(-1) : 0;
+        double maxRight = right == null ? 0 :
+            right.getContent() != null ? (horizontal) ? right.getContent().maxWidth(-1) : right.getContent().maxHeight(-1) : 0;                        
+               
+        double previousDividerPos = 0;
+        double nextDividerPos = getSize();
+        int index = contentDividers.indexOf(divider);
 
+        if (index - 1 >= 0) {
+            previousDividerPos = contentDividers.get(index - 1).getDividerPos();
+            if (previousDividerPos == -1) {
+                // Get the divider position if it hasn't been initialized.
+                previousDividerPos = getAbsoluteDividerPos(contentDividers.get(index - 1));
+            }
+        }
+        if (index + 1 < contentDividers.size()) {
+            nextDividerPos = contentDividers.get(index + 1).getDividerPos();
+            if (nextDividerPos == -1) {
+                // Get the divider position if it hasn't been initialized.
+                nextDividerPos = getAbsoluteDividerPos(contentDividers.get(index + 1));
+            }
+        }
+        
+        // Set the divider into the correct position by looking at the max and min content sizes.
+        checkDividerPos = false;
+        if (newPos > oldPos) {
+            double max = previousDividerPos == 0 ? maxLeft : previousDividerPos + dividerWidth + maxLeft;
+            double min = nextDividerPos - minRight - dividerWidth;                
+            double stopPos = Math.min(max, min);
+            if (newPos >= stopPos) {                
+                setAbsoluteDividerPos(divider, stopPos);
+            } else {
+                double rightMax = nextDividerPos - maxRight - dividerWidth;                    
+                if (newPos <= rightMax) {
+                    setAbsoluteDividerPos(divider, rightMax);
+                } else {                    
+                    setAbsoluteDividerPos(divider, newPos);
+                }
+            }             
+        } else {
+            double max = nextDividerPos - maxRight - dividerWidth;
+            double min = previousDividerPos == 0 ? minLeft : previousDividerPos + minLeft + dividerWidth;
+            double stopPos = Math.max(max, min);
+            if (newPos <= stopPos) {
+                setAbsoluteDividerPos(divider, stopPos);
+            } else {
+                double leftMax = previousDividerPos + maxLeft + dividerWidth;
+                if (newPos >= leftMax) {
+                    setAbsoluteDividerPos(divider, leftMax);
+                } else {
+                    setAbsoluteDividerPos(divider, newPos);
+                }
+            }                
+        }                    
+        checkDividerPos = true;
+    }
+    
     private void addDivider(SplitPane.Divider d) {
-        ContentDivider c = new ContentDivider(d);
+        ContentDivider c = new ContentDivider(d);        
         c.setInitialPos(d.getPosition());
-        c.setDividerPos(d.getPosition());
+        c.setDividerPos(-1);
+        ChangeListener posPropertyListener = new PosPropertyListener(c);
+        c.setPosPropertyListener(posPropertyListener);
         d.positionProperty().addListener(posPropertyListener);
         initializeDivderEventHandlers(c);
         contentDividers.add(c);
@@ -139,7 +215,7 @@
         while (dividers.hasNext()) {
             ContentDivider c = dividers.next();
             getChildren().remove(c);
-            c.getDivider().positionProperty().removeListener(posPropertyListener);
+            c.getDivider().positionProperty().removeListener(c.getPosPropertyListener());
             dividers.remove();
         }
         lastDividerUpdate = 0;
@@ -168,61 +244,11 @@
         });
 
         divider.setOnMouseDragged(new EventHandler<MouseEvent>() {
-            @Override public void handle(MouseEvent e) {
-                double dividerWidth = divider.prefWidth(-1);
-                Content left = getLeft(divider);
-                Content right = getRight(divider);
-                double minLeft = left == null ? 0 : (horizontal) ? left.minWidth(-1) : left.minHeight(-1);
-                double minRight = right == null ? 0 : (horizontal) ? right.minWidth(-1) : right.minHeight(-1);
-                double maxLeft = left == null ? 0 :
-                    left.getContent() != null ? (horizontal) ? left.getContent().maxWidth(-1) : left.getContent().maxHeight(-1) : 0;
-                double maxRight = right == null ? 0 :
-                    right.getContent() != null ? (horizontal) ? right.getContent().maxWidth(-1) : right.getContent().maxHeight(-1) : 0;
-
-                double delta;
-                double w = 0;
-                if (horizontal) {
-                    delta = e.getSceneX() - divider.getPressPos();
-                     w = getWidth() - (getInsets().getLeft() + getInsets().getRight());
-                } else {
-                    delta = e.getSceneY() - divider.getPressPos();
-                    w = getHeight() - (getInsets().getTop() + getInsets().getBottom());
-                }
-
-                // newPos is the center of the divider;
-                double newPos = Math.ceil(divider.getInitialPos() + delta);
-
-                double previousDividerPos = 0;
-                double nextDividerPos = getSize();
-                int index = contentDividers.indexOf(divider);
-
-                if (index - 1 >= 0) {
-                    previousDividerPos = contentDividers.get(index - 1).getDividerPos();
-                }
-                if (index + 1 < contentDividers.size()) {
-                    nextDividerPos = contentDividers.get(index + 1).getDividerPos();
-                }
-                if (delta > 0) {
-                    double max = previousDividerPos == 0 ? maxLeft : previousDividerPos + dividerWidth + maxLeft;
-                    double min = nextDividerPos - minRight - dividerWidth;
-                    double stopPos = Math.min(max, min);
-
-                    if (newPos >= stopPos) {
-                        setAbsoluteDividerPos(divider, stopPos);
-                    } else {
-                        setAbsoluteDividerPos(divider, newPos);
-                    }
-                } else {
-                    double max = nextDividerPos - maxRight - dividerWidth;
-                    double min = previousDividerPos == 0 ? minLeft : previousDividerPos + minLeft + dividerWidth;
-                    double stopPos = Math.max(max, min);
-
-                    if (newPos <= stopPos) {
-                        setAbsoluteDividerPos(divider, stopPos);
-                    } else {
-                        setAbsoluteDividerPos(divider, newPos);
-                    }
-                }
+            @Override public void handle(MouseEvent e) {                
+                double delta = (horizontal ? e.getSceneX() : e.getSceneY()) - divider.getPressPos();                
+                double newPos = Math.ceil(divider.getInitialPos() + delta);    
+                checkDividerPos = true;
+                setAbsoluteDividerPos(divider, newPos);
                 e.consume();
             }
         });
@@ -258,7 +284,7 @@
     }
 
     // Value is the left edge of the divider
-     private void setAbsoluteDividerPos(ContentDivider divider, double value) {
+    private void setAbsoluteDividerPos(ContentDivider divider, double value) {
         if (getWidth() > 0 && getHeight() > 0 && divider != null) {
             SplitPane.Divider paneDivider = divider.getDivider();
             divider.setDividerPos(value);
@@ -273,27 +299,32 @@
             }
         }
     }
-
+   
     // Updates the divider with the SplitPane.Divider's position
     // The value updated to SplitPane.Divider will be the center of the divider.
     // The returned position will be the left edge of the divider
     private double getAbsoluteDividerPos(ContentDivider divider) {
         if (getWidth() > 0 && getHeight() > 0 && divider != null) {
             SplitPane.Divider paneDivider = divider.getDivider();
-            double pos = paneDivider.getPosition();
-            double newPos = getSize() * pos;
-            if (pos == 1) {                
-                newPos -= divider.prefWidth(-1);
-            } else {
-                newPos -= divider.prefWidth(-1)/2;
-            }
-            newPos = Math.round(newPos);
+            double newPos = posToDividerPos(divider, paneDivider.getPosition());
             divider.setDividerPos(newPos);
             return newPos;
         }
         return 0;
     }
 
+    // Returns the left edge of the divider at pos
+    // Pos is the percentage location from SplitPane.Divider.
+    private double posToDividerPos(ContentDivider divider, double pos) {
+        double newPos = getSize() * pos;
+        if (pos == 1) {                
+            newPos -= divider.prefWidth(-1);
+        } else {
+            newPos -= divider.prefWidth(-1)/2;
+        }       
+        return Math.round(newPos);                    
+    }
+    
     private double totalMinSize() {
         double dividerWidth = !contentDividers.isEmpty() ? contentDividers.size() * contentDividers.get(0).prefWidth(-1) : 0;
         double minSize = 0;
@@ -327,7 +358,7 @@
         if (available.isEmpty()) {
             return size;
         }
-
+                
         size = snapSize(size);
         int portion = (int)(size)/available.size();
         int remainder;
@@ -441,6 +472,9 @@
 
         startX = 0;
         startY = 0;
+        // The dividers are already in the correct positions.  Disable
+        // checking the divider positions.
+        checkDividerPos = false;
         for (int i = 0; i < contentDividers.size(); i++) {
             ContentDivider d = contentDividers.get(i);
             if (horizontal) {
@@ -449,9 +483,10 @@
                 startY += getLeft(d).getArea() + (i == 0 ? 0 : dividerWidth);
             }
             d.setX(startX);
-            d.setY(startY);
+            d.setY(startY);              
             setAbsoluteDividerPos(d, (horizontal ? d.getX() : d.getY()));
         }
+        checkDividerPos = true;
     }
 
     private void layoutDividersAndContent(double width, double height) {
@@ -488,12 +523,15 @@
     private double previousHeight = -1;
     private int lastDividerUpdate = 0;
     private boolean resize = false;
+    private boolean checkDividerPos = true;
 
     @Override protected void layoutChildren() {
-        if (!getSkinnable().isVisible() || (horizontal ? getWidth() == 0 : getHeight() == 0)) {
+        if (!getSkinnable().isVisible() || 
+            (horizontal ? getWidth() == 0 : getHeight() == 0) ||
+            contentRegions.isEmpty()) {
             return;
         }
-
+        
         double dividerWidth = contentDividers.isEmpty() ? 0 : contentDividers.get(0).prefWidth(-1);
         double w = getWidth() - (getInsets().getLeft() + getInsets().getRight());
         double h = getHeight() - (getInsets().getTop() + getInsets().getBottom());
@@ -605,7 +643,7 @@
         for(int trys = 0; trys < 10; trys++) {
             // Compute the area in between each divider.            
             ContentDivider previousDivider = null;
-            ContentDivider divider = null;
+            ContentDivider divider = null;            
             for (int i = 0; i < contentRegions.size(); i++) {
                 double space = 0;                
                 if (i < contentDividers.size()) {
@@ -619,12 +657,11 @@
                             // The current divider and the previous divider share the same position
                             // or the current divider position is less than the previous position.
                             // We will set the divider next to the previous divider.
-                            space = Double.NaN;                            
-                            double pos = getAbsoluteDividerPos(previousDivider);                            
+                            double pos = getAbsoluteDividerPos(previousDivider);                                
+                            checkDividerPos = true;
                             setAbsoluteDividerPos(divider, pos + dividerWidth);
-                        } else {
-                            space = getAbsoluteDividerPos(divider) - (getAbsoluteDividerPos(previousDivider) + dividerWidth);
                         }
+                        space = getAbsoluteDividerPos(divider) - (getAbsoluteDividerPos(previousDivider) + dividerWidth);
                     }
                 } else if (i == contentDividers.size()) {
                     // Last panel
@@ -655,21 +692,8 @@
                     // Add the space that needs to be distributed to the others
                     extraSpace += (c.getArea() - max);
                     c.setArea(max);
-                    c.setAvailable(c.getArea() - min);
-                } else if (c.getArea() <= min) {
-                    c.setAvailable(c.getArea() - min);
-                } else if (Double.isNaN(c.getArea())) {
-                    if (min == 0) {
-                        // We have no panels and the dividers are stacked ontop of each other.
-                        c.setArea(0);
-                        c.setAvailable(0);
-                    } else {
-                        c.setArea(0);
-                        c.setAvailable(-min);
-                    }
-                } else {
-                    c.setAvailable(c.getArea() - min);
                 }
+                c.setAvailable(c.getArea() - min);
                 if (c.getAvailable() < 0) {
                     spaceRequested += c.getAvailable();
                 }
@@ -788,7 +812,7 @@
         }
 
         layoutDividersAndContent(w, h);        
-        resize = false;
+        resize = false;        
     }
 
     @Override protected double computeMinWidth(double height) {
@@ -859,6 +883,13 @@
         }
     }
 
+    private void printDividerPositions() {
+        for (int i = 0; i < contentDividers.size(); i++) {
+            System.out.print("DIVIDER[" + i + "] " + contentDividers.get(i).getDividerPos() + " ");
+        } 
+        System.out.println("");
+    }
+    
     private void printAreaAndAvailable() {
         for (int i = 0; i < contentRegions.size(); i++) {
             System.out.print("AREA[" + i + "] " + contentRegions.get(i).getArea() + " ");
@@ -881,7 +912,8 @@
         private SplitPane.Divider d;
         private StackPane grabber;
         private double x;
-        private double y;
+        private double y;  
+        private ChangeListener listener;
 
         public ContentDivider(SplitPane.Divider d) {
             getStyleClass().setAll("split-pane-divider");
@@ -977,6 +1009,14 @@
             this.y = y;
         }
 
+        public ChangeListener getPosPropertyListener() {
+            return listener;
+        }
+
+        public void setPosPropertyListener(ChangeListener listener) {
+            this.listener = listener;
+        }
+                
         @Override protected double computeMinWidth(double height) {
             return computePrefWidth(height);
         }
--- a/javafx-ui-controls/src/javafx/scene/control/CheckBox.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/CheckBox.java	Mon Jul 09 13:16:34 2012 -0700
@@ -123,7 +123,6 @@
                 @Override protected void invalidated() {
                     impl_pseudoClassStateChanged(PSEUDO_CLASS_DETERMINATE);
                     impl_pseudoClassStateChanged(PSEUDO_CLASS_INDETERMINATE);
-                    fireEvent(new ActionEvent());
                 }
 
                 @Override
@@ -156,7 +155,6 @@
             selected = new BooleanPropertyBase() {
                 @Override protected void invalidated() {
                     impl_pseudoClassStateChanged(PSEUDO_CLASS_SELECTED);
-                    fireEvent(new ActionEvent());
                 }
 
                 @Override
@@ -225,6 +223,7 @@
             setSelected(!isSelected());
             setIndeterminate(false);
         }
+        fireEvent(new ActionEvent());
     }
 
     /***************************************************************************
--- a/javafx-ui-controls/src/javafx/scene/control/CheckBoxTreeItem.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/CheckBoxTreeItem.java	Mon Jul 09 13:16:34 2012 -0700
@@ -38,16 +38,24 @@
 /**
  * TreeItem subclass that adds support for being in selected, unselected, and
  * indeterminate states. This is useful when used in conjunction with a TreeView
- * which has a {@link CheckBoxCellFactory} installed.
+ * which has a {@link CheckBoxTreeCell} installed.
  * 
  * <p>A CheckBoxTreeItem can be {@link #independentProperty() independent} or 
  * dependent. By default, CheckBoxTreeItem instances are dependent, which means 
  * that any changes to the selection state of a TreeItem will have an impact on 
- * parent and children CheckBoxTreeItem instances. 
+ * parent and children CheckBoxTreeItem instances. If a CheckBoxTreeItem is
+ * set to be independent, this means that any changes to that CheckBoxTreeItem
+ * will not directly impact the state of parent and children CheckBoxTreeItem
+ * instances.
+ * 
+ * <p>The {@link #indeterminateProperty() indeterminate} property is used to
+ * represent the same concept as that in {@link CheckBox#indeterminateProperty()},
+ * namely, that the CheckBox is neither selected or unselected. This is commonly
+ * used inside a TreeView when some, but not all, of a branches children are
+ * selected.
  * 
  * <p>A simple example of using the CheckBoxTreeItem class, in conjunction with 
- * {@link CheckBoxCellFactory} or {@link CheckBoxTreeCell} classes is shown 
- * below:
+ * {@link CheckBoxTreeCell} is shown below:
  * 
  * <pre><code>
  * // create the tree model
@@ -66,7 +74,7 @@
  * treeView.setRoot(gilesFamily);
  *       
  * // set the cell factory
- * treeView.setCellFactory(CheckBoxCellFactory.&lt;String&gt;forTreeView());</code></pre>
+ * treeView.setCellFactory(CheckBoxTreeCell.&lt;String&gt;forTreeView());</code></pre>
  *
  * @see CheckBoxTreeCell
  * @see TreeItem
--- a/javafx-ui-controls/src/javafx/scene/control/MultipleSelectionModelBase.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/MultipleSelectionModelBase.java	Mon Jul 09 13:16:34 2012 -0700
@@ -212,7 +212,6 @@
     protected abstract int getFocusedIndex();
     
     
-    // FIXME not optimal: each shift requires a whole new loop
     // package only
     void shiftSelection(int position, int shift) {
         // with no check here, we get RT-15024
@@ -228,26 +227,23 @@
         int idx = 0;
         
         if (shift > 0) {
-            for (int iter = 0; iter < shift; iter++) {
-                for (int i = selectedIndicesSize - 1; i >= position && i >= 0; i--) {
-                    boolean selected = selectedIndices.get(i);
-                    selectedIndices.set(i+1, selected);
-                    
-                    if (selected) {
-                        perm[idx++] = i + 1;
-                    }
+            for (int i = selectedIndicesSize - 1; i >= position && i >= 0; i--) {
+                boolean selected = selectedIndices.get(i);
+                selectedIndices.set(i + shift, selected);
+
+                if (selected) {
+                    perm[idx++] = i + 1;
                 }
-                selectedIndices.clear(position);
-             }
+            }
+            selectedIndices.clear(position);
         } else if (shift < 0) {
-            for (int iter = 0; iter < Math.abs(shift); iter++) {
-                for (int i = position; i < selectedIndicesSize; i++) {
-                    boolean selected = selectedIndices.get(i + 1);
-                    selectedIndices.set(i, selected);
-                    
-                    if (selected) {
-                        perm[idx++] = i;
-                    }
+            for (int i = position; i < selectedIndicesSize; i++) {
+                if ((i + shift) < 0) continue;
+                boolean selected = selectedIndices.get(i + 1);
+                selectedIndices.set(i + 1 + shift, selected);
+
+                if (selected) {
+                    perm[idx++] = i;
                 }
             }
         }
--- a/javafx-ui-controls/src/javafx/scene/control/Pagination.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/Pagination.java	Mon Jul 09 13:16:34 2012 -0700
@@ -67,7 +67,7 @@
  * <h3>Styling the page indicators</h3>
  * <p>
  * The control can be customized to display numeric page indicators or bullet style indicators by
- * setting the style class {@link STYLE_CLASS_BULLET}.  The
+ * setting the style class {@link #STYLE_CLASS_BULLET}.  The
  * {@link #maxPageIndicatorCountProperty() maxPageIndicatorCountProperty} can be used to change
  * the maximum number of page indicators.  The property value can also be changed
  * via CSS using -fx-max-page-indicator-count.
@@ -154,7 +154,7 @@
     }
 
     /**
-     * Constructs a Pagination control with an {@link INDETERMINATE} page count
+     * Constructs a Pagination control with an {@link #INDETERMINATE} page count
      * and a page index equal to zero.
      */
     public Pagination() {
@@ -250,10 +250,10 @@
 
     /**
      * The number of pages for this pagination control.  This
-     * value must be greater than or equal to 1.  {@link INDETERMINATE}
+     * value must be greater than or equal to 1. {@link #INDETERMINATE}
      * should be used as the page count if the total number of pages is unknown.
      *
-     * The default is an {@link INDETERMINATE} number of pages.
+     * The default is an {@link #INDETERMINATE} number of pages.
      */
     public final IntegerProperty pageCountProperty() { return pageCount; }
 
--- a/javafx-ui-controls/src/javafx/scene/control/SplitPane.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/SplitPane.java	Mon Jul 09 13:16:34 2012 -0700
@@ -142,7 +142,7 @@
     /**
      * Return true if the node is resizable when the parent container is resized false otherwise.
      * @param node A node in the SplitPane.
-     * @default true
+     * @defaultValue true
      * @return true if the node is resizable false otherwise.
      */
     public static Boolean isResizableWithParent(Node node) {
--- a/javafx-ui-controls/src/javafx/scene/control/Tab.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/Tab.java	Mon Jul 09 13:16:34 2012 -0700
@@ -514,7 +514,7 @@
     /**
      * Sets the disabled state of this tab. A disable tab is no longer interactive
      * or traversable, but the contents remain interactive.  A disable tab 
-     * can be selected using {@link TabPane.getSelectionModel()}.
+     * can be selected using {@link TabPane#getSelectionModel()}.
      * 
      * @defaultValue false
      */    
--- a/javafx-ui-controls/src/javafx/scene/control/Tooltip.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/Tooltip.java	Mon Jul 09 13:16:34 2012 -0700
@@ -194,8 +194,9 @@
     }
     /**
      * Specifies the behavior for lines of text <em>when text is multiline</em>.
-     * Unlike {@link #contentDisplay} which affects the graphic and text, this setting
-     * only affects multiple lines of text relative to the text bounds.
+     * Unlike {@link #contentDisplayProperty() contentDisplay} which affects the 
+     * graphic and text, this setting only affects multiple lines of text 
+     * relative to the text bounds.
      */
     public final ObjectProperty<TextAlignment> textAlignmentProperty() {
         return ((Tooltip.CSSBridge)bridge).textAlignmentProperty();
@@ -245,7 +246,8 @@
 
     /**
      * An optional icon for the Tooltip. This can be positioned relative to the
-     * text by using the {@link #contentDisplay} property.
+     * text by using the {@link #contentDisplayProperty() content display} 
+     * property.
      * The node specified for this variable cannot appear elsewhere in the
      * scene graph, otherwise the {@code IllegalArgumentException} is thrown.
      * See the class description of {@link javafx.scene.Node Node} for more detail.
--- a/javafx-ui-controls/src/javafx/scene/control/cell/CellUtils.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/CellUtils.java	Mon Jul 09 13:16:34 2012 -0700
@@ -96,7 +96,7 @@
             converter.toString(cell.getItem());
     }
     
-    
+
     
     /***************************************************************************
      *                                                                         *
@@ -191,6 +191,12 @@
         textField.setOnKeyReleased(new EventHandler<KeyEvent>() {
             @Override public void handle(KeyEvent t) {
                 if (t.getCode() == KeyCode.ENTER) {
+                    if (converter == null) {
+                        throw new IllegalStateException(
+                            "Attempting to convert text input into Object, but provided "
+                                + "StringConverter is null. Be sure to set a StringConverter "
+                                + "in your cell factory.");
+                    }
                     cell.commitEdit(converter.fromString(textField.getText()));
                 } else if (t.getCode() == KeyCode.ESCAPE) {
                     cell.cancelEdit();
--- a/javafx-ui-controls/src/javafx/scene/control/cell/CheckBoxListCell.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/CheckBoxListCell.java	Mon Jul 09 13:16:34 2012 -0700
@@ -53,7 +53,6 @@
  * interactions, and the CheckBox will reflect the state of the 
  * ObservableValue<Boolean>, if it changes externally).
  * 
- * @see CheckBoxCellFactory
  * @see CheckBox
  * @see ListCell
  * @param <T> The type of the elements contained within the ListView.
--- a/javafx-ui-controls/src/javafx/scene/control/cell/CheckBoxTableCell.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/CheckBoxTableCell.java	Mon Jul 09 13:16:34 2012 -0700
@@ -134,8 +134,9 @@
      *      the TableCell beside the {@link CheckBox}. By default a label is not 
      *      shown, but by setting this to true the item in the cell will also 
      *      have toString() called on it. If this is not the desired behavior, 
-     *      consider using {@link #forTableColumn(Callback, Callback)}, which 
-     *      allows for you to provide a callback that specifies the label for a 
+     *      consider using 
+     *      {@link #forTableColumn(javafx.util.Callback, javafx.util.StringConverter) }, 
+     *      which allows for you to provide a callback that specifies the label for a 
      *      given row item.
      * @return A {@link Callback} that will return a {@link TableCell} that is 
      *      able to work on the type of element contained within the TableColumn.
--- a/javafx-ui-controls/src/javafx/scene/control/cell/ChoiceBoxTableCell.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/ChoiceBoxTableCell.java	Mon Jul 09 13:16:34 2012 -0700
@@ -29,6 +29,7 @@
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
+import javafx.event.EventHandler;
 import javafx.scene.control.ChoiceBox;
 import javafx.scene.control.Label;
 import javafx.scene.control.TableCell;
@@ -70,9 +71,9 @@
      *      type as the TableColumn. Note that it is up to the developer to set 
      *      {@link EventHandler event handlers} to listen to edit events in the 
      *      TableColumn, and react accordingly. Methods of interest include 
-     *      {@link TableColumn#setOnEditStart(EventHandler) setOnEditStart},
+     *      {@link TableColumn#setOnEditStart(javafx.event.EventHandler) setOnEditStart},
      *      {@link TableColumn#setOnEditCommit(javafx.event.EventHandler) setOnEditCommit}, 
-     *      and {@link TableColumn#setOnEditCancel(EventHandler) setOnEditCancel}.
+     *      and {@link TableColumn#setOnEditCancel(javafx.event.EventHandler) setOnEditCancel}.
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
@@ -94,9 +95,9 @@
      *      type as the TableColumn. Note that it is up to the developer to set 
      *      {@link EventHandler event handlers} to listen to edit events in the 
      *      TableColumn, and react accordingly. Methods of interest include 
-     *      {@link TableColumn#setOnEditStart(EventHandler) setOnEditStart},
+     *      {@link TableColumn#setOnEditStart(javafx.event.EventHandler) setOnEditStart},
      *      {@link TableColumn#setOnEditCommit(javafx.event.EventHandler) setOnEditCommit}, 
-     *      and {@link TableColumn#setOnEditCancel(EventHandler) setOnEditCancel}.
+     *      and {@link TableColumn#setOnEditCancel(javafx.event.EventHandler) setOnEditCancel}.
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
@@ -118,9 +119,9 @@
      *      type as the TableColumn. Note that it is up to the developer to set 
      *      {@link EventHandler event handlers} to listen to edit events in the 
      *      TableColumn, and react accordingly. Methods of interest include 
-     *      {@link TableColumn#setOnEditStart(EventHandler) setOnEditStart},
+     *      {@link TableColumn#setOnEditStart(javafx.event.EventHandler) setOnEditStart},
      *      {@link TableColumn#setOnEditCommit(javafx.event.EventHandler) setOnEditCommit}, 
-     *      and {@link TableColumn#setOnEditCancel(EventHandler) setOnEditCancel}.
+     *      and {@link TableColumn#setOnEditCancel(javafx.event.EventHandler) setOnEditCancel}.
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
@@ -143,9 +144,9 @@
      *      type as the TableColumn. Note that it is up to the developer to set 
      *      {@link EventHandler event handlers} to listen to edit events in the 
      *      TableColumn, and react accordingly. Methods of interest include 
-     *      {@link TableColumn#setOnEditStart(EventHandler) setOnEditStart},
+     *      {@link TableColumn#setOnEditStart(javafx.event.EventHandler) setOnEditStart},
      *      {@link TableColumn#setOnEditCommit(javafx.event.EventHandler) setOnEditCommit}, 
-     *      and {@link TableColumn#setOnEditCancel(EventHandler) setOnEditCancel}.
+     *      and {@link TableColumn#setOnEditCancel(javafx.event.EventHandler) setOnEditCancel}.
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
--- a/javafx-ui-controls/src/javafx/scene/control/cell/ComboBoxTableCell.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/ComboBoxTableCell.java	Mon Jul 09 13:16:34 2012 -0700
@@ -31,6 +31,7 @@
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
+import javafx.event.EventHandler;
 import javafx.scene.control.ComboBox;
 import javafx.scene.control.Label;
 import javafx.scene.control.TableCell;
@@ -72,9 +73,9 @@
      *      type as the TableColumn. Note that it is up to the developer to set 
      *      {@link EventHandler event handlers} to listen to edit events in the 
      *      TableColumn, and react accordingly. Methods of interest include 
-     *      {@link TableColumn#setOnEditStart(EventHandler) setOnEditStart},
+     *      {@link TableColumn#setOnEditStart(javafx.event.EventHandler) setOnEditStart},
      *      {@link TableColumn#setOnEditCommit(javafx.event.EventHandler) setOnEditCommit}, 
-     *      and {@link TableColumn#setOnEditCancel(EventHandler) setOnEditCancel}.
+     *      and {@link TableColumn#setOnEditCancel(javafx.event.EventHandler) setOnEditCancel}.
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
@@ -97,9 +98,9 @@
      *      type as the TableColumn. Note that it is up to the developer to set 
      *      {@link EventHandler event handlers} to listen to edit events in the 
      *      TableColumn, and react accordingly. Methods of interest include 
-     *      {@link TableColumn#setOnEditStart(EventHandler) setOnEditStart},
+     *      {@link TableColumn#setOnEditStart(javafx.event.EventHandler) setOnEditStart},
      *      {@link TableColumn#setOnEditCommit(javafx.event.EventHandler) setOnEditCommit}, 
-     *      and {@link TableColumn#setOnEditCancel(EventHandler) setOnEditCancel}.
+     *      and {@link TableColumn#setOnEditCancel(javafx.event.EventHandler) setOnEditCancel}.
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
@@ -121,9 +122,9 @@
      *      type as the TableColumn. Note that it is up to the developer to set 
      *      {@link EventHandler event handlers} to listen to edit events in the 
      *      TableColumn, and react accordingly. Methods of interest include 
-     *      {@link TableColumn#setOnEditStart(EventHandler) setOnEditStart},
+     *      {@link TableColumn#setOnEditStart(javafx.event.EventHandler) setOnEditStart},
      *      {@link TableColumn#setOnEditCommit(javafx.event.EventHandler) setOnEditCommit}, 
-     *      and {@link TableColumn#setOnEditCancel(EventHandler) setOnEditCancel}.
+     *      and {@link TableColumn#setOnEditCancel(javafx.event.EventHandler) setOnEditCancel}.
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
@@ -146,9 +147,9 @@
      *      type as the TableColumn. Note that it is up to the developer to set 
      *      {@link EventHandler event handlers} to listen to edit events in the 
      *      TableColumn, and react accordingly. Methods of interest include 
-     *      {@link TableColumn#setOnEditStart(EventHandler) setOnEditStart},
+     *      {@link TableColumn#setOnEditStart(javafx.event.EventHandler) setOnEditStart},
      *      {@link TableColumn#setOnEditCommit(javafx.event.EventHandler) setOnEditCommit}, 
-     *      and {@link TableColumn#setOnEditCancel(EventHandler) setOnEditCancel}.
+     *      and {@link TableColumn#setOnEditCancel(javafx.event.EventHandler) setOnEditCancel}.
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
--- a/javafx-ui-controls/src/javafx/scene/control/cell/MapValueFactory.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/MapValueFactory.java	Mon Jul 09 13:16:34 2012 -0700
@@ -34,9 +34,10 @@
 import javafx.beans.property.ReadOnlyObjectWrapper;
 import javafx.beans.property.ReadOnlyStringWrapper;
 import javafx.beans.value.ObservableValue;
+import javafx.scene.control.TableCell;
 import javafx.scene.control.TableColumn;
 import javafx.scene.control.TableColumn.CellDataFeatures;
-import javafx.scene.control.cell.PropertyValueFactory;
+import javafx.scene.control.TableView;
 import javafx.util.Callback;
 
 /**
--- a/javafx-ui-controls/src/javafx/scene/control/cell/TextFieldListCell.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/TextFieldListCell.java	Mon Jul 09 13:16:34 2012 -0700
@@ -107,7 +107,11 @@
      **************************************************************************/    
     
     /**
-     * Creates a default TextFieldListCell with a null converter.
+     * Creates a default TextFieldListCell with a null converter. Without a 
+     * {@link StringConverter} specified, this cell will not be able to accept
+     * input from the TextField (as it will not know how to convert this back
+     * to the domain object). It is therefore strongly encouraged to not use
+     * this constructor unless you intend to set the converter separately.
      */
     public TextFieldListCell() { 
         this(null);
@@ -122,7 +126,7 @@
      * instance of type T. This item will then be passed along to the 
      * {@link ListView#onEditCommitProperty()} callback.
      * 
-     * @param onCommit A {@link StringConverter<T> converter} that can convert 
+     * @param converter A {@link StringConverter converter} that can convert 
      *      the given String (from what the user typed in) into an instance of 
      *      type T.
      */
--- a/javafx-ui-controls/src/javafx/scene/control/cell/TextFieldTableCell.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/TextFieldTableCell.java	Mon Jul 09 13:16:34 2012 -0700
@@ -26,10 +26,7 @@
 
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleObjectProperty;
-import javafx.scene.control.Label;
-import javafx.scene.control.TableCell;
-import javafx.scene.control.TableColumn;
-import javafx.scene.control.TextField;
+import javafx.scene.control.*;
 import javafx.util.Callback;
 import javafx.util.StringConverter;
 import javafx.util.converter.DefaultStringConverter;
@@ -55,8 +52,9 @@
     /**
      * Provides a {@link TextField} that allows editing of the cell content when
      * the cell is double-clicked, or when 
-     * {@link TableView#edit(int, TableColumn)} is called. This method will only 
-     * work on {@link TableColumn} instances which are of type String.
+     * {@link TableView#edit(int, javafx.scene.control.TableColumn)} is called. 
+     * This method will only  work on {@link TableColumn} instances which are of
+     * type String.
      * 
      * @return A {@link Callback} that can be inserted into the 
      *      {@link TableColumn#cellFactoryProperty() cell factory property} of a 
@@ -69,11 +67,11 @@
     /**
      * Provides a {@link TextField} that allows editing of the cell content when
      * the cell is double-clicked, or when 
-     * {@link TableView#edit(int, TableColumn)} is called. This method will work 
-     * on any {@link TableColumn} instance, regardless of its generic type. 
-     * However, to enable this, a {@link StringConverter} must be provided that will 
-     * convert the given String (from what the user typed in) into an instance 
-     * of type T. This item will then be passed along to the 
+     * {@link TableView#edit(int, javafx.scene.control.TableColumn) } is called. 
+     * This method will work  on any {@link TableColumn} instance, regardless of 
+     * its generic type. However, to enable this, a {@link StringConverter} must 
+     * be provided that will convert the given String (from what the user typed 
+     * in) into an instance of type T. This item will then be passed along to the 
      * {@link TableColumn#onEditCommitProperty()} callback.
      * 
      * @param converter A {@link StringConverter} that can convert the given String 
@@ -109,7 +107,11 @@
      **************************************************************************/
 
     /**
-     * Creates a default TextFieldTableCell with a null converter.
+     * Creates a default TextFieldTableCell with a null converter. Without a 
+     * {@link StringConverter} specified, this cell will not be able to accept
+     * input from the TextField (as it will not know how to convert this back
+     * to the domain object). It is therefore strongly encouraged to not use
+     * this constructor unless you intend to set the converter separately.
      */
     public TextFieldTableCell() { 
         this(null);
@@ -124,7 +126,7 @@
      * instance of type T. This item will then be passed along to the 
      * {@link TableColumn#onEditCommitProperty()} callback.
      * 
-     * @param onCommit A {@link StringConverter<T> converter} that can convert 
+     * @param converter A {@link StringConverter converter} that can convert 
      *      the given String (from what the user typed in) into an instance of 
      *      type T.
      */
--- a/javafx-ui-controls/src/javafx/scene/control/cell/TextFieldTreeCell.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/TextFieldTreeCell.java	Mon Jul 09 13:16:34 2012 -0700
@@ -42,7 +42,7 @@
  * being edited, and as a TextField when in editing mode. The TextField will, by 
  * default, stretch to fill the entire tree cell.
  * 
- * @param <T> The type of the elements contained within the ListView.
+ * @param <T> The type of the elements contained within the TreeView.
  */
 public class TextFieldTreeCell<T> extends TreeCell<T> {
     
@@ -54,7 +54,8 @@
     
     /**
      * Provides a {@link TextField} that allows editing of the cell content when 
-     * the cell is double-clicked, or when {@link ListView#edit(int)} is called. 
+     * the cell is double-clicked, or when 
+     * {@link TreeView#edit(javafx.scene.control.TreeItem)} is called. 
      * This method will only work on {@link TreeView} instances which are of 
      * type String.
      * 
@@ -111,7 +112,11 @@
      **************************************************************************/
     
     /**
-     * Creates a default TextFieldTreeCell with a null converter.
+     * Creates a default TextFieldTreeCell with a null converter. Without a 
+     * {@link StringConverter} specified, this cell will not be able to accept
+     * input from the TextField (as it will not know how to convert this back
+     * to the domain object). It is therefore strongly encouraged to not use
+     * this constructor unless you intend to set the converter separately.
      */
     public TextFieldTreeCell() { 
         this(null);
@@ -126,7 +131,7 @@
      * instance of type T. This item will then be passed along to the 
      * {@link TreeView#onEditCommitProperty()} callback.
      * 
-     * @param onCommit A {@link StringConverter<T> converter} that can convert 
+     * @param converter A {@link StringConverter converter} that can convert 
      *      the given String (from what the user typed in) into an instance of 
      *      type T.
      */
--- a/javafx-ui-controls/test/javafx/scene/control/SplitPaneTest.java	Thu Jul 05 12:13:20 2012 -0700
+++ b/javafx-ui-controls/test/javafx/scene/control/SplitPaneTest.java	Mon Jul 09 13:16:34 2012 -0700
@@ -9,6 +9,7 @@
 import com.sun.javafx.pgstub.StubToolkit;
 import com.sun.javafx.scene.control.skin.SplitPaneSkin;
 import com.sun.javafx.tk.Toolkit;
+import javafx.application.Platform;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleDoubleProperty;
@@ -318,7 +319,7 @@
         assertEquals(0, spCenter.getLayoutBounds().getWidth(), 1e-100);
         assertEquals(190, spRight.getLayoutBounds().getWidth(), 1e-100);
     }
-
+        
     @Test public void twoDividersHaveTheDifferentPositions() {
         StackPane spLeft = new StackPane();
         StackPane spCenter = new StackPane();
@@ -1168,4 +1169,117 @@
         assertEquals(29, spCenter.getLayoutBounds().getHeight(), 1e-100);
         assertEquals(29, spRight.getLayoutBounds().getHeight(), 1e-100);
     }    
+    
+    @Test public void positionDividersWithANonResizablePanel_RT22929() {
+        StackPane spLeft = new StackPane();
+        StackPane spCenter = new StackPane();
+        StackPane spRight = new StackPane();
+
+        spRight.setMinWidth(20);
+        spRight.setPrefWidth(20);
+        spRight.setMaxWidth(30);
+
+        splitPane.setDividerPosition(0, 0.50);
+        splitPane.setDividerPosition(1, 0.50);
+        splitPane.getItems().addAll(spLeft, spCenter, spRight);
+
+        root.setPrefSize(100, 100);
+        root.getChildren().add(splitPane);
+        show();
+
+        root.impl_reapplyCSS();
+        root.autosize();
+        root.layout();
+
+        double w = 98; // The width minus the insets.
+        double pos[] = splitPane.getDividerPositions();
+        double p0 = convertDividerPostionToAbsolutePostion(pos[0], w);
+        double p1 = convertDividerPostionToAbsolutePostion(pos[1], w);
+
+        assertEquals(46, p0, 1e-100);
+        assertEquals(62, p1, 1e-100);
+        assertEquals(46, spLeft.getLayoutBounds().getWidth(), 1e-100);
+        assertEquals(10, spCenter.getLayoutBounds().getWidth(), 1e-100);
+        assertEquals(30, spRight.getLayoutBounds().getWidth(), 1e-100);       
+        
+        splitPane.setDividerPosition(0, 0.20);        
+        
+        pos = splitPane.getDividerPositions();
+        p0 = convertDividerPostionToAbsolutePostion(pos[0], w);
+        p1 = convertDividerPostionToAbsolutePostion(pos[1], w);       
+        assertEquals(17, p0, 1e-100);
+        assertEquals(62, p1, 1e-100);
+        
+        splitPane.setDividerPosition(1, 0.25);
+                
+        pos = splitPane.getDividerPositions();
+        p0 = convertDividerPostionToAbsolutePostion(pos[0], w);
+        p1 = convertDividerPostionToAbsolutePostion(pos[1], w);       
+        assertEquals(17, p0, 1e-100);
+        assertEquals(62, p1, 1e-100);
+    }
+    
+    @Test public void threeDividersHaveTheSamePosition() {
+        StackPane sp1 = new StackPane();
+        StackPane sp2 = new StackPane();
+        StackPane sp3 = new StackPane();
+        StackPane sp4 = new StackPane();
+
+        splitPane.getItems().addAll(sp1, sp2, sp3, sp4);
+
+        root.setPrefSize(400, 400);
+        root.getChildren().add(splitPane);
+        show();
+
+        root.impl_reapplyCSS();
+        root.autosize();
+        root.layout();
+
+        double w = 398; // The width minus the insets.
+        double pos[] = splitPane.getDividerPositions();
+        double p0 = convertDividerPostionToAbsolutePostion(pos[0], w);
+        double p1 = convertDividerPostionToAbsolutePostion(pos[1], w);
+        double p2 = convertDividerPostionToAbsolutePostion(pos[2], w);
+
+        assertEquals(190, p0, 1e-100);
+        assertEquals(196, p1, 1e-100);
+        assertEquals(202, p2, 1e-100);
+        assertEquals(190, sp1.getLayoutBounds().getWidth(), 1e-100);
+        assertEquals(0, sp2.getLayoutBounds().getWidth(), 1e-100);
+        assertEquals(0, sp3.getLayoutBounds().getWidth(), 1e-100);
+        assertEquals(190, sp4.getLayoutBounds().getWidth(), 1e-100);
+    }    
+    
+    @Test public void addItemsInRunLater_RT23063() {
+        final SplitPane sp = new SplitPane();
+        Stage st = new Stage();
+        st.setScene(new Scene(sp, 2000, 2000));
+        st.show();
+           
+        Runnable runnable = new Runnable() {
+            @Override
+            public void run() {
+                StackPane rightsp = new StackPane();
+                Label right = new Label("right");
+                rightsp.getChildren().add(right);
+                
+                StackPane leftsp = new StackPane();
+                Label left = new Label("left");
+                leftsp.getChildren().add(left);
+                
+                sp.getItems().addAll(rightsp, leftsp);
+            }
+        };
+        Platform.runLater(runnable);
+                        
+        sp.impl_reapplyCSS();
+        sp.resize(400, 400);
+        sp.layout();
+        
+        assertEquals(1, sp.getDividerPositions().length);
+        
+        double pos[] = sp.getDividerPositions();
+        double p0 = convertDividerPostionToAbsolutePostion(pos[0], 398);
+        assertEquals(196, p0, 1e-100);        
+    }    
 }