changeset 6973:abc855ae09c0 8u20-b13

RT-36334: Clean up warnings in control component Contributed-by: Tom Schindl <tom.schindl@bestsolution.at> Reviewed-by: jgiles
author jgiles
date Mon, 05 May 2014 10:06:16 +1200
parents e4d920161c61
children 98fc97b79c74 8a32fefcbfca c4ca4ff6f858
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/AccordionSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/BehaviorSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CellSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ChoiceBoxSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPickerSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxBaseSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxPopupControl.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CustomColorDialog.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DatePickerContent.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DoubleFieldSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/FXVKSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/InputFieldSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/IntegerFieldSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabelSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledText.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ListViewSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuBarSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuButtonSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuButtonSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/PaginationSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressBarSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressIndicatorSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/RadioButtonSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollBarSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SeparatorSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SliderSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SplitMenuButtonSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SplitPaneSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TabPaneSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableCellSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableCellSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableColumnHeader.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableHeaderRow.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableRowSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableRowSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableViewSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableViewSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextAreaSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextFieldSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextInputControlSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TitledPaneSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ToggleButtonSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ToolBarSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeCellSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableCellSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableRowSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableViewSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeViewSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualContainerBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualScrollBar.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/WebColorFieldSkin.java modules/controls/src/main/java/javafx/scene/control/Accordion.java modules/controls/src/main/java/javafx/scene/control/Cell.java modules/controls/src/main/java/javafx/scene/control/Control.java modules/controls/src/main/java/javafx/scene/control/DatePicker.java modules/controls/src/main/java/javafx/scene/control/Hyperlink.java modules/controls/src/main/java/javafx/scene/control/Label.java modules/controls/src/main/java/javafx/scene/control/Labeled.java modules/controls/src/main/java/javafx/scene/control/ListView.java modules/controls/src/main/java/javafx/scene/control/MenuBar.java modules/controls/src/main/java/javafx/scene/control/Pagination.java modules/controls/src/main/java/javafx/scene/control/PopupControl.java modules/controls/src/main/java/javafx/scene/control/ProgressBar.java modules/controls/src/main/java/javafx/scene/control/ProgressIndicator.java modules/controls/src/main/java/javafx/scene/control/RadioButton.java modules/controls/src/main/java/javafx/scene/control/ScrollBar.java modules/controls/src/main/java/javafx/scene/control/ScrollPane.java modules/controls/src/main/java/javafx/scene/control/Separator.java modules/controls/src/main/java/javafx/scene/control/Slider.java modules/controls/src/main/java/javafx/scene/control/SplitPane.java modules/controls/src/main/java/javafx/scene/control/TabPane.java modules/controls/src/main/java/javafx/scene/control/TextArea.java modules/controls/src/main/java/javafx/scene/control/TextField.java modules/controls/src/main/java/javafx/scene/control/TextInputControl.java modules/controls/src/main/java/javafx/scene/control/TitledPane.java modules/controls/src/main/java/javafx/scene/control/ToggleButton.java modules/controls/src/main/java/javafx/scene/control/ToolBar.java modules/controls/src/main/java/javafx/scene/control/Tooltip.java modules/controls/src/main/java/javafx/scene/control/TreeTableView.java modules/controls/src/main/java/javafx/scene/control/TreeView.java modules/controls/src/main/java/javafx/scene/control/cell/CellUtils.java modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxListCell.java modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxTableCell.java modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxTreeCell.java modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxTreeTableCell.java modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxListCell.java modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxTableCell.java modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxTreeCell.java modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxTreeTableCell.java modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxListCell.java modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxTableCell.java modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxTreeCell.java modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxTreeTableCell.java modules/controls/src/main/java/javafx/scene/control/cell/ProgressBarTableCell.java modules/controls/src/main/java/javafx/scene/control/cell/ProgressBarTreeTableCell.java modules/controls/src/main/java/javafx/scene/control/cell/PropertyValueFactory.java modules/controls/src/main/java/javafx/scene/control/cell/TreeItemPropertyValueFactory.java
diffstat 102 files changed, 1478 insertions(+), 1487 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/AccordionSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/AccordionSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -26,7 +26,6 @@
 package com.sun.javafx.scene.control.skin;
 
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.ListChangeListener;
 import javafx.scene.Node;
 import javafx.scene.control.Accordion;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/BehaviorSkinBase.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/BehaviorSkinBase.java	Mon May 05 10:06:16 2014 +1200
@@ -34,7 +34,6 @@
 import javafx.scene.control.SkinBase;
 import javafx.scene.input.ContextMenuEvent;
 import javafx.scene.input.MouseEvent;
-import javafx.util.Callback;
 import com.sun.javafx.scene.control.MultiplePropertyChangeListenerHandler;
 import com.sun.javafx.scene.control.behavior.BehaviorBase;
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CellSkinBase.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CellSkinBase.java	Mon May 05 10:06:16 2014 +1200
@@ -30,18 +30,19 @@
 import java.util.List;
 
 import com.sun.javafx.scene.control.behavior.BehaviorBase;
+
 import javafx.scene.control.Cell;
-
 import javafx.css.StyleableDoubleProperty;
 import javafx.css.CssMetaData;
 import javafx.css.StyleOrigin;
+
 import com.sun.javafx.css.converters.SizeConverter;
-import com.sun.javafx.scene.control.behavior.CellBehaviorBase;
+
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.ReadOnlyDoubleProperty;
+import javafx.beans.value.WritableValue;
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
-import javafx.scene.control.IndexedCell;
 import javafx.scene.control.SkinBase;
 
 
@@ -145,7 +146,7 @@
             @Override
             public StyleableProperty<Number> getStyleableProperty(Cell<?> n) {
                 final CellSkinBase<?,?> skin = (CellSkinBase<?,?>) n.getSkin();
-                return (StyleableProperty<Number>)skin.cellSizePropertyImpl();
+                return (StyleableProperty<Number>)(WritableValue<Number>)skin.cellSizePropertyImpl();
             }
         };
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ChoiceBoxSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ChoiceBoxSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -27,14 +27,8 @@
 
 import javafx.util.StringConverter;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.event.Event;
-import javafx.event.EventHandler;
 import javafx.geometry.HPos;
 import javafx.geometry.Side;
 import javafx.geometry.VPos;
@@ -57,7 +51,7 @@
 /**
  * ChoiceBoxSkin - default implementation
  */
