changeset 1244:b2064c0c3ba3

RT-22038: HelloTableView layout problem
author jgiles
date Tue, 05 Jun 2012 14:56:30 +1200
parents 32f6a7948935
children 12c454b407e2
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableCellSkin.java
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableCellSkin.java	Tue Jun 05 12:23:15 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableCellSkin.java	Tue Jun 05 14:56:30 2012 +1200
@@ -30,6 +30,7 @@
 import javafx.scene.control.TableCell;
 
 import com.sun.javafx.scene.control.behavior.TableCellBehavior;
+import javafx.scene.shape.Rectangle;
 
 /**
  */
@@ -51,10 +52,17 @@
     
     private WeakInvalidationListener weakColumnWidthListener =
             new WeakInvalidationListener(columnWidthListener);
-
+    
     public TableCellSkin(TableCell control) {
         super(control, new TableCellBehavior(control));
         
+        // RT-22038
+        Rectangle clip = new Rectangle();
+        clip.widthProperty().bind(widthProperty());
+        clip.heightProperty().bind(heightProperty());
+        setClip(clip);
+        // --- end of RT-22038
+        
         if (getSkinnable().getTableColumn() != null) {
             getSkinnable().getTableColumn().widthProperty().addListener(
                 new WeakInvalidationListener(weakColumnWidthListener));