-    public class ChoiceBoxSkin<T> extends BehaviorSkinBase<ChoiceBox<T>, ChoiceBoxBehavior<T>> {
+public class ChoiceBoxSkin<T> extends BehaviorSkinBase<ChoiceBox<T>, ChoiceBoxBehavior<T>> {
 
     public ChoiceBoxSkin(ChoiceBox<T> control) {
         super(control, new ChoiceBoxBehavior<T>(control));
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPickerSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPickerSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -26,31 +26,37 @@
 package com.sun.javafx.scene.control.skin;
 
 import com.sun.javafx.css.StyleManager;
+
 import javafx.beans.property.StringProperty;
 import javafx.css.StyleOrigin;
 import javafx.css.StyleableBooleanProperty;
 import javafx.css.CssMetaData;
+
 import com.sun.javafx.css.converters.BooleanConverter;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
+
 import javafx.css.StyleableDoubleProperty;
 import javafx.css.StyleableStringProperty;
 import javafx.geometry.Pos;
 import javafx.scene.Node;
-import javafx.event.EventHandler;
 import javafx.scene.image.ImageView;
-import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.StackPane;
 import javafx.scene.shape.Rectangle;
+
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.css.converters.StringConverter;
 import com.sun.javafx.scene.control.behavior.ColorPickerBehavior;
+
 import java.util.HashMap;
 import java.util.Map;
+
 import javafx.scene.control.ColorPicker;
 import javafx.beans.property.BooleanProperty;
+import javafx.beans.value.WritableValue;
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
 import javafx.event.ActionEvent;
@@ -552,7 +558,7 @@
             
             @Override public StyleableProperty<Boolean> getStyleableProperty(ColorPicker n) {
                 final ColorPickerSkin skin = (ColorPickerSkin) n.getSkin();
-                return (StyleableProperty<Boolean>)skin.colorLabelVisible;
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)skin.colorLabelVisible;
             }
         };
         private static final CssMetaData<ColorPicker,Number> COLOR_RECT_WIDTH =
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxBaseSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxBaseSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -26,9 +26,6 @@
 package com.sun.javafx.scene.control.skin;
 
 import com.sun.javafx.scene.control.behavior.ComboBoxBaseBehavior;
-import javafx.beans.InvalidationListener;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.geometry.HPos;
 import javafx.geometry.VPos;
 import javafx.scene.Node;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxPopupControl.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxPopupControl.java	Mon May 05 10:06:16 2014 +1200
@@ -30,9 +30,6 @@
 import javafx.scene.control.*;
 import com.sun.javafx.scene.control.behavior.ComboBoxBaseBehavior;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
-import javafx.event.Event;
-import javafx.event.EventHandler;
 import javafx.scene.Node;
 import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.Region;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java	Mon May 05 10:06:16 2014 +1200
@@ -31,13 +31,11 @@
 package com.sun.javafx.scene.control.skin;
 
 import com.sun.javafx.scene.control.MultiplePropertyChangeListenerHandler;
-import com.sun.javafx.scene.control.behavior.TextBinding;
 import com.sun.javafx.scene.control.behavior.TwoLevelFocusPopupBehavior;
 import javafx.animation.Animation.Status;
 import javafx.animation.KeyFrame;
 import javafx.animation.Timeline;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.WeakInvalidationListener;
 import javafx.beans.property.ReadOnlyBooleanProperty;
 import javafx.beans.value.ChangeListener;
@@ -48,7 +46,6 @@
 import javafx.css.PseudoClass;
 import javafx.css.Styleable;
 import javafx.event.ActionEvent;
-import javafx.event.Event;
 import javafx.event.EventHandler;
 import javafx.geometry.*;
 import javafx.scene.Node;
@@ -64,7 +61,6 @@
 import javafx.scene.layout.StackPane;
 import javafx.scene.layout.VBox;
 import javafx.scene.shape.Rectangle;
-import javafx.util.Callback;
 import javafx.util.Duration;
 
 import java.util.ArrayList;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -25,8 +25,6 @@
 
 package com.sun.javafx.scene.control.skin;
 
-import javafx.application.ConditionalFeature;
-import javafx.application.Platform;
 import javafx.event.Event;
 import javafx.event.EventHandler;
 import javafx.scene.Node;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CustomColorDialog.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CustomColorDialog.java	Mon May 05 10:06:16 2014 +1200
@@ -28,9 +28,6 @@
 import javafx.beans.InvalidationListener;
 import javafx.beans.Observable;
 import javafx.beans.property.*;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.scene.Scene;
 import javafx.scene.control.*;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DatePickerContent.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DatePickerContent.java	Mon May 05 10:06:16 2014 +1200
@@ -45,16 +45,12 @@
 import javafx.application.Platform;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleObjectProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.scene.Node;
 import javafx.scene.control.Button;
 import javafx.scene.control.DatePicker;
 import javafx.scene.control.DateCell;
 import javafx.scene.control.Label;
-import javafx.scene.input.KeyCode;
 import javafx.scene.input.KeyEvent;
 import javafx.scene.input.MouseButton;
 import javafx.scene.input.MouseEvent;
@@ -66,7 +62,6 @@
 import javafx.scene.layout.StackPane;
 
 import com.sun.javafx.scene.control.skin.resources.ControlResources;
-import com.sun.javafx.scene.traversal.Direction;
 
 import static com.sun.javafx.PlatformUtil.*;
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DoubleFieldSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DoubleFieldSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -27,7 +27,6 @@
 
 import javafx.application.Platform;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.scene.Node;
 
 /**
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/FXVKSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/FXVKSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -35,7 +35,6 @@
 import javafx.beans.Observable;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.SimpleDoubleProperty;
-import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.event.EventTarget;
 import javafx.geometry.Bounds;
@@ -68,7 +67,6 @@
 import java.util.List;
 import java.util.Locale;
 import java.util.HashMap;
-import com.sun.javafx.css.StyleManager;
 import com.sun.javafx.scene.control.behavior.BehaviorBase;
 import static javafx.scene.input.MouseEvent.MOUSE_PRESSED;
 import static javafx.scene.input.TouchEvent.TOUCH_PRESSED;
@@ -475,7 +473,7 @@
     }
 
     public FXVKSkin(final FXVK fxvk) {
-        super(fxvk, new BehaviorBase<>(fxvk, Collections.EMPTY_LIST));
+        super(fxvk, new BehaviorBase<>(fxvk, Collections.emptyList()));
         this.fxvk = fxvk;
         if (fxvk == FXVK.vk) {
             primaryVK = fxvk;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/InputFieldSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/InputFieldSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -27,7 +27,6 @@
 
 import com.sun.javafx.event.EventDispatchChainImpl;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.event.EventDispatchChain;
 import javafx.scene.Node;
 import javafx.scene.control.Skin;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/IntegerFieldSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/IntegerFieldSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -27,7 +27,6 @@
 
 import javafx.application.Platform;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.scene.Node;
 
 /**
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabelSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabelSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -25,9 +25,6 @@
 
 package com.sun.javafx.scene.control.skin;
 
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.scene.Node;
 import javafx.scene.control.Label;
 import java.util.Collections;
 import com.sun.javafx.scene.control.behavior.BehaviorBase;
@@ -39,7 +36,7 @@
 public class LabelSkin extends LabeledSkinBase<Label, BehaviorBase<Label>> {
 
     public LabelSkin(final Label label) {
-        super(label, new BehaviorBase<>(label, Collections.EMPTY_LIST));
+        super(label, new BehaviorBase<>(label, Collections.emptyList()));
 
         // Labels do not block the mouse by default, unlike most other UI Controls.
         consumeMouseEvents(false);
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledSkinBase.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledSkinBase.java	Mon May 05 10:06:16 2014 +1200
@@ -1,1131 +1,1129 @@
-/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.javafx.scene.control.skin;
-
-import javafx.application.Platform;
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
-import javafx.geometry.HPos;
-import javafx.geometry.NodeOrientation;
-import javafx.geometry.Orientation;
-import javafx.geometry.Pos;
-import javafx.geometry.VPos;
-import javafx.scene.Node;
-import javafx.scene.Parent;
-import javafx.scene.Scene;
-import javafx.scene.accessibility.Attribute;
-import javafx.scene.control.ContentDisplay;
-import javafx.scene.control.Control;
-import javafx.scene.control.Label;
-import javafx.scene.control.Labeled;
-import javafx.scene.control.OverrunStyle;
-import javafx.scene.input.KeyCombination;
-import javafx.scene.input.Mnemonic;
-import javafx.scene.shape.Line;
-import javafx.scene.shape.Rectangle;
-import javafx.scene.text.Font;
-
-import com.sun.javafx.scene.control.behavior.BehaviorBase;
-import com.sun.javafx.scene.control.behavior.TextBinding;
-
-import static javafx.scene.control.ContentDisplay.*;
-import static javafx.scene.control.OverrunStyle.*;
-import javafx.scene.image.ImageView;
-
-public abstract class LabeledSkinBase<C extends Labeled, B extends BehaviorBase<C>> extends BehaviorSkinBase<C, B> {
-
-    /**
-     *  The Text node used to display the text. This is package only
-     *  for the sake of testing!
-     */
-    LabeledText text;
-
-    /**
-     * Indicates that the text content is invalid and needs to be updated.
-     * This is package private only for the sake of testing.
-     */
-    boolean invalidText = true;
-
-    /**
-     * A reference to the last-known graphic on the Labeled. This reference
-     * is kept so that we can remove listeners from the old graphic later
-     */
-    Node graphic;
-
-    /**
-     * The cached full width of the non-truncated text. We only want to
-     * recompute this if the text has itself changed, or if the font has changed.
-     * This is package private ONLY FOR THE SAKE OF TESTING
-     */
-    double textWidth = Double.NEGATIVE_INFINITY;
-
-    /**
-     * The cached width of the ellipsis string. This will be recomputed
-     * if the font or the ellipsisString property have changed.
-     * This is package private ONLY FOR THE SAKE OF TESTING
-     */
-    double ellipsisWidth = Double.NEGATIVE_INFINITY;
-
-    /**
-     * A listener which is applied to the graphic whenever the graphic is set
-     * and is visible within the labeled. For example, if there is a graphic
-     * defined on the Labeled but the ContentDisplay is set to TEXT_ONLY, then
-     * we will not bother installing this listener on the graphic. In all
-     * other cases, if the graphic is defined, it will have this listener
-     * added to it, which ensures that if the graphic's layout bounds change,
-     * we end up performing a layout and potentially update the visible text.
-     *
-     * This is package private ONLY FOR THE SAKE OF TESTING
-     */
-    final InvalidationListener graphicPropertyChangedListener = valueModel -> {
-        invalidText = true;
-        getSkinnable().requestLayout();
-    };
-
-    private Rectangle textClip;
-    private double wrapWidth;
-    private double wrapHeight;
-
-
-    /**
-     * Constructor for LabeledSkinBase. The Labeled must be specified, and cannot be null.
-     * At the conclusion of the constructor call, the skin will be marked as
-     * needsLayout, and will be fully configured based on the current state of
-     * the labeled. Any subsequent changes to the Labeled will be handled via
-     * listeners and applied appropriately.
-     *
-     * @param labeled
-     */
-    public LabeledSkinBase(final C labeled, final B behavior) {
-        super(labeled, behavior);
-
-        // Configure the Text node with all of the attributes from the
-        // Labeled which apply to it.
-        text = new LabeledText(labeled);
-        
-        updateChildren();
-
-        // Labels do not block the mouse by default, unlike most other UI Controls.
-        //consumeMouseEvents(false);
-
-        // Register listeners
-        registerChangeListener(labeled.ellipsisStringProperty(), "ELLIPSIS_STRING");
-        registerChangeListener(labeled.widthProperty(), "WIDTH");
-        registerChangeListener(labeled.heightProperty(), "HEIGHT");
-        registerChangeListener(labeled.textFillProperty(), "TEXT_FILL");
-        registerChangeListener(labeled.fontProperty(), "FONT");
-        registerChangeListener(labeled.graphicProperty(), "GRAPHIC");
-        registerChangeListener(labeled.contentDisplayProperty(), "CONTENT_DISPLAY");
-        registerChangeListener(labeled.labelPaddingProperty(), "LABEL_PADDING");
-        registerChangeListener(labeled.graphicTextGapProperty(), "GRAPHIC_TEXT_GAP");
-        registerChangeListener(labeled.alignmentProperty(), "ALIGNMENT");
-        registerChangeListener(labeled.mnemonicParsingProperty(), "MNEMONIC_PARSING");
-        registerChangeListener(labeled.textProperty(), "TEXT");
-        registerChangeListener(labeled.textAlignmentProperty(), "TEXT_ALIGNMENT");
-        registerChangeListener(labeled.textOverrunProperty(), "TEXT_OVERRUN");
-        registerChangeListener(labeled.wrapTextProperty(), "WRAP_TEXT");
-        registerChangeListener(labeled.underlineProperty(), "UNDERLINE");
-        registerChangeListener(labeled.lineSpacingProperty(), "LINE_SPACING");
-        registerChangeListener(labeled.sceneProperty(), "SCENE");
-    }
-
-    /***************************************************************************
-     *                                                                         *
-     * Control State Changes                                                   *
-     *                                                                         *
-     **************************************************************************/
-
-    @Override protected void handleControlPropertyChanged(String p) {
-        super.handleControlPropertyChanged(p);
-        /*
-         * There are basically 2 things to worry about in each of these handlers
-         *  1) Update the Text node
-         *  2) Have the text metrics changed?
-         *
-         * If the metrics have changed, we need to request a layout and invalidate
-         * the text so that we recompute the display text on next read.
-         */
-        if ("WIDTH".equals(p)) {
-            updateWrappingWidth();
-            invalidText = true;
-            // No requestLayout() because Control will force a layout
-        } else if ("HEIGHT".equals(p)) {
-            invalidText = true;
-            // No requestLayout() because Control will force a layout
-        } else if ("FONT".equals(p)) {
-            textMetricsChanged();
-            invalidateWidths();
-            ellipsisWidth = Double.NEGATIVE_INFINITY;
-        } else if ("GRAPHIC".equals(p)) {
-            updateChildren();
-            textMetricsChanged();
-        } else if ("CONTENT_DISPLAY".equals(p)) {
-            updateChildren();
-            textMetricsChanged();
-        } else if ("LABEL_PADDING".equals(p)) {
-            textMetricsChanged();
-        } else if ("GRAPHIC_TEXT_GAP".equals(p)) {
-            textMetricsChanged();
-        } else if ("ALIGNMENT".equals(p)) {
-            // Doesn't involve text metrics because if the text is too long, then
-            // it will already have fit all available width and a change to hpos
-            // has no effect. Or it is too short (i.e. it all fits) and we don't
-            // have to worry about truncation. So just call request layout.
-            // Doesn't involve text metrics because if the text is too long, then
-            // it will already have fit all available height and a change to vpos
-            // has no effect. Or it is too short (i.e. it all fits) and we don't
-            // have to worry about truncation. So just call request layout.
-            getSkinnable().requestLayout();
-        } else if ("MNEMONIC_PARSING".equals(p)) {
-            containsMnemonic = false;
-            textMetricsChanged();
-        } else if ("TEXT".equals(p)) {
-            updateChildren();
-            textMetricsChanged();
-            invalidateWidths();
-        } else if ("TEXT_ALIGNMENT".equals(p)) {
-            // NO-OP
-        } else if ("TEXT_OVERRUN".equals(p)) {
-            textMetricsChanged();
-        } else if ("ELLIPSIS_STRING".equals(p)) {
-            textMetricsChanged();
-            invalidateWidths();
-            ellipsisWidth = Double.NEGATIVE_INFINITY;
-        } else if ("WRAP_TEXT".equals(p)) {
-            updateWrappingWidth();
-            textMetricsChanged();
-        } else if ("UNDERLINE".equals(p)) {
-            textMetricsChanged();
-        } else if ("LINE_SPACING".equals(p)) {
-            textMetricsChanged();
-        } else if ("SCENE".equals(p)) {
-            sceneChanged();
-        }
-    }
-
-    protected double topLabelPadding() { // TODOJASPER remove these if you can
-        return snapSize(getSkinnable().getLabelPadding().getTop());
-    }
-
-    protected double bottomLabelPadding() {
-        return snapSize(getSkinnable().getLabelPadding().getBottom());
-    }
-
-    protected double leftLabelPadding() {
-        return snapSize(getSkinnable().getLabelPadding().getLeft());
-    }
-
-    protected double rightLabelPadding() {
-        return snapSize(getSkinnable().getLabelPadding().getRight());
-    }
-
-
-    /**
-     * Called whenever some state has changed that affects the text metrics.
-     * Changes here will involve invalidating the display text so the next
-     * call to updateDisplayedText computes a new value, and call requestLayout.
-     */
-    private void textMetricsChanged() {
-        invalidText = true;
-        getSkinnable().requestLayout();
-    }
-
-    /*
-    ** The Label is a mnemonic, and it's target node
-    ** has changed, but it's label hasn't so just
-    ** swap them over, and tidy up.
-    */
-    protected void mnemonicTargetChanged() {
-        if (containsMnemonic == true) {
-            /*
-            ** was there previously a labelFor  
-            */
-            removeMnemonic();
-
-            /*
-            ** is there a new labelFor
-            */
-            Control control = getSkinnable();
-            if (control instanceof Label) {
-                labeledNode = ((Label)control).getLabelFor();
-                addMnemonic();
-            }
-            else {
-                labeledNode = null;
-            }
-        }
-    }
-
-    private void sceneChanged() {
-        final Labeled labeled = getSkinnable();
-        Scene scene = labeled.getScene();
-
-        if (scene != null && containsMnemonic) {
-            addMnemonic();
-        }
-
-    }
-
-    /**
-     * Marks minWidth as being invalid and in need of recomputation.
-     */
-    private void invalidateWidths() {
-        textWidth = Double.NEGATIVE_INFINITY;
-    }
-
-    /**
-     * Updates the content of the underlying Text node. This method should
-     * only be called when necessary. If the invalidText flag is not set, then
-     * the method is a no-op. This care is taken because recomputing the
-     * text to display is an expensive operation. Package private ONLY FOR THE
-     * SAKE OF TESTING.
-     */
-    void updateDisplayedText() {
-        updateDisplayedText(-1, -1);
-    }
-
-    private void updateDisplayedText(double w, double h) {
-        if (invalidText) {
-            final Labeled labeled = getSkinnable();
-            String s = labeled.getText();
-
-            int mnemonicIndex = -1;
-
-            /*
-            ** if there's a valid string then parse it
-            */
-            if (s != null && s.length() > 0) {
-                bindings = new TextBinding(s);
-
-                if (!com.sun.javafx.PlatformUtil.isMac() && getSkinnable().isMnemonicParsing() == true) {
-                    /*
-                    ** the Labeled has a MnemonicParsing property,
-                    ** if set true, then auto-parsing will check for
-                    ** a mnemonic
-                    */
-                    if (labeled instanceof Label) {
-                        // buttons etc
-                        labeledNode = ((Label)labeled).getLabelFor();
-                    } else {
-                        labeledNode = labeled;
-                    }
-
-                    if (labeledNode == null) {
-                        labeledNode = labeled;
-                    }
-                    mnemonicIndex = bindings.getMnemonicIndex() ;
-                }
-            }
-
-            /*
-            ** we were previously a mnemonic
-            */
-            if (containsMnemonic) {
-                /*
-                ** are we no longer a mnemonic, or have we changed code?
-                */
-                if (mnemonicScene != null) {
-                    if (mnemonicIndex == -1 ||
-                            (bindings != null && !bindings.getMnemonicKeyCombination().equals(mnemonicCode))) {
-                        removeMnemonic();
-                    }
-                    containsMnemonic = false;
-                }
-            }
-            else {
-                /*
-                ** this can happen if mnemonic parsing is
-                ** disabled on a previously valid mnemonic
-                */
-                removeMnemonic();
-            }
-
-            /*
-            ** check we have a labeled
-            */
-            if (s != null && s.length() > 0) {
-                if (mnemonicIndex >= 0 && containsMnemonic == false) {
-                    containsMnemonic = true;
-                    mnemonicCode = bindings.getMnemonicKeyCombination();
-                    addMnemonic();
-                }
-            }
-
-            if (containsMnemonic == true) {
-                s = bindings.getText();
-                if (mnemonic_underscore == null) {
-                    mnemonic_underscore = new Line();
-                    mnemonic_underscore.setStartX(0.0f);
-                    mnemonic_underscore.setStartY(0.0f);
-                    mnemonic_underscore.setEndY(0.0f);
-                    mnemonic_underscore.getStyleClass().clear();
-                    mnemonic_underscore.getStyleClass().setAll("mnemonic-underline");
-                }
-                if (!getChildren().contains(mnemonic_underscore)) {
-                    getChildren().add(mnemonic_underscore);
-                }
-            } else {
-                /*
-                ** we don't need a mnemonic....
-                */
-                if (getSkinnable().isMnemonicParsing() == true && com.sun.javafx.PlatformUtil.isMac() && bindings != null) {
-                    s = bindings.getText();
-                }
-                else {
-                    s = labeled.getText();
-                }
-                if (mnemonic_underscore != null) {
-                    if (getChildren().contains(mnemonic_underscore)) {
-                        Platform.runLater(() -> {
-                              getChildren().remove(mnemonic_underscore);
-                              mnemonic_underscore = null;
-                        });
-                    }
-                }
-            }
-
-            int len = s != null ? s.length() : 0;
-            boolean multiline = false;
-
-            if (s != null && len > 0) {
-                int i = s.indexOf('\n');
-                if (i > -1 && i < len - 1) {
-                    // Multiline text with embedded newlines - not
-                    // taking into account a potential trailing newline.
-                    multiline = true;
-                }
-            }
-
-            String result;
-            boolean horizontalPosition =
-                    (labeled.getContentDisplay() == ContentDisplay.LEFT ||
-                    labeled.getContentDisplay() == ContentDisplay.RIGHT);
-
-            double availableWidth = labeled.getWidth() - snappedLeftInset() - leftLabelPadding() -
-                                    snappedRightInset() - rightLabelPadding();
-            availableWidth = Math.max(availableWidth, 0);
-
-            if (w == -1) {
-                w = availableWidth;
-            }
-            double minW = Math.min(computeMinLabeledPartWidth(-1, snappedTopInset() , snappedRightInset(), snappedBottomInset(), snappedLeftInset()), availableWidth);
-            if (horizontalPosition && !isIgnoreGraphic()) {
-                double graphicW = (labeled.getGraphic().getLayoutBounds().getWidth() + labeled.getGraphicTextGap());
-                w -= graphicW;
-                minW -= graphicW;
-            }
-            wrapWidth = Math.max(minW, w);
-
-            boolean verticalPosition =
-                    (labeled.getContentDisplay() == ContentDisplay.TOP ||
-                    labeled.getContentDisplay() == ContentDisplay.BOTTOM);
-
-            double availableHeight = labeled.getHeight() - snappedTopInset() - topLabelPadding() -
-                                     snappedBottomInset() - bottomLabelPadding();
-            availableHeight = Math.max(availableHeight, 0);
-
-            if (h == -1) {
-                h = availableHeight;
-            }
-            double minH = Math.min(computeMinLabeledPartHeight(wrapWidth, snappedTopInset() , snappedRightInset(), snappedBottomInset(), snappedLeftInset()), availableHeight);
-            if (verticalPosition && labeled.getGraphic() != null) {
-                double graphicH = labeled.getGraphic().getLayoutBounds().getHeight() + labeled.getGraphicTextGap();
-                h -= graphicH;
-                minH -= graphicH;
-            }
-            wrapHeight = Math.max(minH, h);
-
-            updateWrappingWidth();
-
-            Font font = text.getFont();
-            OverrunStyle truncationStyle = labeled.getTextOverrun();
-            String ellipsisString = labeled.getEllipsisString();
-
-            if (labeled.isWrapText()) {
-                result = Utils.computeClippedWrappedText(font, s, wrapWidth, wrapHeight, truncationStyle, ellipsisString, text.getBoundsType());
-            } else if (multiline) {
-                StringBuilder sb = new StringBuilder();
-
-                String[] splits = s.split("\n");
-                for (int i = 0; i < splits.length; i++) {
-                    sb.append(Utils.computeClippedText(font, splits[i], wrapWidth, truncationStyle, ellipsisString));
-                    if (i < splits.length - 1) {
-                        sb.append('\n');
-                    }
-                }
-
-                // TODO: Consider what to do in the case where vertical space is
-                // limited and the last visible line isn't already truncated
-                // with a trailing ellipsis. What if the style calls for leading
-                // or center ellipses? We could possibly add an additional
-                // trailing ellipsis to the last visible line, like this:
-
-                // +--------------------------------+
-                // |  This is some long text with multiple lines\n
-                // |  where more than one exceed the|width\n
-                // |  and wrapText is false, and all|lines\n
-                // +--don't fit.--------------------+
-                //
-                // +--------------------------------+
-                // |  This is some...multiple lines |
-                // |  where more t...ceed the width |
-                // |  and wrapText...d all lines... |
-                // +--------------------------------+
-
-                result = sb.toString();
-            } else {
-                result = Utils.computeClippedText(font, s, wrapWidth, truncationStyle, ellipsisString);
-            }
-
-            if (result != null && result.endsWith("\n")) {
-                // Strip ending newline so we don't display another row.
-                result = result.substring(0, result.length() - 1);
-            }
-
-            text.setText(result);
-            updateWrappingWidth();
-            invalidText = false;
-        }
-    }
-
-    private void addMnemonic() {
-        if (labeledNode != null) {
-            mnemonicScene = labeledNode.getScene();
-            if (mnemonicScene != null) {
-                mnemonicScene.addMnemonic(new Mnemonic(labeledNode, mnemonicCode));
-            }
-        }
-    }
-
-
-    private void removeMnemonic() {
-        if (mnemonicScene != null && labeledNode != null) {
-            mnemonicScene.removeMnemonic(new Mnemonic(labeledNode, mnemonicCode));
-            mnemonicScene = null;
-        }
-    }
-
-    /**
-     * Updates the wrapping width of the text node. Although changing the font
-     * does affect the metrics used for text layout, this method does not
-     * call requestLayout or invalidate the text, since it may be called
-     * from the constructor and such work would be duplicative and wasted.
-     */
-    private void updateWrappingWidth() {
-        final Labeled labeled = getSkinnable();
-        text.setWrappingWidth(0);
-        if (labeled.isWrapText()) {
-            // Note that the wrapping width needs to be set to zero before
-            // getting the text's real preferred width.
-            double w = Math.min(text.prefWidth(-1), wrapWidth);
-            text.setWrappingWidth(w);
-        }
-    }
-
-    /**
-     * Updates the children managed by LabeledSkinBase, which can be the Labeled
-     * graphic and/or a Text node. Only those nodes which actually must
-     * be used are used. For example, with a ContentDisplay of
-     * GRAPHIC_ONLY the text node is not added, and with a ContentDisplay
-     * of TEXT_ONLY, the graphic is not added.
-     */
-    protected void updateChildren() {
-        final Labeled labeled = getSkinnable();
-        // Only in some situations do we want to have the graphicPropertyChangedListener
-        // installed. Since updateChildren() is not called much, we'll just remove it always
-        // and reinstall it later if it is necessary to do so.
-        if (graphic != null) {
-            graphic.layoutBoundsProperty().removeListener(graphicPropertyChangedListener);
-        }
-        // Now update the graphic (since it may have changed)
-        graphic = labeled.getGraphic();
-        
-        // RT-19851 Only setMouseTransparent(true) for an ImageView.  This allows the button 
-        // to be picked regardless of the changing images on top of it. 
-        if (graphic instanceof ImageView) {
-            graphic.setMouseTransparent(true);
-        }                
-        
-        // Now update the children (and add the graphicPropertyChangedListener as necessary)
-        if (isIgnoreGraphic()) {
-            if (labeled.getContentDisplay() == ContentDisplay.GRAPHIC_ONLY) {
-                getChildren().clear();
-            } else {
-                getChildren().setAll(text);
-            }
-        } else {
-            graphic.layoutBoundsProperty().addListener(graphicPropertyChangedListener);
-            if (isIgnoreText()) {
-                getChildren().setAll(graphic);
-            } else {
-                getChildren().setAll(graphic, text);
-            }
-        }
-    }
-
-    /**
-     * Gets whether for various computations we can ignore the presence of the graphic
-     * (or lack thereof). 
-     * @return
-     */
-    protected boolean isIgnoreGraphic() {
-        return (graphic == null ||
-                !graphic.isManaged() ||
-                getSkinnable().getContentDisplay() == ContentDisplay.TEXT_ONLY);
-    }
-
-    /**
-     * Gets whether for various computations we can ignore the presence of the text.
-     * @return
-     */
-    protected boolean isIgnoreText() {
-        final Labeled labeled = getSkinnable();
-        final String txt = labeled.getText();
-        return (txt == null ||
-                txt.equals("") ||
-                labeled.getContentDisplay() == ContentDisplay.GRAPHIC_ONLY);
-    }
-
-    /***************************************************************************
-     *                                                                         *
-     * Skin Layout                                                             *
-     *                                                                         *
-     **************************************************************************/
-
-    /**
-     * Compute and return the minimum width of this Labeled. The minimum width is
-     * the smaller of the width of "..." and the width with the actual text.
-     * In this way, if the text width itself is smaller than the ellipsis then
-     * we should use that as the min width, otherwise the ellipsis needs to be the
-     * min width.
-     * <p>
-     * We use the same calculation here regardless of whether we are talking
-     * about a single or multiline labeled. So a multiline labeled may find that
-     * the width of the "..." is as small as it will ever get.
-     */
-    @Override protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
-        return computeMinLabeledPartWidth(height, topInset, rightInset, bottomInset, leftInset);
-    }
-
-    private double computeMinLabeledPartWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
-        // First compute the minTextWidth by checking the width of the string
-        // made by the ellipsis "...", and then by checking the width of the
-        // string made up by labeled.text. We want the smaller of the two.
-        final Labeled labeled = getSkinnable();
-        final ContentDisplay contentDisplay = labeled.getContentDisplay();
-        final double gap = labeled.getGraphicTextGap();
-        double minTextWidth = 0;
-
-        final Font font = text.getFont();
-        OverrunStyle truncationStyle = labeled.getTextOverrun();
-        String ellipsisString = labeled.getEllipsisString();
-        final String string = labeled.getText();
-        final boolean emptyText = string == null || string.isEmpty();
-
-        if (!emptyText) {
-            // We only want to recompute the full text width if the font or text changed
-            if (truncationStyle == CLIP) {
-                if (textWidth == Double.NEGATIVE_INFINITY) {
-                    // Show at minimum the first character
-                    textWidth = Utils.computeTextWidth(font, string.substring(0, 1), 0);
-                }
-                minTextWidth = textWidth;
-            } else {
-                if (textWidth == Double.NEGATIVE_INFINITY) {
-                    textWidth = Utils.computeTextWidth(font, string, 0);
-                }
-                // We only want to recompute the ellipsis width if the font has changed
-                if (ellipsisWidth == Double.NEGATIVE_INFINITY) {
-                    ellipsisWidth = Utils.computeTextWidth(font, ellipsisString, 0);
-                }
-                minTextWidth = Math.min(textWidth, ellipsisWidth);
-            }
-        }
-
-        // Now inspect the graphic and the hpos to determine the the minWidth
-        final Node graphic = labeled.getGraphic();
-        double width;
-        if (isIgnoreGraphic()) {
-            width = minTextWidth;
-        } else if (isIgnoreText()) {
-            width = graphic.minWidth(-1);
-        } else if (contentDisplay == LEFT || contentDisplay == RIGHT){
-            width = (minTextWidth + graphic.minWidth(-1) + gap);
-        } else {
-            width = Math.max(minTextWidth, graphic.minWidth(-1));
-        }
-
-        return width + leftInset + leftLabelPadding() +
-                rightInset + rightLabelPadding();
-    }
-
-    @Override protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
-        return computeMinLabeledPartHeight(width, topInset, rightInset, bottomInset, leftInset);
-    }
-
-    private double computeMinLabeledPartHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
-        final Labeled labeled = getSkinnable();
-        final Font font = text.getFont();
-
-        String str = labeled.getText();
-        if (str != null && str.length() > 0) {
-            int newlineIndex = str.indexOf('\n');
-            if (newlineIndex >= 0) {
-                str = str.substring(0, newlineIndex);
-            }
-        }
-
-        // TODO figure out how to cache this effectively.
-        // Base minimum height on one line (ignoring wrapping here).
-        double s = labeled.getLineSpacing();
-        final double textHeight = Utils.computeTextHeight(font, str, 0, s, text.getBoundsType());
-
-        double h = textHeight;
-
-        // Now we want to add on the graphic if necessary!
-        if (!isIgnoreGraphic()) {
-            final Node graphic = labeled.getGraphic();
-            if (labeled.getContentDisplay() == ContentDisplay.TOP
-                || labeled.getContentDisplay() == ContentDisplay.BOTTOM) {
-                h = graphic.minHeight(width) + labeled.getGraphicTextGap() + textHeight;
-            } else {
-                h = Math.max(textHeight, graphic.minHeight(width));
-            }
-        }
-
-        return topInset + h + bottomInset + topLabelPadding() - bottomLabelPadding();
-    }
-
-    @Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
-        // Get the preferred width of the text
-        final Labeled labeled = getSkinnable();
-        final Font font = text.getFont();
-        final String string = labeled.getText();
-        boolean emptyText = string == null || string.isEmpty();
-        double widthPadding = leftInset + leftLabelPadding() +
-                              rightInset + rightLabelPadding();
-
-        double textWidth = emptyText ? 0 : Utils.computeTextWidth(font, string, 0);
-
-        // Now add on the graphic, gap, and padding as appropriate
-        final Node graphic = labeled.getGraphic();
-        if (isIgnoreGraphic()) {
-            return textWidth + widthPadding;
-        } else if (isIgnoreText()) {
-            return graphic.prefWidth(-1) + widthPadding;
-        } else if (labeled.getContentDisplay() == ContentDisplay.LEFT
-                || labeled.getContentDisplay() == ContentDisplay.RIGHT) {
-            return textWidth + labeled.getGraphicTextGap() + graphic.prefWidth(-1) + widthPadding;
-        } else {
-            return Math.max(textWidth, graphic.prefWidth(-1)) + widthPadding;
-        }
-    }
-
-    @Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
-        final Labeled labeled = getSkinnable();
-        final Font font = text.getFont();
-        final ContentDisplay contentDisplay = labeled.getContentDisplay();
-        final double gap = labeled.getGraphicTextGap();
-        width -= leftInset + leftLabelPadding() +
-                rightInset + rightLabelPadding();
-
-        String str = labeled.getText();
-        if (str != null && str.endsWith("\n")) {
-            // Strip ending newline so we don't count another row.
-            str = str.substring(0, str.length() - 1);
-        }
-
-        double textWidth = width;
-        if (!isIgnoreGraphic() &&
-            (contentDisplay == LEFT || contentDisplay == RIGHT)) {
-            textWidth -= (graphic.prefWidth(-1) + gap);
-        }
-
-        // TODO figure out how to cache this effectively.
-        final double textHeight = Utils.computeTextHeight(font, str,
-                                                          labeled.isWrapText() ? textWidth : 0,
-                                                          labeled.getLineSpacing(), text.getBoundsType());
-
-        // Now we want to add on the graphic if necessary!
-        double h = textHeight;
-        if (!isIgnoreGraphic()) {
-            final Node graphic = labeled.getGraphic();
-            if (contentDisplay == TOP || contentDisplay == BOTTOM) {
-                h = graphic.prefHeight(width) + gap + textHeight;
-            } else {
-                h = Math.max(textHeight, graphic.prefHeight(width));
-            }
-        }
-
-        return topInset + h + bottomInset + topLabelPadding() + bottomLabelPadding();
-    }
-
-    @Override protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
-        return getSkinnable().prefWidth(height);
-    }
-
-    @Override protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
-        return getSkinnable().prefHeight(width);
-    }
-
-    @Override public double computeBaselineOffset(double topInset, double rightInset, double bottomInset, double leftInset) {
-        double textBaselineOffset = text.getBaselineOffset();
-        double h = textBaselineOffset;
-        final Labeled labeled = getSkinnable();
-        final Node g = labeled.getGraphic();
-        if (!isIgnoreGraphic()) {
-            ContentDisplay contentDisplay = labeled.getContentDisplay();
-            if (contentDisplay == ContentDisplay.TOP) {
-                h = g.prefHeight(-1) + labeled.getGraphicTextGap() + textBaselineOffset;
-            } else if (contentDisplay == ContentDisplay.LEFT || contentDisplay == RIGHT) {
-                h = textBaselineOffset + (g.prefHeight(-1) - text.prefHeight(-1)) / 2;
-            }
-        }
-                
-        return topInset + topLabelPadding() + h;
-    }
-
-    public TextBinding bindings;
-    Line mnemonic_underscore;
-
-    private boolean containsMnemonic = false;
-    private Scene mnemonicScene = null;
-    private KeyCombination mnemonicCode;
-    // needs to be an object, as MenuItem isn't a node
-    private Node labeledNode = null;
-
-    /**
-     * The Layout algorithm works like this:
-     *
-     *  - Get the labeled w/h, graphic w/h, text w/h
-     *  - Compute content w/h based on graphicVPos, graphicHPos,
-     *    graphicTextGap, and graphic w/h and text w/h
-     *  - (Note that the text content has been pre-truncated where
-     *    necessary)
-     *  - compute content x/y based on content w/h and labeled w/h
-     *    and the labeled's hpos and vpos
-     *  - position the graphic and text
-     */
-    @Override protected void layoutChildren(final double x, final double y,
-            final double w, final double h) {
-        layoutLabelInArea(x, y, w, h);
-    }
-
-    /**
-     * Performs the actual layout of the label content within the area given.
-     * This method is called by subclasses that override layoutChildren().
-     *
-     * @param x The x position of the label part of the control, inside padding
-     *
-     * @param y The y position of the label part of the control, inside padding
-     *
-     * @param w The width of the label part of the control, not including padding
-     *
-     * @param h The height of the label part of the control, not including padding
-     */
-    protected void layoutLabelInArea(double x, double y, double w, double h) {
-        layoutLabelInArea(x, y, w, h, null);
-    }
-
-    /**
-     * Performs the actual layout of the label content within the area given.
-     * This method is called by subclasses that override layoutChildren().
-     *
-     * @param x The x position of the label part of the control, inside padding
-     *
-     * @param y The y position of the label part of the control, inside padding
-     *
-     * @param w The width of the label part of the control, not including padding
-     *
-     * @param h The height of the label part of the control, not including padding
-     *
-     * @param alignment The alignment of the label part of the control within the given area. If null, then the control's alignment will be used.
-     */
-    protected void layoutLabelInArea(double x, double y, double w, double h, Pos alignment) {
-        // References to essential labeled state
-        final Labeled labeled = getSkinnable();
-        final ContentDisplay contentDisplay = labeled.getContentDisplay();
-
-        if (alignment == null) {
-            alignment = labeled.getAlignment();
-        }
-
-        final HPos hpos = alignment == null ? HPos.LEFT   : alignment.getHpos();
-        final VPos vpos = alignment == null ? VPos.CENTER : alignment.getVpos();
-
-        // Figure out whether we should ignore the Graphic, and/or
-        // ignore the Text
-        final boolean ignoreGraphic = isIgnoreGraphic();
-        final boolean ignoreText = isIgnoreText();
-
-        x += leftLabelPadding();
-        y += topLabelPadding();
-        w -= leftLabelPadding() + rightLabelPadding();
-        h -= topLabelPadding() + bottomLabelPadding();
-
-        // Compute some standard useful numbers for the graphic, text, and gap
-        double graphicWidth;
-        double graphicHeight;
-        double textWidth;
-        double textHeight;
-
-        if (ignoreGraphic) {
-            graphicWidth = graphicHeight = 0;
-        } else if (ignoreText) {
-            if (graphic.isResizable()) {
-                Orientation contentBias = graphic.getContentBias();
-                if (contentBias == Orientation.HORIZONTAL) {
-                    graphicWidth  = Utils.boundedSize(w, graphic.minWidth(-1), graphic.maxWidth(-1));
-                    graphicHeight = Utils.boundedSize(h, graphic.minHeight(graphicWidth), graphic.maxHeight(graphicWidth));
-                } else if (contentBias == Orientation.VERTICAL) {
-                    graphicHeight = Utils.boundedSize(h, graphic.minHeight(-1), graphic.maxHeight(-1));
-                    graphicWidth  = Utils.boundedSize(w, graphic.minWidth(graphicHeight), graphic.maxWidth(graphicHeight));
-                } else {
-                    graphicWidth  = Utils.boundedSize(w, graphic.minWidth(-1), graphic.maxWidth(-1));
-                    graphicHeight = Utils.boundedSize(h, graphic.minHeight(-1), graphic.maxHeight(-1));
-                }
-                graphic.resize(graphicWidth, graphicHeight);
-            } else {
-                graphicWidth = graphic.getLayoutBounds().getWidth();
-                graphicHeight = graphic.getLayoutBounds().getHeight();
-            }
-        } else {
-            graphic.autosize(); // We have to do this before getting metrics
-            graphicWidth = graphic.getLayoutBounds().getWidth();
-            graphicHeight = graphic.getLayoutBounds().getHeight();
-        }
-
-        if (ignoreText) {
-            textWidth  = textHeight = 0;
-            text.setText("");
-        } else {
-            updateDisplayedText(w, h); // Have to do this just in case it needs to be recomputed
-            textWidth  = snapSize(Math.min(text.getLayoutBounds().getWidth(),  wrapWidth));
-            textHeight = snapSize(Math.min(text.getLayoutBounds().getHeight(), wrapHeight));
-        }
-
-        final double gap = (ignoreText || ignoreGraphic) ? 0 : labeled.getGraphicTextGap();
-
-        // Figure out the contentWidth and contentHeight. This is the width
-        // and height of the Labeled and Graphic together, not the available
-        // content area (which would be a different calculation).
-        double contentWidth = Math.max(graphicWidth, textWidth);
-        double contentHeight = Math.max(graphicHeight, textHeight);
-        if (contentDisplay == ContentDisplay.TOP || contentDisplay == ContentDisplay.BOTTOM) {
-            contentHeight = graphicHeight + gap + textHeight;
-        } else if (contentDisplay == ContentDisplay.LEFT || contentDisplay == ContentDisplay.RIGHT) {
-            contentWidth = graphicWidth + gap + textWidth;
-        }
-
-        // Now we want to compute the x/y location to place the content at.
-
-         // Compute the contentX position based on hpos and the space available
-        double contentX;
-        if (hpos == HPos.LEFT) {
-           contentX = x;
-        } else if (hpos == HPos.RIGHT) {
-           contentX = x + (w - contentWidth);
-        } else {
-            // TODO Baseline may not be handled correctly
-            // may have been CENTER or null, treat as center
-            contentX = (x + ((w - contentWidth) / 2.0));
-        }
-
-        // Compute the contentY position based on vpos and the space available
-        double contentY;
-        if (vpos == VPos.TOP) {
-            contentY = y;
-        } else if (vpos == VPos.BOTTOM) {
-            contentY = (y + (h - contentHeight));
-        } else {
-            // TODO Baseline may not be handled correctly
-            // may have been CENTER, BASELINE, or null, treat as center
-            contentY = (y + ((h - contentHeight) / 2.0));
-        }
-
-        double preMnemonicWidth = 0.0;
-        double mnemonicWidth = 0.0;
-        double mnemonicHeight = 0.0;
-        if (containsMnemonic) {
-            final Font font = text.getFont();
-            String preSt = bindings.getText();
-            preMnemonicWidth = Utils.computeTextWidth(font, preSt.substring(0,bindings.getMnemonicIndex()) , 0);
-            mnemonicWidth = Utils.computeTextWidth(font, preSt.substring(bindings.getMnemonicIndex(),bindings.getMnemonicIndex()+1) , 0);
-            mnemonicHeight = Utils.computeTextHeight(font, "_", 0, text.getBoundsType());
-        }
-
-
-        // Now to position the graphic and text. At this point I know the
-        // contentX and contentY locations (including the padding and whatnot
-        // that was defined on the Labeled). I also know the content width and
-        // height. So now I just need to lay out the graphic and text within
-        // that content x/y/w/h area.
-        if ((!ignoreGraphic || !ignoreText) && !text.isManaged()) {
-            text.setManaged(true);
-        }
-
-        if (ignoreGraphic && ignoreText) {
-            // There might be a text node as a child, or a graphic node as
-            // a child. However we don't have to do anything for the graphic
-            // node because the only way it can be a child and still have
-            // ignoreGraphic true is if it is unmanaged. Text however might
-            // be a child but still not matter, in which case we will just
-            // stop managing it (although really I wish it just wasn't here
-            // all all in that case)
-            if (text.isManaged()) {
-                text.setManaged(false);
-            }
-            text.relocate(snapPosition(contentX), snapPosition(contentY));
-        } else if (ignoreGraphic) {
-            // Since I only have to position the text, it goes at the
-            // contentX/contentY location. Note that positionNode will
-            // adjust the text based on the text's minX/minY so no need to
-            // worry about that here
-            text.relocate(snapPosition(contentX), snapPosition(contentY));
-            if (containsMnemonic) {
-                mnemonic_underscore.setEndX(mnemonicWidth-2.0);
-                mnemonic_underscore.relocate(contentX+preMnemonicWidth, contentY+mnemonicHeight-1);
-            }
-
-        } else if (ignoreText) {
-            // there isn't text to display, so we need to position it
-            // such that it doesn't affect the content area (although when
-            // there is a graphic, the text isn't even in the scene)
-            text.relocate(snapPosition(contentX), snapPosition(contentY));
-            graphic.relocate(snapPosition(contentX), snapPosition(contentY));
-            if (containsMnemonic) {
-                mnemonic_underscore.setEndX(mnemonicWidth);
-                mnemonic_underscore.setStrokeWidth(mnemonicHeight/10.0);
-                mnemonic_underscore.relocate(contentX+preMnemonicWidth, contentY+mnemonicHeight-1);
-
-            }
-        } else {
-            // There is both text and a graphic, so I need to position them
-            // relative to each other
-            double graphicX = 0;
-            double graphicY = 0;
-            double textX = 0;
-            double textY = 0;
-
-            if (contentDisplay == ContentDisplay.TOP) {
-                graphicX = contentX + ((contentWidth - graphicWidth) / 2.0);
-                textX = contentX + ((contentWidth - textWidth) / 2.0);
-                // The graphic is above the text, so it is positioned at
-                // graphicY and the text below it.
-                graphicY = contentY;
-                textY = graphicY + graphicHeight + gap;
-            } else if (contentDisplay == ContentDisplay.RIGHT) {
-                // The graphic is to the right of the text
-                textX = contentX;
-                graphicX = textX + textWidth + gap;
-                graphicY = contentY + ((contentHeight - graphicHeight) / 2.0);
-                textY = contentY + ((contentHeight - textHeight) / 2.0);
-            } else if (contentDisplay == ContentDisplay.BOTTOM) {
-                graphicX = contentX + ((contentWidth - graphicWidth) / 2.0);
-                textX = contentX + ((contentWidth - textWidth) / 2.0);
-                // The graphic is below the text
-                textY = contentY;
-                graphicY = textY + textHeight + gap;
-            } else if (contentDisplay == ContentDisplay.LEFT) {
-                // The graphic is to the left of the text, so the graphicX is
-                // simply the contentX and the textX is to the right of it.
-                graphicX = contentX;
-                textX = graphicX + graphicWidth + gap;
-                graphicY = contentY + ((contentHeight - graphicHeight) / 2.0);
-                textY = contentY + ((contentHeight - textHeight) / 2.0);
-            } else if (contentDisplay == ContentDisplay.CENTER) {
-                graphicX = contentX + ((contentWidth - graphicWidth) / 2.0);
-                textX = contentX + ((contentWidth - textWidth) / 2.0);
-                graphicY = contentY + ((contentHeight - graphicHeight) / 2.0);
-                textY = contentY + ((contentHeight - textHeight) / 2.0);
-            }
-            text.relocate(snapPosition(textX), snapPosition(textY));
-            if (containsMnemonic) {
-                mnemonic_underscore.setEndX(mnemonicWidth);
-                mnemonic_underscore.setStrokeWidth(mnemonicHeight/10.0);
-                mnemonic_underscore.relocate(snapPosition(textX+preMnemonicWidth), snapPosition(textY+mnemonicHeight-1));
-            }
-            graphic.relocate(snapPosition(graphicX), snapPosition(graphicY));
-        }
-
-        /**
-         * check if the label text overflows it's bounds.
-         * If there's an overflow, and no text clip then
-         * we'll clip it. 
-         * If there is no overflow, and the label text has a
-         * clip, then remove it.
-         */
-        if ((text != null) && 
-            ((text.getLayoutBounds().getHeight() > wrapHeight) ||
-             (text.getLayoutBounds().getWidth() > wrapWidth))) {
-
-            if (textClip == null) {
-                textClip = new Rectangle();
-            }
-
-            if (labeled.getEffectiveNodeOrientation() == NodeOrientation.LEFT_TO_RIGHT) {
-                textClip.setX(text.getLayoutBounds().getMinX());
-            } else {
-                textClip.setX(text.getLayoutBounds().getMaxX() - wrapWidth);
-            }
-            textClip.setY(text.getLayoutBounds().getMinY());
-            textClip.setWidth(wrapWidth);
-            textClip.setHeight(wrapHeight);
-            if (text.getClip() == null) {
-                text.setClip(textClip);
-            }
-        }
-        else {
-            /**
-             * content fits inside bounds, no need
-             * for a clip
-             */
-            if (text.getClip() != null) {
-                text.setClip(null);
-            }
-        }
-    }
-
-    /** @treatAsPrivate */
-    @Override protected Object accGetAttribute(Attribute attribute, Object... parameters) {
-        switch (attribute) {
-            case TITLE: {
-                if (bindings != null) {
-                    return bindings.getText();
-                }
-                final Labeled labeled = getSkinnable();
-                return labeled != null ? labeled.getText() : null;
-            }
-            case MNEMONIC: {
-                if (bindings != null) {
-                    return bindings.getMnemonic();
-                }
-                return null;
-            }
-            default: return super.accGetAttribute(attribute, parameters);
-        }
-    }
-}
+/*
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.scene.control.skin;
+
+import javafx.application.Platform;
+import javafx.beans.InvalidationListener;
+import javafx.geometry.HPos;
+import javafx.geometry.NodeOrientation;
+import javafx.geometry.Orientation;
+import javafx.geometry.Pos;
+import javafx.geometry.VPos;
+import javafx.scene.Node;
+import javafx.scene.Scene;
+import javafx.scene.accessibility.Attribute;
+import javafx.scene.control.ContentDisplay;
+import javafx.scene.control.Control;
+import javafx.scene.control.Label;
+import javafx.scene.control.Labeled;
+import javafx.scene.control.OverrunStyle;
+import javafx.scene.input.KeyCombination;
+import javafx.scene.input.Mnemonic;
+import javafx.scene.shape.Line;
+import javafx.scene.shape.Rectangle;
+import javafx.scene.text.Font;
+
+import com.sun.javafx.scene.control.behavior.BehaviorBase;
+import com.sun.javafx.scene.control.behavior.TextBinding;
+
+import static javafx.scene.control.ContentDisplay.*;
+import static javafx.scene.control.OverrunStyle.*;
+import javafx.scene.image.ImageView;
+
+public abstract class LabeledSkinBase<C extends Labeled, B extends BehaviorBase<C>> extends BehaviorSkinBase<C, B> {
+
+    /**
+     *  The Text node used to display the text. This is package only
+     *  for the sake of testing!
+     */
+    LabeledText text;
+
+    /**
+     * Indicates that the text content is invalid and needs to be updated.
+     * This is package private only for the sake of testing.
+     */
+    boolean invalidText = true;
+
+    /**
+     * A reference to the last-known graphic on the Labeled. This reference
+     * is kept so that we can remove listeners from the old graphic later
+     */
+    Node graphic;
+
+    /**
+     * The cached full width of the non-truncated text. We only want to
+     * recompute this if the text has itself changed, or if the font has changed.
+     * This is package private ONLY FOR THE SAKE OF TESTING
+     */
+    double textWidth = Double.NEGATIVE_INFINITY;
+
+    /**
+     * The cached width of the ellipsis string. This will be recomputed
+     * if the font or the ellipsisString property have changed.
+     * This is package private ONLY FOR THE SAKE OF TESTING
+     */
+    double ellipsisWidth = Double.NEGATIVE_INFINITY;
+
+    /**
+     * A listener which is applied to the graphic whenever the graphic is set
+     * and is visible within the labeled. For example, if there is a graphic
+     * defined on the Labeled but the ContentDisplay is set to TEXT_ONLY, then
+     * we will not bother installing this listener on the graphic. In all
+     * other cases, if the graphic is defined, it will have this listener
+     * added to it, which ensures that if the graphic's layout bounds change,
+     * we end up performing a layout and potentially update the visible text.
+     *
+     * This is package private ONLY FOR THE SAKE OF TESTING
+     */
+    final InvalidationListener graphicPropertyChangedListener = valueModel -> {
+        invalidText = true;
+        getSkinnable().requestLayout();
+    };
+
+    private Rectangle textClip;
+    private double wrapWidth;
+    private double wrapHeight;
+
+
+    /**
+     * Constructor for LabeledSkinBase. The Labeled must be specified, and cannot be null.
+     * At the conclusion of the constructor call, the skin will be marked as
+     * needsLayout, and will be fully configured based on the current state of
+     * the labeled. Any subsequent changes to the Labeled will be handled via
+     * listeners and applied appropriately.
+     *
+     * @param labeled
+     */
+    public LabeledSkinBase(final C labeled, final B behavior) {
+        super(labeled, behavior);
+
+        // Configure the Text node with all of the attributes from the
+        // Labeled which apply to it.
+        text = new LabeledText(labeled);
+        
+        updateChildren();
+
+        // Labels do not block the mouse by default, unlike most other UI Controls.
+        //consumeMouseEvents(false);
+
+        // Register listeners
+        registerChangeListener(labeled.ellipsisStringProperty(), "ELLIPSIS_STRING");
+        registerChangeListener(labeled.widthProperty(), "WIDTH");
+        registerChangeListener(labeled.heightProperty(), "HEIGHT");
+        registerChangeListener(labeled.textFillProperty(), "TEXT_FILL");
+        registerChangeListener(labeled.fontProperty(), "FONT");
+        registerChangeListener(labeled.graphicProperty(), "GRAPHIC");
+        registerChangeListener(labeled.contentDisplayProperty(), "CONTENT_DISPLAY");
+        registerChangeListener(labeled.labelPaddingProperty(), "LABEL_PADDING");
+        registerChangeListener(labeled.graphicTextGapProperty(), "GRAPHIC_TEXT_GAP");
+        registerChangeListener(labeled.alignmentProperty(), "ALIGNMENT");
+        registerChangeListener(labeled.mnemonicParsingProperty(), "MNEMONIC_PARSING");
+        registerChangeListener(labeled.textProperty(), "TEXT");
+        registerChangeListener(labeled.textAlignmentProperty(), "TEXT_ALIGNMENT");
+        registerChangeListener(labeled.textOverrunProperty(), "TEXT_OVERRUN");
+        registerChangeListener(labeled.wrapTextProperty(), "WRAP_TEXT");
+        registerChangeListener(labeled.underlineProperty(), "UNDERLINE");
+        registerChangeListener(labeled.lineSpacingProperty(), "LINE_SPACING");
+        registerChangeListener(labeled.sceneProperty(), "SCENE");
+    }
+
+    /***************************************************************************
+     *                                                                         *
+     * Control State Changes                                                   *
+     *                                                                         *
+     **************************************************************************/
+
+    @Override protected void handleControlPropertyChanged(String p) {
+        super.handleControlPropertyChanged(p);
+        /*
+         * There are basically 2 things to worry about in each of these handlers
+         *  1) Update the Text node
+         *  2) Have the text metrics changed?
+         *
+         * If the metrics have changed, we need to request a layout and invalidate
+         * the text so that we recompute the display text on next read.
+         */
+        if ("WIDTH".equals(p)) {
+            updateWrappingWidth();
+            invalidText = true;
+            // No requestLayout() because Control will force a layout
+        } else if ("HEIGHT".equals(p)) {
+            invalidText = true;
+            // No requestLayout() because Control will force a layout
+        } else if ("FONT".equals(p)) {
+            textMetricsChanged();
+            invalidateWidths();
+            ellipsisWidth = Double.NEGATIVE_INFINITY;
+        } else if ("GRAPHIC".equals(p)) {
+            updateChildren();
+            textMetricsChanged();
+        } else if ("CONTENT_DISPLAY".equals(p)) {
+            updateChildren();
+            textMetricsChanged();
+        } else if ("LABEL_PADDING".equals(p)) {
+            textMetricsChanged();
+        } else if ("GRAPHIC_TEXT_GAP".equals(p)) {
+            textMetricsChanged();
+        } else if ("ALIGNMENT".equals(p)) {
+            // Doesn't involve text metrics because if the text is too long, then
+            // it will already have fit all available width and a change to hpos
+            // has no effect. Or it is too short (i.e. it all fits) and we don't
+            // have to worry about truncation. So just call request layout.
+            // Doesn't involve text metrics because if the text is too long, then
+            // it will already have fit all available height and a change to vpos
+            // has no effect. Or it is too short (i.e. it all fits) and we don't
+            // have to worry about truncation. So just call request layout.
+            getSkinnable().requestLayout();
+        } else if ("MNEMONIC_PARSING".equals(p)) {
+            containsMnemonic = false;
+            textMetricsChanged();
+        } else if ("TEXT".equals(p)) {
+            updateChildren();
+            textMetricsChanged();
+            invalidateWidths();
+        } else if ("TEXT_ALIGNMENT".equals(p)) {
+            // NO-OP
+        } else if ("TEXT_OVERRUN".equals(p)) {
+            textMetricsChanged();
+        } else if ("ELLIPSIS_STRING".equals(p)) {
+            textMetricsChanged();
+            invalidateWidths();
+            ellipsisWidth = Double.NEGATIVE_INFINITY;
+        } else if ("WRAP_TEXT".equals(p)) {
+            updateWrappingWidth();
+            textMetricsChanged();
+        } else if ("UNDERLINE".equals(p)) {
+            textMetricsChanged();
+        } else if ("LINE_SPACING".equals(p)) {
+            textMetricsChanged();
+        } else if ("SCENE".equals(p)) {
+            sceneChanged();
+        }
+    }
+
+    protected double topLabelPadding() { // TODOJASPER remove these if you can
+        return snapSize(getSkinnable().getLabelPadding().getTop());
+    }
+
+    protected double bottomLabelPadding() {
+        return snapSize(getSkinnable().getLabelPadding().getBottom());
+    }
+
+    protected double leftLabelPadding() {
+        return snapSize(getSkinnable().getLabelPadding().getLeft());
+    }
+
+    protected double rightLabelPadding() {
+        return snapSize(getSkinnable().getLabelPadding().getRight());
+    }
+
+
+    /**
+     * Called whenever some state has changed that affects the text metrics.
+     * Changes here will involve invalidating the display text so the next
+     * call to updateDisplayedText computes a new value, and call requestLayout.
+     */
+    private void textMetricsChanged() {
+        invalidText = true;
+        getSkinnable().requestLayout();
+    }
+
+    /*
+    ** The Label is a mnemonic, and it's target node
+    ** has changed, but it's label hasn't so just
+    ** swap them over, and tidy up.
+    */
+    protected void mnemonicTargetChanged() {
+        if (containsMnemonic == true) {
+            /*
+            ** was there previously a labelFor  
+            */
+            removeMnemonic();
+
+            /*
+            ** is there a new labelFor
+            */
+            Control control = getSkinnable();
+            if (control instanceof Label) {
+                labeledNode = ((Label)control).getLabelFor();
+                addMnemonic();
+            }
+            else {
+                labeledNode = null;
+            }
+        }
+    }
+
+    private void sceneChanged() {
+        final Labeled labeled = getSkinnable();
+        Scene scene = labeled.getScene();
+
+        if (scene != null && containsMnemonic) {
+            addMnemonic();
+        }
+
+    }
+
+    /**
+     * Marks minWidth as being invalid and in need of recomputation.
+     */
+    private void invalidateWidths() {
+        textWidth = Double.NEGATIVE_INFINITY;
+    }
+
+    /**
+     * Updates the content of the underlying Text node. This method should
+     * only be called when necessary. If the invalidText flag is not set, then
+     * the method is a no-op. This care is taken because recomputing the
+     * text to display is an expensive operation. Package private ONLY FOR THE
+     * SAKE OF TESTING.
+     */
+    void updateDisplayedText() {
+        updateDisplayedText(-1, -1);
+    }
+
+    private void updateDisplayedText(double w, double h) {
+        if (invalidText) {
+            final Labeled labeled = getSkinnable();
+            String s = labeled.getText();
+
+            int mnemonicIndex = -1;
+
+            /*
+            ** if there's a valid string then parse it
+            */
+            if (s != null && s.length() > 0) {
+                bindings = new TextBinding(s);
+
+                if (!com.sun.javafx.PlatformUtil.isMac() && getSkinnable().isMnemonicParsing() == true) {
+                    /*
+                    ** the Labeled has a MnemonicParsing property,
+                    ** if set true, then auto-parsing will check for
+                    ** a mnemonic
+                    */
+                    if (labeled instanceof Label) {
+                        // buttons etc
+                        labeledNode = ((Label)labeled).getLabelFor();
+                    } else {
+                        labeledNode = labeled;
+                    }
+
+                    if (labeledNode == null) {
+                        labeledNode = labeled;
+                    }
+                    mnemonicIndex = bindings.getMnemonicIndex() ;
+                }
+            }
+
+            /*
+            ** we were previously a mnemonic
+            */
+            if (containsMnemonic) {
+                /*
+                ** are we no longer a mnemonic, or have we changed code?
+                */
+                if (mnemonicScene != null) {
+                    if (mnemonicIndex == -1 ||
+                            (bindings != null && !bindings.getMnemonicKeyCombination().equals(mnemonicCode))) {
+                        removeMnemonic();
+                    }
+                    containsMnemonic = false;
+                }
+            }
+            else {
+                /*
+                ** this can happen if mnemonic parsing is
+                ** disabled on a previously valid mnemonic
+                */
+                removeMnemonic();
+            }
+
+            /*
+            ** check we have a labeled
+            */
+            if (s != null && s.length() > 0) {
+                if (mnemonicIndex >= 0 && containsMnemonic == false) {
+                    containsMnemonic = true;
+                    mnemonicCode = bindings.getMnemonicKeyCombination();
+                    addMnemonic();
+                }
+            }
+
+            if (containsMnemonic == true) {
+                s = bindings.getText();
+                if (mnemonic_underscore == null) {
+                    mnemonic_underscore = new Line();
+                    mnemonic_underscore.setStartX(0.0f);
+                    mnemonic_underscore.setStartY(0.0f);
+                    mnemonic_underscore.setEndY(0.0f);
+                    mnemonic_underscore.getStyleClass().clear();
+                    mnemonic_underscore.getStyleClass().setAll("mnemonic-underline");
+                }
+                if (!getChildren().contains(mnemonic_underscore)) {
+                    getChildren().add(mnemonic_underscore);
+                }
+            } else {
+                /*
+                ** we don't need a mnemonic....
+                */
+                if (getSkinnable().isMnemonicParsing() == true && com.sun.javafx.PlatformUtil.isMac() && bindings != null) {
+                    s = bindings.getText();
+                }
+                else {
+                    s = labeled.getText();
+                }
+                if (mnemonic_underscore != null) {
+                    if (getChildren().contains(mnemonic_underscore)) {
+                        Platform.runLater(() -> {
+                              getChildren().remove(mnemonic_underscore);
+                              mnemonic_underscore = null;
+                        });
+                    }
+                }
+            }
+
+            int len = s != null ? s.length() : 0;
+            boolean multiline = false;
+
+            if (s != null && len > 0) {
+                int i = s.indexOf('\n');
+                if (i > -1 && i < len - 1) {
+                    // Multiline text with embedded newlines - not
+                    // taking into account a potential trailing newline.
+                    multiline = true;
+                }
+            }
+
+            String result;
+            boolean horizontalPosition =
+                    (labeled.getContentDisplay() == ContentDisplay.LEFT ||
+                    labeled.getContentDisplay() == ContentDisplay.RIGHT);
+
+            double availableWidth = labeled.getWidth() - snappedLeftInset() - leftLabelPadding() -
+                                    snappedRightInset() - rightLabelPadding();
+            availableWidth = Math.max(availableWidth, 0);
+
+            if (w == -1) {
+                w = availableWidth;
+            }
+            double minW = Math.min(computeMinLabeledPartWidth(-1, snappedTopInset() , snappedRightInset(), snappedBottomInset(), snappedLeftInset()), availableWidth);
+            if (horizontalPosition && !isIgnoreGraphic()) {
+                double graphicW = (labeled.getGraphic().getLayoutBounds().getWidth() + labeled.getGraphicTextGap());
+                w -= graphicW;
+                minW -= graphicW;
+            }
+            wrapWidth = Math.max(minW, w);
+
+            boolean verticalPosition =
+                    (labeled.getContentDisplay() == ContentDisplay.TOP ||
+                    labeled.getContentDisplay() == ContentDisplay.BOTTOM);
+
+            double availableHeight = labeled.getHeight() - snappedTopInset() - topLabelPadding() -
+                                     snappedBottomInset() - bottomLabelPadding();
+            availableHeight = Math.max(availableHeight, 0);
+
+            if (h == -1) {
+                h = availableHeight;
+            }
+            double minH = Math.min(computeMinLabeledPartHeight(wrapWidth, snappedTopInset() , snappedRightInset(), snappedBottomInset(), snappedLeftInset()), availableHeight);
+            if (verticalPosition && labeled.getGraphic() != null) {
+                double graphicH = labeled.getGraphic().getLayoutBounds().getHeight() + labeled.getGraphicTextGap();
+                h -= graphicH;
+                minH -= graphicH;
+            }
+            wrapHeight = Math.max(minH, h);
+
+            updateWrappingWidth();
+
+            Font font = text.getFont();
+            OverrunStyle truncationStyle = labeled.getTextOverrun();
+            String ellipsisString = labeled.getEllipsisString();
+
+            if (labeled.isWrapText()) {
+                result = Utils.computeClippedWrappedText(font, s, wrapWidth, wrapHeight, truncationStyle, ellipsisString, text.getBoundsType());
+            } else if (multiline) {
+                StringBuilder sb = new StringBuilder();
+
+                String[] splits = s.split("\n");
+                for (int i = 0; i < splits.length; i++) {
+                    sb.append(Utils.computeClippedText(font, splits[i], wrapWidth, truncationStyle, ellipsisString));
+                    if (i < splits.length - 1) {
+                        sb.append('\n');
+                    }
+                }
+
+                // TODO: Consider what to do in the case where vertical space is
+                // limited and the last visible line isn't already truncated
+                // with a trailing ellipsis. What if the style calls for leading
+                // or center ellipses? We could possibly add an additional
+                // trailing ellipsis to the last visible line, like this:
+
+                // +--------------------------------+
+                // |  This is some long text with multiple lines\n
+                // |  where more than one exceed the|width\n
+                // |  and wrapText is false, and all|lines\n
+                // +--don't fit.--------------------+
+                //
+                // +--------------------------------+
+                // |  This is some...multiple lines |
+                // |  where more t...ceed the width |
+                // |  and wrapText...d all lines... |
+                // +--------------------------------+
+
+                result = sb.toString();
+            } else {
+                result = Utils.computeClippedText(font, s, wrapWidth, truncationStyle, ellipsisString);
+            }
+
+            if (result != null && result.endsWith("\n")) {
+                // Strip ending newline so we don't display another row.
+                result = result.substring(0, result.length() - 1);
+            }
+
+            text.setText(result);
+            updateWrappingWidth();
+            invalidText = false;
+        }
+    }
+
+    private void addMnemonic() {
+        if (labeledNode != null) {
+            mnemonicScene = labeledNode.getScene();
+            if (mnemonicScene != null) {
+                mnemonicScene.addMnemonic(new Mnemonic(labeledNode, mnemonicCode));
+            }
+        }
+    }
+
+
+    private void removeMnemonic() {
+        if (mnemonicScene != null && labeledNode != null) {
+            mnemonicScene.removeMnemonic(new Mnemonic(labeledNode, mnemonicCode));
+            mnemonicScene = null;
+        }
+    }
+
+    /**
+     * Updates the wrapping width of the text node. Although changing the font
+     * does affect the metrics used for text layout, this method does not
+     * call requestLayout or invalidate the text, since it may be called
+     * from the constructor and such work would be duplicative and wasted.
+     */
+    private void updateWrappingWidth() {
+        final Labeled labeled = getSkinnable();
+        text.setWrappingWidth(0);
+        if (labeled.isWrapText()) {
+            // Note that the wrapping width needs to be set to zero before
+            // getting the text's real preferred width.
+            double w = Math.min(text.prefWidth(-1), wrapWidth);
+            text.setWrappingWidth(w);
+        }
+    }
+
+    /**
+     * Updates the children managed by LabeledSkinBase, which can be the Labeled
+     * graphic and/or a Text node. Only those nodes which actually must
+     * be used are used. For example, with a ContentDisplay of
+     * GRAPHIC_ONLY the text node is not added, and with a ContentDisplay
+     * of TEXT_ONLY, the graphic is not added.
+     */
+    protected void updateChildren() {
+        final Labeled labeled = getSkinnable();
+        // Only in some situations do we want to have the graphicPropertyChangedListener
+        // installed. Since updateChildren() is not called much, we'll just remove it always
+        // and reinstall it later if it is necessary to do so.
+        if (graphic != null) {
+            graphic.layoutBoundsProperty().removeListener(graphicPropertyChangedListener);
+        }
+        // Now update the graphic (since it may have changed)
+        graphic = labeled.getGraphic();
+        
+        // RT-19851 Only setMouseTransparent(true) for an ImageView.  This allows the button 
+        // to be picked regardless of the changing images on top of it. 
+        if (graphic instanceof ImageView) {
+            graphic.setMouseTransparent(true);
+        }                
+        
+        // Now update the children (and add the graphicPropertyChangedListener as necessary)
+        if (isIgnoreGraphic()) {
+            if (labeled.getContentDisplay() == ContentDisplay.GRAPHIC_ONLY) {
+                getChildren().clear();
+            } else {
+                getChildren().setAll(text);
+            }
+        } else {
+            graphic.layoutBoundsProperty().addListener(graphicPropertyChangedListener);
+            if (isIgnoreText()) {
+                getChildren().setAll(graphic);
+            } else {
+                getChildren().setAll(graphic, text);
+            }
+        }
+    }
+
+    /**
+     * Gets whether for various computations we can ignore the presence of the graphic
+     * (or lack thereof). 
+     * @return
+     */
+    protected boolean isIgnoreGraphic() {
+        return (graphic == null ||
+                !graphic.isManaged() ||
+                getSkinnable().getContentDisplay() == ContentDisplay.TEXT_ONLY);
+    }
+
+    /**
+     * Gets whether for various computations we can ignore the presence of the text.
+     * @return
+     */
+    protected boolean isIgnoreText() {
+        final Labeled labeled = getSkinnable();
+        final String txt = labeled.getText();
+        return (txt == null ||
+                txt.equals("") ||
+                labeled.getContentDisplay() == ContentDisplay.GRAPHIC_ONLY);
+    }
+
+    /***************************************************************************
+     *                                                                         *
+     * Skin Layout                                                             *
+     *                                                                         *
+     **************************************************************************/
+
+    /**
+     * Compute and return the minimum width of this Labeled. The minimum width is
+     * the smaller of the width of "..." and the width with the actual text.
+     * In this way, if the text width itself is smaller than the ellipsis then
+     * we should use that as the min width, otherwise the ellipsis needs to be the
+     * min width.
+     * <p>
+     * We use the same calculation here regardless of whether we are talking
+     * about a single or multiline labeled. So a multiline labeled may find that
+     * the width of the "..." is as small as it will ever get.
+     */
+    @Override protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
+        return computeMinLabeledPartWidth(height, topInset, rightInset, bottomInset, leftInset);
+    }
+
+    private double computeMinLabeledPartWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
+        // First compute the minTextWidth by checking the width of the string
+        // made by the ellipsis "...", and then by checking the width of the
+        // string made up by labeled.text. We want the smaller of the two.
+        final Labeled labeled = getSkinnable();
+        final ContentDisplay contentDisplay = labeled.getContentDisplay();
+        final double gap = labeled.getGraphicTextGap();
+        double minTextWidth = 0;
+
+        final Font font = text.getFont();
+        OverrunStyle truncationStyle = labeled.getTextOverrun();
+        String ellipsisString = labeled.getEllipsisString();
+        final String string = labeled.getText();
+        final boolean emptyText = string == null || string.isEmpty();
+
+        if (!emptyText) {
+            // We only want to recompute the full text width if the font or text changed
+            if (truncationStyle == CLIP) {
+                if (textWidth == Double.NEGATIVE_INFINITY) {
+                    // Show at minimum the first character
+                    textWidth = Utils.computeTextWidth(font, string.substring(0, 1), 0);
+                }
+                minTextWidth = textWidth;
+            } else {
+                if (textWidth == Double.NEGATIVE_INFINITY) {
+                    textWidth = Utils.computeTextWidth(font, string, 0);
+                }
+                // We only want to recompute the ellipsis width if the font has changed
+                if (ellipsisWidth == Double.NEGATIVE_INFINITY) {
+                    ellipsisWidth = Utils.computeTextWidth(font, ellipsisString, 0);
+                }
+                minTextWidth = Math.min(textWidth, ellipsisWidth);
+            }
+        }
+
+        // Now inspect the graphic and the hpos to determine the the minWidth
+        final Node graphic = labeled.getGraphic();
+        double width;
+        if (isIgnoreGraphic()) {
+            width = minTextWidth;
+        } else if (isIgnoreText()) {
+            width = graphic.minWidth(-1);
+        } else if (contentDisplay == LEFT || contentDisplay == RIGHT){
+            width = (minTextWidth + graphic.minWidth(-1) + gap);
+        } else {
+            width = Math.max(minTextWidth, graphic.minWidth(-1));
+        }
+
+        return width + leftInset + leftLabelPadding() +
+                rightInset + rightLabelPadding();
+    }
+
+    @Override protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
+        return computeMinLabeledPartHeight(width, topInset, rightInset, bottomInset, leftInset);
+    }
+
+    private double computeMinLabeledPartHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
+        final Labeled labeled = getSkinnable();
+        final Font font = text.getFont();
+
+        String str = labeled.getText();
+        if (str != null && str.length() > 0) {
+            int newlineIndex = str.indexOf('\n');
+            if (newlineIndex >= 0) {
+                str = str.substring(0, newlineIndex);
+            }
+        }
+
+        // TODO figure out how to cache this effectively.
+        // Base minimum height on one line (ignoring wrapping here).
+        double s = labeled.getLineSpacing();
+        final double textHeight = Utils.computeTextHeight(font, str, 0, s, text.getBoundsType());
+
+        double h = textHeight;
+
+        // Now we want to add on the graphic if necessary!
+        if (!isIgnoreGraphic()) {
+            final Node graphic = labeled.getGraphic();
+            if (labeled.getContentDisplay() == ContentDisplay.TOP
+                || labeled.getContentDisplay() == ContentDisplay.BOTTOM) {
+                h = graphic.minHeight(width) + labeled.getGraphicTextGap() + textHeight;
+            } else {
+                h = Math.max(textHeight, graphic.minHeight(width));
+            }
+        }
+
+        return topInset + h + bottomInset + topLabelPadding() - bottomLabelPadding();
+    }
+
+    @Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
+        // Get the preferred width of the text
+        final Labeled labeled = getSkinnable();
+        final Font font = text.getFont();
+        final String string = labeled.getText();
+        boolean emptyText = string == null || string.isEmpty();
+        double widthPadding = leftInset + leftLabelPadding() +
+                              rightInset + rightLabelPadding();
+
+        double textWidth = emptyText ? 0 : Utils.computeTextWidth(font, string, 0);
+
+        // Now add on the graphic, gap, and padding as appropriate
+        final Node graphic = labeled.getGraphic();
+        if (isIgnoreGraphic()) {
+            return textWidth + widthPadding;
+        } else if (isIgnoreText()) {
+            return graphic.prefWidth(-1) + widthPadding;
+        } else if (labeled.getContentDisplay() == ContentDisplay.LEFT
+                || labeled.getContentDisplay() == ContentDisplay.RIGHT) {
+            return textWidth + labeled.getGraphicTextGap() + graphic.prefWidth(-1) + widthPadding;
+        } else {
+            return Math.max(textWidth, graphic.prefWidth(-1)) + widthPadding;
+        }
+    }
+
+    @Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
+        final Labeled labeled = getSkinnable();
+        final Font font = text.getFont();
+        final ContentDisplay contentDisplay = labeled.getContentDisplay();
+        final double gap = labeled.getGraphicTextGap();
+        width -= leftInset + leftLabelPadding() +
+                rightInset + rightLabelPadding();
+
+        String str = labeled.getText();
+        if (str != null && str.endsWith("\n")) {
+            // Strip ending newline so we don't count another row.
+            str = str.substring(0, str.length() - 1);
+        }
+
+        double textWidth = width;
+        if (!isIgnoreGraphic() &&
+            (contentDisplay == LEFT || contentDisplay == RIGHT)) {
+            textWidth -= (graphic.prefWidth(-1) + gap);
+        }
+
+        // TODO figure out how to cache this effectively.
+        final double textHeight = Utils.computeTextHeight(font, str,
+                                                          labeled.isWrapText() ? textWidth : 0,
+                                                          labeled.getLineSpacing(), text.getBoundsType());
+
+        // Now we want to add on the graphic if necessary!
+        double h = textHeight;
+        if (!isIgnoreGraphic()) {
+            final Node graphic = labeled.getGraphic();
+            if (contentDisplay == TOP || contentDisplay == BOTTOM) {
+                h = graphic.prefHeight(width) + gap + textHeight;
+            } else {
+                h = Math.max(textHeight, graphic.prefHeight(width));
+            }
+        }
+
+        return topInset + h + bottomInset + topLabelPadding() + bottomLabelPadding();
+    }
+
+    @Override protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
+        return getSkinnable().prefWidth(height);
+    }
+
+    @Override protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
+        return getSkinnable().prefHeight(width);
+    }
+
+    @Override public double computeBaselineOffset(double topInset, double rightInset, double bottomInset, double leftInset) {
+        double textBaselineOffset = text.getBaselineOffset();
+        double h = textBaselineOffset;
+        final Labeled labeled = getSkinnable();
+        final Node g = labeled.getGraphic();
+        if (!isIgnoreGraphic()) {
+            ContentDisplay contentDisplay = labeled.getContentDisplay();
+            if (contentDisplay == ContentDisplay.TOP) {
+                h = g.prefHeight(-1) + labeled.getGraphicTextGap() + textBaselineOffset;
+            } else if (contentDisplay == ContentDisplay.LEFT || contentDisplay == RIGHT) {
+                h = textBaselineOffset + (g.prefHeight(-1) - text.prefHeight(-1)) / 2;
+            }
+        }
+                
+        return topInset + topLabelPadding() + h;
+    }
+
+    public TextBinding bindings;
+    Line mnemonic_underscore;
+
+    private boolean containsMnemonic = false;
+    private Scene mnemonicScene = null;
+    private KeyCombination mnemonicCode;
+    // needs to be an object, as MenuItem isn't a node
+    private Node labeledNode = null;
+
+    /**
+     * The Layout algorithm works like this:
+     *
+     *  - Get the labeled w/h, graphic w/h, text w/h
+     *  - Compute content w/h based on graphicVPos, graphicHPos,
+     *    graphicTextGap, and graphic w/h and text w/h
+     *  - (Note that the text content has been pre-truncated where
+     *    necessary)
+     *  - compute content x/y based on content w/h and labeled w/h
+     *    and the labeled's hpos and vpos
+     *  - position the graphic and text
+     */
+    @Override protected void layoutChildren(final double x, final double y,
+            final double w, final double h) {
+        layoutLabelInArea(x, y, w, h);
+    }
+
+    /**
+     * Performs the actual layout of the label content within the area given.
+     * This method is called by subclasses that override layoutChildren().
+     *
+     * @param x The x position of the label part of the control, inside padding
+     *
+     * @param y The y position of the label part of the control, inside padding
+     *
+     * @param w The width of the label part of the control, not including padding
+     *
+     * @param h The height of the label part of the control, not including padding
+     */
+    protected void layoutLabelInArea(double x, double y, double w, double h) {
+        layoutLabelInArea(x, y, w, h, null);
+    }
+
+    /**
+     * Performs the actual layout of the label content within the area given.
+     * This method is called by subclasses that override layoutChildren().
+     *
+     * @param x The x position of the label part of the control, inside padding
+     *
+     * @param y The y position of the label part of the control, inside padding
+     *
+     * @param w The width of the label part of the control, not including padding
+     *
+     * @param h The height of the label part of the control, not including padding
+     *
+     * @param alignment The alignment of the label part of the control within the given area. If null, then the control's alignment will be used.
+     */
+    protected void layoutLabelInArea(double x, double y, double w, double h, Pos alignment) {
+        // References to essential labeled state
+        final Labeled labeled = getSkinnable();
+        final ContentDisplay contentDisplay = labeled.getContentDisplay();
+
+        if (alignment == null) {
+            alignment = labeled.getAlignment();
+        }
+
+        final HPos hpos = alignment == null ? HPos.LEFT   : alignment.getHpos();
+        final VPos vpos = alignment == null ? VPos.CENTER : alignment.getVpos();
+
+        // Figure out whether we should ignore the Graphic, and/or
+        // ignore the Text
+        final boolean ignoreGraphic = isIgnoreGraphic();
+        final boolean ignoreText = isIgnoreText();
+
+        x += leftLabelPadding();
+        y += topLabelPadding();
+        w -= leftLabelPadding() + rightLabelPadding();
+        h -= topLabelPadding() + bottomLabelPadding();
+
+        // Compute some standard useful numbers for the graphic, text, and gap
+        double graphicWidth;
+        double graphicHeight;
+        double textWidth;
+        double textHeight;
+
+        if (ignoreGraphic) {
+            graphicWidth = graphicHeight = 0;
+        } else if (ignoreText) {
+            if (graphic.isResizable()) {
+                Orientation contentBias = graphic.getContentBias();
+                if (contentBias == Orientation.HORIZONTAL) {
+                    graphicWidth  = Utils.boundedSize(w, graphic.minWidth(-1), graphic.maxWidth(-1));
+                    graphicHeight = Utils.boundedSize(h, graphic.minHeight(graphicWidth), graphic.maxHeight(graphicWidth));
+                } else if (contentBias == Orientation.VERTICAL) {
+                    graphicHeight = Utils.boundedSize(h, graphic.minHeight(-1), graphic.maxHeight(-1));
+                    graphicWidth  = Utils.boundedSize(w, graphic.minWidth(graphicHeight), graphic.maxWidth(graphicHeight));
+                } else {
+                    graphicWidth  = Utils.boundedSize(w, graphic.minWidth(-1), graphic.maxWidth(-1));
+                    graphicHeight = Utils.boundedSize(h, graphic.minHeight(-1), graphic.maxHeight(-1));
+                }
+                graphic.resize(graphicWidth, graphicHeight);
+            } else {
+                graphicWidth = graphic.getLayoutBounds().getWidth();
+                graphicHeight = graphic.getLayoutBounds().getHeight();
+            }
+        } else {
+            graphic.autosize(); // We have to do this before getting metrics
+            graphicWidth = graphic.getLayoutBounds().getWidth();
+            graphicHeight = graphic.getLayoutBounds().getHeight();
+        }
+
+        if (ignoreText) {
+            textWidth  = textHeight = 0;
+            text.setText("");
+        } else {
+            updateDisplayedText(w, h); // Have to do this just in case it needs to be recomputed
+            textWidth  = snapSize(Math.min(text.getLayoutBounds().getWidth(),  wrapWidth));
+            textHeight = snapSize(Math.min(text.getLayoutBounds().getHeight(), wrapHeight));
+        }
+
+        final double gap = (ignoreText || ignoreGraphic) ? 0 : labeled.getGraphicTextGap();
+
+        // Figure out the contentWidth and contentHeight. This is the width
+        // and height of the Labeled and Graphic together, not the available
+        // content area (which would be a different calculation).
+        double contentWidth = Math.max(graphicWidth, textWidth);
+        double contentHeight = Math.max(graphicHeight, textHeight);
+        if (contentDisplay == ContentDisplay.TOP || contentDisplay == ContentDisplay.BOTTOM) {
+            contentHeight = graphicHeight + gap + textHeight;
+        } else if (contentDisplay == ContentDisplay.LEFT || contentDisplay == ContentDisplay.RIGHT) {
+            contentWidth = graphicWidth + gap + textWidth;
+        }
+
+        // Now we want to compute the x/y location to place the content at.
+
+         // Compute the contentX position based on hpos and the space available
+        double contentX;
+        if (hpos == HPos.LEFT) {
+           contentX = x;
+        } else if (hpos == HPos.RIGHT) {
+           contentX = x + (w - contentWidth);
+        } else {
+            // TODO Baseline may not be handled correctly
+            // may have been CENTER or null, treat as center
+            contentX = (x + ((w - contentWidth) / 2.0));
+        }
+
+        // Compute the contentY position based on vpos and the space available
+        double contentY;
+        if (vpos == VPos.TOP) {
+            contentY = y;
+        } else if (vpos == VPos.BOTTOM) {
+            contentY = (y + (h - contentHeight));
+        } else {
+            // TODO Baseline may not be handled correctly
+            // may have been CENTER, BASELINE, or null, treat as center
+            contentY = (y + ((h - contentHeight) / 2.0));
+        }
+
+        double preMnemonicWidth = 0.0;
+        double mnemonicWidth = 0.0;
+        double mnemonicHeight = 0.0;
+        if (containsMnemonic) {
+            final Font font = text.getFont();
+            String preSt = bindings.getText();
+            preMnemonicWidth = Utils.computeTextWidth(font, preSt.substring(0,bindings.getMnemonicIndex()) , 0);
+            mnemonicWidth = Utils.computeTextWidth(font, preSt.substring(bindings.getMnemonicIndex(),bindings.getMnemonicIndex()+1) , 0);
+            mnemonicHeight = Utils.computeTextHeight(font, "_", 0, text.getBoundsType());
+        }
+
+
+        // Now to position the graphic and text. At this point I know the
+        // contentX and contentY locations (including the padding and whatnot
+        // that was defined on the Labeled). I also know the content width and
+        // height. So now I just need to lay out the graphic and text within
+        // that content x/y/w/h area.
+        if ((!ignoreGraphic || !ignoreText) && !text.isManaged()) {
+            text.setManaged(true);
+        }
+
+        if (ignoreGraphic && ignoreText) {
+            // There might be a text node as a child, or a graphic node as
+            // a child. However we don't have to do anything for the graphic
+            // node because the only way it can be a child and still have
+            // ignoreGraphic true is if it is unmanaged. Text however might
+            // be a child but still not matter, in which case we will just
+            // stop managing it (although really I wish it just wasn't here
+            // all all in that case)
+            if (text.isManaged()) {
+                text.setManaged(false);
+            }
+            text.relocate(snapPosition(contentX), snapPosition(contentY));
+        } else if (ignoreGraphic) {
+            // Since I only have to position the text, it goes at the
+            // contentX/contentY location. Note that positionNode will
+            // adjust the text based on the text's minX/minY so no need to
+            // worry about that here
+            text.relocate(snapPosition(contentX), snapPosition(contentY));
+            if (containsMnemonic) {
+                mnemonic_underscore.setEndX(mnemonicWidth-2.0);
+                mnemonic_underscore.relocate(contentX+preMnemonicWidth, contentY+mnemonicHeight-1);
+            }
+
+        } else if (ignoreText) {
+            // there isn't text to display, so we need to position it
+            // such that it doesn't affect the content area (although when
+            // there is a graphic, the text isn't even in the scene)
+            text.relocate(snapPosition(contentX), snapPosition(contentY));
+            graphic.relocate(snapPosition(contentX), snapPosition(contentY));
+            if (containsMnemonic) {
+                mnemonic_underscore.setEndX(mnemonicWidth);
+                mnemonic_underscore.setStrokeWidth(mnemonicHeight/10.0);
+                mnemonic_underscore.relocate(contentX+preMnemonicWidth, contentY+mnemonicHeight-1);
+
+            }
+        } else {
+            // There is both text and a graphic, so I need to position them
+            // relative to each other
+            double graphicX = 0;
+            double graphicY = 0;
+            double textX = 0;
+            double textY = 0;
+
+            if (contentDisplay == ContentDisplay.TOP) {
+                graphicX = contentX + ((contentWidth - graphicWidth) / 2.0);
+                textX = contentX + ((contentWidth - textWidth) / 2.0);
+                // The graphic is above the text, so it is positioned at
+                // graphicY and the text below it.
+                graphicY = contentY;
+                textY = graphicY + graphicHeight + gap;
+            } else if (contentDisplay == ContentDisplay.RIGHT) {
+                // The graphic is to the right of the text
+                textX = contentX;
+                graphicX = textX + textWidth + gap;
+                graphicY = contentY + ((contentHeight - graphicHeight) / 2.0);
+                textY = contentY + ((contentHeight - textHeight) / 2.0);
+            } else if (contentDisplay == ContentDisplay.BOTTOM) {
+                graphicX = contentX + ((contentWidth - graphicWidth) / 2.0);
+                textX = contentX + ((contentWidth - textWidth) / 2.0);
+                // The graphic is below the text
+                textY = contentY;
+                graphicY = textY + textHeight + gap;
+            } else if (contentDisplay == ContentDisplay.LEFT) {
+                // The graphic is to the left of the text, so the graphicX is
+                // simply the contentX and the textX is to the right of it.
+                graphicX = contentX;
+                textX = graphicX + graphicWidth + gap;
+                graphicY = contentY + ((contentHeight - graphicHeight) / 2.0);
+                textY = contentY + ((contentHeight - textHeight) / 2.0);
+            } else if (contentDisplay == ContentDisplay.CENTER) {
+                graphicX = contentX + ((contentWidth - graphicWidth) / 2.0);
+                textX = contentX + ((contentWidth - textWidth) / 2.0);
+                graphicY = contentY + ((contentHeight - graphicHeight) / 2.0);
+                textY = contentY + ((contentHeight - textHeight) / 2.0);
+            }
+            text.relocate(snapPosition(textX), snapPosition(textY));
+            if (containsMnemonic) {
+                mnemonic_underscore.setEndX(mnemonicWidth);
+                mnemonic_underscore.setStrokeWidth(mnemonicHeight/10.0);
+                mnemonic_underscore.relocate(snapPosition(textX+preMnemonicWidth), snapPosition(textY+mnemonicHeight-1));
+            }
+            graphic.relocate(snapPosition(graphicX), snapPosition(graphicY));
+        }
+
+        /**
+         * check if the label text overflows it's bounds.
+         * If there's an overflow, and no text clip then
+         * we'll clip it. 
+         * If there is no overflow, and the label text has a
+         * clip, then remove it.
+         */
+        if ((text != null) && 
+            ((text.getLayoutBounds().getHeight() > wrapHeight) ||
+             (text.getLayoutBounds().getWidth() > wrapWidth))) {
+
+            if (textClip == null) {
+                textClip = new Rectangle();
+            }
+
+            if (labeled.getEffectiveNodeOrientation() == NodeOrientation.LEFT_TO_RIGHT) {
+                textClip.setX(text.getLayoutBounds().getMinX());
+            } else {
+                textClip.setX(text.getLayoutBounds().getMaxX() - wrapWidth);
+            }
+            textClip.setY(text.getLayoutBounds().getMinY());
+            textClip.setWidth(wrapWidth);
+            textClip.setHeight(wrapHeight);
+            if (text.getClip() == null) {
+                text.setClip(textClip);
+            }
+        }
+        else {
+            /**
+             * content fits inside bounds, no need
+             * for a clip
+             */
+            if (text.getClip() != null) {
+                text.setClip(null);
+            }
+        }
+    }
+
+    /** @treatAsPrivate */
+    @Override protected Object accGetAttribute(Attribute attribute, Object... parameters) {
+        switch (attribute) {
+            case TITLE: {
+                if (bindings != null) {
+                    return bindings.getText();
+                }
+                final Labeled labeled = getSkinnable();
+                return labeled != null ? labeled.getText() : null;
+            }
+            case MNEMONIC: {
+                if (bindings != null) {
+                    return bindings.getMnemonic();
+                }
+                return null;
+            }
+            default: return super.accGetAttribute(attribute, parameters);
+        }
+    }
+}
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledText.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledText.java	Mon May 05 10:06:16 2014 +1200
@@ -36,8 +36,8 @@
 
 import javafx.beans.InvalidationListener;
 import javafx.beans.Observable;
-import javafx.beans.property.ObjectProperty;
 import javafx.beans.value.ObservableValue;
+import javafx.beans.value.WritableValue;
 import javafx.css.*;
 import javafx.scene.control.Labeled;
 import javafx.scene.paint.Color;
@@ -113,7 +113,7 @@
     private StyleablePropertyMirror<Font> fontMirror = null;
     private StyleableProperty<Font> fontMirror() {
         if (fontMirror == null) {
-            fontMirror = new StyleablePropertyMirror<Font>(FONT, "fontMirror", Font.getDefault(), (StyleableProperty<Font>)labeled.fontProperty());
+            fontMirror = new StyleablePropertyMirror<Font>(FONT, "fontMirror", Font.getDefault(), (StyleableProperty<Font>)(WritableValue<Font>)labeled.fontProperty());
             fontProperty().addListener(fontMirror);
         }
         return fontMirror;
@@ -136,7 +136,7 @@
     private StyleablePropertyMirror<Paint> fillMirror;
     private StyleableProperty<Paint> fillMirror() {
         if (fillMirror == null) {
-            fillMirror = new StyleablePropertyMirror<Paint>(FILL, "fillMirror", Color.BLACK, (StyleableProperty<Paint>)labeled.textFillProperty());
+            fillMirror = new StyleablePropertyMirror<Paint>(FILL, "fillMirror", Color.BLACK, (StyleableProperty<Paint>)(WritableValue<Paint>)labeled.textFillProperty());
             fillProperty().addListener(fillMirror);
         }
         return fillMirror;        
@@ -160,7 +160,7 @@
     private StyleablePropertyMirror<TextAlignment> textAlignmentMirror;
     private StyleableProperty<TextAlignment> textAlignmentMirror() {
         if (textAlignmentMirror == null) {
-            textAlignmentMirror = new StyleablePropertyMirror<TextAlignment>(TEXT_ALIGNMENT, "textAlignmentMirror", TextAlignment.LEFT, (StyleableProperty<TextAlignment>)labeled.textAlignmentProperty());
+            textAlignmentMirror = new StyleablePropertyMirror<TextAlignment>(TEXT_ALIGNMENT, "textAlignmentMirror", TextAlignment.LEFT, (StyleableProperty<TextAlignment>)(WritableValue<TextAlignment>)labeled.textAlignmentProperty());
             textAlignmentProperty().addListener(textAlignmentMirror);
         }
         return textAlignmentMirror;        
@@ -185,7 +185,7 @@
     private StyleablePropertyMirror<Boolean> underlineMirror;
     private StyleableProperty<Boolean> underlineMirror() {
         if (underlineMirror == null) {
-            underlineMirror = new StyleablePropertyMirror<Boolean>(UNDERLINE, "underLineMirror", Boolean.FALSE, (StyleableProperty<Boolean>)labeled.underlineProperty());
+            underlineMirror = new StyleablePropertyMirror<Boolean>(UNDERLINE, "underLineMirror", Boolean.FALSE, (StyleableProperty<Boolean>)(WritableValue<Boolean>)labeled.underlineProperty());
             underlineProperty().addListener(underlineMirror);
         }
         return underlineMirror;        
@@ -210,7 +210,7 @@
     private StyleablePropertyMirror<Number> lineSpacingMirror;
     private StyleableProperty<Number> lineSpacingMirror() {
         if (lineSpacingMirror == null) {
-            lineSpacingMirror = new StyleablePropertyMirror<Number>(LINE_SPACING, "lineSpacingMirror", 0d, (StyleableProperty<Number>)labeled.lineSpacingProperty());
+            lineSpacingMirror = new StyleablePropertyMirror<Number>(LINE_SPACING, "lineSpacingMirror", 0d, (StyleableProperty<Number>)(WritableValue<Number>)labeled.lineSpacingProperty());
             lineSpacingProperty().addListener(lineSpacingMirror);
         }
         return lineSpacingMirror;        
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ListViewSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ListViewSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -44,7 +44,6 @@
 import javafx.scene.control.SelectionModel;
 import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.StackPane;
-import javafx.util.Callback;
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -399,8 +398,8 @@
         ListCell<T> lastVisibleCell = flow.getLastVisibleCellWithinViewPort();
         if (lastVisibleCell == null) return -1;
 
-        final SelectionModel sm = getSkinnable().getSelectionModel();
-        final FocusModel fm = getSkinnable().getFocusModel();
+        final SelectionModel<T> sm = getSkinnable().getSelectionModel();
+        final FocusModel<T> fm = getSkinnable().getFocusModel();
         if (sm == null || fm == null) return -1;
 
         int lastVisibleCellIndex = lastVisibleCell.getIndex();
@@ -445,8 +444,8 @@
         ListCell<T> firstVisibleCell = flow.getFirstVisibleCellWithinViewPort();
         if (firstVisibleCell == null) return -1;
 
-        final SelectionModel sm = getSkinnable().getSelectionModel();
-        final FocusModel fm = getSkinnable().getFocusModel();
+        final SelectionModel<T> sm = getSkinnable().getSelectionModel();
+        final FocusModel<T> fm = getSkinnable().getFocusModel();
         if (sm == null || fm == null) return -1;
 
         int firstVisibleCellIndex = firstVisibleCell.getIndex();
@@ -495,7 +494,7 @@
                 return flow.getPrivateCell(rowIndex);
             }
             case SELECTED_ROWS: {
-                MultipleSelectionModel sm = getSkinnable().getSelectionModel();
+                MultipleSelectionModel<T> sm = getSkinnable().getSelectionModel();
                 ObservableList<Integer> indices = sm.getSelectedIndices();
                 List<Node> selection = new ArrayList<>(indices.size());
                 for (int i : indices) {
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuBarSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuBarSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -186,7 +186,7 @@
      **************************************************************************/
 
     public MenuBarSkin(final MenuBar control) {
-        super(control, new BehaviorBase<>(control, Collections.EMPTY_LIST));
+        super(control, new BehaviorBase<>(control, Collections.emptyList()));
         
         container = new HBox();
         container.getStyleClass().add("container");
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuButtonSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuButtonSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -25,11 +25,9 @@
 
 package com.sun.javafx.scene.control.skin;
 
-import javafx.event.ActionEvent;
 import javafx.event.Event;
 import javafx.event.EventHandler;
 import javafx.scene.control.MenuButton;
-import javafx.stage.WindowEvent;
 
 import com.sun.javafx.scene.control.behavior.MenuButtonBehavior;
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuButtonSkinBase.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuButtonSkinBase.java	Mon May 05 10:06:16 2014 +1200
@@ -26,27 +26,16 @@
 package com.sun.javafx.scene.control.skin;
 
 import com.sun.javafx.scene.control.ControlAcceleratorSupport;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.ListChangeListener;
 import javafx.event.ActionEvent;
-import javafx.event.Event;
-import javafx.event.EventHandler;
-import javafx.scene.Scene;
-import javafx.scene.control.CheckMenuItem;
 import javafx.scene.control.ContextMenu;
-import javafx.scene.control.Menu;
 import javafx.scene.control.MenuButton;
 import javafx.scene.control.MenuItem;
-import javafx.scene.control.RadioMenuItem;
-import javafx.scene.input.KeyCombination;
 import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.Region;
 import javafx.scene.layout.StackPane;
 import com.sun.javafx.scene.control.behavior.MenuButtonBehaviorBase;
 
-import java.util.Map;
-
 /**
  * Base class for MenuButtonSkin and SplitMenuButtonSkin. It consists of the
  * label, the arrowButton with its arrow shape, and the popup.
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/PaginationSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/PaginationSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -30,21 +30,21 @@
 import javafx.css.StyleableDoubleProperty;
 import javafx.css.StyleableObjectProperty;
 import javafx.css.CssMetaData;
+
 import com.sun.javafx.css.converters.BooleanConverter;
 import com.sun.javafx.css.converters.EnumConverter;
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.scene.control.behavior.PaginationBehavior;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+
 import javafx.animation.*;
 import javafx.application.Platform;
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.ObjectProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
+import javafx.beans.value.WritableValue;
 import javafx.collections.ListChangeListener;
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
@@ -65,7 +65,6 @@
 import javafx.scene.layout.HBox;
 import javafx.scene.layout.StackPane;
 import javafx.scene.shape.Rectangle;
-import javafx.scene.text.Font;
 import javafx.util.Duration;
 
 public class PaginationSkin extends BehaviorSkinBase<Pagination, PaginationBehavior>  {
@@ -1286,7 +1285,7 @@
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(Pagination n) {
                 final PaginationSkin skin = (PaginationSkin) n.getSkin();
-                return (StyleableProperty<Boolean>)skin.arrowsVisibleProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)skin.arrowsVisibleProperty();
             }
         };
 
@@ -1303,7 +1302,7 @@
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(Pagination n) {
                 final PaginationSkin skin = (PaginationSkin) n.getSkin();
-                return (StyleableProperty<Boolean>)skin.pageInformationVisibleProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)skin.pageInformationVisibleProperty();
             }
         };
 
@@ -1320,7 +1319,7 @@
             @Override
             public StyleableProperty<Side> getStyleableProperty(Pagination n) {
                 final PaginationSkin skin = (PaginationSkin) n.getSkin();
-                return (StyleableProperty<Side>)skin.pageInformationAlignmentProperty();
+                return (StyleableProperty<Side>)(WritableValue<Side>)skin.pageInformationAlignmentProperty();
             }
         };
 
@@ -1337,7 +1336,7 @@
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(Pagination n) {
                 final PaginationSkin skin = (PaginationSkin) n.getSkin();
-                return (StyleableProperty<Boolean>)skin.tooltipVisibleProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)skin.tooltipVisibleProperty();
             }
         };
         private static final CssMetaData<Pagination,Number> ARROW_BUTTON_GAP =
@@ -1349,7 +1348,7 @@
                 }
                 @Override public StyleableProperty<Number> getStyleableProperty(Pagination n) {
                     final PaginationSkin skin = (PaginationSkin) n.getSkin();
-                    return (StyleableProperty<Number>)skin.arrowButtonGapProperty();
+                    return (StyleableProperty<Number>)(WritableValue<Number>)skin.arrowButtonGapProperty();
                 }
             };
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressBarSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressBarSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -34,18 +34,14 @@
 import javafx.animation.KeyValue;
 import javafx.animation.Timeline;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.binding.When;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.DoubleProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
+import javafx.beans.value.WritableValue;
 import javafx.css.CssMetaData;
 import javafx.css.StyleableBooleanProperty;
 import javafx.css.StyleableDoubleProperty;
 import javafx.css.StyleableProperty;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.geometry.Bounds;
 import javafx.scene.Node;
 import javafx.scene.Parent;
@@ -59,9 +55,11 @@
 import javafx.scene.paint.Color;
 import javafx.stage.Window;
 import javafx.util.Duration;
+
 import com.sun.javafx.css.converters.BooleanConverter;
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.scene.control.behavior.ProgressBarBehavior;
+
 import javafx.css.Styleable;
 
 
@@ -611,7 +609,7 @@
             @Override
             public StyleableProperty<Number> getStyleableProperty(ProgressBar n) {
                 final ProgressBarSkin skin = (ProgressBarSkin) n.getSkin();
-                return (StyleableProperty<Number>)skin.indeterminateBarLengthProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)skin.indeterminateBarLengthProperty();
             }
         };
 
@@ -629,7 +627,7 @@
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(ProgressBar n) {
                 final ProgressBarSkin skin = (ProgressBarSkin) n.getSkin();
-                return (StyleableProperty<Boolean>)skin.indeterminateBarEscapeProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)skin.indeterminateBarEscapeProperty();
             }
         };
 
@@ -647,7 +645,7 @@
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(ProgressBar n) {
                 final ProgressBarSkin skin = (ProgressBarSkin) n.getSkin();
-                return (StyleableProperty<Boolean>)skin.indeterminateBarFlipProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)skin.indeterminateBarFlipProperty();
             }
         };
 
@@ -665,7 +663,7 @@
             @Override
             public StyleableProperty<Number> getStyleableProperty(ProgressBar n) {
                 final ProgressBarSkin skin = (ProgressBarSkin) n.getSkin();
-                return (StyleableProperty<Number>)skin.indeterminateBarAnimationTimeProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)skin.indeterminateBarAnimationTimeProperty();
             }
         };
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressIndicatorSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressIndicatorSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -34,16 +34,14 @@
 import javafx.animation.Timeline;
 import javafx.beans.InvalidationListener;
 import javafx.beans.Observable;
-import javafx.beans.WeakInvalidationListener;
 import javafx.beans.binding.BooleanExpression;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.IntegerProperty;
 import javafx.beans.property.ObjectProperty;
+import javafx.beans.value.WritableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.geometry.Bounds;
 import javafx.geometry.NodeOrientation;
 import javafx.geometry.VPos;
@@ -743,7 +741,7 @@
                     @Override
                     public StyleableProperty<Paint> getStyleableProperty(ProgressIndicator n) {
                         final ProgressIndicatorSkin skin = (ProgressIndicatorSkin) n.getSkin();
-                        return (StyleableProperty<Paint>)skin.progressColor;
+                        return (StyleableProperty<Paint>)(WritableValue<Paint>)skin.progressColor;
                     }
                 };
         private static final CssMetaData<ProgressIndicator,Number> INDETERMINATE_SEGMENT_COUNT =
@@ -758,7 +756,7 @@
 
                     @Override public StyleableProperty<Number> getStyleableProperty(ProgressIndicator n) {
                         final ProgressIndicatorSkin skin = (ProgressIndicatorSkin) n.getSkin();
-                        return (StyleableProperty<Number>)skin.indeterminateSegmentCount;
+                        return (StyleableProperty<Number>)(WritableValue<Number>)skin.indeterminateSegmentCount;
                     }
                 };
         private static final CssMetaData<ProgressIndicator,Boolean> SPIN_ENABLED =
@@ -771,7 +769,7 @@
 
                     @Override public StyleableProperty<Boolean> getStyleableProperty(ProgressIndicator node) {
                         final ProgressIndicatorSkin skin = (ProgressIndicatorSkin) node.getSkin();
-                        return (StyleableProperty<Boolean>)skin.spinEnabled;
+                        return (StyleableProperty<Boolean>)(WritableValue<Boolean>)skin.spinEnabled;
                     }
                 };
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/RadioButtonSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/RadioButtonSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -29,8 +29,6 @@
 import javafx.scene.control.RadioButton;
 import javafx.scene.layout.StackPane;
 
-import com.sun.javafx.scene.control.behavior.ButtonBehavior;
-
 public class RadioButtonSkin extends LabeledSkinBase<RadioButton, ToggleButtonBehavior<RadioButton>> {
 
     /** The radio contains the "dot", which is usually a circle */
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollBarSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollBarSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -25,14 +25,12 @@
 
 package com.sun.javafx.scene.control.skin;
 
-import javafx.event.EventHandler;
 import javafx.geometry.Orientation;
 import javafx.geometry.Point2D;
 import javafx.scene.accessibility.Action;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
 import javafx.scene.control.ScrollBar;
-import javafx.scene.control.Slider;
 import javafx.scene.input.MouseButton;
 import javafx.scene.input.ScrollEvent;
 import javafx.scene.layout.Region;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -25,9 +25,7 @@
 
 package com.sun.javafx.scene.control.skin;
 
-import com.sun.javafx.scene.traversal.Direction;
 import com.sun.javafx.scene.traversal.ParentTraversalEngine;
-import com.sun.javafx.scene.traversal.TraversalEngine;
 import javafx.animation.Animation.Status;
 import javafx.animation.KeyFrame;
 import javafx.animation.KeyValue;
@@ -38,11 +36,7 @@
 import javafx.beans.property.DoublePropertyBase;
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableValue;
-import javafx.event.ActionEvent;
-import javafx.event.Event;
-import javafx.event.EventDispatchChain;
 import javafx.event.EventDispatcher;
-import javafx.event.EventHandler;
 import javafx.geometry.BoundingBox;
 import javafx.geometry.Bounds;
 import javafx.geometry.Orientation;
@@ -61,7 +55,6 @@
 import com.sun.javafx.Utils;
 import com.sun.javafx.scene.control.behavior.ScrollPaneBehavior;
 import com.sun.javafx.scene.traversal.TraverseListener;
-import static com.sun.javafx.Utils.*;
 import static com.sun.javafx.scene.control.skin.Utils.*;
 import javafx.geometry.Insets;
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SeparatorSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SeparatorSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -60,7 +60,7 @@
         // There is no behavior for the separator, so we just create a
         // dummy behavior base instead, since SkinBase will complain
         // about it being null.
-        super(separator, new BehaviorBase<>(separator, Collections.EMPTY_LIST));
+        super(separator, new BehaviorBase<>(separator, Collections.emptyList()));
 
         line = new Region();
         line.getStyleClass().setAll("line");
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SliderSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SliderSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -26,7 +26,6 @@
 package com.sun.javafx.scene.control.skin;
 
 import javafx.animation.Transition;
-import javafx.event.EventHandler;
 import javafx.geometry.Orientation;
 import javafx.geometry.Point2D;
 import javafx.geometry.Side;
@@ -35,7 +34,6 @@
 import javafx.scene.accessibility.Role;
 import javafx.scene.chart.NumberAxis;
 import javafx.scene.control.Slider;
-import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.StackPane;
 import javafx.util.Duration;
 import javafx.util.StringConverter;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SplitMenuButtonSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SplitMenuButtonSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -25,7 +25,6 @@
 
 package com.sun.javafx.scene.control.skin;
 
-import javafx.event.EventHandler;
 import javafx.scene.control.SplitMenuButton;
 import javafx.scene.input.MouseEvent;
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SplitPaneSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SplitPaneSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -30,7 +30,6 @@
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
-import javafx.event.EventHandler;
 import javafx.geometry.HPos;
 import javafx.geometry.NodeOrientation;
 import javafx.geometry.Orientation;
@@ -55,7 +54,7 @@
     private boolean horizontal;
     
     public SplitPaneSkin(final SplitPane splitPane) {
-        super(splitPane, new BehaviorBase<>(splitPane, Collections.EMPTY_LIST));
+        super(splitPane, new BehaviorBase<>(splitPane, Collections.emptyList()));
 //        splitPane.setManaged(false);
         horizontal = getSkinnable().getOrientation() == Orientation.HORIZONTAL;
         
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TabPaneSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TabPaneSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -26,6 +26,7 @@
 package com.sun.javafx.scene.control.skin;
 
 import com.sun.javafx.Utils;
+
 import javafx.animation.Interpolator;
 import javafx.animation.KeyFrame;
 import javafx.animation.KeyValue;
@@ -36,6 +37,7 @@
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleDoubleProperty;
+import javafx.beans.value.WritableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
@@ -47,7 +49,6 @@
 import javafx.css.StyleableProperty;
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
-import javafx.geometry.Bounds;
 import javafx.geometry.HPos;
 import javafx.geometry.Pos;
 import javafx.geometry.Side;
@@ -77,18 +78,18 @@
 import javafx.scene.layout.StackPane;
 import javafx.scene.shape.Rectangle;
 import javafx.scene.transform.Rotate;
-import javafx.util.Callback;
 import javafx.util.Duration;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+
 import com.sun.javafx.css.converters.EnumConverter;
 import com.sun.javafx.scene.control.MultiplePropertyChangeListenerHandler;
 import com.sun.javafx.scene.control.behavior.TabPaneBehavior;
 import com.sun.javafx.scene.traversal.Direction;
 import com.sun.javafx.scene.traversal.TraversalEngine;
-import com.sun.javafx.scene.traversal.TraverseListener;
 
 public class TabPaneSkin extends BehaviorSkinBase<TabPane, TabPaneBehavior> {
     private static enum TabAnimation {
@@ -603,7 +604,7 @@
 
             @Override public StyleableProperty<TabAnimation> getStyleableProperty(TabPane node) {
                 TabPaneSkin skin = (TabPaneSkin) node.getSkin();
-                return (StyleableProperty<TabAnimation>)skin.openTabAnimation;
+                return (StyleableProperty<TabAnimation>)(WritableValue<TabAnimation>)skin.openTabAnimation;
             }
         };
         
@@ -617,7 +618,7 @@
 
             @Override public StyleableProperty<TabAnimation> getStyleableProperty(TabPane node) {
                 TabPaneSkin skin = (TabPaneSkin) node.getSkin();
-                return (StyleableProperty<TabAnimation>)skin.closeTabAnimation;
+                return (StyleableProperty<TabAnimation>)(WritableValue<TabAnimation>)skin.closeTabAnimation;
             }
         };
         
@@ -697,7 +698,7 @@
                         if (!removeTab.isEmpty()) {                            
                             double offset = 0;
                             double w = tabHeaderArea.getWidth() - snapSize(controlButtons.prefWidth(-1)) - firstTabIndent() - SPACER;
-                            Iterator i = getChildren().iterator();
+                            Iterator<Node> i = getChildren().iterator();
                             while (i.hasNext()) {
                                 TabHeaderSkin tabHeader = (TabHeaderSkin)i.next();
                                 double tabHeaderPrefWidth = snapSize(tabHeader.prefWidth(-1));
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableCellSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableCellSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -36,13 +36,11 @@
  */
 public class TableCellSkin<S,T> extends TableCellSkinBase<TableCell<S,T>, TableCellBehavior<S,T>> {
     
-    private final TableCell<S,T> tableCell;
     private final TableColumn<S,T> tableColumn;
     
     public TableCellSkin(TableCell<S,T> tableCell) {
         super(tableCell, new TableCellBehavior<S,T>(tableCell));
         
-        this.tableCell = tableCell;
         this.tableColumn = tableCell.getTableColumn();
         
         super.init(tableCell);
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableCellSkinBase.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableCellSkinBase.java	Mon May 05 10:06:16 2014 +1200
@@ -27,7 +27,6 @@
 
 import com.sun.javafx.scene.control.behavior.CellBehaviorBase;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.WeakInvalidationListener;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.ReadOnlyDoubleProperty;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableColumnHeader.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableColumnHeader.java	Mon May 05 10:06:16 2014 +1200
@@ -26,6 +26,7 @@
 package com.sun.javafx.scene.control.skin;
 
 import javafx.beans.property.DoubleProperty;
+import javafx.beans.value.WritableValue;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
 import javafx.collections.WeakListChangeListener;
@@ -52,13 +53,15 @@
 import javafx.scene.layout.HBox;
 import javafx.scene.layout.Priority;
 import javafx.scene.layout.Region;
-import javafx.util.Callback;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
+
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.scene.control.MultiplePropertyChangeListenerHandler;
+
 import static com.sun.javafx.scene.control.TableColumnSortTypeWrapper.getSortTypeName;
 import static com.sun.javafx.scene.control.TableColumnSortTypeWrapper.getSortTypeProperty;
 import static com.sun.javafx.scene.control.TableColumnSortTypeWrapper.isAscending;
@@ -968,7 +971,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(TableColumnHeader n) {
-                return (StyleableProperty<Number>)n.sizeProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.sizeProperty();
             }
         };
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableHeaderRow.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableHeaderRow.java	Mon May 05 10:06:16 2014 +1200
@@ -28,14 +28,12 @@
 import java.util.*;
 
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.WeakInvalidationListener;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.StringProperty;
 import javafx.collections.ListChangeListener;
 import javafx.collections.WeakListChangeListener;
-import javafx.event.EventHandler;
 import javafx.geometry.HPos;
 import javafx.geometry.Insets;
 import javafx.geometry.Side;
@@ -46,7 +44,6 @@
 import javafx.scene.control.Label;
 import javafx.scene.control.TableColumn;
 import javafx.scene.control.TableColumnBase;
-import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.Pane;
 import javafx.scene.layout.Region;
 import javafx.scene.layout.StackPane;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableRowSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableRowSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -28,7 +28,6 @@
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
 
 import javafx.beans.property.DoubleProperty;
 import javafx.scene.accessibility.Attribute;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableRowSkinBase.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableRowSkinBase.java	Mon May 05 10:06:16 2014 +1200
@@ -37,9 +37,7 @@
 import javafx.collections.WeakListChangeListener;
 import javafx.css.StyleOrigin;
 import javafx.css.StyleableObjectProperty;
-import javafx.geometry.HPos;
 import javafx.geometry.Pos;
-import javafx.geometry.VPos;
 import javafx.scene.Node;
 import javafx.scene.Parent;
 import javafx.scene.control.Control;
@@ -370,7 +368,7 @@
                 // if the style origin is null then the property has not been
                 // set (or it has been reset to its default), which means that
                 // we can set it without overwriting someone elses settings.
-                final StyleOrigin origin = ((StyleableObjectProperty) tableCell.alignmentProperty()).getStyleOrigin();
+                final StyleOrigin origin = ((StyleableObjectProperty<?>) tableCell.alignmentProperty()).getStyleOrigin();
                 if (! centreContent && origin == null) {
                     tableCell.setAlignment(Pos.TOP_LEFT);
                 }
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableViewSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableViewSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -28,8 +28,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.collections.FXCollections;
@@ -48,7 +46,6 @@
 import javafx.scene.control.TableView.TableViewSelectionModel;
 import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.Region;
-import javafx.scene.text.Font;
 import javafx.util.Callback;
 
 import com.sun.javafx.scene.control.behavior.TableViewBehavior;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableViewSkinBase.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableViewSkinBase.java	Mon May 05 10:06:16 2014 +1200
@@ -28,9 +28,7 @@
 import com.sun.javafx.scene.control.behavior.BehaviorBase;
 
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.MapChangeListener;
@@ -47,13 +45,11 @@
 import javafx.collections.WeakListChangeListener;
 import com.sun.javafx.scene.control.skin.resources.ControlResources;
 
-import java.util.ArrayList;
 import java.util.List;
 import javafx.beans.WeakInvalidationListener;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.value.WeakChangeListener;
-import javafx.event.EventHandler;
 import javafx.geometry.HPos;
 import javafx.geometry.VPos;
 
@@ -499,7 +495,7 @@
 
     private boolean isLeadIndex(boolean isFocusDriven, int index) {
         final TableSelectionModel<S> sm = getSelectionModel();
-        final FocusModel fm = getFocusModel();
+        final FocusModel<S> fm = getFocusModel();
 
         return (isFocusDriven && fm.getFocusedIndex() == index)
                 || (! isFocusDriven && sm.getSelectedIndex() == index);
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -30,15 +30,11 @@
 import javafx.animation.KeyFrame;
 import javafx.animation.Timeline;
 import javafx.application.Platform;
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.binding.BooleanBinding;
 import javafx.beans.binding.DoubleBinding;
 import javafx.beans.binding.IntegerBinding;
-import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableBooleanValue;
 import javafx.beans.value.ObservableIntegerValue;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
 import javafx.event.ActionEvent;
@@ -62,7 +58,6 @@
 import javafx.scene.shape.Path;
 import javafx.scene.shape.PathElement;
 import javafx.scene.text.Text;
-import javafx.scene.text.TextBoundsType;
 import javafx.util.Duration;
 
 import java.util.List;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextFieldSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextFieldSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -25,18 +25,14 @@
 
 package com.sun.javafx.scene.control.skin;
 
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.binding.BooleanBinding;
 import javafx.beans.binding.DoubleBinding;
 import javafx.beans.binding.ObjectBinding;
 import javafx.beans.binding.StringBinding;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.SimpleDoubleProperty;
-import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableBooleanValue;
 import javafx.beans.value.ObservableDoubleValue;
-import javafx.beans.value.ObservableValue;
 import javafx.event.EventHandler;
 import javafx.geometry.Bounds;
 import javafx.geometry.HPos;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextInputControlSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextInputControlSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -30,8 +30,6 @@
 import javafx.animation.Timeline;
 import javafx.application.ConditionalFeature;
 import javafx.application.Platform;
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.binding.BooleanBinding;
 import javafx.beans.binding.ObjectBinding;
 import javafx.beans.property.BooleanProperty;
@@ -45,8 +43,6 @@
 import javafx.css.StyleableBooleanProperty;
 import javafx.css.StyleableObjectProperty;
 import javafx.css.StyleableProperty;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.geometry.NodeOrientation;
 import javafx.geometry.Point2D;
 import javafx.geometry.Rectangle2D;
@@ -62,7 +58,6 @@
 import javafx.scene.input.Clipboard;
 import javafx.scene.input.InputMethodEvent;
 import javafx.scene.input.InputMethodHighlight;
-import javafx.scene.input.InputMethodRequests;
 import javafx.scene.input.InputMethodTextRun;
 import javafx.scene.layout.StackPane;
 import javafx.scene.paint.Color;
@@ -738,13 +733,13 @@
 
             @Override
             public boolean isSettable(TextInputControl n) {
-                final TextInputControlSkin skin = (TextInputControlSkin) n.getSkin();
+                final TextInputControlSkin<?,?> skin = (TextInputControlSkin<?,?>) n.getSkin();
                 return skin.textFill == null || !skin.textFill.isBound();
             }
 
             @Override @SuppressWarnings("unchecked") 
             public StyleableProperty<Paint> getStyleableProperty(TextInputControl n) {
-                final TextInputControlSkin skin = (TextInputControlSkin) n.getSkin();                
+                final TextInputControlSkin<?,?> skin = (TextInputControlSkin<?,?>) n.getSkin();                
                 return (StyleableProperty<Paint>)skin.textFill;
             }
         };
@@ -755,13 +750,13 @@
 
             @Override
             public boolean isSettable(TextInputControl n) {
-                final TextInputControlSkin skin = (TextInputControlSkin) n.getSkin();
+                final TextInputControlSkin<?,?> skin = (TextInputControlSkin<?,?>) n.getSkin();
                 return skin.promptTextFill == null || !skin.promptTextFill.isBound();
             }
 
             @Override @SuppressWarnings("unchecked") 
             public StyleableProperty<Paint> getStyleableProperty(TextInputControl n) {
-                final TextInputControlSkin skin = (TextInputControlSkin) n.getSkin();
+                final TextInputControlSkin<?,?> skin = (TextInputControlSkin<?,?>) n.getSkin();
                 return (StyleableProperty<Paint>)skin.promptTextFill;
             }
         };
@@ -772,13 +767,13 @@
 
             @Override
             public boolean isSettable(TextInputControl n) {
-                final TextInputControlSkin skin = (TextInputControlSkin) n.getSkin();
+                final TextInputControlSkin<?,?> skin = (TextInputControlSkin<?,?>) n.getSkin();
                 return skin.highlightFill == null || !skin.highlightFill.isBound();
             }
 
             @Override @SuppressWarnings("unchecked") 
             public StyleableProperty<Paint> getStyleableProperty(TextInputControl n) {
-                final TextInputControlSkin skin = (TextInputControlSkin) n.getSkin();
+                final TextInputControlSkin<?,?> skin = (TextInputControlSkin<?,?>) n.getSkin();
                 return (StyleableProperty<Paint>)skin.highlightFill;
             }
         };
@@ -789,13 +784,13 @@
 
             @Override
             public boolean isSettable(TextInputControl n) {
-                final TextInputControlSkin skin = (TextInputControlSkin) n.getSkin();
+                final TextInputControlSkin<?,?> skin = (TextInputControlSkin<?,?>) n.getSkin();
                 return skin.highlightTextFill == null || !skin.highlightTextFill.isBound();
             }
 
             @Override @SuppressWarnings("unchecked") 
             public StyleableProperty<Paint> getStyleableProperty(TextInputControl n) {
-                final TextInputControlSkin skin = (TextInputControlSkin) n.getSkin();
+                final TextInputControlSkin<?,?> skin = (TextInputControlSkin<?,?>) n.getSkin();
                 return (StyleableProperty<Paint>)skin.highlightTextFill;
             }
         };
@@ -806,13 +801,13 @@
 
             @Override
             public boolean isSettable(TextInputControl n) {
-                final TextInputControlSkin skin = (TextInputControlSkin) n.getSkin();
+                final TextInputControlSkin<?,?> skin = (TextInputControlSkin<?,?>) n.getSkin();
                 return skin.displayCaret == null || !skin.displayCaret.isBound();
             }
 
             @Override @SuppressWarnings("unchecked") 
             public StyleableProperty<Boolean> getStyleableProperty(TextInputControl n) {
-                final TextInputControlSkin skin = (TextInputControlSkin) n.getSkin();
+                final TextInputControlSkin<?,?> skin = (TextInputControlSkin<?,?>) n.getSkin();
                 return (StyleableProperty<Boolean>)skin.displayCaret;
             }
         };
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TitledPaneSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TitledPaneSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -33,8 +33,6 @@
 import javafx.animation.Timeline;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.SimpleDoubleProperty;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.geometry.HPos;
 import javafx.geometry.Pos;
 import javafx.geometry.VPos;
@@ -42,14 +40,11 @@
 import javafx.scene.Node;
 import javafx.scene.control.ContentDisplay;
 import javafx.scene.control.TitledPane;
-import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.StackPane;
 import javafx.scene.shape.Rectangle;
 import javafx.util.Duration;
 
 import com.sun.javafx.scene.control.behavior.TitledPaneBehavior;
-import com.sun.javafx.scene.traversal.Direction;
-import com.sun.javafx.scene.traversal.TraversalEngine;
 import javafx.beans.binding.DoubleBinding;
 import javafx.geometry.Insets;
 import javafx.scene.control.Accordion;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ToggleButtonSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ToggleButtonSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -28,8 +28,6 @@
 import com.sun.javafx.scene.control.behavior.ToggleButtonBehavior;
 import javafx.scene.control.ToggleButton;
 
-import com.sun.javafx.scene.control.behavior.ButtonBehavior;
-
 public class ToggleButtonSkin extends LabeledSkinBase<ToggleButton, ToggleButtonBehavior<ToggleButton>> {
 
     public ToggleButtonSkin(ToggleButton toggleButton) {
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ToolBarSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ToolBarSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -32,14 +32,13 @@
 import com.sun.javafx.scene.traversal.Algorithm;
 import com.sun.javafx.scene.traversal.ParentTraversalEngine;
 import com.sun.javafx.scene.traversal.TraversalContext;
+
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.DoubleProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
+import javafx.beans.value.WritableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
-import javafx.event.EventHandler;
 import javafx.geometry.HPos;
 import javafx.geometry.Orientation;
 import javafx.geometry.Pos;
@@ -58,21 +57,20 @@
 import javafx.scene.control.SkinBase;
 import javafx.scene.control.ToolBar;
 import javafx.scene.input.KeyCode;
-import javafx.scene.input.KeyEvent;
-import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.HBox;
 import javafx.scene.layout.Pane;
 import javafx.scene.layout.StackPane;
 import javafx.scene.layout.VBox;
-
 import javafx.css.StyleableDoubleProperty;
 import javafx.css.StyleableObjectProperty;
 import javafx.css.StyleableProperty;
 import javafx.css.CssMetaData;
+
 import com.sun.javafx.css.converters.EnumConverter;
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.scene.control.behavior.ToolBarBehavior;
 import com.sun.javafx.scene.traversal.Direction;
+
 import javafx.css.Styleable;
 
 public class ToolBarSkin extends BehaviorSkinBase<ToolBar, ToolBarBehavior> {
@@ -732,7 +730,7 @@
             @Override
             public StyleableProperty<Number> getStyleableProperty(ToolBar n) {
                 final ToolBarSkin skin = (ToolBarSkin) n.getSkin();
-                return (StyleableProperty<Number>)skin.spacingProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)skin.spacingProperty();
             }
         };
          
@@ -749,7 +747,7 @@
             @Override
             public StyleableProperty<Pos> getStyleableProperty(ToolBar n) {
                 final ToolBarSkin skin = (ToolBarSkin) n.getSkin();
-                return (StyleableProperty<Pos>)skin.boxAlignmentProperty();
+                return (StyleableProperty<Pos>)(WritableValue<Pos>)skin.boxAlignmentProperty();
             }
         };
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeCellSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeCellSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -32,21 +32,22 @@
 import java.util.WeakHashMap;
 
 import javafx.beans.property.DoubleProperty;
+import javafx.beans.value.WritableValue;
 import javafx.geometry.HPos;
 import javafx.geometry.VPos;
 import javafx.scene.Node;
 import javafx.scene.control.TreeCell;
 import javafx.scene.control.TreeItem;
 import javafx.scene.control.TreeView;
-
 import javafx.css.StyleableDoubleProperty;
 import javafx.css.StyleableProperty;
 import javafx.css.CssMetaData;
+
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.scene.control.MultiplePropertyChangeListenerHandler;
 import com.sun.javafx.scene.control.behavior.TreeCellBehavior;
+
 import javafx.css.Styleable;
-import javafx.util.Callback;
 
 public class TreeCellSkin<T> extends CellSkinBase<TreeCell<T>, TreeCellBehavior<T>> {
 
@@ -203,7 +204,7 @@
         // being cleaned out.
         // if (treeItem == null) return;
         
-        TreeView tree = getSkinnable().getTreeView();
+        TreeView<T> tree = getSkinnable().getTreeView();
         if (tree == null) return;
         
         if (disclosureNodeDirty) {
@@ -270,7 +271,7 @@
             return fixedCellSize;
         }
 
-        final TreeCell cell = getSkinnable();
+        final TreeCell<T> cell = getSkinnable();
         
         final double pref = super.computePrefHeight(width, topInset, rightInset, bottomInset, leftInset);
         final Node d = cell.getDisclosureNode();
@@ -294,7 +295,7 @@
 
         double pw = snappedLeftInset() + snappedRightInset();
 
-        TreeView tree = getSkinnable().getTreeView();
+        TreeView<T> tree = getSkinnable().getTreeView();
         if (tree == null) return pw;
         
         if (treeItem == null) return pw;
@@ -329,14 +330,14 @@
             new CssMetaData<TreeCell<?>,Number>("-fx-indent",
                 SizeConverter.getInstance(), 10.0) {
                     
-            @Override public boolean isSettable(TreeCell n) {
-                DoubleProperty p = ((TreeCellSkin) n.getSkin()).indentProperty();
+            @Override public boolean isSettable(TreeCell<?> n) {
+                DoubleProperty p = ((TreeCellSkin<?>) n.getSkin()).indentProperty();
                 return p == null || !p.isBound();
             }
 
-            @Override public StyleableProperty<Number> getStyleableProperty(TreeCell n) {
-                final TreeCellSkin skin = (TreeCellSkin) n.getSkin();
-                return (StyleableProperty<Number>)skin.indentProperty();
+            @Override public StyleableProperty<Number> getStyleableProperty(TreeCell<?> n) {
+                final TreeCellSkin<?> skin = (TreeCellSkin<?>) n.getSkin();
+                return (StyleableProperty<Number>)(WritableValue<Number>)skin.indentProperty();
             }
         };
         
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableCellSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableCellSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -96,7 +96,7 @@
 
         double indentPerLevel = 10;
         if (treeTableRow.getSkin() instanceof TreeTableRowSkin) {
-            indentPerLevel = ((TreeTableRowSkin)treeTableRow.getSkin()).getIndentationPerLevel();
+            indentPerLevel = ((TreeTableRowSkin<?>)treeTableRow.getSkin()).getIndentationPerLevel();
         }
         leftPadding += nodeLevel * indentPerLevel;
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableRowSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableRowSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -42,18 +42,19 @@
 
 import javafx.beans.property.DoubleProperty;
 import javafx.scene.Node;
-
 import javafx.css.StyleableDoubleProperty;
 import javafx.css.CssMetaData;
+
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.scene.control.MultiplePropertyChangeListenerHandler;
 import com.sun.javafx.scene.control.behavior.TreeTableRowBehavior;
+
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.value.WritableValue;
 import javafx.collections.ObservableList;
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
-import javafx.util.Callback;
 
 public class TreeTableRowSkin<T> extends TableRowSkinBase<TreeItem<T>, TreeTableRow<T>, TreeTableRowBehavior<T>, TreeTableCell<T,?>> {
 
@@ -345,7 +346,7 @@
     }
 
     private void updateTableViewSkin() {
-        TreeTableView tableView = getSkinnable().getTreeTableView();
+        TreeTableView<T> tableView = getSkinnable().getTreeTableView();
         if (tableView.getSkin() instanceof TreeTableViewSkin) {
             treeTableViewSkin = (TreeTableViewSkin)tableView.getSkin();
         }
@@ -365,14 +366,14 @@
             new CssMetaData<TreeTableRow<?>,Number>("-fx-indent",
                 SizeConverter.getInstance(), 10.0) {
                     
-            @Override public boolean isSettable(TreeTableRow n) {
-                DoubleProperty p = ((TreeTableRowSkin) n.getSkin()).indentProperty();
+            @Override public boolean isSettable(TreeTableRow<?> n) {
+                DoubleProperty p = ((TreeTableRowSkin<?>) n.getSkin()).indentProperty();
                 return p == null || !p.isBound();
             }
 
-            @Override public StyleableProperty<Number> getStyleableProperty(TreeTableRow n) {
-                final TreeTableRowSkin skin = (TreeTableRowSkin) n.getSkin();
-                return (StyleableProperty<Number>)skin.indentProperty();
+            @Override public StyleableProperty<Number> getStyleableProperty(TreeTableRow<?> n) {
+                final TreeTableRowSkin<?> skin = (TreeTableRowSkin<?>) n.getSkin();
+                return (StyleableProperty<Number>)(WritableValue<Number>)skin.indentProperty();
             }
         };
         
@@ -412,14 +413,14 @@
                 // (selectedCells could be big, cellsMap is much smaller)
                 List<Node> selection = new ArrayList<>();
                 int index = getSkinnable().getIndex();
-                for (TreeTablePosition pos : treeTableView.getSelectionModel().getSelectedCells()) {
+                for (TreeTablePosition<T,?> pos : treeTableView.getSelectionModel().getSelectedCells()) {
                     if (pos.getRow() == index) {
-                        TreeTableColumn column = pos.getTableColumn();
+                        TreeTableColumn<T,?> column = pos.getTableColumn();
                         if (column == null) {
                             /* This is the row-based case */
                             column = treeTableView.getVisibleLeafColumn(0);
                         }
-                        TreeTableCell cell = cellsMap.get(column);
+                        TreeTableCell<T,?> cell = cellsMap.get(column);
                         if (cell != null) selection.add(cell);
                     }
                     return FXCollections.observableArrayList(selection);
@@ -427,13 +428,13 @@
             }
             case CELL_AT_ROW_COLUMN: {
                 int colIndex = (Integer)parameters[1];
-                TreeTableColumn column = treeTableView.getVisibleLeafColumn(colIndex);
+                TreeTableColumn<T,?> column = treeTableView.getVisibleLeafColumn(colIndex);
                 return cellsMap.get(column);
             }
             case FOCUS_ITEM: {
                 TreeTableView.TreeTableViewFocusModel<T> fm = treeTableView.getFocusModel();
-                TreeTablePosition focusedCell = fm.getFocusedCell();
-                TreeTableColumn column = focusedCell.getTableColumn();
+                TreeTablePosition<T,?> focusedCell = fm.getFocusedCell();
+                TreeTableColumn<T,?> column = focusedCell.getTableColumn();
                 if (column == null) {
                     /* This is the row-based case */
                     column = treeTableView.getVisibleLeafColumn(0);
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableViewSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableViewSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -402,7 +402,7 @@
             case SELECTED_CELLS: {
                 List<Node> selection = new ArrayList<>();
                 TreeTableView.TreeTableViewSelectionModel<S> sm = getSkinnable().getSelectionModel();
-                for (TreeTablePosition pos : sm.getSelectedCells()) {
+                for (TreeTablePosition<S,?> pos : sm.getSelectedCells()) {
                     TreeTableRow<S> row = flow.getPrivateCell(pos.getRow());
                     if (row != null) selection.add(row);
                 }
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeViewSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeViewSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -40,7 +40,6 @@
 import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.HBox;
 import javafx.scene.layout.StackPane;
-import javafx.util.Callback;
 import java.lang.ref.WeakReference;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -131,7 +130,7 @@
     private boolean needCellsRebuilt = true;
     private boolean needCellsReconfigured = false;
     
-    private EventHandler<TreeModificationEvent> rootListener = e -> {
+    private EventHandler<TreeModificationEvent<T>> rootListener = e -> {
         if (e.wasAdded() && e.wasRemoved() && e.getAddedSize() == e.getRemovedSize()) {
             // Fix for RT-14842, where the children of a TreeItem were changing,
             // but because the overall item count was staying the same, there was
@@ -147,7 +146,7 @@
         } else {
             // Fix for RT-20090. We are checking to see if the event coming
             // from the TreeItem root is an event where the count has changed.
-            EventType eventType = e.getEventType();
+            EventType<?> eventType = e.getEventType();
             while (eventType != null) {
                 if (eventType.equals(TreeItem.<T>expandedItemCountChangeEvent())) {
                     rowCountDirty = true;
@@ -159,20 +158,20 @@
         }
     };
     
-    private WeakEventHandler weakRootListener;
+    private WeakEventHandler<TreeModificationEvent<T>> weakRootListener;
             
     
-    private WeakReference<TreeItem> weakRoot;
-    private TreeItem getRoot() {
+    private WeakReference<TreeItem<T>> weakRoot;
+    private TreeItem<T> getRoot() {
         return weakRoot == null ? null : weakRoot.get();
     }
-    private void setRoot(TreeItem newRoot) {
+    private void setRoot(TreeItem<T> newRoot) {
         if (getRoot() != null && weakRootListener != null) {
             getRoot().removeEventHandler(TreeItem.<T>treeNotificationEvent(), weakRootListener);
         }
-        weakRoot = new WeakReference<TreeItem>(newRoot);
+        weakRoot = new WeakReference<>(newRoot);
         if (getRoot() != null) {
-            weakRootListener = new WeakEventHandler(rootListener);
+            weakRootListener = new WeakEventHandler<>(rootListener);
             getRoot().addEventHandler(TreeItem.<T>treeNotificationEvent(), weakRootListener);
         }
         
@@ -353,13 +352,13 @@
     }
     
     private void onFocusPreviousCell() {
-        FocusModel fm = getSkinnable().getFocusModel();
+        FocusModel<TreeItem<T>> fm = getSkinnable().getFocusModel();
         if (fm == null) return;
         flow.show(fm.getFocusedIndex());
     }
 
     private void onFocusNextCell() {
-        FocusModel fm = getSkinnable().getFocusModel();
+        FocusModel<TreeItem<T>> fm = getSkinnable().getFocusModel();
         if (fm == null) return;
         flow.show(fm.getFocusedIndex());
     }
@@ -391,8 +390,8 @@
         TreeCell<T> lastVisibleCell = flow.getLastVisibleCellWithinViewPort();
         if (lastVisibleCell == null) return -1;
 
-        final SelectionModel sm = getSkinnable().getSelectionModel();
-        final FocusModel fm = getSkinnable().getFocusModel();
+        final SelectionModel<TreeItem<T>> sm = getSkinnable().getSelectionModel();
+        final FocusModel<TreeItem<T>> fm = getSkinnable().getFocusModel();
         if (sm == null || fm == null) return -1;
 
         int lastVisibleCellIndex = lastVisibleCell.getIndex();
@@ -435,8 +434,8 @@
         TreeCell<T> firstVisibleCell = flow.getFirstVisibleCellWithinViewPort();
         if (firstVisibleCell == null) return -1;
 
-        final SelectionModel sm = getSkinnable().getSelectionModel();
-        final FocusModel fm = getSkinnable().getFocusModel();
+        final SelectionModel<TreeItem<T>> sm = getSkinnable().getSelectionModel();
+        final FocusModel<TreeItem<T>> fm = getSkinnable().getFocusModel();
         if (sm == null || fm == null) return -1;
 
         int firstVisibleCellIndex = firstVisibleCell.getIndex();
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualContainerBase.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualContainerBase.java	Mon May 05 10:06:16 2014 +1200
@@ -25,7 +25,6 @@
 
 package com.sun.javafx.scene.control.skin;
 
-import javafx.event.EventHandler;
 import javafx.scene.control.Control;
 import javafx.scene.control.IndexedCell;
 import javafx.scene.control.ScrollToEvent;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java	Mon May 05 10:06:16 2014 +1200
@@ -751,7 +751,7 @@
 //        addChangedListener(VERTICAL, listenerY);
 //        vbar.addChangedListener(ScrollBar.VALUE, listenerY);
 
-        ChangeListener listenerY = (ov, t, t1) -> {
+        ChangeListener<Number> listenerY = (ov, t, t1) -> {
             clipView.setClipY(isVertical() ? 0 : vbar.getValue());
         };
         vbar.valueProperty().addListener(listenerY);
@@ -971,7 +971,7 @@
 
         if (needsCellsLayout) {
             for (int i = 0, max = cells.size(); i < max; i++) {
-                Cell cell = cells.get(i);
+                Cell<?> cell = cells.get(i);
                 if (cell != null) {
                     cell.requestLayout();
                 }
@@ -1017,7 +1017,7 @@
 
         if (!cellNeedsLayout) {
             for (int i = 0; i < cells.size(); i++) {
-                Cell cell = cells.get(i);
+                Cell<?> cell = cells.get(i);
                 cellNeedsLayout = cell.isNeedsLayout();
                 if (cellNeedsLayout) break;
             }
@@ -1684,7 +1684,7 @@
         // Note: Do not optimise this loop by pre-calculating the cells size and
         // storing that into a int value - this can lead to RT-32828
         for (int i = 0; i < cells.size(); i++) {
-            Cell cell = cells.get(i);
+            Cell<?> cell = cells.get(i);
             if (isVertical) {
                 cell.resize(size, cell.getHeight());
             } else {
@@ -2023,7 +2023,7 @@
         }
     }
 
-    private boolean doesCellContainFocus(Cell c) {
+    private boolean doesCellContainFocus(Cell<?> c) {
         Scene scene = c.getScene();
         final Node focusOwner = scene == null ? null : scene.getFocusOwner();
 
@@ -2623,7 +2623,7 @@
 
         private final Rectangle clipRect;
 
-        public ClippedContainer(final VirtualFlow flow) {
+        public ClippedContainer(final VirtualFlow<?> flow) {
             if (flow == null) {
                 throw new IllegalArgumentException("VirtualFlow can not be null");
             }
@@ -2662,7 +2662,7 @@
      * <p>
      * This class is package private solely for the sake of testing.
      */
-    public static class ArrayLinkedList<T> extends AbstractList {
+    public static class ArrayLinkedList<T> extends AbstractList<T> {
         /**
          * The array list backing this class. We default the size of the array
          * list to be fairly large so as not to require resizing during normal
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualScrollBar.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualScrollBar.java	Mon May 05 10:06:16 2014 +1200
@@ -25,8 +25,6 @@
 
 package com.sun.javafx.scene.control.skin;
 
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.scene.control.IndexedCell;
 import javafx.scene.control.ScrollBar;
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/WebColorFieldSkin.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/WebColorFieldSkin.java	Mon May 05 10:06:16 2014 +1200
@@ -28,7 +28,6 @@
 import java.util.Locale;
 
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.scene.Node;
 import javafx.scene.paint.Color;
 
--- a/modules/controls/src/main/java/javafx/scene/control/Accordion.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/Accordion.java	Mon May 05 10:06:16 2014 +1200
@@ -31,7 +31,9 @@
 
 import com.sun.javafx.collections.TrackableObservableList;
 import com.sun.javafx.scene.control.skin.AccordionSkin;
+
 import javafx.beans.property.ObjectPropertyBase;
+import javafx.beans.value.WritableValue;
 import javafx.css.StyleableProperty;
 
 /**
@@ -75,7 +77,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing focusTraversable by calling applyStyle with null
         // StyleOrigin ensures that css will be able to override the value.
-        ((StyleableProperty)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
+        ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
     }
 
     /***************************************************************************
--- a/modules/controls/src/main/java/javafx/scene/control/Cell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/Cell.java	Mon May 05 10:06:16 2014 +1200
@@ -39,6 +39,7 @@
 import javafx.css.PseudoClass;
 import javafx.beans.property.ReadOnlyBooleanProperty;
 import javafx.beans.property.ReadOnlyBooleanWrapper;
+import javafx.beans.value.WritableValue;
 import javafx.css.StyleableProperty;
 
 /**
@@ -350,7 +351,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing focusTraversable by calling set on the 
         // CssMetaData ensures that css will be able to override the value.
-        ((StyleableProperty)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
+        ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
         getStyleClass().addAll(DEFAULT_STYLE_CLASS);
 
         /**
--- a/modules/controls/src/main/java/javafx/scene/control/Control.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/Control.java	Mon May 05 10:06:16 2014 +1200
@@ -427,7 +427,7 @@
         // override. Initializing focusTraversable by calling applyStyle
         // with null for StyleOrigin ensures that css will be able to override
         // the value.
-        final StyleableProperty<Boolean> prop = (StyleableProperty<Boolean>)focusTraversableProperty();
+        final StyleableProperty<Boolean> prop = (StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty();
         prop.applyStyle(null, Boolean.TRUE);
 
         // we add a listener for menu request events to show the context menu
@@ -786,7 +786,7 @@
 
             @Override
             public StyleableProperty<String> getStyleableProperty(Control n) {
-                return (StyleableProperty<String>)n.skinClassNameProperty();
+                return (StyleableProperty<String>)(WritableValue<String>)n.skinClassNameProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/DatePicker.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/DatePicker.java	Mon May 05 10:06:16 2014 +1200
@@ -43,11 +43,13 @@
 import java.util.Locale;
 
 import com.sun.javafx.scene.control.skin.ComboBoxListViewSkin;
+
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ReadOnlyObjectProperty;
 import javafx.beans.property.ReadOnlyObjectWrapper;
 import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.value.WritableValue;
 import javafx.css.CssMetaData;
 import javafx.css.Styleable;
 import javafx.css.StyleableBooleanProperty;
@@ -507,7 +509,7 @@
             }
 
             @Override public StyleableProperty<Boolean> getStyleableProperty(DatePicker n) {
-                return (StyleableProperty)n.showWeekNumbersProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.showWeekNumbersProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/Hyperlink.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/Hyperlink.java	Mon May 05 10:06:16 2014 +1200
@@ -27,11 +27,14 @@
 
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.BooleanPropertyBase;
+import javafx.beans.value.WritableValue;
 import javafx.event.ActionEvent;
 import javafx.scene.Cursor;
 import javafx.scene.Node;
 import javafx.css.PseudoClass;
+
 import com.sun.javafx.scene.control.skin.HyperlinkSkin;
+
 import javafx.css.StyleableProperty;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
@@ -91,7 +94,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing cursor by calling applyStyle with null
         // StyleOrigin ensures that css will be able to override the value.
-        ((StyleableProperty)cursorProperty()).applyStyle(null, Cursor.HAND);
+        ((StyleableProperty<Cursor>)(WritableValue<Cursor>)cursorProperty()).applyStyle(null, Cursor.HAND);
     }
     
     /***************************************************************************
--- a/modules/controls/src/main/java/javafx/scene/control/Label.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/Label.java	Mon May 05 10:06:16 2014 +1200
@@ -27,9 +27,11 @@
 
 import com.sun.javafx.scene.control.skin.LabelSkin;
 import com.sun.javafx.scene.NodeHelper;
+
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ObjectPropertyBase;
 import javafx.beans.value.ChangeListener;
+import javafx.beans.value.WritableValue;
 import javafx.css.StyleableProperty;
 import javafx.scene.Node;
 import javafx.scene.accessibility.Attribute;
@@ -90,7 +92,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing focusTraversable by calling set on the 
         // CssMetaData ensures that css will be able to override the value.        
-        ((StyleableProperty)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
+        ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
     }
     
     /***************************************************************************
--- a/modules/controls/src/main/java/javafx/scene/control/Labeled.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/Labeled.java	Mon May 05 10:06:16 2014 +1200
@@ -33,6 +33,7 @@
 import com.sun.javafx.css.converters.PaintConverter;
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.css.converters.StringConverter;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -44,6 +45,7 @@
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleStringProperty;
 import javafx.beans.property.StringProperty;
+import javafx.beans.value.WritableValue;
 import javafx.geometry.Insets;
 import javafx.geometry.Orientation;
 import javafx.geometry.Pos;
@@ -55,7 +57,6 @@
 import javafx.scene.paint.Paint;
 import javafx.scene.text.Font;
 import javafx.scene.text.TextAlignment;
-
 import javafx.beans.DefaultProperty;
 import javafx.css.CssMetaData;
 import javafx.css.FontCssMetaData;
@@ -65,7 +66,6 @@
 import javafx.css.StyleableDoubleProperty;
 import javafx.css.StyleableObjectProperty;
 import javafx.css.StyleableProperty;
-
 import javafx.css.StyleableStringProperty;
 
 
@@ -125,7 +125,7 @@
      */
     public Labeled(String text, Node graphic) {
         setText(text);
-        ((StyleableProperty<Node>)graphicProperty()).applyStyle(null, graphic);
+        ((StyleableProperty<Node>)(WritableValue<Node>)graphicProperty()).applyStyle(null, graphic);
     }
 
     /***************************************************************************
@@ -469,7 +469,7 @@
                     final String url = super.get();
 
                     if (url == null) {
-                        ((StyleableProperty)graphicProperty()).applyStyle(origin, null);
+                        ((StyleableProperty<Node>)(WritableValue<Node>)graphicProperty()).applyStyle(origin, null);
                     } else {
                         // RT-34466 - if graphic's url is the same as this property's value, then don't overwrite.
                         final Node graphicNode = Labeled.this.getGraphic();
@@ -497,7 +497,7 @@
                             // Have to call applyStyle on graphicProperty so that the graphicProperty's
                             // origin matches the imageUrlProperty's origin.
                             //
-                            ((StyleableProperty)graphicProperty()).applyStyle(origin, new ImageView(img));
+                            ((StyleableProperty<Node>)(WritableValue<Node>)graphicProperty()).applyStyle(origin, new ImageView(img));
                         }
                     }
                 }
@@ -526,7 +526,7 @@
                     // The origin of the imageUrlProperty is that of the graphicProperty.
                     // Return the origin in a way that doesn't expand the graphicProperty.
                     //
-                    return graphic != null ? ((StyleableProperty)graphic).getStyleOrigin() : null;
+                    return graphic != null ? ((StyleableProperty<Node>)(WritableValue<Node>)graphic).getStyleOrigin() : null;
                 }
 
                 @Override
@@ -827,7 +827,7 @@
 
             @Override
             public StyleableProperty<Font> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.fontProperty();
+                return (StyleableProperty<Font>)(WritableValue<Font>)n.fontProperty();
             }
         };
         
@@ -842,7 +842,7 @@
 
             @Override
             public StyleableProperty<Pos> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.alignmentProperty();
+                return (StyleableProperty<Pos>)(WritableValue<Pos>)n.alignmentProperty();
             }
             
             @Override
@@ -863,7 +863,7 @@
 
             @Override
             public StyleableProperty<TextAlignment> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.textAlignmentProperty();
+                return (StyleableProperty<TextAlignment>)(WritableValue<TextAlignment>)n.textAlignmentProperty();
             }
         };
         
@@ -878,7 +878,7 @@
 
             @Override
             public StyleableProperty<Paint> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.textFillProperty();
+                return (StyleableProperty<Paint>)(WritableValue<Paint>)n.textFillProperty();
             }
         };
         
@@ -894,7 +894,7 @@
 
             @Override
             public StyleableProperty<OverrunStyle> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.textOverrunProperty();
+                return (StyleableProperty<OverrunStyle>)(WritableValue<OverrunStyle>)n.textOverrunProperty();
             }
         };
 
@@ -907,7 +907,7 @@
             }
 
             @Override public StyleableProperty<String> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.ellipsisStringProperty();
+                return (StyleableProperty<String>)(WritableValue<String>)n.ellipsisStringProperty();
             }
         };
 
@@ -922,7 +922,7 @@
 
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.wrapTextProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.wrapTextProperty();
             }
         };
         
@@ -953,7 +953,7 @@
 
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.underlineProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.underlineProperty();
             }
         };
         
@@ -968,7 +968,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.lineSpacingProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.lineSpacingProperty();
             }
         };
 
@@ -984,7 +984,7 @@
 
             @Override
             public StyleableProperty<ContentDisplay> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.contentDisplayProperty();
+                return (StyleableProperty<ContentDisplay>)(WritableValue<ContentDisplay>)n.contentDisplayProperty();
             }
         };
         
@@ -999,7 +999,7 @@
 
             @Override
             public StyleableProperty<Insets> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.labelPaddingPropertyImpl();
+                return (StyleableProperty<Insets>)(WritableValue<Insets>)n.labelPaddingPropertyImpl();
             }
         };
         
@@ -1014,7 +1014,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(Labeled n) {
-                return (StyleableProperty)n.graphicTextGapProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.graphicTextGapProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/ListView.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/ListView.java	Mon May 05 10:06:16 2014 +1200
@@ -41,6 +41,7 @@
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.WeakChangeListener;
+import javafx.beans.value.WritableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ListChangeListener.Change;
@@ -56,14 +57,18 @@
 import javafx.scene.accessibility.Role;
 import javafx.scene.layout.Region;
 import javafx.util.Callback;
-
 import javafx.css.StyleableObjectProperty;
 import javafx.css.CssMetaData;
+
 import com.sun.javafx.css.converters.EnumConverter;
+
 import javafx.collections.WeakListChangeListener;
+
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.scene.control.skin.ListViewSkin;
+
 import java.lang.ref.WeakReference;
+
 import javafx.css.PseudoClass;
 import javafx.beans.DefaultProperty;
 import javafx.css.Styleable;
@@ -1032,7 +1037,7 @@
                 }
 
                 @Override public StyleableProperty<Number> getStyleableProperty(ListView<?> n) {
-                    return (StyleableProperty<Number>) n.fixedCellSizeProperty();
+                    return (StyleableProperty<Number>)(WritableValue<Number>)n.fixedCellSizeProperty();
                 }
             };
             
--- a/modules/controls/src/main/java/javafx/scene/control/MenuBar.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/MenuBar.java	Mon May 05 10:06:16 2014 +1200
@@ -26,21 +26,23 @@
 package javafx.scene.control;
 
 import com.sun.javafx.css.converters.BooleanConverter;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
 import javafx.beans.DefaultProperty;
 import javafx.beans.property.BooleanProperty;
+import javafx.beans.value.WritableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
-
 import javafx.css.CssMetaData;
 import javafx.css.StyleableBooleanProperty;
+
 import com.sun.javafx.scene.control.skin.MenuBarSkin;
+
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
-import javafx.scene.accessibility.Action;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
 
@@ -86,7 +88,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing focusTraversable by calling applyStyle with null
         // StyleOrigin ensures that css will be able to override the value.
-        ((StyleableProperty)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
+        ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
     }
 
 
@@ -183,7 +185,7 @@
             }
 
             @Override public StyleableProperty<Boolean> getStyleableProperty(MenuBar n) {
-                return (StyleableProperty<Boolean>)n.useSystemMenuBarProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.useSystemMenuBarProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/Pagination.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/Pagination.java	Mon May 05 10:06:16 2014 +1200
@@ -34,6 +34,7 @@
 import javafx.beans.property.SimpleIntegerProperty;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.value.ObservableValue;
+import javafx.beans.value.WritableValue;
 import javafx.css.CssMetaData;
 import javafx.css.StyleableIntegerProperty;
 import javafx.css.Styleable;
@@ -347,7 +348,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(Pagination n) {
-                return (StyleableProperty<Number>)n.maxPageIndicatorCountProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.maxPageIndicatorCountProperty();
             }
         };
         private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES;
--- a/modules/controls/src/main/java/javafx/scene/control/PopupControl.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/PopupControl.java	Mon May 05 10:06:16 2014 +1200
@@ -997,7 +997,7 @@
 
                 @Override
                 public StyleableProperty<String> getStyleableProperty(CSSBridge cssBridge) {
-                    return (StyleableProperty)cssBridge.popupControl.skinClassNameProperty();
+                    return (StyleableProperty<String>)(WritableValue<String>)cssBridge.popupControl.skinClassNameProperty();
                 }
             };
 
--- a/modules/controls/src/main/java/javafx/scene/control/ProgressBar.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/ProgressBar.java	Mon May 05 10:06:16 2014 +1200
@@ -26,6 +26,8 @@
 package javafx.scene.control;
 
 import com.sun.javafx.scene.control.skin.ProgressBarSkin;
+
+import javafx.beans.value.WritableValue;
 import javafx.css.StyleableProperty;
 import javafx.scene.accessibility.Attribute;
 import javafx.geometry.Orientation;
@@ -79,7 +81,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing focusTraversable by calling set on the 
         // CssMetaData ensures that css will be able to override the value.
-        ((StyleableProperty)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
+        ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
         setProgress(progress);
         getStyleClass().setAll(DEFAULT_STYLE_CLASS);
     }
--- a/modules/controls/src/main/java/javafx/scene/control/ProgressIndicator.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/ProgressIndicator.java	Mon May 05 10:06:16 2014 +1200
@@ -26,11 +26,14 @@
 package javafx.scene.control;
 
 import javafx.css.PseudoClass;
+
 import com.sun.javafx.scene.control.skin.ProgressIndicatorSkin;
+
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.DoublePropertyBase;
 import javafx.beans.property.ReadOnlyBooleanProperty;
 import javafx.beans.property.ReadOnlyBooleanWrapper;
+import javafx.beans.value.WritableValue;
 import javafx.css.StyleableProperty;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
@@ -93,7 +96,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing focusTraversable by calling applyStyle with null
         // StyleOrigin ensures that css will be able to override the value.
-        ((StyleableProperty)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
+        ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
         setProgress(progress);
         getStyleClass().setAll(DEFAULT_STYLE_CLASS);
         
--- a/modules/controls/src/main/java/javafx/scene/control/RadioButton.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/RadioButton.java	Mon May 05 10:06:16 2014 +1200
@@ -26,7 +26,10 @@
 package javafx.scene.control;
 
 import javafx.geometry.Pos;
+
 import com.sun.javafx.scene.control.skin.RadioButtonSkin;
+
+import javafx.beans.value.WritableValue;
 import javafx.css.StyleableProperty;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
@@ -90,7 +93,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing alignment by calling set on the 
         // CssMetaData ensures that css will be able to override the value.
-        ((StyleableProperty)alignmentProperty()).applyStyle(null, Pos.CENTER_LEFT);
+        ((StyleableProperty<Pos>)(WritableValue<Pos>)alignmentProperty()).applyStyle(null, Pos.CENTER_LEFT);
     }
 
     /***************************************************************************
--- a/modules/controls/src/main/java/javafx/scene/control/ScrollBar.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/ScrollBar.java	Mon May 05 10:06:16 2014 +1200
@@ -29,9 +29,11 @@
 import com.sun.javafx.css.converters.EnumConverter;
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.scene.control.skin.ScrollBarSkin;
+
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleDoubleProperty;
+import javafx.beans.value.WritableValue;
 import javafx.css.CssMetaData;
 import javafx.css.PseudoClass;
 import javafx.css.Styleable;
@@ -91,7 +93,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing focusTraversable by calling applyStyle with null
         // for StyleOrigin ensures that css will be able to override the value.
-        ((StyleableProperty)focusTraversableProperty()).applyStyle(null,Boolean.FALSE);
+        ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null,Boolean.FALSE);
 
         // set pseudo-class state to horizontal
         pseudoClassStateChanged(HORIZONTAL_PSEUDOCLASS_STATE, true);
@@ -393,7 +395,7 @@
 
             @Override
             public StyleableProperty<Orientation> getStyleableProperty(ScrollBar n) {
-                return (StyleableProperty<Orientation>)n.orientationProperty();
+                return (StyleableProperty<Orientation>)(WritableValue<Orientation>)n.orientationProperty();
             }
         };
         
@@ -408,7 +410,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(ScrollBar n) {
-                return (StyleableProperty<Number>)n.unitIncrementProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.unitIncrementProperty();
             }
                     
         };
@@ -424,7 +426,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(ScrollBar n) {
-                return (StyleableProperty<Number>)n.blockIncrementProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.blockIncrementProperty();
             }
                     
         };
--- a/modules/controls/src/main/java/javafx/scene/control/ScrollPane.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/ScrollPane.java	Mon May 05 10:06:16 2014 +1200
@@ -28,12 +28,14 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+
 import javafx.beans.DefaultProperty;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleDoubleProperty;
 import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.value.WritableValue;
 import javafx.css.CssMetaData;
 import javafx.css.PseudoClass;
 import javafx.css.StyleableBooleanProperty;
@@ -44,9 +46,11 @@
 import javafx.scene.Node;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
+
 import com.sun.javafx.css.converters.BooleanConverter;
 import com.sun.javafx.css.converters.EnumConverter;
 import com.sun.javafx.scene.control.skin.ScrollPaneSkin;
+
 import javafx.css.Styleable;
 
 /**
@@ -104,7 +108,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing focusTraversable by calling applyStyle with
         // null StyleOrigin ensures that css will be able to override the value.
-        ((StyleableProperty<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE); 
+        ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE); 
     }
 
     /**
@@ -611,7 +615,7 @@
 
             @Override
             public StyleableProperty<ScrollBarPolicy> getStyleableProperty(ScrollPane n) {
-                return (StyleableProperty<ScrollBarPolicy>)n.hbarPolicyProperty();
+                return (StyleableProperty<ScrollBarPolicy>)(WritableValue<ScrollBarPolicy>)n.hbarPolicyProperty();
             }
         };
                 
@@ -627,7 +631,7 @@
 
             @Override
             public StyleableProperty<ScrollBarPolicy> getStyleableProperty(ScrollPane n) {
-                return (StyleableProperty<ScrollBarPolicy>)n.vbarPolicyProperty();
+                return (StyleableProperty<ScrollBarPolicy>)(WritableValue<ScrollBarPolicy>)n.vbarPolicyProperty();
             }
         };
                 
@@ -642,7 +646,7 @@
 
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(ScrollPane n) {
-                return (StyleableProperty<Boolean>)n.fitToWidthProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.fitToWidthProperty();
             }
         };
                 
@@ -657,7 +661,7 @@
 
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(ScrollPane n) {
-                return (StyleableProperty<Boolean>)n.fitToHeightProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.fitToHeightProperty();
             }
         };
                 
@@ -672,7 +676,7 @@
 
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(ScrollPane n) {
-                return (StyleableProperty<Boolean>)n.pannableProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.pannableProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/Separator.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/Separator.java	Mon May 05 10:06:16 2014 +1200
@@ -30,15 +30,17 @@
 import java.util.List;
 
 import javafx.beans.property.ObjectProperty;
+import javafx.beans.value.WritableValue;
 import javafx.geometry.HPos;
 import javafx.geometry.Orientation;
 import javafx.geometry.VPos;
-
 import javafx.css.StyleableObjectProperty;
 import javafx.css.CssMetaData;
 import javafx.css.PseudoClass;
+
 import com.sun.javafx.css.converters.EnumConverter;
 import com.sun.javafx.scene.control.skin.SeparatorSkin;
+
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
 
@@ -83,7 +85,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing focusTraversable by calling applyStyle with null
         // StyleOrigin ensures that css will be able to override the value.
-        ((StyleableProperty)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
+        ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
         
         // initialize pseudo-class state
         pseudoClassStateChanged(HORIZONTAL_PSEUDOCLASS_STATE, true);
@@ -248,7 +250,7 @@
 
             @Override
             public StyleableProperty<Orientation> getStyleableProperty(Separator n) {
-                return (StyleableProperty<Orientation>)n.orientationProperty();
+                return (StyleableProperty<Orientation>)(WritableValue<Orientation>)n.orientationProperty();
             }
         };
         
@@ -264,7 +266,7 @@
 
             @Override
             public StyleableProperty<HPos> getStyleableProperty(Separator n) {
-                return (StyleableProperty<HPos>)n.halignmentProperty();
+                return (StyleableProperty<HPos>)(WritableValue<HPos>)n.halignmentProperty();
             }
         };
         
@@ -280,7 +282,7 @@
 
             @Override
             public StyleableProperty<VPos> getStyleableProperty(Separator n) {
-                return (StyleableProperty<VPos>)n.valignmentProperty();
+                return (StyleableProperty<VPos>)(WritableValue<VPos>)n.valignmentProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/Slider.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/Slider.java	Mon May 05 10:06:16 2014 +1200
@@ -36,6 +36,7 @@
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.value.WritableValue;
 import javafx.geometry.Orientation;
 import javafx.scene.accessibility.Action;
 import javafx.scene.accessibility.Attribute;
@@ -43,17 +44,19 @@
 import javafx.util.StringConverter;
 
 import com.sun.javafx.Utils;
+
 import javafx.css.CssMetaData;
 import javafx.css.PseudoClass;
 import javafx.css.StyleableBooleanProperty;
 import javafx.css.StyleableDoubleProperty;
 import javafx.css.StyleableIntegerProperty;
 import javafx.css.StyleableObjectProperty;
+
 import com.sun.javafx.css.converters.BooleanConverter;
 import com.sun.javafx.css.converters.EnumConverter;
 import com.sun.javafx.css.converters.SizeConverter;
+import com.sun.javafx.scene.control.skin.SliderSkin;
 
-import com.sun.javafx.scene.control.skin.SliderSkin;
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
 
@@ -661,7 +664,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(Slider n) {
-                return (StyleableProperty<Number>)n.blockIncrementProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.blockIncrementProperty();
             }
         };
         
@@ -676,7 +679,7 @@
 
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(Slider n) {
-                return (StyleableProperty<Boolean>)n.showTickLabelsProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.showTickLabelsProperty();
             }
         };
                     
@@ -691,7 +694,7 @@
 
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(Slider n) {
-                return (StyleableProperty<Boolean>)n.showTickMarksProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.showTickMarksProperty();
             }
         };
             
@@ -706,7 +709,7 @@
 
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(Slider n) {
-                return (StyleableProperty<Boolean>)n.snapToTicksProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.snapToTicksProperty();
             }
         };
         
@@ -721,7 +724,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(Slider n) {
-                return (StyleableProperty<Number>)n.majorTickUnitProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.majorTickUnitProperty();
             }
         };
         
@@ -736,7 +739,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(Slider n) {
-                return (StyleableProperty<Number>)n.minorTickCountProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.minorTickCountProperty();
             }
         };
         
@@ -758,7 +761,7 @@
 
             @Override
             public StyleableProperty<Orientation> getStyleableProperty(Slider n) {
-                return (StyleableProperty<Orientation>)n.orientationProperty();
+                return (StyleableProperty<Orientation>)(WritableValue<Orientation>)n.orientationProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/SplitPane.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/SplitPane.java	Mon May 05 10:06:16 2014 +1200
@@ -34,6 +34,7 @@
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleDoubleProperty;
+import javafx.beans.value.WritableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
@@ -41,11 +42,14 @@
 import javafx.scene.Node;
 
 import com.sun.javafx.collections.annotations.ReturnsUnmodifiableCollection;
+
 import javafx.css.StyleableObjectProperty;
 import javafx.css.CssMetaData;
 import javafx.css.PseudoClass;
+
 import com.sun.javafx.css.converters.EnumConverter;
 import com.sun.javafx.scene.control.skin.SplitPaneSkin;
+
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
 
@@ -175,7 +179,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing focusTraversable by calling applyStyle with a
         // null StyleOrigin ensures that css will be able to override the value.
-        ((StyleableProperty<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE); 
+        ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE); 
 
         items.addListener(new ListChangeListener<Node>() {
             @Override public void onChanged(Change<? extends Node> c) {
@@ -398,7 +402,7 @@
 
             @Override
             public StyleableProperty<Orientation> getStyleableProperty(SplitPane n) {
-                return (StyleableProperty<Orientation>)n.orientationProperty();
+                return (StyleableProperty<Orientation>)(WritableValue<Orientation>)n.orientationProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/TabPane.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/TabPane.java	Mon May 05 10:06:16 2014 +1200
@@ -35,6 +35,7 @@
 import javafx.beans.property.ObjectPropertyBase;
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.value.WritableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
@@ -516,7 +517,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(TabPane n) {
-                return (StyleableProperty<Number>)n.tabMinWidthProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.tabMinWidthProperty();
             }
         };
 
@@ -531,7 +532,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(TabPane n) {
-                return (StyleableProperty<Number>)n.tabMaxWidthProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.tabMaxWidthProperty();
             }
         };
 
@@ -546,7 +547,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(TabPane n) {
-                return (StyleableProperty<Number>)n.tabMinHeightProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.tabMinHeightProperty();
             }
         };
 
@@ -561,7 +562,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(TabPane n) {
-                return (StyleableProperty<Number>)n.tabMaxHeightProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.tabMaxHeightProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/TextArea.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/TextArea.java	Mon May 05 10:06:16 2014 +1200
@@ -30,12 +30,14 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+
 import javafx.beans.InvalidationListener;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.IntegerProperty;
 import javafx.beans.property.SimpleDoubleProperty;
 import javafx.beans.value.ChangeListener;
+import javafx.beans.value.WritableValue;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
 import javafx.css.CssMetaData;
@@ -43,11 +45,13 @@
 import javafx.css.StyleableBooleanProperty;
 import javafx.css.StyleableIntegerProperty;
 import javafx.css.StyleableProperty;
+
 import com.sun.javafx.binding.ExpressionHelper;
 import com.sun.javafx.collections.ListListenerHelper;
 import com.sun.javafx.collections.NonIterableChange;
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.scene.control.skin.TextAreaSkin;
+
 import javafx.css.Styleable;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
@@ -629,7 +633,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(TextArea n) {
-                return (StyleableProperty<Number>)n.prefColumnCountProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.prefColumnCountProperty();
             }
         };
 
@@ -644,7 +648,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(TextArea n) {
-                return (StyleableProperty<Number>)n.prefRowCountProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.prefRowCountProperty();
             }
         };
 
@@ -659,7 +663,7 @@
 
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(TextArea n) {
-                return (StyleableProperty<Boolean>)n.wrapTextProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.wrapTextProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/TextField.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/TextField.java	Mon May 05 10:06:16 2014 +1200
@@ -28,11 +28,13 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+
 import javafx.beans.InvalidationListener;
 import javafx.beans.property.IntegerProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ObjectPropertyBase;
 import javafx.beans.value.ChangeListener;
+import javafx.beans.value.WritableValue;
 import javafx.css.CssMetaData;
 import javafx.css.StyleableIntegerProperty;
 import javafx.css.StyleableObjectProperty;
@@ -42,10 +44,12 @@
 import javafx.geometry.Pos;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
+
 import com.sun.javafx.binding.ExpressionHelper;
 import com.sun.javafx.css.converters.EnumConverter;
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.scene.control.skin.TextFieldSkin;
+
 import javafx.css.Styleable;
 
 
@@ -285,7 +289,7 @@
             }
 
             @Override public StyleableProperty<Pos> getStyleableProperty(TextField n) {
-                return (StyleableProperty<Pos>)n.alignmentProperty();
+                return (StyleableProperty<Pos>)(WritableValue<Pos>)n.alignmentProperty();
             }
         };
 
@@ -300,7 +304,7 @@
 
             @Override
             public StyleableProperty<Number> getStyleableProperty(TextField n) {
-                return (StyleableProperty<Number>)n.prefColumnCountProperty();
+                return (StyleableProperty<Number>)(WritableValue<Number>)n.prefColumnCountProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/TextInputControl.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/TextInputControl.java	Mon May 05 10:06:16 2014 +1200
@@ -44,6 +44,7 @@
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableStringValue;
 import javafx.beans.value.ObservableValue;
+import javafx.beans.value.WritableValue;
 import javafx.css.CssMetaData;
 import javafx.css.FontCssMetaData;
 import javafx.css.PseudoClass;
@@ -53,14 +54,15 @@
 import javafx.css.StyleableProperty;
 import javafx.scene.accessibility.Action;
 import javafx.scene.accessibility.Attribute;
-import javafx.scene.accessibility.Role;
 import javafx.scene.input.Clipboard;
 import javafx.scene.input.ClipboardContent;
 import javafx.scene.text.Font;
+
 import java.text.BreakIterator;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+
 import com.sun.javafx.Utils;
 import com.sun.javafx.binding.ExpressionHelper;
 
@@ -1176,7 +1178,7 @@
 
             @Override
             public StyleableProperty<Font> getStyleableProperty(TextInputControl n) {
-                return (StyleableProperty<Font>)n.fontProperty();
+                return (StyleableProperty<Font>)(WritableValue<Font>)n.fontProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/TitledPane.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/TitledPane.java	Mon May 05 10:06:16 2014 +1200
@@ -33,14 +33,16 @@
 import javafx.beans.property.BooleanPropertyBase;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.value.WritableValue;
 import javafx.geometry.Orientation;
 import javafx.scene.Node;
-
 import javafx.css.PseudoClass;
 import javafx.css.StyleableBooleanProperty;
 import javafx.css.CssMetaData;
+
 import com.sun.javafx.css.converters.BooleanConverter;
 import com.sun.javafx.scene.control.skin.TitledPaneSkin;
+
 import javafx.beans.DefaultProperty;
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
@@ -300,7 +302,7 @@
 
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(TitledPane n) {
-                return (StyleableProperty<Boolean>)n.collapsibleProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.collapsibleProperty();
             }
         };
                
@@ -315,7 +317,7 @@
 
             @Override
             public StyleableProperty<Boolean> getStyleableProperty(TitledPane n) {
-                return (StyleableProperty<Boolean>)n.animatedProperty();
+                return (StyleableProperty<Boolean>)(WritableValue<Boolean>)n.animatedProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/ToggleButton.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/ToggleButton.java	Mon May 05 10:06:16 2014 +1200
@@ -26,18 +26,22 @@
 package javafx.scene.control;
 
 import com.sun.javafx.scene.traversal.ParentTraversalEngine;
+
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.BooleanPropertyBase;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ObjectPropertyBase;
 import javafx.beans.value.ChangeListener;
+import javafx.beans.value.WritableValue;
 import javafx.event.ActionEvent;
 import javafx.geometry.Pos;
 import javafx.scene.Node;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
 import javafx.css.PseudoClass;
+
 import com.sun.javafx.scene.control.skin.ToggleButtonSkin;
+
 import javafx.css.StyleableProperty;
 
 /**
@@ -127,7 +131,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing alignment by calling set on the 
         // CssMetaData ensures that css will be able to override the value.
-        ((StyleableProperty)alignmentProperty()).applyStyle(null, Pos.CENTER);
+        ((StyleableProperty<Pos>)(WritableValue<Pos>)alignmentProperty()).applyStyle(null, Pos.CENTER);
         setMnemonicParsing(true);     // enable mnemonic auto-parsing by default
     }
     /***************************************************************************
--- a/modules/controls/src/main/java/javafx/scene/control/ToolBar.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/ToolBar.java	Mon May 05 10:06:16 2014 +1200
@@ -31,6 +31,7 @@
 
 import javafx.beans.DefaultProperty;
 import javafx.beans.property.ObjectProperty;
+import javafx.beans.value.WritableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
 import javafx.geometry.Orientation;
@@ -40,8 +41,10 @@
 import javafx.css.StyleableObjectProperty;
 import javafx.css.CssMetaData;
 import javafx.css.PseudoClass;
+
 import com.sun.javafx.css.converters.EnumConverter;
 import com.sun.javafx.scene.control.skin.ToolBarSkin;
+
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
 
@@ -114,7 +117,7 @@
         // makes it look to css like the user set the value and css will not 
         // override. Initializing focusTraversable by calling set on the 
         // CssMetaData ensures that css will be able to override the value.
-        ((StyleableProperty)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
+        ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
         
         // initialize css pseudo-class state
         pseudoClassStateChanged(HORIZONTAL_PSEUDOCLASS_STATE, true);
@@ -215,7 +218,7 @@
 
             @Override
             public StyleableProperty<Orientation> getStyleableProperty(ToolBar n) {
-                return (StyleableProperty<Orientation>)n.orientationProperty();
+                return (StyleableProperty<Orientation>)(WritableValue<Orientation>)n.orientationProperty();
             }
         };
 
--- a/modules/controls/src/main/java/javafx/scene/control/Tooltip.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/Tooltip.java	Mon May 05 10:06:16 2014 +1200
@@ -27,17 +27,20 @@
 
 
 import com.sun.javafx.css.StyleManager;
+
 import javafx.css.SimpleStyleableBooleanProperty;
 import javafx.css.SimpleStyleableDoubleProperty;
 import javafx.css.SimpleStyleableObjectProperty;
 import javafx.css.StyleOrigin;
 import javafx.css.StyleableObjectProperty;
 import javafx.css.StyleableStringProperty;
+
 import com.sun.javafx.css.converters.BooleanConverter;
 import com.sun.javafx.css.converters.EnumConverter;
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.css.converters.StringConverter;
 import com.sun.javafx.scene.control.skin.TooltipSkin;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -45,6 +48,7 @@
 import javafx.animation.KeyFrame;
 import javafx.animation.Timeline;
 import javafx.beans.property.*;
+import javafx.beans.value.WritableValue;
 import javafx.css.CssMetaData;
 import javafx.css.FontCssMetaData;
 import javafx.css.Styleable;
@@ -383,7 +387,7 @@
                     final String url = super.get();
 
                     if (url == null) {
-                        ((StyleableProperty)graphicProperty()).applyStyle(origin, null);
+                        ((StyleableProperty<Node>)(WritableValue<Node>)graphicProperty()).applyStyle(origin, null);
                     } else {
                         // RT-34466 - if graphic's url is the same as this property's value, then don't overwrite.
                         final Node graphicNode = Tooltip.this.getGraphic();
@@ -411,7 +415,7 @@
                             // Have to call applyStyle on graphicProperty so that the graphicProperty's
                             // origin matches the imageUrlProperty's origin.
                             //
-                            ((StyleableProperty)graphicProperty()).applyStyle(origin, new ImageView(img));
+                            ((StyleableProperty<Node>)(WritableValue<Node>)graphicProperty()).applyStyle(origin, new ImageView(img));
                         }
                     }
                 }
@@ -440,7 +444,7 @@
                     // The origin of the imageUrlProperty is that of the graphicProperty.
                     // Return the origin in a way that doesn't expand the graphicProperty.
                     //
-                    return graphic != null ? ((StyleableProperty)graphic).getStyleOrigin() : null;
+                    return graphic != null ? ((StyleableProperty<Node>)(WritableValue<Node>)graphic).getStyleOrigin() : null;
                 }
 
                 @Override
@@ -533,7 +537,7 @@
 
                 @Override
                 public StyleableProperty<Font> getStyleableProperty(Tooltip.CSSBridge cssBridge) {
-                    return (StyleableProperty<Font>)cssBridge.tooltip.fontProperty();
+                    return (StyleableProperty<Font>)(WritableValue<Font>)cssBridge.tooltip.fontProperty();
                 }
             };
 
@@ -549,7 +553,7 @@
 
                 @Override
                 public StyleableProperty<TextAlignment> getStyleableProperty(Tooltip.CSSBridge cssBridge) {
-                    return (StyleableProperty<TextAlignment>)cssBridge.tooltip.textAlignmentProperty();
+                    return (StyleableProperty<TextAlignment>)(WritableValue<TextAlignment>)cssBridge.tooltip.textAlignmentProperty();
                 }
             };
 
@@ -565,7 +569,7 @@
 
                 @Override
                 public StyleableProperty<OverrunStyle> getStyleableProperty(Tooltip.CSSBridge cssBridge) {
-                    return (StyleableProperty<OverrunStyle>)cssBridge.tooltip.textOverrunProperty();
+                    return (StyleableProperty<OverrunStyle>)(WritableValue<OverrunStyle>)cssBridge.tooltip.textOverrunProperty();
                 }
             };
 
@@ -580,7 +584,7 @@
 
                 @Override
                 public StyleableProperty<Boolean> getStyleableProperty(Tooltip.CSSBridge cssBridge) {
-                    return (StyleableProperty<Boolean>)cssBridge.tooltip.wrapTextProperty();
+                    return (StyleableProperty<Boolean>)(WritableValue<Boolean>)cssBridge.tooltip.wrapTextProperty();
                 }
             };
 
@@ -611,7 +615,7 @@
 
                 @Override
                 public StyleableProperty<ContentDisplay> getStyleableProperty(Tooltip.CSSBridge cssBridge) {
-                    return (StyleableProperty<ContentDisplay>)cssBridge.tooltip.contentDisplayProperty();
+                    return (StyleableProperty<ContentDisplay>)(WritableValue<ContentDisplay>)cssBridge.tooltip.contentDisplayProperty();
                 }
             };
 
@@ -626,7 +630,7 @@
 
                 @Override
                 public StyleableProperty<Number> getStyleableProperty(Tooltip.CSSBridge cssBridge) {
-                    return (StyleableProperty<Number>)cssBridge.tooltip.graphicTextGapProperty();
+                    return (StyleableProperty<Number>)(WritableValue<Number>)cssBridge.tooltip.graphicTextGapProperty();
                 }
             };
 
--- a/modules/controls/src/main/java/javafx/scene/control/TreeTableView.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeTableView.java	Mon May 05 10:06:16 2014 +1200
@@ -28,8 +28,8 @@
 import com.sun.javafx.collections.MappingChange;
 import com.sun.javafx.collections.NonIterableChange;
 import com.sun.javafx.collections.annotations.ReturnsUnmodifiableCollection;
-
 import com.sun.javafx.scene.control.SelectedCellsMap;
+
 import javafx.beans.property.DoubleProperty;
 import javafx.css.CssMetaData;
 import javafx.css.PseudoClass;
@@ -65,6 +65,7 @@
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.WeakChangeListener;
+import javafx.beans.value.WritableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.MapChangeListener;
@@ -1827,7 +1828,7 @@
                     }
 
                     @Override public StyleableProperty<Number> getStyleableProperty(TreeTableView<?> n) {
-                        return (StyleableProperty<Number>) n.fixedCellSizeProperty();
+                        return (StyleableProperty<Number>)(WritableValue<Number>) n.fixedCellSizeProperty();
                     }
                 };
 
@@ -1897,7 +1898,7 @@
                 return row != null ? row.accGetAttribute(attribute, parameters) : null;
             }
             case MULTIPLE_SELECTION: {
-                MultipleSelectionModel sm = getSelectionModel();
+                TreeTableViewSelectionModel<S> sm = getSelectionModel();
                 return sm != null && sm.getSelectionMode() == SelectionMode.MULTIPLE;
             }
 
--- a/modules/controls/src/main/java/javafx/scene/control/TreeView.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeView.java	Mon May 05 10:06:16 2014 +1200
@@ -27,6 +27,7 @@
 
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.scene.control.skin.TreeViewSkin;
+
 import javafx.application.Platform;
 import javafx.beans.DefaultProperty;
 import javafx.beans.InvalidationListener;
@@ -42,6 +43,7 @@
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.WeakChangeListener;
+import javafx.beans.value.WritableValue;
 import javafx.css.CssMetaData;
 import javafx.css.Styleable;
 import javafx.css.StyleableDoubleProperty;
@@ -1069,7 +1071,7 @@
                     }
 
                     @Override public StyleableProperty<Number> getStyleableProperty(TreeView<?> n) {
-                        return (StyleableProperty<Number>) n.fixedCellSizeProperty();
+                        return (StyleableProperty<Number>)(WritableValue<Number>) n.fixedCellSizeProperty();
                     }
                 };
 
--- a/modules/controls/src/main/java/javafx/scene/control/cell/CellUtils.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/CellUtils.java	Mon May 05 10:06:16 2014 +1200
@@ -26,11 +26,7 @@
 package javafx.scene.control.cell;
 
 import javafx.beans.property.ObjectProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.scene.Node;
 import javafx.scene.control.Cell;
 import javafx.scene.control.ChoiceBox;
@@ -38,7 +34,6 @@
 import javafx.scene.control.TextField;
 import javafx.scene.control.TreeItem;
 import javafx.scene.input.KeyCode;
-import javafx.scene.input.KeyEvent;
 import javafx.scene.layout.HBox;
 import javafx.util.StringConverter;
 
@@ -53,7 +48,7 @@
      *                                                                         *
      **************************************************************************/    
     
-    private final static StringConverter defaultStringConverter = new StringConverter<Object>() {
+    private final static StringConverter<?> defaultStringConverter = new StringConverter<Object>() {
         @Override public String toString(Object t) {
             return t == null ? null : t.toString();
         }
@@ -63,15 +58,15 @@
         }
     };
     
-    private final static StringConverter defaultTreeItemStringConverter =
-        new StringConverter<TreeItem>() {
-            @Override public String toString(TreeItem treeItem) {
+    private final static StringConverter<?> defaultTreeItemStringConverter =
+        new StringConverter<TreeItem<?>>() {
+            @Override public String toString(TreeItem<?> treeItem) {
                 return (treeItem == null || treeItem.getValue() == null) ? 
                         "" : treeItem.getValue().toString();
             }
 
-            @Override public TreeItem fromString(String string) {
-                return new TreeItem(string);
+            @Override public TreeItem<?> fromString(String string) {
+                return new TreeItem<>(string);
             }
         };
     
@@ -85,6 +80,7 @@
      * Simple method to provide a StringConverter implementation in various cell
      * implementations.
      */
+    @SuppressWarnings("unchecked")
     static <T> StringConverter<T> defaultStringConverter() {
         return (StringConverter<T>) defaultStringConverter;
     }
@@ -93,6 +89,7 @@
      * Simple method to provide a TreeItem-specific StringConverter 
      * implementation in various cell implementations.
      */
+    @SuppressWarnings("unchecked")
     static <T> StringConverter<TreeItem<T>> defaultTreeItemStringConverter() {
         return (StringConverter<TreeItem<T>>) defaultTreeItemStringConverter;
     }
--- a/modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxListCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxListCell.java	Mon May 05 10:06:16 2014 +1200
@@ -34,7 +34,6 @@
 import javafx.scene.control.ContentDisplay;
 import javafx.scene.control.ListCell;
 import javafx.scene.control.ListView;
-import javafx.scene.control.TreeItem;
 import javafx.util.Callback;
 import javafx.util.StringConverter;
 
@@ -263,7 +262,7 @@
         super.updateItem(item, empty);
         
         if (! empty) {
-            StringConverter c = getConverter();
+            StringConverter<T> c = getConverter();
             Callback<T, ObservableValue<Boolean>> callback = getSelectedStateCallback();
             if (callback == null) {
                 throw new NullPointerException(
--- a/modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxTableCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxTableCell.java	Mon May 05 10:06:16 2014 +1200
@@ -25,7 +25,6 @@
 
 package javafx.scene.control.cell;
 
-import javafx.css.CssMetaData;
 import javafx.beans.binding.Bindings;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.ObjectProperty;
@@ -342,6 +341,7 @@
      **************************************************************************/
     
     /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
     @Override public void updateItem(T item, boolean empty) {
         super.updateItem(item, empty);
         
@@ -349,7 +349,7 @@
             setText(null);
             setGraphic(null);
         } else {
-            StringConverter c = getConverter();
+            StringConverter<T> c = getConverter();
             
             if (showLabel) {
                 setText(c.toString(item));
@@ -359,9 +359,9 @@
             if (booleanProperty instanceof BooleanProperty) {
                 checkBox.selectedProperty().unbindBidirectional((BooleanProperty)booleanProperty);
             }
-            ObservableValue obsValue = getSelectedProperty();
+            ObservableValue<?> obsValue = getSelectedProperty();
             if (obsValue instanceof BooleanProperty) {
-                booleanProperty = obsValue;
+                booleanProperty = (ObservableValue<Boolean>) obsValue;
                 checkBox.selectedProperty().bindBidirectional((BooleanProperty)booleanProperty);
             }
             
@@ -386,7 +386,7 @@
         this.checkBox.setAlignment(showLabel ? Pos.CENTER_LEFT : Pos.CENTER);
     }
     
-    private ObservableValue getSelectedProperty() {
+    private ObservableValue<?> getSelectedProperty() {
         return getSelectedStateCallback() != null ?
                 getSelectedStateCallback().call(getIndex()) :
                 getTableColumn().getCellObservableValue(getIndex());
--- a/modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxTreeCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxTreeCell.java	Mon May 05 10:06:16 2014 +1200
@@ -424,7 +424,7 @@
             setText(null);
             setGraphic(null);
         } else {
-            StringConverter c = getConverter();
+            StringConverter<TreeItem<T>> c = getConverter();
             
             TreeItem<T> treeItem = getTreeItem();
             
--- a/modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxTreeTableCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/CheckBoxTreeTableCell.java	Mon May 05 10:06:16 2014 +1200
@@ -25,7 +25,6 @@
 
 package javafx.scene.control.cell;
 
-import javafx.css.CssMetaData;
 import javafx.beans.binding.Bindings;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.ObjectProperty;
@@ -340,6 +339,7 @@
      **************************************************************************/
     
     /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
     @Override public void updateItem(T item, boolean empty) {
         super.updateItem(item, empty);
         
@@ -347,7 +347,7 @@
             setText(null);
             setGraphic(null);
         } else {
-            StringConverter c = getConverter();
+            StringConverter<T> c = getConverter();
             
             if (showLabel) {
                 setText(c.toString(item));
@@ -357,9 +357,9 @@
             if (booleanProperty instanceof BooleanProperty) {
                 checkBox.selectedProperty().unbindBidirectional((BooleanProperty)booleanProperty);
             }
-            ObservableValue obsValue = getSelectedProperty();
+            ObservableValue<?> obsValue = getSelectedProperty();
             if (obsValue instanceof BooleanProperty) {
-                booleanProperty = obsValue;
+                booleanProperty = (ObservableValue<Boolean>) obsValue;
                 checkBox.selectedProperty().bindBidirectional((BooleanProperty)booleanProperty);
             }
             
@@ -384,7 +384,7 @@
         this.checkBox.setAlignment(showLabel ? Pos.CENTER_LEFT : Pos.CENTER);
     }
     
-    private ObservableValue getSelectedProperty() {
+    private ObservableValue<?> getSelectedProperty() {
         return getSelectedStateCallback() != null ?
                 getSelectedStateCallback().call(getIndex()) :
                 getTableColumn().getCellObservableValue(getIndex());
--- a/modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxListCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxListCell.java	Mon May 05 10:06:16 2014 +1200
@@ -77,6 +77,7 @@
      * @return A {@link Callback} that will return a ListCell that is able to 
      *      work on the type of element contained within the ListView.
      */
+    @SafeVarargs
     public static <T> Callback<ListView<T>, ListCell<T>> forListView(final T... items) {
         return forListView(FXCollections.observableArrayList(items));
     }
@@ -98,6 +99,7 @@
      * @return A {@link Callback} that will return a ListCell that is able to 
      *      work on the type of element contained within the ListView.
      */
+    @SafeVarargs
     public static <T> Callback<ListView<T>, ListCell<T>> forListView(
             final StringConverter<T> converter, 
             final T... items) {
@@ -181,6 +183,7 @@
      * @param items The items to show in the ChoiceBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ChoiceBoxListCell(T... items) {
         this(FXCollections.observableArrayList(items));
     }
@@ -197,6 +200,7 @@
      * @param items The items to show in the ChoiceBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ChoiceBoxListCell(StringConverter<T> converter, T... items) {
         this(converter, FXCollections.observableArrayList(items));
     }
--- a/modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxTableCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxTableCell.java	Mon May 05 10:06:16 2014 +1200
@@ -79,6 +79,7 @@
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
+    @SafeVarargs
     public static <S,T> Callback<TableColumn<S,T>, TableCell<S,T>> forTableColumn(final T... items) {
         return forTableColumn(null, items);
     }
@@ -103,6 +104,7 @@
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
+    @SafeVarargs
     public static <S,T> Callback<TableColumn<S,T>, TableCell<S,T>> forTableColumn(
             final StringConverter<T> converter, 
             final T... items) {
@@ -192,6 +194,7 @@
      * @param items The items to show in the ChoiceBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ChoiceBoxTableCell(T... items) {
         this(FXCollections.observableArrayList(items));
     }
@@ -208,6 +211,7 @@
      * @param items The items to show in the ChoiceBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ChoiceBoxTableCell(StringConverter<T> converter, T... items) {
         this(converter, FXCollections.observableArrayList(items));
     }
--- a/modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxTreeCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxTreeCell.java	Mon May 05 10:06:16 2014 +1200
@@ -76,6 +76,7 @@
      * @return A {@link Callback} that will return a TreeCell that is able to 
      *      work on the type of element contained within the TreeView.
      */    
+    @SafeVarargs
     public static <T> Callback<TreeView<T>, TreeCell<T>> forTreeView(T... items) {
         return forTreeView(FXCollections.observableArrayList(items));
     }
@@ -121,6 +122,7 @@
      * @return A {@link Callback} that will return a TreeCell that is able to 
      *      work on the type of element contained within the TreeView.
      */  
+    @SafeVarargs
     public static <T> Callback<TreeView<T>, TreeCell<T>> forTreeView(
             final StringConverter<T> converter, 
             final T... items) {
@@ -187,6 +189,7 @@
      * @param items The items to show in the ChoiceBox popup menu when selected 
      * by the user.
      */
+    @SafeVarargs
     public ChoiceBoxTreeCell(T... items) {
         this(FXCollections.observableArrayList(items));
     }
@@ -203,6 +206,7 @@
      * @param items The items to show in the ChoiceBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ChoiceBoxTreeCell(StringConverter<T> converter, T... items) {
         this(converter, FXCollections.observableArrayList(items));
     }
--- a/modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxTreeTableCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/ChoiceBoxTreeTableCell.java	Mon May 05 10:06:16 2014 +1200
@@ -79,6 +79,7 @@
      * @return A {@link Callback} that will return a TreeTableCell that is able to 
      *      work on the type of element contained within the TreeTableColumn.
      */
+    @SafeVarargs
     public static <S,T> Callback<TreeTableColumn<S,T>, TreeTableCell<S,T>> forTreeTableColumn(final T... items) {
         return forTreeTableColumn(null, items);
     }
@@ -103,6 +104,7 @@
      * @return A {@link Callback} that will return a TreeTableCell that is able to 
      *      work on the type of element contained within the TreeTableColumn.
      */
+    @SafeVarargs
     public static <S,T> Callback<TreeTableColumn<S,T>, TreeTableCell<S,T>> forTreeTableColumn(
             final StringConverter<T> converter, 
             final T... items) {
@@ -192,6 +194,7 @@
      * @param items The items to show in the ChoiceBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ChoiceBoxTreeTableCell(T... items) {
         this(FXCollections.observableArrayList(items));
     }
@@ -208,6 +211,7 @@
      * @param items The items to show in the ChoiceBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ChoiceBoxTreeTableCell(StringConverter<T> converter, T... items) {
         this(converter, FXCollections.observableArrayList(items));
     }
--- a/modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxListCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxListCell.java	Mon May 05 10:06:16 2014 +1200
@@ -76,6 +76,7 @@
      * @return A {@link Callback} that will return a ListCell that is able to 
      *      work on the type of element contained within the ListView.
      */
+    @SafeVarargs
     public static <T> Callback<ListView<T>, ListCell<T>> forListView(final T... items) {
         return forListView(FXCollections.observableArrayList(items));
     }
@@ -97,6 +98,7 @@
      * @return A {@link Callback} that will return a ListCell that is able to 
      *      work on the type of element contained within the ListView.
      */
+    @SafeVarargs
     public static <T> Callback<ListView<T>, ListCell<T>> forListView(
                 final StringConverter<T> converter, 
                 final T... items) {
@@ -180,6 +182,7 @@
      * @param items The items to show in the ComboBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ComboBoxListCell(T... items) {
         this(FXCollections.observableArrayList(items));
     }
@@ -196,6 +199,7 @@
      * @param items The items to show in the ComboBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ComboBoxListCell(StringConverter<T> converter, T... items) {
         this(converter, FXCollections.observableArrayList(items));
     }
--- a/modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxTableCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxTableCell.java	Mon May 05 10:06:16 2014 +1200
@@ -81,6 +81,7 @@
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
+    @SafeVarargs
     public static <S,T> Callback<TableColumn<S,T>, TableCell<S,T>> forTableColumn(
             final T... items) {
         return forTableColumn(null, items);
@@ -106,6 +107,7 @@
      * @return A {@link Callback} that will return a TableCell that is able to 
      *      work on the type of element contained within the TableColumn.
      */
+    @SafeVarargs
     public static <S,T> Callback<TableColumn<S,T>, TableCell<S,T>> forTableColumn(
             final StringConverter<T> converter, 
             final T... items) {
@@ -195,6 +197,7 @@
      * @param items The items to show in the ComboBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ComboBoxTableCell(T... items) {
         this(FXCollections.observableArrayList(items));
     }
@@ -211,6 +214,7 @@
      * @param items The items to show in the ComboBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ComboBoxTableCell(StringConverter<T> converter, T... items) {
         this(converter, FXCollections.observableArrayList(items));
     }
--- a/modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxTreeCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxTreeCell.java	Mon May 05 10:06:16 2014 +1200
@@ -36,7 +36,6 @@
 import javafx.scene.layout.HBox;
 import javafx.util.Callback;
 import javafx.util.StringConverter;
-
 import static javafx.scene.control.cell.CellUtils.createComboBox;
 
 /**
@@ -79,6 +78,7 @@
      * @return A {@link Callback} that will return a TreeCell that is able to 
      *      work on the type of element contained within the TreeView.
      */    
+    @SafeVarargs
     public static <T> Callback<TreeView<T>, TreeCell<T>> forTreeView(T... items) {
         return forTreeView(FXCollections.observableArrayList(items));
     }
@@ -123,6 +123,7 @@
      * @return A {@link Callback} that will return a TreeCell that is able to 
      *      work on the type of element contained within the TreeView.
      */  
+    @SafeVarargs
     public static <T> Callback<TreeView<T>, TreeCell<T>> forTreeView(
             final StringConverter<T> converter, 
             final T... items) {
@@ -187,6 +188,7 @@
      * @param items The items to show in the ComboBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ComboBoxTreeCell(T... items) {
         this(FXCollections.observableArrayList(items));
     }
@@ -203,6 +205,7 @@
      * @param items The items to show in the ComboBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ComboBoxTreeCell(StringConverter<T> converter, T... items) {
         this(converter, FXCollections.observableArrayList(items));
     }
--- a/modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxTreeTableCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/ComboBoxTreeTableCell.java	Mon May 05 10:06:16 2014 +1200
@@ -81,6 +81,7 @@
      * @return A {@link Callback} that will return a TreeTableCell that is able to 
      *      work on the type of element contained within the TreeTableColumn.
      */
+    @SafeVarargs
     public static <S,T> Callback<TreeTableColumn<S,T>, TreeTableCell<S,T>> forTreeTableColumn(
             final T... items) {
         return forTreeTableColumn(null, items);
@@ -106,6 +107,7 @@
      * @return A {@link Callback} that will return a TreeTableCell that is able to 
      *      work on the type of element contained within the TreeTableColumn.
      */
+    @SafeVarargs
     public static <S,T> Callback<TreeTableColumn<S,T>, TreeTableCell<S,T>> forTreeTableColumn(
             final StringConverter<T> converter, 
             final T... items) {
@@ -195,6 +197,7 @@
      * @param items The items to show in the ComboBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ComboBoxTreeTableCell(T... items) {
         this(FXCollections.observableArrayList(items));
     }
@@ -211,6 +214,7 @@
      * @param items The items to show in the ComboBox popup menu when selected 
      *      by the user.
      */
+    @SafeVarargs
     public ComboBoxTreeTableCell(StringConverter<T> converter, T... items) {
         this(converter, FXCollections.observableArrayList(items));
     }
--- a/modules/controls/src/main/java/javafx/scene/control/cell/ProgressBarTableCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/ProgressBarTableCell.java	Mon May 05 10:06:16 2014 +1200
@@ -70,7 +70,7 @@
     
     private final ProgressBar progressBar;
     
-    private ObservableValue observable;
+    private ObservableValue<Double> observable;
     
     
     
--- a/modules/controls/src/main/java/javafx/scene/control/cell/ProgressBarTreeTableCell.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/ProgressBarTreeTableCell.java	Mon May 05 10:06:16 2014 +1200
@@ -27,7 +27,6 @@
 
 import javafx.beans.value.ObservableValue;
 import javafx.scene.control.ProgressBar;
-import javafx.scene.control.TableColumn;
 import javafx.scene.control.TreeTableCell;
 import javafx.scene.control.TreeTableColumn;
 import javafx.util.Callback;
@@ -71,7 +70,7 @@
     
     private final ProgressBar progressBar;
     
-    private ObservableValue observable;
+    private ObservableValue<Double> observable;
     
     
     
--- a/modules/controls/src/main/java/javafx/scene/control/cell/PropertyValueFactory.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/PropertyValueFactory.java	Mon May 05 10:06:16 2014 +1200
@@ -99,7 +99,7 @@
 
     private final String property;
 
-    private Class columnClass;
+    private Class<?> columnClass;
     private String previousProperty;
     private PropertyReference<T> propertyRef;
 
@@ -116,7 +116,7 @@
 
     /** {@inheritDoc} */
     @Override public ObservableValue<T> call(CellDataFeatures<S,T> param) {
-        return getCellDataReflectively((T)param.getValue());
+        return getCellDataReflectively(param.getValue());
     }
 
     /**
@@ -124,7 +124,7 @@
      */
     public final String getProperty() { return property; }
 
-    private ObservableValue<T> getCellDataReflectively(T rowData) {
+    private ObservableValue<T> getCellDataReflectively(S rowData) {
         if (getProperty() == null || getProperty().isEmpty() || rowData == null) return null;
 
         try {
--- a/modules/controls/src/main/java/javafx/scene/control/cell/TreeItemPropertyValueFactory.java	Fri May 02 17:33:21 2014 -0400
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/TreeItemPropertyValueFactory.java	Mon May 05 10:06:16 2014 +1200
@@ -96,7 +96,7 @@
 
     private final String property;
 
-    private Class columnClass;
+    private Class<?> columnClass;
     private String previousProperty;
     private PropertyReference<T> propertyRef;
 
@@ -114,7 +114,7 @@
     /** {@inheritDoc} */
     @Override public ObservableValue<T> call(CellDataFeatures<S, T> param) {
         TreeItem<S> treeItem = param.getValue();
-        return getCellDataReflectively((T)treeItem.getValue());
+        return getCellDataReflectively(treeItem.getValue());
     }
 
     /**
@@ -122,7 +122,7 @@
      */
     public final String getProperty() { return property; }
 
-    private ObservableValue<T> getCellDataReflectively(T rowData) {
+    private ObservableValue<T> getCellDataReflectively(S rowData) {
         if (getProperty() == null || getProperty().isEmpty() || rowData == null) return null;
 
         try {