changeset 6904:df050d476706

RT-36334: Clean up warnings in control component Contributed-by: Tom Schindl <tom.schindl@bestsolution.at> Reviewed-by: jgiles
author jgiles
date Fri, 25 Apr 2014 12:05:53 +1200
parents 8979d8ffbc06
children c5322f1ee55e
files modules/controls/src/main/java/com/sun/javafx/charts/ChartLayoutAnimator.java modules/controls/src/main/java/com/sun/javafx/charts/Legend.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/BehaviorBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/CellBehaviorBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ColorPickerBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ComboBoxBaseBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/DateCellBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/DatePickerBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ListCellBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ListViewBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ProgressBarBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ProgressIndicatorBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ScrollPaneBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TabPaneBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableCellBehaviorBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableRowBehaviorBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableViewBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextBinding.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextFieldBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TitledPaneBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeCellBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeTableCellBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeTableViewBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeViewBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusComboBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusListBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusPopupBehavior.java modules/controls/src/main/java/javafx/scene/chart/AreaChart.java modules/controls/src/main/java/javafx/scene/chart/Axis.java modules/controls/src/main/java/javafx/scene/chart/BarChart.java modules/controls/src/main/java/javafx/scene/chart/BubbleChart.java modules/controls/src/main/java/javafx/scene/chart/LineChart.java modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java modules/controls/src/main/java/javafx/scene/chart/PieChart.java modules/controls/src/main/java/javafx/scene/chart/ScatterChart.java modules/controls/src/main/java/javafx/scene/chart/StackedAreaChart.java modules/controls/src/main/java/javafx/scene/chart/XYChart.java modules/controls/src/main/java/javafx/scene/control/CheckBoxTreeItem.java modules/controls/src/main/java/javafx/scene/control/ChoiceBox.java modules/controls/src/main/java/javafx/scene/control/ComboBox.java modules/controls/src/main/java/javafx/scene/control/DatePicker.java modules/controls/src/main/java/javafx/scene/control/FocusModel.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/ListCell.java modules/controls/src/main/java/javafx/scene/control/ListView.java modules/controls/src/main/java/javafx/scene/control/Menu.java modules/controls/src/main/java/javafx/scene/control/MultipleSelectionModelBase.java modules/controls/src/main/java/javafx/scene/control/ScrollToEvent.java modules/controls/src/main/java/javafx/scene/control/SortEvent.java modules/controls/src/main/java/javafx/scene/control/Tab.java modules/controls/src/main/java/javafx/scene/control/TableCell.java modules/controls/src/main/java/javafx/scene/control/TableColumn.java modules/controls/src/main/java/javafx/scene/control/TableRow.java modules/controls/src/main/java/javafx/scene/control/TableView.java modules/controls/src/main/java/javafx/scene/control/ToolBar.java modules/controls/src/main/java/javafx/scene/control/TreeItem.java modules/controls/src/main/java/javafx/scene/control/TreeTableCell.java modules/controls/src/main/java/javafx/scene/control/TreeTableColumn.java modules/controls/src/main/java/javafx/scene/control/TreeTableRow.java modules/controls/src/main/java/javafx/scene/control/TreeTableView.java modules/controls/src/main/java/javafx/scene/control/TreeUtil.java modules/controls/src/main/java/javafx/scene/control/TreeView.java
diffstat 65 files changed, 1922 insertions(+), 2037 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/charts/ChartLayoutAnimator.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/charts/ChartLayoutAnimator.java	Fri Apr 25 12:05:53 2014 +1200
@@ -54,14 +54,14 @@
 
     @Override public void handle(long l) {
         if(isAxis) {
-            ((Axis)nodeToLayout).requestAxisLayout();
+            ((Axis<?>)nodeToLayout).requestAxisLayout();
         } else {
             nodeToLayout.requestLayout();
         }
     }
 
     @Override public void handle(ActionEvent actionEvent) {
-        Object removed = activeTimeLines.remove(actionEvent.getSource());
+        activeTimeLines.remove(actionEvent.getSource());
         if(activeTimeLines.isEmpty()) stop();
         // cause one last re-layout to make sure final values were used
         handle(0l);
--- a/modules/controls/src/main/java/com/sun/javafx/charts/Legend.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/charts/Legend.java	Fri Apr 25 12:05:53 2014 +1200
@@ -51,7 +51,6 @@
 
     // -------------- PRIVATE FIELDS ------------------------------------------
 
-    private int rows = 0, columns = 0;
     private ListChangeListener<LegendItem> itemsListener = c -> {
         getChildren().clear();
         for (LegendItem item : getItems()) getChildren().add(item.label);
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/BehaviorBase.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/BehaviorBase.java	Fri Apr 25 12:05:53 2014 +1200
@@ -155,7 +155,7 @@
         // Don't need to explicitly check for null because Collections.unmodifiableList
         // will die on null, as will the adding of listeners
         this.control = control;
-        this.keyBindings = keyBindings == null ? Collections.EMPTY_LIST
+        this.keyBindings = keyBindings == null ? Collections.emptyList()
                 : Collections.unmodifiableList(new ArrayList<>(keyBindings));
         control.addEventHandler(KeyEvent.ANY, keyEventListener);
         control.focusedProperty().addListener(focusListener);
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/CellBehaviorBase.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/CellBehaviorBase.java	Fri Apr 25 12:05:53 2014 +1200
@@ -120,7 +120,7 @@
      **************************************************************************/
 
     protected int getIndex() {
-        return getControl() instanceof IndexedCell ? ((IndexedCell)getControl()).getIndex() : -1;
+        return getControl() instanceof IndexedCell ? ((IndexedCell<?>)getControl()).getIndex() : -1;
     }
 
     @Override public void mousePressed(MouseEvent e) {
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ColorPickerBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ColorPickerBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -34,7 +34,6 @@
 import javafx.scene.control.ColorPicker;
 import com.sun.javafx.scene.control.skin.ColorPickerSkin;
 
-import javafx.scene.input.MouseEvent;
 import javafx.scene.paint.Color;
 
 public class ColorPickerBehavior extends ComboBoxBaseBehavior<Color> {
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ComboBoxBaseBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ComboBoxBaseBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -28,13 +28,11 @@
 import javafx.event.EventTarget;
 import javafx.scene.Node;
 import javafx.scene.control.ComboBoxBase;
-import javafx.scene.control.Control;
 import javafx.scene.input.KeyEvent;
 import javafx.scene.input.MouseButton;
 import javafx.scene.input.MouseEvent;
 import java.util.ArrayList;
 import java.util.List;
-import com.sun.javafx.Utils;
 import static javafx.scene.input.KeyCode.DOWN;
 import static javafx.scene.input.KeyCode.ENTER;
 import static javafx.scene.input.KeyCode.F4;
@@ -79,7 +77,7 @@
     @Override protected void focusChanged() {
         // If we did have the key down, but are now not focused, then we must
         // disarm the box.
-        final ComboBoxBase box = getControl();
+        final ComboBoxBase<T> box = getControl();
         if (keyDown && !box.isFocused()) {
             keyDown = false;
             box.disarm();
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/DateCellBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/DateCellBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -28,19 +28,15 @@
 import javafx.geometry.NodeOrientation;
 import javafx.scene.Node;
 import javafx.scene.control.DateCell;
-import java.time.LocalDate;
 import java.util.ArrayList;
 import java.util.List;
 import com.sun.javafx.scene.control.skin.DatePickerContent;
 import com.sun.javafx.scene.traversal.Direction;
 import static java.time.temporal.ChronoUnit.DAYS;
-import static java.time.temporal.ChronoUnit.MONTHS;
 import static java.time.temporal.ChronoUnit.WEEKS;
 import static javafx.scene.input.KeyCode.DOWN;
 import static javafx.scene.input.KeyCode.ENTER;
 import static javafx.scene.input.KeyCode.LEFT;
-import static javafx.scene.input.KeyCode.PAGE_DOWN;
-import static javafx.scene.input.KeyCode.PAGE_UP;
 import static javafx.scene.input.KeyCode.RIGHT;
 import static javafx.scene.input.KeyCode.SPACE;
 import static javafx.scene.input.KeyCode.UP;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/DatePickerBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/DatePickerBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -26,18 +26,13 @@
 package com.sun.javafx.scene.control.behavior;
 
 import javafx.scene.control.DatePicker;
-import javafx.scene.input.MouseEvent;
 import java.time.LocalDate;
 import java.util.ArrayList;
 import java.util.List;
 import com.sun.javafx.scene.control.skin.DatePickerSkin;
 import static javafx.scene.input.KeyCode.DOWN;
-import static javafx.scene.input.KeyCode.ENTER;
-import static javafx.scene.input.KeyCode.ESCAPE;
 import static javafx.scene.input.KeyCode.F4;
-import static javafx.scene.input.KeyCode.SPACE;
 import static javafx.scene.input.KeyCode.UP;
-import static javafx.scene.input.KeyEvent.KEY_PRESSED;
 import static javafx.scene.input.KeyEvent.KEY_RELEASED;
 
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ListCellBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ListCellBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -41,7 +41,7 @@
      **************************************************************************/
 
     public ListCellBehavior(ListCell<T> control) {
-        super(control, Collections.EMPTY_LIST);
+        super(control, Collections.emptyList());
     }
 
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ListViewBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ListViewBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -691,7 +691,7 @@
     
     private void selectAllToFocus(boolean setAnchorToFocusIndex) {
         // Fix for RT-31241
-        final ListView listView = getControl();
+        final ListView<T> listView = getControl();
         if (listView.getEditingIndex() >= 0) return;
 
         MultipleSelectionModel<T> sm = listView.getSelectionModel();
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ProgressBarBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ProgressBarBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -38,6 +38,6 @@
      **************************************************************************/
 
     public ProgressBarBehavior(final C progress) {
-        super(progress, Collections.EMPTY_LIST);
+        super(progress, Collections.emptyList());
     }
 }
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ProgressIndicatorBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ProgressIndicatorBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -37,6 +37,6 @@
      **************************************************************************/
 
     public ProgressIndicatorBehavior(final C progress) {
-        super(progress, Collections.EMPTY_LIST);
+        super(progress, Collections.emptyList());
     }
 }
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ScrollPaneBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ScrollPaneBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -26,14 +26,11 @@
 package com.sun.javafx.scene.control.behavior;
 
 import javafx.geometry.NodeOrientation;
-import javafx.scene.Node;
-import javafx.scene.Parent;
 import javafx.scene.control.ScrollPane;
 import javafx.scene.input.KeyEvent;
 import javafx.scene.input.MouseEvent;
 import java.util.ArrayList;
 import java.util.List;
-import com.sun.javafx.scene.traversal.Direction;
 import com.sun.javafx.scene.control.skin.ScrollPaneSkin;
 import static javafx.scene.input.KeyCode.DOWN;
 import static javafx.scene.input.KeyCode.F4;
@@ -45,7 +42,6 @@
 import static javafx.scene.input.KeyCode.UP;
 import static javafx.scene.input.KeyCode.HOME;
 import static javafx.scene.input.KeyCode.END;
-import static javafx.scene.input.KeyCode.TAB;
 
 
 /**
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TabPaneBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TabPaneBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -25,7 +25,6 @@
 
 package com.sun.javafx.scene.control.behavior;
 
-import javafx.collections.ObservableList;
 import javafx.event.Event;
 import javafx.geometry.NodeOrientation;
 import javafx.scene.Node;
@@ -35,12 +34,8 @@
 import javafx.scene.control.TabPane;
 import javafx.scene.input.KeyCode;
 import javafx.scene.input.MouseEvent;
-import javafx.scene.layout.StackPane;
 import java.util.ArrayList;
 import java.util.List;
-import com.sun.javafx.scene.control.skin.TabPaneSkin;
-import com.sun.javafx.scene.traversal.Direction;
-import com.sun.javafx.scene.traversal.TraversalEngine;
 
 public class TabPaneBehavior extends BehaviorBase<TabPane> {
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableCellBehaviorBase.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableCellBehaviorBase.java	Fri Apr 25 12:05:53 2014 +1200
@@ -34,9 +34,7 @@
 import javafx.scene.control.TableSelectionModel;
 import javafx.scene.input.MouseButton;
 
-import java.util.ArrayList;
 import java.util.Collections;
-import java.util.List;
 
 public abstract class TableCellBehaviorBase<S, T, TC extends TableColumnBase<S, ?>, C extends IndexedCell<T>> extends CellBehaviorBase<C> {
     
@@ -54,7 +52,7 @@
      **************************************************************************/    
 
     public TableCellBehaviorBase(C control) {
-        super(control, Collections.EMPTY_LIST);
+        super(control, Collections.emptyList());
     }
     
     
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableRowBehaviorBase.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableRowBehaviorBase.java	Fri Apr 25 12:05:53 2014 +1200
@@ -28,15 +28,12 @@
 import javafx.collections.ObservableList;
 import javafx.scene.control.Cell;
 import javafx.scene.control.Control;
-import javafx.scene.control.TableColumn;
 import javafx.scene.control.TableColumnBase;
 import javafx.scene.control.TablePositionBase;
 import javafx.scene.control.TableSelectionModel;
-import javafx.scene.control.TreeItem;
 import javafx.scene.input.MouseButton;
 import javafx.scene.input.MouseEvent;
 
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
@@ -49,7 +46,7 @@
      **************************************************************************/
 
     public TableRowBehaviorBase(T control) {
-        super(control, Collections.EMPTY_LIST);
+        super(control, Collections.emptyList());
     }
 
 
@@ -112,7 +109,7 @@
                 } else if (shiftDown) {
                     // we add all rows between the current focus and
                     // this row (inclusive) to the current selection.
-                    TablePositionBase anchor = TableCellBehavior.getAnchor(table, getFocusedCell());
+                    TablePositionBase<?> anchor = TableCellBehavior.getAnchor(table, getFocusedCell());
                     final int anchorRow = anchor.getRow();
                     selectRows(anchorRow, index);
                 } else {
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableViewBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableViewBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -26,7 +26,6 @@
 package com.sun.javafx.scene.control.behavior;
 
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.beans.value.WeakChangeListener;
 import javafx.collections.ObservableList;
 import javafx.scene.control.TableColumn;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextBinding.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextBinding.java	Fri Apr 25 12:05:53 2014 +1200
@@ -25,10 +25,6 @@
 
 package com.sun.javafx.scene.control.behavior;
 
-import java.util.Locale;
-import java.util.StringTokenizer;
-
-import javafx.scene.input.KeyCode;
 import javafx.scene.input.KeyEvent;
 import javafx.scene.input.KeyCombination;
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextFieldBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextFieldBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -26,7 +26,6 @@
 package com.sun.javafx.scene.control.behavior;
 
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.beans.value.WeakChangeListener;
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
@@ -39,7 +38,6 @@
 import javafx.scene.control.TextField;
 import javafx.scene.input.ContextMenuEvent;
 import javafx.scene.input.KeyEvent;
-import javafx.scene.input.MouseButton;
 import javafx.scene.input.MouseEvent;
 import javafx.stage.Screen;
 import javafx.stage.Window;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -27,7 +27,6 @@
 
 import javafx.application.ConditionalFeature;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.geometry.NodeOrientation;
 import javafx.scene.control.IndexRange;
 import javafx.scene.control.TextInputControl;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TitledPaneBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TitledPaneBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -25,17 +25,12 @@
 
 package com.sun.javafx.scene.control.behavior;
 
-import javafx.scene.Node;
-import javafx.scene.Parent;
 import javafx.scene.control.TitledPane;
 import javafx.scene.input.MouseEvent;
 import java.util.ArrayList;
 import java.util.List;
-import com.sun.javafx.scene.control.skin.TitledPaneSkin;
-import com.sun.javafx.scene.traversal.Direction;
 import static javafx.scene.input.KeyCode.ENTER;
 import static javafx.scene.input.KeyCode.SPACE;
-import static javafx.scene.input.KeyCode.TAB;
 
 public class TitledPaneBehavior extends BehaviorBase<TitledPane> {
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeCellBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeCellBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -44,7 +44,7 @@
      **************************************************************************/
 
     public TreeCellBehavior(final TreeCell<T> control) {
-        super(control, Collections.EMPTY_LIST);
+        super(control, Collections.emptyList());
     }
 
 
@@ -72,7 +72,7 @@
 
     @Override
     protected void edit(TreeCell<T> cell) {
-        TreeItem treeItem = cell == null ? null : cell.getTreeItem();
+        TreeItem<T> treeItem = cell == null ? null : cell.getTreeItem();
         getCellContainer().edit(treeItem);
     }
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeTableCellBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeTableCellBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -28,13 +28,11 @@
 import javafx.scene.Node;
 import javafx.scene.control.TableColumnBase;
 import javafx.scene.control.TablePositionBase;
-import javafx.scene.control.TableSelectionModel;
 import javafx.scene.control.TreeItem;
 import javafx.scene.control.TreeTableCell;
 import javafx.scene.control.TreeTableColumn;
 import javafx.scene.control.TreeTableView;
 import javafx.scene.input.MouseButton;
-import javafx.scene.input.MouseEvent;
 
 /**
  */
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeTableViewBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeTableViewBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -28,7 +28,6 @@
 import static javafx.scene.input.KeyCode.*;
 
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.beans.value.WeakChangeListener;
 import javafx.collections.ObservableList;
 import javafx.geometry.NodeOrientation;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeViewBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeViewBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -629,7 +629,7 @@
     
     private void selectAllToFocus(boolean setAnchorToFocusIndex) {
         // Fix for RT-31241
-        final TreeView treeView = getControl();
+        final TreeView<T> treeView = getControl();
         if (treeView.getEditingItem() != null) return;
 
         MultipleSelectionModel<TreeItem<T>> sm = treeView.getSelectionModel();
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -34,9 +34,7 @@
 import javafx.scene.input.KeyEvent;
 
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.event.Event;
-import javafx.event.EventDispatchChain;
 import javafx.event.EventDispatcher;
 import javafx.event.EventHandler;
 import javafx.scene.input.MouseEvent;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusComboBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusComboBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -31,9 +31,7 @@
 import javafx.scene.input.KeyEvent;
 
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.event.Event;
-import javafx.event.EventDispatchChain;
 import javafx.event.EventDispatcher;
 import javafx.event.EventHandler;
 import javafx.scene.input.MouseEvent;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusListBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusListBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -32,9 +32,7 @@
 import javafx.scene.input.KeyEvent;
 
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.event.Event;
-import javafx.event.EventDispatchChain;
 import javafx.event.EventDispatcher;
 import javafx.event.EventHandler;
 import javafx.scene.input.MouseEvent;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusPopupBehavior.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusPopupBehavior.java	Fri Apr 25 12:05:53 2014 +1200
@@ -32,9 +32,7 @@
 import javafx.scene.input.KeyEvent;
 
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.event.Event;
-import javafx.event.EventDispatchChain;
 import javafx.event.EventDispatcher;
 import javafx.event.EventHandler;
 import javafx.scene.input.MouseEvent;
--- a/modules/controls/src/main/java/javafx/scene/chart/AreaChart.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/AreaChart.java	Fri Apr 25 12:05:53 2014 +1200
@@ -41,8 +41,6 @@
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.scene.Group;
 import javafx.scene.Node;
 import javafx.scene.layout.StackPane;
@@ -73,7 +71,7 @@
     // -------------- PRIVATE FIELDS ------------------------------------------
 
     /** A multiplier for teh Y values that we store for each series, it is used to animate in a new series */
-    private Map<Series, DoubleProperty> seriesYMultiplierMap = new HashMap<Series, DoubleProperty>();
+    private Map<Series<X,Y>, DoubleProperty> seriesYMultiplierMap = new HashMap<>();
     private Legend legend = new Legend();
 
     // -------------- PUBLIC PROPERTIES ----------------------------------------
@@ -343,7 +341,7 @@
             seriesLine.getStyleClass().setAll("chart-series-area-line", "series" + i, s.defaultColorStyleClass);
             fillPath.getStyleClass().setAll("chart-series-area-fill", "series" + i, s.defaultColorStyleClass);
             for (int j=0; j < s.getData().size(); j++) {
-                final Data item = s.getData().get(j);
+                final Data<X,Y> item = s.getData().get(j);
                 final Node node = item.getNode();
                 if(node!=null) node.getStyleClass().setAll("chart-area-symbol", "series" + i, "data" + j, s.defaultColorStyleClass);
             }
@@ -382,7 +380,7 @@
             ));
         }
         for (int j=0; j<series.getData().size(); j++) {
-            Data item = series.getData().get(j);
+            Data<X,Y> item = series.getData().get(j);
             final Node symbol = createSymbol(series, seriesIndex, item, j);
             if (symbol != null) {
                 if (shouldAnimate()) {
@@ -427,7 +425,7 @@
             nodes.add(series.getNode());
             if (getCreateSymbols()) { // RT-22124
                 // done need to fade the symbols if createSymbols is false
-                for (Data d: series.getData()) nodes.add(d.getNode());
+                for (Data<X,Y> d: series.getData()) nodes.add(d.getNode());
             }
             // fade out old and symbols
             KeyValue[] startValues = new KeyValue[nodes.size()];
@@ -447,7 +445,7 @@
             tl.play();
         } else {
             getPlotChildren().remove(series.getNode());
-            for (Data d:series.getData()) getPlotChildren().remove(d.getNode());
+            for (Data<X,Y> d:series.getData()) getPlotChildren().remove(d.getNode());
             removeSeriesFromDisplay(series);
         }
     }
@@ -491,7 +489,7 @@
         }
     }
 
-    private Node createSymbol(Series series, int seriesIndex, final Data item, int itemIndex) {
+    private Node createSymbol(Series<X,Y> series, int seriesIndex, final Data<X,Y> item, int itemIndex) {
         Node symbol = item.getNode();
         // check if symbol has already been created
         if (symbol == null && getCreateSymbols()) {
@@ -536,12 +534,12 @@
                 BooleanConverter.getInstance(), Boolean.TRUE) {
 
             @Override
-            public boolean isSettable(AreaChart node) {
+            public boolean isSettable(AreaChart<?,?> node) {
                 return node.createSymbols == null || !node.createSymbols.isBound();
 }
 
             @Override
-            public StyleableProperty<Boolean> getStyleableProperty(AreaChart node) {
+            public StyleableProperty<Boolean> getStyleableProperty(AreaChart<?,?> node) {
                 return (StyleableProperty<Boolean>)node.createSymbolsProperty();
             }
         };
--- a/modules/controls/src/main/java/javafx/scene/chart/Axis.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/Axis.java	Fri Apr 25 12:05:53 2014 +1200
@@ -1,1206 +1,1206 @@
-/*
- * Copyright (c) 2010, 2013, 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 javafx.scene.chart;
-
-import javafx.css.Styleable;
-import javafx.css.CssMetaData;
-import javafx.css.PseudoClass;
-import javafx.css.StyleableBooleanProperty;
-import javafx.css.StyleableDoubleProperty;
-import javafx.css.StyleableObjectProperty;
-import com.sun.javafx.css.converters.BooleanConverter;
-import com.sun.javafx.css.converters.EnumConverter;
-import com.sun.javafx.css.converters.PaintConverter;
-import com.sun.javafx.css.converters.SizeConverter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import javafx.animation.FadeTransition;
-import javafx.beans.binding.DoubleExpression;
-import javafx.beans.binding.ObjectExpression;
-import javafx.beans.binding.StringExpression;
-import javafx.beans.property.*;
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
-import javafx.css.FontCssMetaData;
-import javafx.css.StyleableProperty;
-import javafx.geometry.Bounds;
-import javafx.geometry.Dimension2D;
-import javafx.geometry.Orientation;
-import javafx.geometry.Pos;
-import javafx.geometry.Side;
-import javafx.scene.control.Label;
-import javafx.scene.layout.Region;
-import javafx.scene.paint.Color;
-import javafx.scene.paint.Paint;
-import javafx.scene.shape.LineTo;
-import javafx.scene.shape.MoveTo;
-import javafx.scene.shape.Path;
-import javafx.scene.text.Font;
-import javafx.scene.text.Text;
-import javafx.scene.transform.Rotate;
-import javafx.scene.transform.Translate;
-import javafx.util.Duration;
-
-
-/**
- * Base class for all axes in JavaFX that represents an axis drawn on a chart area.
- * It holds properties for axis auto ranging, ticks and labels along the axis.
- * <p>
- * Some examples of concrete subclasses include {@link NumberAxis} whose axis plots data
- * in numbers and {@link CategoryAxis} whose values / ticks represent string
- * categories along its axis.
- * @since JavaFX 2.0
- */
-public abstract class Axis<T> extends Region {
-
-    // -------------- PRIVATE FIELDS -----------------------------------------------------------------------------------
-
-    Text measure = new Text();
-    private Orientation effectiveOrientation;
-    private double effectiveTickLabelRotation = Double.NaN;
-    private Label axisLabel = new Label();
-    private final Path tickMarkPath = new Path();
-    private double oldLength = 0;
-    /** True when the current range invalid and all dependent calculations need to be updated */
-    boolean rangeValid = false;
-    private boolean measureInvalid = false;
-
-    private int numLabelsToSkip = 1;
-
-    // -------------- PUBLIC PROPERTIES --------------------------------------------------------------------------------
-
-    private final ObservableList<TickMark<T>> tickMarks = FXCollections.observableArrayList();
-    private final ObservableList<TickMark<T>> unmodifiableTickMarks = FXCollections.unmodifiableObservableList(tickMarks);
-    /**
-     * Unmodifiable observable list of tickmarks, each TickMark directly representing a tickmark on this axis. This is updated
-     * whenever the displayed tickmarks changes.
-     *
-     * @return Unmodifiable observable list of TickMarks on this axis
-     */
-    public ObservableList<TickMark<T>> getTickMarks() { return unmodifiableTickMarks; }
-
-    /** The side of the plot which this axis is being drawn on */
-    private ObjectProperty<Side> side = new StyleableObjectProperty<Side>(){
-        @Override protected void invalidated() {
-            // cause refreshTickMarks
-            Side edge = get();
-            pseudoClassStateChanged(TOP_PSEUDOCLASS_STATE, edge == Side.TOP);
-            pseudoClassStateChanged(RIGHT_PSEUDOCLASS_STATE, edge == Side.RIGHT);
-            pseudoClassStateChanged(BOTTOM_PSEUDOCLASS_STATE, edge == Side.BOTTOM);
-            pseudoClassStateChanged(LEFT_PSEUDOCLASS_STATE, edge == Side.LEFT);
-            requestAxisLayout();
-        }
-        
-        @Override
-        public CssMetaData<Axis<?>,Side> getCssMetaData() {
-            return StyleableProperties.SIDE;
-        }
-
-        @Override
-        public Object getBean() {
-            return Axis.this;
-        }
-
-        @Override
-        public String getName() {
-            return "side";
-        }
-    };
-    public final Side getSide() { return side.get(); }
-    public final void setSide(Side value) { side.set(value); }
-    public final ObjectProperty<Side> sideProperty() { return side; }
-
-    final void setEffectiveOrientation(Orientation orientation) {
-        effectiveOrientation = orientation;
-    }
-
-    final Side getEffectiveSide() {
-        final Side side = getSide();
-        if (side == null || (side.isVertical() && effectiveOrientation == Orientation.HORIZONTAL)
-                || side.isHorizontal() && effectiveOrientation == Orientation.VERTICAL) {
-            // Means side == null && effectiveOrientation == null produces Side.BOTTOM
-            return effectiveOrientation == Orientation.VERTICAL ? Side.LEFT : Side.BOTTOM;
-        }
-        return side;
-    }
-
-    /** The axis label */
-    private ObjectProperty<String> label = new ObjectPropertyBase<String>() {
-        @Override protected void invalidated() {
-            axisLabel.setText(get());
-            requestAxisLayout();
-        }
-
-        @Override
-        public Object getBean() {
-            return Axis.this;
-        }
-
-        @Override
-        public String getName() {
-            return "label";
-        }
-    };
-    public final String getLabel() { return label.get(); }
-    public final void setLabel(String value) { label.set(value); }
-    public final ObjectProperty<String> labelProperty() { return label; }
-
-    /** true if tick marks should be displayed */
-    private BooleanProperty tickMarkVisible = new StyleableBooleanProperty(true) {
-        @Override protected void invalidated() {
-            tickMarkPath.setVisible(get());
-            requestAxisLayout();
-        }
-
-        @Override
-        public CssMetaData<Axis<?>,Boolean> getCssMetaData() {
-            return StyleableProperties.TICK_MARK_VISIBLE;
-        }
-        @Override
-        public Object getBean() {
-            return Axis.this;
-        }
-
-        @Override
-        public String getName() {
-            return "tickMarkVisible";
-        }
-    };
-    public final boolean isTickMarkVisible() { return tickMarkVisible.get(); }
-    public final void setTickMarkVisible(boolean value) { tickMarkVisible.set(value); }
-    public final BooleanProperty tickMarkVisibleProperty() { return tickMarkVisible; }
-
-    /** true if tick mark labels should be displayed */
-    private BooleanProperty tickLabelsVisible = new StyleableBooleanProperty(true) {
-        @Override protected void invalidated() {
-            // update textNode visibility for each tick
-            for (TickMark<T> tick : tickMarks) {
-                tick.setTextVisible(get());
-            }
-            requestAxisLayout();
-        }
-        
-        @Override
-        public CssMetaData<Axis<?>,Boolean> getCssMetaData() {
-            return StyleableProperties.TICK_LABELS_VISIBLE;
-        }
-
-        @Override
-        public Object getBean() {
-            return Axis.this;
-        }
-
-        @Override
-        public String getName() {
-            return "tickLabelsVisible";
-        }
-    };
-    public final boolean isTickLabelsVisible() { return tickLabelsVisible.get(); }
-    public final void setTickLabelsVisible(boolean value) {
-        tickLabelsVisible.set(value); }
-    public final BooleanProperty tickLabelsVisibleProperty() { return tickLabelsVisible; }
-
-    /** The length of tick mark lines */
-    private DoubleProperty tickLength = new StyleableDoubleProperty(8) {
-        @Override protected void invalidated() {
-            if (tickLength.get() < 0 && !tickLength.isBound()) {
-                tickLength.set(0);
-            }
-            // this effects preferred size so request layout
-            requestAxisLayout();
-        }
-
-        @Override
-        public CssMetaData<Axis<?>,Number> getCssMetaData() {
-            return StyleableProperties.TICK_LENGTH;
-        }        
-        @Override
-        public Object getBean() {
-            return Axis.this;
-        }
-
-        @Override
-        public String getName() {
-            return "tickLength";
-        }
-    };
-    public final double getTickLength() { return tickLength.get(); }
-    public final void setTickLength(double value) { tickLength.set(value); }
-    public final DoubleProperty tickLengthProperty() { return tickLength; }
-
-    /** This is true when the axis determines its range from the data automatically */
-    private BooleanProperty autoRanging = new BooleanPropertyBase(true) {
-        @Override protected void invalidated() {
-            if(get()) {
-                // auto range turned on, so need to auto range now
-//                autoRangeValid = false;
-                requestAxisLayout();
-            }
-        }
-
-        @Override
-        public Object getBean() {
-            return Axis.this;
-        }
-
-        @Override
-        public String getName() {
-            return "autoRanging";
-        }
-    };
-    public final boolean isAutoRanging() { return autoRanging.get(); }
-    public final void setAutoRanging(boolean value) { autoRanging.set(value); }
-    public final BooleanProperty autoRangingProperty() { return autoRanging; }
-
-    /** The font for all tick labels */
-    private ObjectProperty<Font> tickLabelFont = new StyleableObjectProperty<Font>(Font.font("System",8)) {
-        @Override protected void invalidated() {
-            Font f = get();
-            measure.setFont(f);
-            for(TickMark<T> tm : getTickMarks()) {
-                tm.textNode.setFont(f);
-            }
-            measureInvalid = true;
-            requestAxisLayout();
-        }
-
-        @Override 
-        public CssMetaData<Axis<?>,Font> getCssMetaData() {
-            return StyleableProperties.TICK_LABEL_FONT;
-        }
-        
-        @Override
-        public Object getBean() {
-            return Axis.this;
-        }
-
-        @Override
-        public String getName() {
-            return "tickLabelFont";
-        }
-    };
-    public final Font getTickLabelFont() { return tickLabelFont.get(); }
-    public final void setTickLabelFont(Font value) { tickLabelFont.set(value); }
-    public final ObjectProperty<Font> tickLabelFontProperty() { return tickLabelFont; }
-
-    /** The fill for all tick labels */
-    private ObjectProperty<Paint> tickLabelFill = new StyleableObjectProperty<Paint>(Color.BLACK) {
-        @Override protected void invalidated() {
-            for (TickMark<T> tick : tickMarks) {
-                tick.textNode.setFill(getTickLabelFill());
-            }
-        }
-
-        @Override
-        public CssMetaData<Axis<?>,Paint> getCssMetaData() {
-            return StyleableProperties.TICK_LABEL_FILL;
-        }
-        
-        @Override
-        public Object getBean() {
-            return Axis.this;
-        }
-
-        @Override
-        public String getName() {
-            return "tickLabelFill";
-        }
-    };
-    public final Paint getTickLabelFill() { return tickLabelFill.get(); }
-    public final void setTickLabelFill(Paint value) { tickLabelFill.set(value); }
-    public final ObjectProperty<Paint> tickLabelFillProperty() { return tickLabelFill; }
-
-    /** The gap between tick labels and the tick mark lines */
-    private DoubleProperty tickLabelGap = new StyleableDoubleProperty(3) {
-        @Override protected void invalidated() {
-           requestAxisLayout();
-        }
-
-        @Override
-        public CssMetaData<Axis<?>,Number> getCssMetaData() {
-            return StyleableProperties.TICK_LABEL_TICK_GAP;
-        }
-        
-        @Override
-        public Object getBean() {
-            return Axis.this;
-        }
-
-        @Override
-        public String getName() {
-            return "tickLabelGap";
-        }
-    };
-    public final double getTickLabelGap() { return tickLabelGap.get(); }
-    public final void setTickLabelGap(double value) { tickLabelGap.set(value); }
-    public final DoubleProperty tickLabelGapProperty() { return tickLabelGap; }
-
-    /**
-     * When true any changes to the axis and its range will be animated.
-     */
-    private BooleanProperty animated = new SimpleBooleanProperty(this, "animated", true);
-
-    /**
-     * Indicates whether the changes to axis range will be animated or not.
-     *
-     * @return true if axis range changes will be animated and false otherwise
-     */
-    public final boolean getAnimated() { return animated.get(); }
-    public final void setAnimated(boolean value) { animated.set(value); }
-    public final BooleanProperty animatedProperty() { return animated; }
-
-    /**
-     * Rotation in degrees of tick mark labels from their normal horizontal.
-     */
-    private DoubleProperty tickLabelRotation = new DoublePropertyBase(0) {
-        @Override protected void invalidated() {
-            requestAxisLayout();
-        }
-
-        @Override
-        public Object getBean() {
-            return Axis.this;
-        }
-
-        @Override
-        public String getName() {
-            return "tickLabelRotation";
-        }
-    };
-    public final double getTickLabelRotation() { return tickLabelRotation.getValue(); }
-    public final void setTickLabelRotation(double value) { tickLabelRotation.setValue(value); }
-    public final DoubleProperty tickLabelRotationProperty() { return tickLabelRotation; }
-
-    // -------------- CONSTRUCTOR --------------------------------------------------------------------------------------
-
-    /**
-     * Creates and initializes a new instance of the Axis class.
-     */
-    public Axis() {
-        getStyleClass().setAll("axis");
-        axisLabel.getStyleClass().add("axis-label");
-        axisLabel.setAlignment(Pos.CENTER);
-        tickMarkPath.getStyleClass().add("axis-tick-mark");
-        getChildren().addAll(axisLabel, tickMarkPath);
-    }
-
-    // -------------- METHODS ------------------------------------------------------------------------------------------
-
-    /**
-     * See if the current range is valid, if it is not then any range dependent calulcations need to redone on the next layout pass
-     *
-     * @return true if current range calculations are valid
-     */
-    protected final boolean isRangeValid() { return rangeValid; }
-
-    /**
-     * Mark the current range invalid, this will cause anything that depends on the range to be recalculated on the
-     * next layout.
-     */
-    protected final void invalidateRange() { rangeValid = false; }
-
-    /**
-     * This is used to check if any given animation should run. It returns true if animation is enabled and the node
-     * is visible and in a scene.
-     *
-     * @return true if animations should happen
-     */
-    protected final boolean shouldAnimate(){
-        return getAnimated() && impl_isTreeVisible() && getScene() != null;
-    }
-    
-    /**
-     * We suppress requestLayout() calls here by doing nothing as we don't want changes to our children to cause
-     * layout. If you really need to request layout then call requestAxisLayout().
-     */
-    @Override public void requestLayout() {}
-
-    /**
-     * Request that the axis is laid out in the next layout pass. This replaces requestLayout() as it has been
-     * overridden to do nothing so that changes to children's bounds etc do not cause a layout. This was done as a
-     * optimization as the Axis knows the exact minimal set of changes that really need layout to be updated. So we
-     * only want to request layout then, not on any child change.
-     */
-    public void requestAxisLayout() {
-        super.requestLayout();
-    }
-
-    /**
-     * Called when data has changed and the range may not be valid any more. This is only called by the chart if
-     * isAutoRanging() returns true. If we are auto ranging it will cause layout to be requested and auto ranging to
-     * happen on next layout pass.
-     *
-     * @param data The current set of all data that needs to be plotted on this axis
-     */
-    public void invalidateRange(List<T> data) {
-        invalidateRange();
-        requestAxisLayout();
-    }
-
-    /**
-     * This calculates the upper and lower bound based on the data provided to invalidateRange() method. This must not
-     * effect the state of the axis, changing any properties of the axis. Any results of the auto-ranging should be
-     * returned in the range object. This will we passed to setRange() if it has been decided to adopt this range for
-     * this axis.
-     *
-     * @param length The length of the axis in screen coordinates
-     * @return Range information, this is implementation dependent
-     */
-    protected abstract Object autoRange(double length);
-
-    /**
-     * Called to set the current axis range to the given range. If isAnimating() is true then this method should
-     * animate the range to the new range.
-     *
-     * @param range A range object returned from autoRange()
-     * @param animate If true animate the change in range
-     */
-    protected abstract void setRange(Object range, boolean animate);
-
-    /**
-     * Called to get the current axis range.
-     *
-     * @return A range object that can be passed to setRange() and calculateTickValues()
-     */
-    protected abstract Object getRange();
-
-    /**
-     * Get the display position of the zero line along this axis.
-     *
-     * @return display position or Double.NaN if zero is not in current range;
-     */
-    public abstract double getZeroPosition();
-
-    /**
-     * Get the display position along this axis for a given value
-     *
-     * @param value The data value to work out display position for
-     * @return display position or Double.NaN if zero is not in current range;
-     */
-    public abstract double getDisplayPosition(T value);
-
-    /**
-     * Get the data value for the given display position on this axis. If the axis
-     * is a CategoryAxis this will be the nearest value.
-     *
-     * @param  displayPosition A pixel position on this axis
-     * @return the nearest data value to the given pixel position or
-     *         null if not on axis;
-     */
-    public abstract T getValueForDisplay(double displayPosition);
-
-    /**
-     * Checks if the given value is plottable on this axis
-     *
-     * @param value The value to check if its on axis
-     * @return true if the given value is plottable on this axis
-     */
-    public abstract boolean isValueOnAxis(T value);
-
-    /**
-     * All axis values must be representable by some numeric value. This gets the numeric value for a given data value.
-     *
-     * @param value The data value to convert
-     * @return Numeric value for the given data value
-     */
-    public abstract double toNumericValue(T value);
-
-    /**
-     * All axis values must be representable by some numeric value. This gets the data value for a given numeric value.
-     *
-     * @param value The numeric value to convert
-     * @return Data value for given numeric value
-     */
-    public abstract T toRealValue(double value);
-
-    /**
-     * Calculate a list of all the data values for each tick mark in range
-     *
-     * @param length The length of the axis in display units
-     * @param range A range object returned from autoRange()
-     * @return A list of tick marks that fit along the axis if it was the given length
-     */
-    protected abstract List<T> calculateTickValues(double length, Object range);
-
-    /**
-     * Computes the preferred height of this axis for the given width. If axis orientation
-     * is horizontal, it takes into account the tick mark length, tick label gap and
-     * label height.
-     *
-     * @return the computed preferred width for this axis
-     */
-    @Override protected double computePrefHeight(double width) {
-        final Side side = getEffectiveSide();
-        if (side.isVertical()) {
-            // TODO for now we have no hard and fast answer here, I guess it should work
-            // TODO out the minimum size needed to display min, max and zero tick mark labels.
-            return 100;
-        } else { // HORIZONTAL
-            // we need to first auto range as this may/will effect tick marks
-            Object range = autoRange(width);
-            // calculate max tick label height
-            double maxLabelHeight = 0;
-            // calculate the new tick marks
-            if (isTickLabelsVisible()) {
-                final List<T> newTickValues = calculateTickValues(width, range);
-                for (T value: newTickValues) {
-                    maxLabelHeight = Math.max(maxLabelHeight,measureTickMarkSize(value, range).getHeight());
-                }
-            }
-            // calculate tick mark length
-            final double tickMarkLength = isTickMarkVisible() ? (getTickLength() > 0) ? getTickLength() : 0 : 0;
-            // calculate label height
-            final double labelHeight =
-                    axisLabel.getText() == null || axisLabel.getText().length() == 0 ?
-                    0 : axisLabel.prefHeight(-1);
-            return maxLabelHeight + getTickLabelGap() + tickMarkLength + labelHeight;
-        } 
-    }
-
-    /**
-     * Computes the preferred width of this axis for the given height. If axis orientation
-     * is vertical, it takes into account the tick mark length, tick label gap and
-     * label height.
-     *
-     * @return the computed preferred width for this axis
-     */
-    @Override protected double computePrefWidth(double height) {
-        final Side side = getEffectiveSide();
-        if (side.isVertical()) {
-            // we need to first auto range as this may/will effect tick marks
-            Object range = autoRange(height);
-            // calculate max tick label width
-            double maxLabelWidth = 0;
-            // calculate the new tick marks
-            if (isTickLabelsVisible()) {
-                final List<T> newTickValues = calculateTickValues(height,range);
-                for (T value: newTickValues) {
-                    maxLabelWidth = Math.max(maxLabelWidth, measureTickMarkSize(value, range).getWidth());
-                }
-            }
-            // calculate tick mark length
-            final double tickMarkLength = isTickMarkVisible() ? (getTickLength() > 0) ? getTickLength() : 0 : 0;
-            // calculate label height
-            final double labelHeight =
-                    axisLabel.getText() == null || axisLabel.getText().length() == 0 ?
-                    0 : axisLabel.prefHeight(-1);
-            return maxLabelWidth + getTickLabelGap() + tickMarkLength + labelHeight;
-        } else  { // HORIZONTAL
-            // TODO for now we have no hard and fast answer here, I guess it should work
-            // TODO out the minimum size needed to display min, max and zero tick mark labels.
-            return 100;
-        } 
-    }
-
-    /**
-     * Called during layout if the tickmarks have been updated, allowing subclasses to do anything they need to
-     * in reaction.
-     */
-    protected void tickMarksUpdated(){}
-
-    /**
-     * Invoked during the layout pass to layout this axis and all its content.
-     */
-    @Override protected void layoutChildren() {
-        final double width = getWidth();
-        final double height = getHeight();
-        final double tickMarkLength = (isTickMarkVisible() && getTickLength() > 0) ? getTickLength() : 0;
-        final boolean isFirstPass = oldLength == 0;
-        // auto range if it is not valid
-        final Side side = getEffectiveSide();
-        final double length = (side.isVertical()) ? height : width;
-        int tickIndex = 0;
-        boolean rangeInvalid = !isRangeValid();
-        if (oldLength != length || rangeInvalid) {
-            // get range
-            Object range;
-            if(isAutoRanging()) {
-                // auto range
-                range = autoRange(length);
-                // set current range to new range
-                setRange(range, getAnimated() && !isFirstPass && impl_isTreeVisible() && rangeInvalid);
-            } else {
-                range = getRange();
-            }
-            // calculate new tick marks
-            List<T> newTickValues = calculateTickValues(length, range);
-
-            // remove everything
-            Iterator<TickMark<T>> tickMarkIterator = tickMarks.iterator();
-            while (tickMarkIterator.hasNext()) {
-                TickMark<T> tick = tickMarkIterator.next();
-                final TickMark<T> tm = tick;
-                if (shouldAnimate()) {
-                    FadeTransition ft = new FadeTransition(Duration.millis(250),tick.textNode);
-                    ft.setToValue(0);
-                    ft.setOnFinished(actionEvent -> {
-                        getChildren().remove(tm.textNode);
-                    });
-                    ft.play();
-                } else {
-                    getChildren().remove(tm.textNode);
-                }
-                // we have to remove the tick mark immediately so we don't draw tick line for it or grid lines and fills
-                tickMarkIterator.remove();
-            }
-
-            // add new tick marks for new values
-            for(T newValue: newTickValues) {
-                final TickMark<T> tick = new TickMark<T>();
-                tick.setValue(newValue);
-                tick.textNode.setText(getTickMarkLabel(newValue));
-                tick.textNode.setFont(getTickLabelFont());
-                tick.textNode.setFill(getTickLabelFill());
-                tick.setTextVisible(isTickLabelsVisible());
-                if (shouldAnimate()) tick.textNode.setOpacity(0);
-                getChildren().add(tick.textNode);
-                tickMarks.add(tick);
-                if (shouldAnimate()) {
-                    FadeTransition ft = new FadeTransition(Duration.millis(750),tick.textNode);
-                    ft.setFromValue(0);
-                    ft.setToValue(1);
-                    ft.play();
-                }
-            }
-
-            // call tick marks updated to inform subclasses that we have updated tick marks
-            tickMarksUpdated();
-            // mark all done
-            oldLength = length;
-            rangeValid = true;
-        }
-
-        if (oldLength != length || rangeInvalid || measureInvalid) {
-            measureInvalid = false;
-            // RT-12272 : tick labels overlapping
-            switch (side) {
-                case LEFT:
-                case RIGHT:
-                    double totalLabelHeight = 0;
-                    double maxLabelHeight = 0;
-                    for (TickMark<T> m : tickMarks) {
-                        double tickHeight = measureTickMarkSize(m.getValue(), getRange()).getHeight();
-                        totalLabelHeight += tickHeight;
-                        maxLabelHeight = Math.round(Math.max(maxLabelHeight, tickHeight));
-                    }
-                    if (maxLabelHeight > 0 && length < totalLabelHeight) {
-                        numLabelsToSkip = ((int)(tickMarks.size() * maxLabelHeight / length)) + 1;
-                    }
-                    break;
-                case BOTTOM:
-                case TOP:
-                    double totalLabelWidth = 0;
-                    double maxLabelWidth = 0;
-                    for (TickMark<T> m : tickMarks) {
-                        double tickWidth = measureTickMarkSize(m.getValue(), getRange()).getWidth();
-                        totalLabelWidth += tickWidth;
-                        maxLabelWidth = Math.round(Math.max(maxLabelWidth, tickWidth));
-                    }
-                    if (maxLabelWidth > 0 && length < totalLabelWidth) {
-                        numLabelsToSkip = ((int)(tickMarks.size() * maxLabelWidth / length)) + 1;
-                    }
-                    break;
-            }
-        }
-
-        // clear tick mark path elements as we will recreate
-        tickMarkPath.getElements().clear();
-        // do layout of axis label, tick mark lines and text
-        double effectiveLabelRotation = getEffectiveTickLabelRotation();
-        if (Side.LEFT.equals(side)) {
-            // offset path to make strokes snap to pixel
-            tickMarkPath.setLayoutX(-0.5);
-            tickMarkPath.setLayoutY(0.5);
-            if (getLabel() != null) {
-                axisLabel.getTransforms().setAll(new Translate(0, height), new Rotate(-90, 0, 0));
-                axisLabel.setLayoutX(0);
-                axisLabel.setLayoutY(0);
-                //noinspection SuspiciousNameCombination
-                axisLabel.resize(height, Math.ceil(axisLabel.prefHeight(width)));
-            }
-            tickIndex = 0;
-            for (TickMark<T> tick : tickMarks) {
-                tick.setPosition(getDisplayPosition(tick.getValue()));
-                positionTextNode(tick.textNode, width - getTickLabelGap() - tickMarkLength,
-                                 tick.getPosition(), effectiveLabelRotation,side);
-
-                // check if position is inside bounds
-                if(tick.getPosition() >= 0 && tick.getPosition() <= Math.ceil(length)) {
-                    if (isTickLabelsVisible()) {
-                        tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
-                        tickIndex++;
-                    }
-                    // add tick mark line
-                    tickMarkPath.getElements().addAll(
-                        new MoveTo(width - tickMarkLength, tick.getPosition()),
-                        new LineTo(width, tick.getPosition())
-                    );
-                } else {
-                    tick.textNode.setVisible(false);
-                }
-            }
-        } else if (Side.RIGHT.equals(side)) {
-            // offset path to make strokes snap to pixel
-            tickMarkPath.setLayoutX(0.5);
-            tickMarkPath.setLayoutY(0.5);
-            tickIndex = 0;
-            for (TickMark<T> tick : tickMarks) {
-                tick.setPosition(getDisplayPosition(tick.getValue()));
-                positionTextNode(tick.textNode, getTickLabelGap() + tickMarkLength,
-                                 tick.getPosition(), effectiveLabelRotation,side);
-                // check if position is inside bounds
-                if(tick.getPosition() >= 0 && tick.getPosition() <= Math.ceil(length)) {
-                    if (isTickLabelsVisible()) {
-                        tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
-                        tickIndex++;
-                    }
-                    // add tick mark line
-                    tickMarkPath.getElements().addAll(
-                        new MoveTo(0, tick.getPosition()),
-                        new LineTo(tickMarkLength, tick.getPosition())
-                    );
-                } else {
-                    tick.textNode.setVisible(false);
-                }
-            }
-            if (getLabel() != null) {
-                final double axisLabelWidth = Math.ceil(axisLabel.prefHeight(width));
-                axisLabel.getTransforms().setAll(new Translate(0, height), new Rotate(-90, 0, 0));
-                axisLabel.setLayoutX(width-axisLabelWidth);
-                axisLabel.setLayoutY(0);
-                //noinspection SuspiciousNameCombination
-                axisLabel.resize(height, axisLabelWidth);
-            }
-        } else if (Side.TOP.equals(side)) {
-            // offset path to make strokes snap to pixel
-            tickMarkPath.setLayoutX(0.5);
-            tickMarkPath.setLayoutY(-0.5);
-            if (getLabel() != null) {
-                axisLabel.getTransforms().clear();
-                axisLabel.setLayoutX(0);
-                axisLabel.setLayoutY(0);
-                axisLabel.resize(width, Math.ceil(axisLabel.prefHeight(width)));
-            }
-            tickIndex = 0;
-            for (TickMark<T> tick : tickMarks) {
-                tick.setPosition(getDisplayPosition(tick.getValue()));
-                positionTextNode(tick.textNode, tick.getPosition(), height - tickMarkLength - getTickLabelGap(),
-                        effectiveLabelRotation, side);
-                // check if position is inside bounds
-                if(tick.getPosition() >= 0 && tick.getPosition() <= Math.ceil(length)) {
-                    if (isTickLabelsVisible()) {
-                        tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
-                        tickIndex++;
-                    }
-                    // add tick mark line
-                    tickMarkPath.getElements().addAll(
-                        new MoveTo(tick.getPosition(), height),
-                        new LineTo(tick.getPosition(), height - tickMarkLength)
-                    );
-                } else {
-                    tick.textNode.setVisible(false);
-                }
-            }
-        } else {
-            // BOTTOM
-            // offset path to make strokes snap to pixel
-            tickMarkPath.setLayoutX(0.5);
-            tickMarkPath.setLayoutY(0.5);
-            tickIndex = 0;
-            for (TickMark<T> tick : tickMarks) {
-                final double xPos = Math.round(getDisplayPosition(tick.getValue()));
-                tick.setPosition(xPos);
-//                System.out.println("tick pos at : "+tickIndex+" = "+xPos);
-                positionTextNode(tick.textNode,xPos, tickMarkLength + getTickLabelGap(),
-                        effectiveLabelRotation,side);
-                // check if position is inside bounds
-                if(xPos >= 0 && xPos <= Math.ceil(length)) {
-                    if (isTickLabelsVisible()) {
-                        tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
-                        tickIndex++;
-                    }
-                    // add tick mark line
-                    tickMarkPath.getElements().addAll(
-                        new MoveTo(xPos, 0),
-                        new LineTo(xPos, tickMarkLength)
-                    );
-                } else {
-                    tick.textNode.setVisible(false);
-                }
-            }
-            if (getLabel() != null) {
-                axisLabel.getTransforms().clear();
-                final double labelHeight = Math.ceil(axisLabel.prefHeight(width));
-                axisLabel.setLayoutX(0);
-                axisLabel.setLayoutY(height-labelHeight);
-                axisLabel.resize(width, labelHeight);
-            }
-        }
-    }
-
-    /**
-     * Positions a text node to one side of the given point, it X height is vertically centered on point if LEFT or
-     * RIGHT and its centered horizontally if TOP ot BOTTOM.
-     *
-     * @param node The text node to position
-     * @param posX The x position, to place text next to
-     * @param posY The y position, to place text next to
-     * @param angle The text rotation
-     * @param side The side to place text next to position x,y at
-     */
-    private void positionTextNode(Text node, double posX, double posY, double angle, Side side) {
-        node.setLayoutX(0);
-        node.setLayoutY(0);
-        node.setRotate(angle);
-        final Bounds bounds = node.getBoundsInParent();
-        if (Side.LEFT.equals(side)) {
-            node.setLayoutX(posX-bounds.getWidth()-bounds.getMinX());
-            node.setLayoutY(posY - (bounds.getHeight() / 2d) - bounds.getMinY());
-        } else if (Side.RIGHT.equals(side)) {
-            node.setLayoutX(posX-bounds.getMinX());
-            node.setLayoutY(posY-(bounds.getHeight()/2d)-bounds.getMinY());
-        } else if (Side.TOP.equals(side)) {
-            node.setLayoutX(posX-(bounds.getWidth()/2d)-bounds.getMinX());
-            node.setLayoutY(posY-bounds.getHeight()-bounds.getMinY());
-        } else {
-            node.setLayoutX(posX-(bounds.getWidth()/2d)-bounds.getMinX());
-            node.setLayoutY(posY-bounds.getMinY());
-        }
-    }
-
-    /**
-     * Get the string label name for a tick mark with the given value
-     *
-     * @param value The value to format into a tick label string
-     * @return A formatted string for the given value
-     */
-    protected abstract String getTickMarkLabel(T value);
-
-    /**
-     * Measure the size of the label for given tick mark value. This uses the font that is set for the tick marks
-     *
-     *
-     * @param labelText     tick mark label text
-     * @param rotation  The text rotation
-     * @return size of tick mark label for given value
-     */
-    protected final Dimension2D measureTickMarkLabelSize(String labelText, double rotation) {
-        measure.setRotate(rotation);
-        measure.setText(labelText);
-        Bounds bounds = measure.getBoundsInParent();
-        return new Dimension2D(bounds.getWidth(), bounds.getHeight());
-    }
-
-    /**
-     * Measure the size of the label for given tick mark value. This uses the font that is set for the tick marks
-     *
-     * @param value     tick mark value
-     * @param rotation  The text rotation
-     * @return size of tick mark label for given value
-     */
-    protected final Dimension2D measureTickMarkSize(T value, double rotation) {
-        return measureTickMarkLabelSize(getTickMarkLabel(value), rotation);
-    }
-
-    /**
-     * Measure the size of the label for given tick mark value. This uses the font that is set for the tick marks
-     *
-     * @param value tick mark value
-     * @param range range to use during calculations
-     * @return size of tick mark label for given value
-     */
-    protected Dimension2D measureTickMarkSize(T value, Object range) {
-        return measureTickMarkSize(value, getEffectiveTickLabelRotation());
-    }
-
-    final double getEffectiveTickLabelRotation() {
-        return Double.isNaN(effectiveTickLabelRotation) ? getTickLabelRotation() : effectiveTickLabelRotation;
-    }
-
-    /**
-     *
-     * @param rotation NaN for using the tickLabelRotationProperty()
-     */
-    final void setEffectiveTickLabelRotation(double rotation) {
-        effectiveTickLabelRotation = rotation;
-    }
-
-    // -------------- TICKMARK INNER CLASS -----------------------------------------------------------------------------
-
-    /**
-     * TickMark represents the label text, its associated properties for each tick
-     * along the Axis.
-     * @since JavaFX 2.0
-     */
-    public static final class TickMark<T> {
-        /**
-         * The display text for tick mark
-         */
-        private StringProperty label = new StringPropertyBase() {
-            @Override protected void invalidated() {
-                textNode.setText(getValue());
-            }
-
-            @Override
-            public Object getBean() {
-                return TickMark.this;
-            }
-
-            @Override
-            public String getName() {
-                return "label";
-            }
-        };
-        public final String getLabel() { return label.get(); }
-        public final void setLabel(String value) { label.set(value); }
-        public final StringExpression labelProperty() { return label; }
-
-        /**
-         * The value for this tick mark in data units
-         */
-        private ObjectProperty<T> value = new SimpleObjectProperty<T>(this, "value");
-        public final T getValue() { return value.get(); }
-        public final void setValue(T v) { value.set(v); }
-        public final ObjectExpression<T> valueProperty() { return value; }
-
-        /**
-         * The display position along the axis from axis origin in display units
-         */
-        private DoubleProperty position = new SimpleDoubleProperty(this, "position");
-        public final double getPosition() { return position.get(); }
-        public final void setPosition(double value) { position.set(value); }
-        public final DoubleExpression positionProperty() { return position; }
-
-        Text textNode = new Text();
-
-        /** true if tick mark labels should be displayed */
-        private BooleanProperty textVisible = new BooleanPropertyBase(true) {
-            @Override protected void invalidated() {
-                if(!get()) {
-                    textNode.setVisible(false);
-                }
-            }
-
-            @Override
-            public Object getBean() {
-                return TickMark.this;
-            }
-
-            @Override
-            public String getName() {
-                return "textVisible";
-            }
-        };
-
-        /**
-         * Indicates whether this tick mark label text is displayed or not.
-         * @return true if tick mark label text is visible and false otherwise
-         */
-        public final boolean isTextVisible() { return textVisible.get(); }
-
-        /**
-         * Specifies whether this tick mark label text is displayed or not.
-         * @param value true if tick mark label text is visible and false otherwise
-         */
-        public final void setTextVisible(boolean value) { textVisible.set(value); }
-
-        /**
-         * Creates and initializes an instance of TickMark. 
-         */
-        public TickMark() {
-        }
-
-        /**
-         * Returns a string representation of this {@code TickMark} object.
-         * @return a string representation of this {@code TickMark} object.
-         */ 
-        @Override public String toString() {
-            return value.get().toString();
-        }
-    }
-
-    // -------------- STYLESHEET HANDLING ------------------------------------------------------------------------------
-
-    /** @treatAsPrivate implementation detail */
-    private static class StyleableProperties {
-        private static final CssMetaData<Axis<?>,Side> SIDE =
-            new CssMetaData<Axis<?>,Side>("-fx-side",
-                new EnumConverter<Side>(Side.class)) {
-
-            @Override
-            public boolean isSettable(Axis n) {
-                return n.side == null || !n.side.isBound();
-            }
-
-            @SuppressWarnings("unchecked") // sideProperty() is StyleableProperty<Side>              
-            @Override
-            public StyleableProperty<Side> getStyleableProperty(Axis n) {
-                return (StyleableProperty<Side>)n.sideProperty();
-            }
-        };
-        
-        private static final CssMetaData<Axis<?>,Number> TICK_LENGTH =
-            new CssMetaData<Axis<?>,Number>("-fx-tick-length",
-                SizeConverter.getInstance(), 8.0) {
-
-            @Override
-            public boolean isSettable(Axis n) {
-                return n.tickLength == null || !n.tickLength.isBound();
-            }
-
-            @Override
-            public StyleableProperty<Number> getStyleableProperty(Axis n) {
-                return (StyleableProperty<Number>)n.tickLengthProperty();
-            }
-        };
-        
-        private static final CssMetaData<Axis<?>,Font> TICK_LABEL_FONT =
-            new FontCssMetaData<Axis<?>>("-fx-tick-label-font",
-                Font.font("system", 8.0)) {
-
-            @Override
-            public boolean isSettable(Axis n) {
-                return n.tickLabelFont == null || !n.tickLabelFont.isBound();
-            }
-
-            @SuppressWarnings("unchecked") // tickLabelFontProperty() is StyleableProperty<Font>              
-            @Override
-            public StyleableProperty<Font> getStyleableProperty(Axis n) {
-                return (StyleableProperty<Font>)n.tickLabelFontProperty();
-            }
-        };
-
-        private static final CssMetaData<Axis<?>,Paint> TICK_LABEL_FILL =
-            new CssMetaData<Axis<?>,Paint>("-fx-tick-label-fill",
-                PaintConverter.getInstance(), Color.BLACK) {
-
-            @Override
-            public boolean isSettable(Axis n) {
-                return n.tickLabelFill == null | !n.tickLabelFill.isBound();
-            }
-
-            @SuppressWarnings("unchecked") // tickLabelFillProperty() is StyleableProperty<Paint>            
-            @Override
-            public StyleableProperty<Paint> getStyleableProperty(Axis n) {
-                return (StyleableProperty<Paint>)n.tickLabelFillProperty();
-            }
-        };
-        
-        private static final CssMetaData<Axis<?>,Number> TICK_LABEL_TICK_GAP =
-            new CssMetaData<Axis<?>,Number>("-fx-tick-label-gap",
-                SizeConverter.getInstance(), 3.0) {
-
-            @Override
-            public boolean isSettable(Axis n) {
-                return n.tickLabelGap == null || !n.tickLabelGap.isBound();
-            }
-
-            @Override
-            public StyleableProperty<Number> getStyleableProperty(Axis n) {
-                return (StyleableProperty<Number>)n.tickLabelGapProperty();
-            }
-        };
-        
-        private static final CssMetaData<Axis<?>,Boolean> TICK_MARK_VISIBLE =
-            new CssMetaData<Axis<?>,Boolean>("-fx-tick-mark-visible",
-                BooleanConverter.getInstance(), Boolean.TRUE) {
-
-            @Override
-            public boolean isSettable(Axis n) {
-                return n.tickMarkVisible == null || !n.tickMarkVisible.isBound();
-            }
-
-            @Override
-            public StyleableProperty<Boolean> getStyleableProperty(Axis n) {
-                return (StyleableProperty<Boolean>)n.tickMarkVisibleProperty();
-            }
-        };
-        
-        private static final CssMetaData<Axis<?>,Boolean> TICK_LABELS_VISIBLE =
-            new CssMetaData<Axis<?>,Boolean>("-fx-tick-labels-visible",
-                BooleanConverter.getInstance(), Boolean.TRUE) {
-
-            @Override
-            public boolean isSettable(Axis n) {
-                return n.tickLabelsVisible == null || !n.tickLabelsVisible.isBound();
-            }
-
-            @Override
-            public StyleableProperty<Boolean> getStyleableProperty(Axis n) {
-                return (StyleableProperty<Boolean>)n.tickLabelsVisibleProperty();
-            }
-        };
-
-        private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES;
-        static {
-        final List<CssMetaData<? extends Styleable, ?>> styleables =
-            new ArrayList<CssMetaData<? extends Styleable, ?>>(Region.getClassCssMetaData());
-            styleables.add(SIDE);
-            styleables.add(TICK_LENGTH);
-            styleables.add(TICK_LABEL_FONT);
-            styleables.add(TICK_LABEL_FILL);
-            styleables.add(TICK_LABEL_TICK_GAP);
-            styleables.add(TICK_MARK_VISIBLE);
-            styleables.add(TICK_LABELS_VISIBLE);
-            STYLEABLES = Collections.unmodifiableList(styleables);
-        }
-    }
-
-    /**
-     * @return The CssMetaData associated with this class, which may include the
-     * CssMetaData of its super classes.
-     * @since JavaFX 8.0
-     */
-    public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() {
-        return StyleableProperties.STYLEABLES;
-    }
-
-    /**
-     * {@inheritDoc}
-     * @since JavaFX 8.0
-     */
-    @Override
-    public List<CssMetaData<? extends Styleable, ?>> getCssMetaData() {
-        return getClassCssMetaData();
-    }
-
-    /** pseudo-class indicating this is a vertical Top side Axis. */
-    private static final PseudoClass TOP_PSEUDOCLASS_STATE =
-            PseudoClass.getPseudoClass("top");
-    /** pseudo-class indicating this is a vertical Bottom side Axis. */
-    private static final PseudoClass BOTTOM_PSEUDOCLASS_STATE =
-            PseudoClass.getPseudoClass("bottom");
-    /** pseudo-class indicating this is a vertical Left side Axis. */
-    private static final PseudoClass LEFT_PSEUDOCLASS_STATE =
-            PseudoClass.getPseudoClass("left");
-    /** pseudo-class indicating this is a vertical Right side Axis. */
-    private static final PseudoClass RIGHT_PSEUDOCLASS_STATE =
-            PseudoClass.getPseudoClass("right");
-
-}
+/*
+ * Copyright (c) 2010, 2013, 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 javafx.scene.chart;
+
+import javafx.css.Styleable;
+import javafx.css.CssMetaData;
+import javafx.css.PseudoClass;
+import javafx.css.StyleableBooleanProperty;
+import javafx.css.StyleableDoubleProperty;
+import javafx.css.StyleableObjectProperty;
+import com.sun.javafx.css.converters.BooleanConverter;
+import com.sun.javafx.css.converters.EnumConverter;
+import com.sun.javafx.css.converters.PaintConverter;
+import com.sun.javafx.css.converters.SizeConverter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import javafx.animation.FadeTransition;
+import javafx.beans.binding.DoubleExpression;
+import javafx.beans.binding.ObjectExpression;
+import javafx.beans.binding.StringExpression;
+import javafx.beans.property.*;
+import javafx.collections.FXCollections;
+import javafx.collections.ObservableList;
+import javafx.css.FontCssMetaData;
+import javafx.css.StyleableProperty;
+import javafx.geometry.Bounds;
+import javafx.geometry.Dimension2D;
+import javafx.geometry.Orientation;
+import javafx.geometry.Pos;
+import javafx.geometry.Side;
+import javafx.scene.control.Label;
+import javafx.scene.layout.Region;
+import javafx.scene.paint.Color;
+import javafx.scene.paint.Paint;
+import javafx.scene.shape.LineTo;
+import javafx.scene.shape.MoveTo;
+import javafx.scene.shape.Path;
+import javafx.scene.text.Font;
+import javafx.scene.text.Text;
+import javafx.scene.transform.Rotate;
+import javafx.scene.transform.Translate;
+import javafx.util.Duration;
+
+
+/**
+ * Base class for all axes in JavaFX that represents an axis drawn on a chart area.
+ * It holds properties for axis auto ranging, ticks and labels along the axis.
+ * <p>
+ * Some examples of concrete subclasses include {@link NumberAxis} whose axis plots data
+ * in numbers and {@link CategoryAxis} whose values / ticks represent string
+ * categories along its axis.
+ * @since JavaFX 2.0
+ */
+public abstract class Axis<T> extends Region {
+
+    // -------------- PRIVATE FIELDS -----------------------------------------------------------------------------------
+
+    Text measure = new Text();
+    private Orientation effectiveOrientation;
+    private double effectiveTickLabelRotation = Double.NaN;
+    private Label axisLabel = new Label();
+    private final Path tickMarkPath = new Path();
+    private double oldLength = 0;
+    /** True when the current range invalid and all dependent calculations need to be updated */
+    boolean rangeValid = false;
+    private boolean measureInvalid = false;
+
+    private int numLabelsToSkip = 1;
+
+    // -------------- PUBLIC PROPERTIES --------------------------------------------------------------------------------
+
+    private final ObservableList<TickMark<T>> tickMarks = FXCollections.observableArrayList();
+    private final ObservableList<TickMark<T>> unmodifiableTickMarks = FXCollections.unmodifiableObservableList(tickMarks);
+    /**
+     * Unmodifiable observable list of tickmarks, each TickMark directly representing a tickmark on this axis. This is updated
+     * whenever the displayed tickmarks changes.
+     *
+     * @return Unmodifiable observable list of TickMarks on this axis
+     */
+    public ObservableList<TickMark<T>> getTickMarks() { return unmodifiableTickMarks; }
+
+    /** The side of the plot which this axis is being drawn on */
+    private ObjectProperty<Side> side = new StyleableObjectProperty<Side>(){
+        @Override protected void invalidated() {
+            // cause refreshTickMarks
+            Side edge = get();
+            pseudoClassStateChanged(TOP_PSEUDOCLASS_STATE, edge == Side.TOP);
+            pseudoClassStateChanged(RIGHT_PSEUDOCLASS_STATE, edge == Side.RIGHT);
+            pseudoClassStateChanged(BOTTOM_PSEUDOCLASS_STATE, edge == Side.BOTTOM);
+            pseudoClassStateChanged(LEFT_PSEUDOCLASS_STATE, edge == Side.LEFT);
+            requestAxisLayout();
+        }
+        
+        @Override
+        public CssMetaData<Axis<?>,Side> getCssMetaData() {
+            return StyleableProperties.SIDE;
+        }
+
+        @Override
+        public Object getBean() {
+            return Axis.this;
+        }
+
+        @Override
+        public String getName() {
+            return "side";
+        }
+    };
+    public final Side getSide() { return side.get(); }
+    public final void setSide(Side value) { side.set(value); }
+    public final ObjectProperty<Side> sideProperty() { return side; }
+
+    final void setEffectiveOrientation(Orientation orientation) {
+        effectiveOrientation = orientation;
+    }
+
+    final Side getEffectiveSide() {
+        final Side side = getSide();
+        if (side == null || (side.isVertical() && effectiveOrientation == Orientation.HORIZONTAL)
+                || side.isHorizontal() && effectiveOrientation == Orientation.VERTICAL) {
+            // Means side == null && effectiveOrientation == null produces Side.BOTTOM
+            return effectiveOrientation == Orientation.VERTICAL ? Side.LEFT : Side.BOTTOM;
+        }
+        return side;
+    }
+
+    /** The axis label */
+    private ObjectProperty<String> label = new ObjectPropertyBase<String>() {
+        @Override protected void invalidated() {
+            axisLabel.setText(get());
+            requestAxisLayout();
+        }
+
+        @Override
+        public Object getBean() {
+            return Axis.this;
+        }
+
+        @Override
+        public String getName() {
+            return "label";
+        }
+    };
+    public final String getLabel() { return label.get(); }
+    public final void setLabel(String value) { label.set(value); }
+    public final ObjectProperty<String> labelProperty() { return label; }
+
+    /** true if tick marks should be displayed */
+    private BooleanProperty tickMarkVisible = new StyleableBooleanProperty(true) {
+        @Override protected void invalidated() {
+            tickMarkPath.setVisible(get());
+            requestAxisLayout();
+        }
+
+        @Override
+        public CssMetaData<Axis<?>,Boolean> getCssMetaData() {
+            return StyleableProperties.TICK_MARK_VISIBLE;
+        }
+        @Override
+        public Object getBean() {
+            return Axis.this;
+        }
+
+        @Override
+        public String getName() {
+            return "tickMarkVisible";
+        }
+    };
+    public final boolean isTickMarkVisible() { return tickMarkVisible.get(); }
+    public final void setTickMarkVisible(boolean value) { tickMarkVisible.set(value); }
+    public final BooleanProperty tickMarkVisibleProperty() { return tickMarkVisible; }
+
+    /** true if tick mark labels should be displayed */
+    private BooleanProperty tickLabelsVisible = new StyleableBooleanProperty(true) {
+        @Override protected void invalidated() {
+            // update textNode visibility for each tick
+            for (TickMark<T> tick : tickMarks) {
+                tick.setTextVisible(get());
+            }
+            requestAxisLayout();
+        }
+        
+        @Override
+        public CssMetaData<Axis<?>,Boolean> getCssMetaData() {
+            return StyleableProperties.TICK_LABELS_VISIBLE;
+        }
+
+        @Override
+        public Object getBean() {
+            return Axis.this;
+        }
+
+        @Override
+        public String getName() {
+            return "tickLabelsVisible";
+        }
+    };
+    public final boolean isTickLabelsVisible() { return tickLabelsVisible.get(); }
+    public final void setTickLabelsVisible(boolean value) {
+        tickLabelsVisible.set(value); }
+    public final BooleanProperty tickLabelsVisibleProperty() { return tickLabelsVisible; }
+
+    /** The length of tick mark lines */
+    private DoubleProperty tickLength = new StyleableDoubleProperty(8) {
+        @Override protected void invalidated() {
+            if (tickLength.get() < 0 && !tickLength.isBound()) {
+                tickLength.set(0);
+            }
+            // this effects preferred size so request layout
+            requestAxisLayout();
+        }
+
+        @Override
+        public CssMetaData<Axis<?>,Number> getCssMetaData() {
+            return StyleableProperties.TICK_LENGTH;
+        }        
+        @Override
+        public Object getBean() {
+            return Axis.this;
+        }
+
+        @Override
+        public String getName() {
+            return "tickLength";
+        }
+    };
+    public final double getTickLength() { return tickLength.get(); }
+    public final void setTickLength(double value) { tickLength.set(value); }
+    public final DoubleProperty tickLengthProperty() { return tickLength; }
+
+    /** This is true when the axis determines its range from the data automatically */
+    private BooleanProperty autoRanging = new BooleanPropertyBase(true) {
+        @Override protected void invalidated() {
+            if(get()) {
+                // auto range turned on, so need to auto range now
+//                autoRangeValid = false;
+                requestAxisLayout();
+            }
+        }
+
+        @Override
+        public Object getBean() {
+            return Axis.this;
+        }
+
+        @Override
+        public String getName() {
+            return "autoRanging";
+        }
+    };
+    public final boolean isAutoRanging() { return autoRanging.get(); }
+    public final void setAutoRanging(boolean value) { autoRanging.set(value); }
+    public final BooleanProperty autoRangingProperty() { return autoRanging; }
+
+    /** The font for all tick labels */
+    private ObjectProperty<Font> tickLabelFont = new StyleableObjectProperty<Font>(Font.font("System",8)) {
+        @Override protected void invalidated() {
+            Font f = get();
+            measure.setFont(f);
+            for(TickMark<T> tm : getTickMarks()) {
+                tm.textNode.setFont(f);
+            }
+            measureInvalid = true;
+            requestAxisLayout();
+        }
+
+        @Override 
+        public CssMetaData<Axis<?>,Font> getCssMetaData() {
+            return StyleableProperties.TICK_LABEL_FONT;
+        }
+        
+        @Override
+        public Object getBean() {
+            return Axis.this;
+        }
+
+        @Override
+        public String getName() {
+            return "tickLabelFont";
+        }
+    };
+    public final Font getTickLabelFont() { return tickLabelFont.get(); }
+    public final void setTickLabelFont(Font value) { tickLabelFont.set(value); }
+    public final ObjectProperty<Font> tickLabelFontProperty() { return tickLabelFont; }
+
+    /** The fill for all tick labels */
+    private ObjectProperty<Paint> tickLabelFill = new StyleableObjectProperty<Paint>(Color.BLACK) {
+        @Override protected void invalidated() {
+            for (TickMark<T> tick : tickMarks) {
+                tick.textNode.setFill(getTickLabelFill());
+            }
+        }
+
+        @Override
+        public CssMetaData<Axis<?>,Paint> getCssMetaData() {
+            return StyleableProperties.TICK_LABEL_FILL;
+        }
+        
+        @Override
+        public Object getBean() {
+            return Axis.this;
+        }
+
+        @Override
+        public String getName() {
+            return "tickLabelFill";
+        }
+    };
+    public final Paint getTickLabelFill() { return tickLabelFill.get(); }
+    public final void setTickLabelFill(Paint value) { tickLabelFill.set(value); }
+    public final ObjectProperty<Paint> tickLabelFillProperty() { return tickLabelFill; }
+
+    /** The gap between tick labels and the tick mark lines */
+    private DoubleProperty tickLabelGap = new StyleableDoubleProperty(3) {
+        @Override protected void invalidated() {
+           requestAxisLayout();
+        }
+
+        @Override
+        public CssMetaData<Axis<?>,Number> getCssMetaData() {
+            return StyleableProperties.TICK_LABEL_TICK_GAP;
+        }
+        
+        @Override
+        public Object getBean() {
+            return Axis.this;
+        }
+
+        @Override
+        public String getName() {
+            return "tickLabelGap";
+        }
+    };
+    public final double getTickLabelGap() { return tickLabelGap.get(); }
+    public final void setTickLabelGap(double value) { tickLabelGap.set(value); }
+    public final DoubleProperty tickLabelGapProperty() { return tickLabelGap; }
+
+    /**
+     * When true any changes to the axis and its range will be animated.
+     */
+    private BooleanProperty animated = new SimpleBooleanProperty(this, "animated", true);
+
+    /**
+     * Indicates whether the changes to axis range will be animated or not.
+     *
+     * @return true if axis range changes will be animated and false otherwise
+     */
+    public final boolean getAnimated() { return animated.get(); }
+    public final void setAnimated(boolean value) { animated.set(value); }
+    public final BooleanProperty animatedProperty() { return animated; }
+
+    /**
+     * Rotation in degrees of tick mark labels from their normal horizontal.
+     */
+    private DoubleProperty tickLabelRotation = new DoublePropertyBase(0) {
+        @Override protected void invalidated() {
+            requestAxisLayout();
+        }
+
+        @Override
+        public Object getBean() {
+            return Axis.this;
+        }
+
+        @Override
+        public String getName() {
+            return "tickLabelRotation";
+        }
+    };
+    public final double getTickLabelRotation() { return tickLabelRotation.getValue(); }
+    public final void setTickLabelRotation(double value) { tickLabelRotation.setValue(value); }
+    public final DoubleProperty tickLabelRotationProperty() { return tickLabelRotation; }
+
+    // -------------- CONSTRUCTOR --------------------------------------------------------------------------------------
+
+    /**
+     * Creates and initializes a new instance of the Axis class.
+     */
+    public Axis() {
+        getStyleClass().setAll("axis");
+        axisLabel.getStyleClass().add("axis-label");
+        axisLabel.setAlignment(Pos.CENTER);
+        tickMarkPath.getStyleClass().add("axis-tick-mark");
+        getChildren().addAll(axisLabel, tickMarkPath);
+    }
+
+    // -------------- METHODS ------------------------------------------------------------------------------------------
+
+    /**
+     * See if the current range is valid, if it is not then any range dependent calulcations need to redone on the next layout pass
+     *
+     * @return true if current range calculations are valid
+     */
+    protected final boolean isRangeValid() { return rangeValid; }
+
+    /**
+     * Mark the current range invalid, this will cause anything that depends on the range to be recalculated on the
+     * next layout.
+     */
+    protected final void invalidateRange() { rangeValid = false; }
+
+    /**
+     * This is used to check if any given animation should run. It returns true if animation is enabled and the node
+     * is visible and in a scene.
+     *
+     * @return true if animations should happen
+     */
+    protected final boolean shouldAnimate(){
+        return getAnimated() && impl_isTreeVisible() && getScene() != null;
+    }
+    
+    /**
+     * We suppress requestLayout() calls here by doing nothing as we don't want changes to our children to cause
+     * layout. If you really need to request layout then call requestAxisLayout().
+     */
+    @Override public void requestLayout() {}
+
+    /**
+     * Request that the axis is laid out in the next layout pass. This replaces requestLayout() as it has been
+     * overridden to do nothing so that changes to children's bounds etc do not cause a layout. This was done as a
+     * optimization as the Axis knows the exact minimal set of changes that really need layout to be updated. So we
+     * only want to request layout then, not on any child change.
+     */
+    public void requestAxisLayout() {
+        super.requestLayout();
+    }
+
+    /**
+     * Called when data has changed and the range may not be valid any more. This is only called by the chart if
+     * isAutoRanging() returns true. If we are auto ranging it will cause layout to be requested and auto ranging to
+     * happen on next layout pass.
+     *
+     * @param data The current set of all data that needs to be plotted on this axis
+     */
+    public void invalidateRange(List<T> data) {
+        invalidateRange();
+        requestAxisLayout();
+    }
+
+    /**
+     * This calculates the upper and lower bound based on the data provided to invalidateRange() method. This must not
+     * effect the state of the axis, changing any properties of the axis. Any results of the auto-ranging should be
+     * returned in the range object. This will we passed to setRange() if it has been decided to adopt this range for
+     * this axis.
+     *
+     * @param length The length of the axis in screen coordinates
+     * @return Range information, this is implementation dependent
+     */
+    protected abstract Object autoRange(double length);
+
+    /**
+     * Called to set the current axis range to the given range. If isAnimating() is true then this method should
+     * animate the range to the new range.
+     *
+     * @param range A range object returned from autoRange()
+     * @param animate If true animate the change in range
+     */
+    protected abstract void setRange(Object range, boolean animate);
+
+    /**
+     * Called to get the current axis range.
+     *
+     * @return A range object that can be passed to setRange() and calculateTickValues()
+     */
+    protected abstract Object getRange();
+
+    /**
+     * Get the display position of the zero line along this axis.
+     *
+     * @return display position or Double.NaN if zero is not in current range;
+     */
+    public abstract double getZeroPosition();
+
+    /**
+     * Get the display position along this axis for a given value
+     *
+     * @param value The data value to work out display position for
+     * @return display position or Double.NaN if zero is not in current range;
+     */
+    public abstract double getDisplayPosition(T value);
+
+    /**
+     * Get the data value for the given display position on this axis. If the axis
+     * is a CategoryAxis this will be the nearest value.
+     *
+     * @param  displayPosition A pixel position on this axis
+     * @return the nearest data value to the given pixel position or
+     *         null if not on axis;
+     */
+    public abstract T getValueForDisplay(double displayPosition);
+
+    /**
+     * Checks if the given value is plottable on this axis
+     *
+     * @param value The value to check if its on axis
+     * @return true if the given value is plottable on this axis
+     */
+    public abstract boolean isValueOnAxis(T value);
+
+    /**
+     * All axis values must be representable by some numeric value. This gets the numeric value for a given data value.
+     *
+     * @param value The data value to convert
+     * @return Numeric value for the given data value
+     */
+    public abstract double toNumericValue(T value);
+
+    /**
+     * All axis values must be representable by some numeric value. This gets the data value for a given numeric value.
+     *
+     * @param value The numeric value to convert
+     * @return Data value for given numeric value
+     */
+    public abstract T toRealValue(double value);
+
+    /**
+     * Calculate a list of all the data values for each tick mark in range
+     *
+     * @param length The length of the axis in display units
+     * @param range A range object returned from autoRange()
+     * @return A list of tick marks that fit along the axis if it was the given length
+     */
+    protected abstract List<T> calculateTickValues(double length, Object range);
+
+    /**
+     * Computes the preferred height of this axis for the given width. If axis orientation
+     * is horizontal, it takes into account the tick mark length, tick label gap and
+     * label height.
+     *
+     * @return the computed preferred width for this axis
+     */
+    @Override protected double computePrefHeight(double width) {
+        final Side side = getEffectiveSide();
+        if (side.isVertical()) {
+            // TODO for now we have no hard and fast answer here, I guess it should work
+            // TODO out the minimum size needed to display min, max and zero tick mark labels.
+            return 100;
+        } else { // HORIZONTAL
+            // we need to first auto range as this may/will effect tick marks
+            Object range = autoRange(width);
+            // calculate max tick label height
+            double maxLabelHeight = 0;
+            // calculate the new tick marks
+            if (isTickLabelsVisible()) {
+                final List<T> newTickValues = calculateTickValues(width, range);
+                for (T value: newTickValues) {
+                    maxLabelHeight = Math.max(maxLabelHeight,measureTickMarkSize(value, range).getHeight());
+                }
+            }
+            // calculate tick mark length
+            final double tickMarkLength = isTickMarkVisible() ? (getTickLength() > 0) ? getTickLength() : 0 : 0;
+            // calculate label height
+            final double labelHeight =
+                    axisLabel.getText() == null || axisLabel.getText().length() == 0 ?
+                    0 : axisLabel.prefHeight(-1);
+            return maxLabelHeight + getTickLabelGap() + tickMarkLength + labelHeight;
+        } 
+    }
+
+    /**
+     * Computes the preferred width of this axis for the given height. If axis orientation
+     * is vertical, it takes into account the tick mark length, tick label gap and
+     * label height.
+     *
+     * @return the computed preferred width for this axis
+     */
+    @Override protected double computePrefWidth(double height) {
+        final Side side = getEffectiveSide();
+        if (side.isVertical()) {
+            // we need to first auto range as this may/will effect tick marks
+            Object range = autoRange(height);
+            // calculate max tick label width
+            double maxLabelWidth = 0;
+            // calculate the new tick marks
+            if (isTickLabelsVisible()) {
+                final List<T> newTickValues = calculateTickValues(height,range);
+                for (T value: newTickValues) {
+                    maxLabelWidth = Math.max(maxLabelWidth, measureTickMarkSize(value, range).getWidth());
+                }
+            }
+            // calculate tick mark length
+            final double tickMarkLength = isTickMarkVisible() ? (getTickLength() > 0) ? getTickLength() : 0 : 0;
+            // calculate label height
+            final double labelHeight =
+                    axisLabel.getText() == null || axisLabel.getText().length() == 0 ?
+                    0 : axisLabel.prefHeight(-1);
+            return maxLabelWidth + getTickLabelGap() + tickMarkLength + labelHeight;
+        } else  { // HORIZONTAL
+            // TODO for now we have no hard and fast answer here, I guess it should work
+            // TODO out the minimum size needed to display min, max and zero tick mark labels.
+            return 100;
+        } 
+    }
+
+    /**
+     * Called during layout if the tickmarks have been updated, allowing subclasses to do anything they need to
+     * in reaction.
+     */
+    protected void tickMarksUpdated(){}
+
+    /**
+     * Invoked during the layout pass to layout this axis and all its content.
+     */
+    @Override protected void layoutChildren() {
+        final double width = getWidth();
+        final double height = getHeight();
+        final double tickMarkLength = (isTickMarkVisible() && getTickLength() > 0) ? getTickLength() : 0;
+        final boolean isFirstPass = oldLength == 0;
+        // auto range if it is not valid
+        final Side side = getEffectiveSide();
+        final double length = (side.isVertical()) ? height : width;
+        int tickIndex = 0;
+        boolean rangeInvalid = !isRangeValid();
+        if (oldLength != length || rangeInvalid) {
+            // get range
+            Object range;
+            if(isAutoRanging()) {
+                // auto range
+                range = autoRange(length);
+                // set current range to new range
+                setRange(range, getAnimated() && !isFirstPass && impl_isTreeVisible() && rangeInvalid);
+            } else {
+                range = getRange();
+            }
+            // calculate new tick marks
+            List<T> newTickValues = calculateTickValues(length, range);
+
+            // remove everything
+            Iterator<TickMark<T>> tickMarkIterator = tickMarks.iterator();
+            while (tickMarkIterator.hasNext()) {
+                TickMark<T> tick = tickMarkIterator.next();
+                final TickMark<T> tm = tick;
+                if (shouldAnimate()) {
+                    FadeTransition ft = new FadeTransition(Duration.millis(250),tick.textNode);
+                    ft.setToValue(0);
+                    ft.setOnFinished(actionEvent -> {
+                        getChildren().remove(tm.textNode);
+                    });
+                    ft.play();
+                } else {
+                    getChildren().remove(tm.textNode);
+                }
+                // we have to remove the tick mark immediately so we don't draw tick line for it or grid lines and fills
+                tickMarkIterator.remove();
+            }
+
+            // add new tick marks for new values
+            for(T newValue: newTickValues) {
+                final TickMark<T> tick = new TickMark<T>();
+                tick.setValue(newValue);
+                tick.textNode.setText(getTickMarkLabel(newValue));
+                tick.textNode.setFont(getTickLabelFont());
+                tick.textNode.setFill(getTickLabelFill());
+                tick.setTextVisible(isTickLabelsVisible());
+                if (shouldAnimate()) tick.textNode.setOpacity(0);
+                getChildren().add(tick.textNode);
+                tickMarks.add(tick);
+                if (shouldAnimate()) {
+                    FadeTransition ft = new FadeTransition(Duration.millis(750),tick.textNode);
+                    ft.setFromValue(0);
+                    ft.setToValue(1);
+                    ft.play();
+                }
+            }
+
+            // call tick marks updated to inform subclasses that we have updated tick marks
+            tickMarksUpdated();
+            // mark all done
+            oldLength = length;
+            rangeValid = true;
+        }
+
+        if (oldLength != length || rangeInvalid || measureInvalid) {
+            measureInvalid = false;
+            // RT-12272 : tick labels overlapping
+            switch (side) {
+                case LEFT:
+                case RIGHT:
+                    double totalLabelHeight = 0;
+                    double maxLabelHeight = 0;
+                    for (TickMark<T> m : tickMarks) {
+                        double tickHeight = measureTickMarkSize(m.getValue(), getRange()).getHeight();
+                        totalLabelHeight += tickHeight;
+                        maxLabelHeight = Math.round(Math.max(maxLabelHeight, tickHeight));
+                    }
+                    if (maxLabelHeight > 0 && length < totalLabelHeight) {
+                        numLabelsToSkip = ((int)(tickMarks.size() * maxLabelHeight / length)) + 1;
+                    }
+                    break;
+                case BOTTOM:
+                case TOP:
+                    double totalLabelWidth = 0;
+                    double maxLabelWidth = 0;
+                    for (TickMark<T> m : tickMarks) {
+                        double tickWidth = measureTickMarkSize(m.getValue(), getRange()).getWidth();
+                        totalLabelWidth += tickWidth;
+                        maxLabelWidth = Math.round(Math.max(maxLabelWidth, tickWidth));
+                    }
+                    if (maxLabelWidth > 0 && length < totalLabelWidth) {
+                        numLabelsToSkip = ((int)(tickMarks.size() * maxLabelWidth / length)) + 1;
+                    }
+                    break;
+            }
+        }
+
+        // clear tick mark path elements as we will recreate
+        tickMarkPath.getElements().clear();
+        // do layout of axis label, tick mark lines and text
+        double effectiveLabelRotation = getEffectiveTickLabelRotation();
+        if (Side.LEFT.equals(side)) {
+            // offset path to make strokes snap to pixel
+            tickMarkPath.setLayoutX(-0.5);
+            tickMarkPath.setLayoutY(0.5);
+            if (getLabel() != null) {
+                axisLabel.getTransforms().setAll(new Translate(0, height), new Rotate(-90, 0, 0));
+                axisLabel.setLayoutX(0);
+                axisLabel.setLayoutY(0);
+                //noinspection SuspiciousNameCombination
+                axisLabel.resize(height, Math.ceil(axisLabel.prefHeight(width)));
+            }
+            tickIndex = 0;
+            for (TickMark<T> tick : tickMarks) {
+                tick.setPosition(getDisplayPosition(tick.getValue()));
+                positionTextNode(tick.textNode, width - getTickLabelGap() - tickMarkLength,
+                                 tick.getPosition(), effectiveLabelRotation,side);
+
+                // check if position is inside bounds
+                if(tick.getPosition() >= 0 && tick.getPosition() <= Math.ceil(length)) {
+                    if (isTickLabelsVisible()) {
+                        tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
+                        tickIndex++;
+                    }
+                    // add tick mark line
+                    tickMarkPath.getElements().addAll(
+                        new MoveTo(width - tickMarkLength, tick.getPosition()),
+                        new LineTo(width, tick.getPosition())
+                    );
+                } else {
+                    tick.textNode.setVisible(false);
+                }
+            }
+        } else if (Side.RIGHT.equals(side)) {
+            // offset path to make strokes snap to pixel
+            tickMarkPath.setLayoutX(0.5);
+            tickMarkPath.setLayoutY(0.5);
+            tickIndex = 0;
+            for (TickMark<T> tick : tickMarks) {
+                tick.setPosition(getDisplayPosition(tick.getValue()));
+                positionTextNode(tick.textNode, getTickLabelGap() + tickMarkLength,
+                                 tick.getPosition(), effectiveLabelRotation,side);
+                // check if position is inside bounds
+                if(tick.getPosition() >= 0 && tick.getPosition() <= Math.ceil(length)) {
+                    if (isTickLabelsVisible()) {
+                        tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
+                        tickIndex++;
+                    }
+                    // add tick mark line
+                    tickMarkPath.getElements().addAll(
+                        new MoveTo(0, tick.getPosition()),
+                        new LineTo(tickMarkLength, tick.getPosition())
+                    );
+                } else {
+                    tick.textNode.setVisible(false);
+                }
+            }
+            if (getLabel() != null) {
+                final double axisLabelWidth = Math.ceil(axisLabel.prefHeight(width));
+                axisLabel.getTransforms().setAll(new Translate(0, height), new Rotate(-90, 0, 0));
+                axisLabel.setLayoutX(width-axisLabelWidth);
+                axisLabel.setLayoutY(0);
+                //noinspection SuspiciousNameCombination
+                axisLabel.resize(height, axisLabelWidth);
+            }
+        } else if (Side.TOP.equals(side)) {
+            // offset path to make strokes snap to pixel
+            tickMarkPath.setLayoutX(0.5);
+            tickMarkPath.setLayoutY(-0.5);
+            if (getLabel() != null) {
+                axisLabel.getTransforms().clear();
+                axisLabel.setLayoutX(0);
+                axisLabel.setLayoutY(0);
+                axisLabel.resize(width, Math.ceil(axisLabel.prefHeight(width)));
+            }
+            tickIndex = 0;
+            for (TickMark<T> tick : tickMarks) {
+                tick.setPosition(getDisplayPosition(tick.getValue()));
+                positionTextNode(tick.textNode, tick.getPosition(), height - tickMarkLength - getTickLabelGap(),
+                        effectiveLabelRotation, side);
+                // check if position is inside bounds
+                if(tick.getPosition() >= 0 && tick.getPosition() <= Math.ceil(length)) {
+                    if (isTickLabelsVisible()) {
+                        tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
+                        tickIndex++;
+                    }
+                    // add tick mark line
+                    tickMarkPath.getElements().addAll(
+                        new MoveTo(tick.getPosition(), height),
+                        new LineTo(tick.getPosition(), height - tickMarkLength)
+                    );
+                } else {
+                    tick.textNode.setVisible(false);
+                }
+            }
+        } else {
+            // BOTTOM
+            // offset path to make strokes snap to pixel
+            tickMarkPath.setLayoutX(0.5);
+            tickMarkPath.setLayoutY(0.5);
+            tickIndex = 0;
+            for (TickMark<T> tick : tickMarks) {
+                final double xPos = Math.round(getDisplayPosition(tick.getValue()));
+                tick.setPosition(xPos);
+//                System.out.println("tick pos at : "+tickIndex+" = "+xPos);
+                positionTextNode(tick.textNode,xPos, tickMarkLength + getTickLabelGap(),
+                        effectiveLabelRotation,side);
+                // check if position is inside bounds
+                if(xPos >= 0 && xPos <= Math.ceil(length)) {
+                    if (isTickLabelsVisible()) {
+                        tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
+                        tickIndex++;
+                    }
+                    // add tick mark line
+                    tickMarkPath.getElements().addAll(
+                        new MoveTo(xPos, 0),
+                        new LineTo(xPos, tickMarkLength)
+                    );
+                } else {
+                    tick.textNode.setVisible(false);
+                }
+            }
+            if (getLabel() != null) {
+                axisLabel.getTransforms().clear();
+                final double labelHeight = Math.ceil(axisLabel.prefHeight(width));
+                axisLabel.setLayoutX(0);
+                axisLabel.setLayoutY(height-labelHeight);
+                axisLabel.resize(width, labelHeight);
+            }
+        }
+    }
+
+    /**
+     * Positions a text node to one side of the given point, it X height is vertically centered on point if LEFT or
+     * RIGHT and its centered horizontally if TOP ot BOTTOM.
+     *
+     * @param node The text node to position
+     * @param posX The x position, to place text next to
+     * @param posY The y position, to place text next to
+     * @param angle The text rotation
+     * @param side The side to place text next to position x,y at
+     */
+    private void positionTextNode(Text node, double posX, double posY, double angle, Side side) {
+        node.setLayoutX(0);
+        node.setLayoutY(0);
+        node.setRotate(angle);
+        final Bounds bounds = node.getBoundsInParent();
+        if (Side.LEFT.equals(side)) {
+            node.setLayoutX(posX-bounds.getWidth()-bounds.getMinX());
+            node.setLayoutY(posY - (bounds.getHeight() / 2d) - bounds.getMinY());
+        } else if (Side.RIGHT.equals(side)) {
+            node.setLayoutX(posX-bounds.getMinX());
+            node.setLayoutY(posY-(bounds.getHeight()/2d)-bounds.getMinY());
+        } else if (Side.TOP.equals(side)) {
+            node.setLayoutX(posX-(bounds.getWidth()/2d)-bounds.getMinX());
+            node.setLayoutY(posY-bounds.getHeight()-bounds.getMinY());
+        } else {
+            node.setLayoutX(posX-(bounds.getWidth()/2d)-bounds.getMinX());
+            node.setLayoutY(posY-bounds.getMinY());
+        }
+    }
+
+    /**
+     * Get the string label name for a tick mark with the given value
+     *
+     * @param value The value to format into a tick label string
+     * @return A formatted string for the given value
+     */
+    protected abstract String getTickMarkLabel(T value);
+
+    /**
+     * Measure the size of the label for given tick mark value. This uses the font that is set for the tick marks
+     *
+     *
+     * @param labelText     tick mark label text
+     * @param rotation  The text rotation
+     * @return size of tick mark label for given value
+     */
+    protected final Dimension2D measureTickMarkLabelSize(String labelText, double rotation) {
+        measure.setRotate(rotation);
+        measure.setText(labelText);
+        Bounds bounds = measure.getBoundsInParent();
+        return new Dimension2D(bounds.getWidth(), bounds.getHeight());
+    }
+
+    /**
+     * Measure the size of the label for given tick mark value. This uses the font that is set for the tick marks
+     *
+     * @param value     tick mark value
+     * @param rotation  The text rotation
+     * @return size of tick mark label for given value
+     */
+    protected final Dimension2D measureTickMarkSize(T value, double rotation) {
+        return measureTickMarkLabelSize(getTickMarkLabel(value), rotation);
+    }
+
+    /**
+     * Measure the size of the label for given tick mark value. This uses the font that is set for the tick marks
+     *
+     * @param value tick mark value
+     * @param range range to use during calculations
+     * @return size of tick mark label for given value
+     */
+    protected Dimension2D measureTickMarkSize(T value, Object range) {
+        return measureTickMarkSize(value, getEffectiveTickLabelRotation());
+    }
+
+    final double getEffectiveTickLabelRotation() {
+        return Double.isNaN(effectiveTickLabelRotation) ? getTickLabelRotation() : effectiveTickLabelRotation;
+    }
+
+    /**
+     *
+     * @param rotation NaN for using the tickLabelRotationProperty()
+     */
+    final void setEffectiveTickLabelRotation(double rotation) {
+        effectiveTickLabelRotation = rotation;
+    }
+
+    // -------------- TICKMARK INNER CLASS -----------------------------------------------------------------------------
+
+    /**
+     * TickMark represents the label text, its associated properties for each tick
+     * along the Axis.
+     * @since JavaFX 2.0
+     */
+    public static final class TickMark<T> {
+        /**
+         * The display text for tick mark
+         */
+        private StringProperty label = new StringPropertyBase() {
+            @Override protected void invalidated() {
+                textNode.setText(getValue());
+            }
+
+            @Override
+            public Object getBean() {
+                return TickMark.this;
+            }
+
+            @Override
+            public String getName() {
+                return "label";
+            }
+        };
+        public final String getLabel() { return label.get(); }
+        public final void setLabel(String value) { label.set(value); }
+        public final StringExpression labelProperty() { return label; }
+
+        /**
+         * The value for this tick mark in data units
+         */
+        private ObjectProperty<T> value = new SimpleObjectProperty<T>(this, "value");
+        public final T getValue() { return value.get(); }
+        public final void setValue(T v) { value.set(v); }
+        public final ObjectExpression<T> valueProperty() { return value; }
+
+        /**
+         * The display position along the axis from axis origin in display units
+         */
+        private DoubleProperty position = new SimpleDoubleProperty(this, "position");
+        public final double getPosition() { return position.get(); }
+        public final void setPosition(double value) { position.set(value); }
+        public final DoubleExpression positionProperty() { return position; }
+
+        Text textNode = new Text();
+
+        /** true if tick mark labels should be displayed */
+        private BooleanProperty textVisible = new BooleanPropertyBase(true) {
+            @Override protected void invalidated() {
+                if(!get()) {
+                    textNode.setVisible(false);
+                }
+            }
+
+            @Override
+            public Object getBean() {
+                return TickMark.this;
+            }
+
+            @Override
+            public String getName() {
+                return "textVisible";
+            }
+        };
+
+        /**
+         * Indicates whether this tick mark label text is displayed or not.
+         * @return true if tick mark label text is visible and false otherwise
+         */
+        public final boolean isTextVisible() { return textVisible.get(); }
+
+        /**
+         * Specifies whether this tick mark label text is displayed or not.
+         * @param value true if tick mark label text is visible and false otherwise
+         */
+        public final void setTextVisible(boolean value) { textVisible.set(value); }
+
+        /**
+         * Creates and initializes an instance of TickMark. 
+         */
+        public TickMark() {
+        }
+
+        /**
+         * Returns a string representation of this {@code TickMark} object.
+         * @return a string representation of this {@code TickMark} object.
+         */ 
+        @Override public String toString() {
+            return value.get().toString();
+        }
+    }
+
+    // -------------- STYLESHEET HANDLING ------------------------------------------------------------------------------
+
+    /** @treatAsPrivate implementation detail */
+    private static class StyleableProperties {
+        private static final CssMetaData<Axis<?>,Side> SIDE =
+            new CssMetaData<Axis<?>,Side>("-fx-side",
+                new EnumConverter<Side>(Side.class)) {
+
+            @Override
+            public boolean isSettable(Axis<?> n) {
+                return n.side == null || !n.side.isBound();
+            }
+
+            @SuppressWarnings("unchecked") // sideProperty() is StyleableProperty<Side>              
+            @Override
+            public StyleableProperty<Side> getStyleableProperty(Axis<?> n) {
+                return (StyleableProperty<Side>)n.sideProperty();
+            }
+        };
+        
+        private static final CssMetaData<Axis<?>,Number> TICK_LENGTH =
+            new CssMetaData<Axis<?>,Number>("-fx-tick-length",
+                SizeConverter.getInstance(), 8.0) {
+
+            @Override
+            public boolean isSettable(Axis<?> n) {
+                return n.tickLength == null || !n.tickLength.isBound();
+            }
+
+            @Override
+            public StyleableProperty<Number> getStyleableProperty(Axis n) {
+                return (StyleableProperty<Number>)n.tickLengthProperty();
+            }
+        };
+        
+        private static final CssMetaData<Axis<?>,Font> TICK_LABEL_FONT =
+            new FontCssMetaData<Axis<?>>("-fx-tick-label-font",
+                Font.font("system", 8.0)) {
+
+            @Override
+            public boolean isSettable(Axis<?> n) {
+                return n.tickLabelFont == null || !n.tickLabelFont.isBound();
+            }
+
+            @SuppressWarnings("unchecked") // tickLabelFontProperty() is StyleableProperty<Font>              
+            @Override
+            public StyleableProperty<Font> getStyleableProperty(Axis<?> n) {
+                return (StyleableProperty<Font>)n.tickLabelFontProperty();
+            }
+        };
+
+        private static final CssMetaData<Axis<?>,Paint> TICK_LABEL_FILL =
+            new CssMetaData<Axis<?>,Paint>("-fx-tick-label-fill",
+                PaintConverter.getInstance(), Color.BLACK) {
+
+            @Override
+            public boolean isSettable(Axis<?> n) {
+                return n.tickLabelFill == null | !n.tickLabelFill.isBound();
+            }
+
+            @SuppressWarnings("unchecked") // tickLabelFillProperty() is StyleableProperty<Paint>            
+            @Override
+            public StyleableProperty<Paint> getStyleableProperty(Axis<?> n) {
+                return (StyleableProperty<Paint>)n.tickLabelFillProperty();
+            }
+        };
+        
+        private static final CssMetaData<Axis<?>,Number> TICK_LABEL_TICK_GAP =
+            new CssMetaData<Axis<?>,Number>("-fx-tick-label-gap",
+                SizeConverter.getInstance(), 3.0) {
+
+            @Override
+            public boolean isSettable(Axis<?> n) {
+                return n.tickLabelGap == null || !n.tickLabelGap.isBound();
+            }
+
+            @Override
+            public StyleableProperty<Number> getStyleableProperty(Axis<?> n) {
+                return (StyleableProperty<Number>)n.tickLabelGapProperty();
+            }
+        };
+        
+        private static final CssMetaData<Axis<?>,Boolean> TICK_MARK_VISIBLE =
+            new CssMetaData<Axis<?>,Boolean>("-fx-tick-mark-visible",
+                BooleanConverter.getInstance(), Boolean.TRUE) {
+
+            @Override
+            public boolean isSettable(Axis<?> n) {
+                return n.tickMarkVisible == null || !n.tickMarkVisible.isBound();
+            }
+
+            @Override
+            public StyleableProperty<Boolean> getStyleableProperty(Axis<?> n) {
+                return (StyleableProperty<Boolean>)n.tickMarkVisibleProperty();
+            }
+        };
+        
+        private static final CssMetaData<Axis<?>,Boolean> TICK_LABELS_VISIBLE =
+            new CssMetaData<Axis<?>,Boolean>("-fx-tick-labels-visible",
+                BooleanConverter.getInstance(), Boolean.TRUE) {
+
+            @Override
+            public boolean isSettable(Axis<?> n) {
+                return n.tickLabelsVisible == null || !n.tickLabelsVisible.isBound();
+            }
+
+            @Override
+            public StyleableProperty<Boolean> getStyleableProperty(Axis<?> n) {
+                return (StyleableProperty<Boolean>)n.tickLabelsVisibleProperty();
+            }
+        };
+
+        private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES;
+        static {
+        final List<CssMetaData<? extends Styleable, ?>> styleables =
+            new ArrayList<CssMetaData<? extends Styleable, ?>>(Region.getClassCssMetaData());
+            styleables.add(SIDE);
+            styleables.add(TICK_LENGTH);
+            styleables.add(TICK_LABEL_FONT);
+            styleables.add(TICK_LABEL_FILL);
+            styleables.add(TICK_LABEL_TICK_GAP);
+            styleables.add(TICK_MARK_VISIBLE);
+            styleables.add(TICK_LABELS_VISIBLE);
+            STYLEABLES = Collections.unmodifiableList(styleables);
+        }
+    }
+
+    /**
+     * @return The CssMetaData associated with this class, which may include the
+     * CssMetaData of its super classes.
+     * @since JavaFX 8.0
+     */
+    public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() {
+        return StyleableProperties.STYLEABLES;
+    }
+
+    /**
+     * {@inheritDoc}
+     * @since JavaFX 8.0
+     */
+    @Override
+    public List<CssMetaData<? extends Styleable, ?>> getCssMetaData() {
+        return getClassCssMetaData();
+    }
+
+    /** pseudo-class indicating this is a vertical Top side Axis. */
+    private static final PseudoClass TOP_PSEUDOCLASS_STATE =
+            PseudoClass.getPseudoClass("top");
+    /** pseudo-class indicating this is a vertical Bottom side Axis. */
+    private static final PseudoClass BOTTOM_PSEUDOCLASS_STATE =
+            PseudoClass.getPseudoClass("bottom");
+    /** pseudo-class indicating this is a vertical Left side Axis. */
+    private static final PseudoClass LEFT_PSEUDOCLASS_STATE =
+            PseudoClass.getPseudoClass("left");
+    /** pseudo-class indicating this is a vertical Right side Axis. */
+    private static final PseudoClass RIGHT_PSEUDOCLASS_STATE =
+            PseudoClass.getPseudoClass("right");
+
+}
--- a/modules/controls/src/main/java/javafx/scene/chart/BarChart.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/BarChart.java	Fri Apr 25 12:05:53 2014 +1200
@@ -42,8 +42,6 @@
 import javafx.beans.property.DoubleProperty;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.geometry.Orientation;
 import javafx.scene.Node;
 import javafx.scene.layout.StackPane;
@@ -67,8 +65,7 @@
 
     // -------------- PRIVATE FIELDS -------------------------------------------
     
-    private Map<Series, Map<String, Data<X,Y>>> seriesCategoryMap = 
-                                new HashMap<Series, Map<String, Data<X,Y>>>();
+    private Map<Series<X,Y>, Map<String, Data<X,Y>>> seriesCategoryMap = new HashMap<>();
     private Legend legend = new Legend();
     private final Orientation orientation;
     private CategoryAxis categoryAxis;
@@ -210,7 +207,7 @@
             categoryAxis.getCategories().add(itemIndex, category);
         } else if (categoryMap.containsKey(category)){
             // RT-21162 : replacing the previous data, first remove the node from scenegraph.
-            Data data = categoryMap.get(category);
+            Data<X,Y> data = categoryMap.get(category);
             getPlotChildren().remove(data.getNode());
             removeDataItemFromDisplay(series, data);
             requestChartLayout();
@@ -385,7 +382,7 @@
         legend.getItems().clear();
         if (getData() != null) {
             for (int seriesIndex=0; seriesIndex < getData().size(); seriesIndex++) {
-                Series series = getData().get(seriesIndex);
+                Series<X,Y> series = getData().get(seriesIndex);
                 LegendItem legenditem = new LegendItem(series.getName());
                 legenditem.getSymbol().getStyleClass().addAll("chart-bar","series"+seriesIndex,"bar-legend-symbol",
                         series.defaultColorStyleClass);
@@ -403,7 +400,7 @@
     
     // -------------- PRIVATE METHODS ------------------------------------------
     
-    private void updateMap(Series series, Data item) {
+    private void updateMap(Series<X,Y> series, Data<X,Y> item) {
         final String category = (orientation == Orientation.VERTICAL) ? (String)item.getXValue() :
                                      (String)item.getYValue();
         Map<String, Data<X,Y>> categoryMap = seriesCategoryMap.get(series);
@@ -484,7 +481,7 @@
         return t;
     }
     
-    @Override void dataBeingRemovedIsAdded(Data item, Series series) {
+    @Override void dataBeingRemovedIsAdded(Data<X,Y> item, Series<X,Y> series) {
         if (dataRemoveTimeline != null) {
             dataRemoveTimeline.setOnFinished(null);
             dataRemoveTimeline.stop();
@@ -518,7 +515,7 @@
                     a.setOnFinished(null);
                 }
             }
-            for (Data item : series.getData()) {
+            for (Data<X,Y> item : series.getData()) {
                 processDataRemove(series, item);
                 if (!lastSeries) {
                     restoreDataValues(item);
@@ -542,7 +539,7 @@
         }
     }
 
-    private Node createBar(Series series, int seriesIndex, final Data item, int itemIndex) {
+    private Node createBar(Series<X,Y> series, int seriesIndex, final Data<X,Y> item, int itemIndex) {
         Node bar = item.getNode();
         if (bar == null) {
             bar = new StackPane();
--- a/modules/controls/src/main/java/javafx/scene/chart/BubbleChart.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/BubbleChart.java	Fri Apr 25 12:05:53 2014 +1200
@@ -34,8 +34,6 @@
 import javafx.beans.NamedArg;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.scene.Node;
 import javafx.scene.layout.StackPane;
 import javafx.scene.shape.Ellipse;
@@ -179,7 +177,7 @@
     @Override protected  void seriesAdded(Series<X,Y> series, int seriesIndex) {
         // handle any data already in series
         for (int j=0; j<series.getData().size(); j++) {
-            Data item = series.getData().get(j);
+            Data<X,Y> item = series.getData().get(j);
             Node bubble = createBubble(series, seriesIndex, item, j);
             if (shouldAnimate()) {
                 bubble.setOpacity(0);
@@ -233,7 +231,7 @@
      * @param itemIndex   The index of the data item in the series
      * @return Node used for given data item
      */
-    private Node createBubble(Series<X, Y> series, int seriesIndex, final Data item, int itemIndex) {
+    private Node createBubble(Series<X, Y> series, int seriesIndex, final Data<X,Y> item, int itemIndex) {
         Node bubble = item.getNode();
         // check if bubble has already been created
         if (bubble == null) {
--- a/modules/controls/src/main/java/javafx/scene/chart/LineChart.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/LineChart.java	Fri Apr 25 12:05:53 2014 +1200
@@ -43,8 +43,6 @@
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.scene.Node;
 import javafx.scene.layout.StackPane;
 import javafx.scene.shape.LineTo;
@@ -72,8 +70,8 @@
 
     // -------------- PRIVATE FIELDS ------------------------------------------
 
-    /** A multiplier for teh Y values that we store for each series, it is used to animate in a new series */
-    private Map<Series, DoubleProperty> seriesYMultiplierMap = new HashMap<Series, DoubleProperty>();
+    /** A multiplier for the Y values that we store for each series, it is used to animate in a new series */
+    private Map<Series<X,Y>, DoubleProperty> seriesYMultiplierMap = new HashMap<>();
     private Legend legend = new Legend();
     private Timeline dataRemoveTimeline;
     private Series<X,Y> seriesOfDataRemoved = null;
@@ -379,7 +377,7 @@
             ));
         }
         for (int j=0; j<series.getData().size(); j++) {
-            Data item = series.getData().get(j);
+            Data<X,Y> item = series.getData().get(j);
             final Node symbol = createSymbol(series, seriesIndex, item, j);
             if(symbol != null) {
                 if (shouldAnimate()) symbol.setOpacity(0);
@@ -414,7 +412,7 @@
             nodes.add(series.getNode());
             if (getCreateSymbols()) { // RT-22124 
                 // done need to fade the symbols if createSymbols is false
-                for (Data d: series.getData()) nodes.add(d.getNode());
+                for (Data<X,Y> d: series.getData()) nodes.add(d.getNode());
             }
             // fade out old and symbols
             KeyValue[] startValues = new KeyValue[nodes.size()];
@@ -434,7 +432,7 @@
             seriesRemoveTimeline.play();
         } else {
             getPlotChildren().remove(series.getNode());
-            for (Data d:series.getData()) getPlotChildren().remove(d.getNode());
+            for (Data<X,Y> d:series.getData()) getPlotChildren().remove(d.getNode());
             removeSeriesFromDisplay(series);
         }
     }
@@ -498,7 +496,7 @@
             seriesRemoveTimeline.setOnFinished(null);
             seriesRemoveTimeline.stop();
             getPlotChildren().remove(series.getNode());
-            for (Data d:series.getData()) getPlotChildren().remove(d.getNode());
+            for (Data<X,Y> d:series.getData()) getPlotChildren().remove(d.getNode());
             removeSeriesFromDisplay(series);
         }
     }
@@ -524,7 +522,7 @@
         return t;
     }
 
-    private Node createSymbol(Series<X, Y> series, int seriesIndex, final Data item, int itemIndex) {
+    private Node createSymbol(Series<X, Y> series, int seriesIndex, final Data<X,Y> item, int itemIndex) {
         Node symbol = item.getNode();
         // check if symbol has already been created
         if (symbol == null && getCreateSymbols()) {
@@ -567,12 +565,12 @@
                 BooleanConverter.getInstance(), Boolean.TRUE) {
 
             @Override
-            public boolean isSettable(LineChart node) {
+            public boolean isSettable(LineChart<?,?> node) {
                 return node.createSymbols == null || !node.createSymbols.isBound();
             }
 
             @Override
-            public StyleableProperty<Boolean> getStyleableProperty(LineChart node) {
+            public StyleableProperty<Boolean> getStyleableProperty(LineChart<?,?> node) {
                 return (StyleableProperty<Boolean>)node.createSymbolsProperty();
             }
         };
--- a/modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java	Fri Apr 25 12:05:53 2014 +1200
@@ -39,7 +39,6 @@
 import javafx.beans.property.IntegerProperty;
 import javafx.beans.property.SimpleIntegerProperty;
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.geometry.Dimension2D;
 import javafx.geometry.Side;
 import javafx.util.Duration;
@@ -487,7 +486,7 @@
          */
         public DefaultFormatter(final NumberAxis axis) {
             formatter = getFormatter(axis.isAutoRanging()? axis.currentRangeIndexProperty.get() : -1);
-            final ChangeListener axisListener = (observable, oldValue, newValue) -> {
+            final ChangeListener<Object> axisListener = (observable, oldValue, newValue) -> {
                 formatter = getFormatter(axis.isAutoRanging()? axis.currentRangeIndexProperty.get() : -1);
             };
             axis.currentRangeIndexProperty.addListener(axisListener);
--- a/modules/controls/src/main/java/javafx/scene/chart/PieChart.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/PieChart.java	Fri Apr 25 12:05:53 2014 +1200
@@ -42,7 +42,6 @@
 import javafx.beans.property.ReadOnlyObjectProperty;
 import javafx.beans.property.ReadOnlyObjectWrapper;
 import javafx.beans.property.SimpleDoubleProperty;
-import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.property.StringProperty;
 import javafx.beans.property.StringPropertyBase;
 import javafx.collections.FXCollections;
--- a/modules/controls/src/main/java/javafx/scene/chart/ScatterChart.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/ScatterChart.java	Fri Apr 25 12:05:53 2014 +1200
@@ -30,8 +30,6 @@
 import javafx.beans.NamedArg;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.scene.Node;
 import javafx.scene.layout.StackPane;
 import javafx.util.Duration;
--- a/modules/controls/src/main/java/javafx/scene/chart/StackedAreaChart.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/StackedAreaChart.java	Fri Apr 25 12:05:53 2014 +1200
@@ -28,15 +28,12 @@
 
 import java.util.*;
 import javafx.animation.*;
-import javafx.beans.InvalidationListener;
 import javafx.beans.NamedArg;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.SimpleDoubleProperty;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.scene.Group;
 import javafx.scene.Node;
 import javafx.scene.layout.StackPane;
@@ -70,7 +67,7 @@
     // -------------- PRIVATE FIELDS ------------------------------------------
 
     /** A multiplier for teh Y values that we store for each series, it is used to animate in a new series */
-    private Map<Series, DoubleProperty> seriesYMultiplierMap = new HashMap<Series, DoubleProperty>();
+    private Map<Series<X,Y>, DoubleProperty> seriesYMultiplierMap = new HashMap<>();
     private Legend legend = new Legend();
 
     // -------------- PUBLIC PROPERTIES ----------------------------------------
@@ -316,7 +313,7 @@
             seriesLine.getStyleClass().setAll("chart-series-area-line", "series" + i, s.defaultColorStyleClass);
             fillPath.getStyleClass().setAll("chart-series-area-fill", "series" + i, s.defaultColorStyleClass);
             for (int j=0; j < s.getData().size(); j++) {
-                final Data item = s.getData().get(j);
+                final Data<X,Y> item = s.getData().get(j);
                 final Node node = item.getNode();
                 if(node!=null) node.getStyleClass().setAll("chart-area-symbol", "series" + i, "data" + j, s.defaultColorStyleClass);
             }
@@ -356,7 +353,7 @@
             ));
         }
         for (int j=0; j<series.getData().size(); j++) {
-            Data item = series.getData().get(j);
+            Data<X,Y> item = series.getData().get(j);
             final Node symbol = createSymbol(series, seriesIndex, item, j);
             if (symbol != null) {
                 if (shouldAnimate()) symbol.setOpacity(0);
@@ -379,7 +376,7 @@
             // create list of all nodes we need to fade out
             final List<Node> nodes = new ArrayList<Node>();
             nodes.add(series.getNode());
-            for (Data d: series.getData()) nodes.add(d.getNode());
+            for (Data<X,Y> d: series.getData()) nodes.add(d.getNode());
             // fade out old and symbols
             if (getCreateSymbols()) {
                 KeyValue[] startValues = new KeyValue[nodes.size()];
@@ -409,7 +406,7 @@
             }
         } else {
             getPlotChildren().remove(series.getNode());
-            for (Data d:series.getData()) getPlotChildren().remove(d.getNode());
+            for (Data<X,Y> d:series.getData()) getPlotChildren().remove(d.getNode());
             removeSeriesFromDisplay(series);
         }
     }
@@ -454,12 +451,10 @@
      
     /** @inheritDoc */
     @Override protected void layoutPlotChildren() {
-        ArrayList<DataPointInfo> currentSeriesData = 
-                                new ArrayList<DataPointInfo>();
+        ArrayList<DataPointInfo<X,Y>> currentSeriesData = new ArrayList<>();
         // AggregateData hold the data points of both the current and the previous series.
             // The goal is to collect all the data, sort it and iterate.
-        ArrayList<DataPointInfo> aggregateData = 
-                                new ArrayList<DataPointInfo>();
+        ArrayList<DataPointInfo<X,Y>> aggregateData = new ArrayList<>();
         for (int seriesIndex=0; seriesIndex < getDataSize(); seriesIndex++) { // for every series
             Series<X, Y> series = getData().get(seriesIndex);
             aggregateData.clear();
@@ -471,7 +466,7 @@
             currentSeriesData.clear(); 
             // now copy actual data of the current series. 
             for(Data<X, Y> item = series.begin; item != null; item = item.next) {
-                DataPointInfo<X,Y> itemInfo = new DataPointInfo(item, item.getXValue(), 
+                DataPointInfo<X,Y> itemInfo = new DataPointInfo<>(item, item.getXValue(), 
                         item.getYValue(), PartOf.CURRENT);
                 aggregateData.add(itemInfo);
             }
@@ -495,8 +490,8 @@
                 if (dataIndex == firstCurrentIndex) firstCurrent = true;
                 double x = 0;
                 double y = 0;
-                DataPointInfo<X,Y> currentDataPoint = new DataPointInfo();
-                DataPointInfo<X,Y> dropDownDataPoint = new DataPointInfo(true);
+                DataPointInfo<X,Y> currentDataPoint = new DataPointInfo<>();
+                DataPointInfo<X,Y> dropDownDataPoint = new DataPointInfo<>(true);
                 Data<X,Y> item = dataInfo.dataItem;
                 if (dataInfo.partOf.equals(PartOf.CURRENT)) { // handle data from current series
                     int pIndex = findPreviousPrevious(aggregateData, dataIndex); 
@@ -642,7 +637,7 @@
             // Draw the SeriesLine and Series fill
             seriesLine.getElements().add(new MoveTo(currentSeriesData.get(0).displayX, currentSeriesData.get(0).displayY));
             fillPath.getElements().add(new MoveTo(currentSeriesData.get(0).displayX, currentSeriesData.get(0).displayY));
-            for (DataPointInfo point : currentSeriesData) {
+            for (DataPointInfo<X,Y> point : currentSeriesData) {
                 if (!point.lineTo) {
                     seriesLine.getElements().add(new MoveTo(point.displayX, point.displayY));
                 } else {
@@ -660,7 +655,7 @@
                 }
             }
             for(int i = aggregateData.size()-1; i > 0; i--) {
-                DataPointInfo point = aggregateData.get(i);
+                DataPointInfo<X,Y> point = aggregateData.get(i);
                 if (PartOf.PREVIOUS.equals(point.partOf)) {
                     fillPath.getElements().add(new  LineTo(point.displayX, point.displayY));
                 }
@@ -672,7 +667,7 @@
      
      //-------------------- helper methods to retrieve data points from the previous
      // or current data series.
-     private int findNextCurrent(ArrayList<DataPointInfo> points, int index) {
+     private int findNextCurrent(ArrayList<DataPointInfo<X,Y>> points, int index) {
         for(int i = index+1; i < points.size(); i++) {
             if (points.get(i).partOf.equals(PartOf.CURRENT)) {
                 return i;
@@ -681,7 +676,7 @@
         return -1;
      }
      
-     private int findPreviousCurrent(ArrayList<DataPointInfo> points, int index) {
+     private int findPreviousCurrent(ArrayList<DataPointInfo<X,Y>> points, int index) {
         for(int i = index-1; i >= 0; i--) {
             if (points.get(i).partOf.equals(PartOf.CURRENT)) {
                 return i;
@@ -691,7 +686,7 @@
      }
      
      
-    private int findPreviousPrevious(ArrayList<DataPointInfo> points, int index) {
+    private int findPreviousPrevious(ArrayList<DataPointInfo<X,Y>> points, int index) {
        for(int i = index-1; i >= 0; i--) {
             if (points.get(i).partOf.equals(PartOf.PREVIOUS)) {
                 return i;
@@ -699,7 +694,7 @@
         }
         return -1;
     }
-    private int findNextPrevious(ArrayList<DataPointInfo> points, int index) {
+    private int findNextPrevious(ArrayList<DataPointInfo<X,Y>> points, int index) {
         for(int i = index+1; i < points.size(); i++) {
             if (points.get(i).partOf.equals(PartOf.PREVIOUS)) {
                 return i;
@@ -709,10 +704,10 @@
     }
      
     
-     private void sortAggregateList(ArrayList<DataPointInfo> aggregateList) {
+     private void sortAggregateList(ArrayList<DataPointInfo<X,Y>> aggregateList) {
         Collections.sort(aggregateList, (o1, o2) -> {
-            Data<X,Y> d1 = ((DataPointInfo)o1).dataItem;
-            Data<X,Y> d2 = ((DataPointInfo)o2).dataItem;
+            Data<X,Y> d1 = o1.dataItem;
+            Data<X,Y> d2 = o2.dataItem;
             double val1 = getXAxis().toNumericValue(d1.getXValue());
             double val2 = getXAxis().toNumericValue(d2.getXValue());
             return (val1 < val2 ? -1 : ( val1 == val2) ? 0 : 1);
@@ -724,7 +719,7 @@
          return (((highY - lowY)/(highX - lowX))*(x - lowX))+lowY;
     }
 
-    private Node createSymbol(Series series, int seriesIndex, final Data item, int itemIndex) {
+    private Node createSymbol(Series<X,Y> series, int seriesIndex, final Data<X,Y> item, int itemIndex) {
         Node symbol = item.getNode();
         // check if symbol has already been created
         if (symbol == null && getCreateSymbols()) {
@@ -826,12 +821,12 @@
                 new CssMetaData<StackedAreaChart<?, ?>, Boolean>("-fx-create-symbols",
                 BooleanConverter.getInstance(), Boolean.TRUE) {
             @Override
-            public boolean isSettable(StackedAreaChart node) {
+            public boolean isSettable(StackedAreaChart<?,?> node) {
                 return node.createSymbols == null || !node.createSymbols.isBound();
             }
 
             @Override
-            public StyleableProperty<Boolean> getStyleableProperty(StackedAreaChart node) {
+            public StyleableProperty<Boolean> getStyleableProperty(StackedAreaChart<?,?> node) {
                 return (StyleableProperty<Boolean>) node.createSymbolsProperty();
             }
         };
--- a/modules/controls/src/main/java/javafx/scene/chart/XYChart.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/XYChart.java	Fri Apr 25 12:05:53 2014 +1200
@@ -89,7 +89,7 @@
     // to indicate which colors are being used for the series
     private final BitSet colorBits = new BitSet(8);
     static String DEFAULT_COLOR = "default-color";
-    final Map<Series, Integer> seriesColorMap = new HashMap<Series, Integer>();
+    final Map<Series<X,Y>, Integer> seriesColorMap = new HashMap<>();
     private boolean rangeValid = false;
     private final Line verticalZeroLine = new Line();
     private final Line horizontalZeroLine = new Line();
@@ -134,7 +134,7 @@
                         getData().get(0).next = XYChart.this.begin;
                         begin = getData().get(0);
                     } else {
-                        Series ptr = begin;
+                        Series<X,Y> ptr = begin;
                         for (int j = 0; j < i -1 && ptr!=null ; j++) {
                             ptr = ptr.next;
                         }
@@ -888,9 +888,9 @@
      * @param series The series to find index for
      * @return index of the series in series list
      */
-    int getSeriesIndex(Series series) {
+    int getSeriesIndex(Series<X,Y> series) {
         int itemIndex = 0;
-        for (Series s = XYChart.this.begin; s != null; s = s.next) {
+        for (Series<X,Y> s = XYChart.this.begin; s != null; s = s.next) {
             if (s == series) break;
             itemIndex++;
         }
@@ -903,7 +903,7 @@
      */
     int getSeriesSize() {
         int count = 0;
-        for (Series d = XYChart.this.begin; d != null; d = d.next) {
+        for (Series<X,Y> d = XYChart.this.begin; d != null; d = d.next) {
             count++;
         }
         return count;
@@ -920,7 +920,7 @@
         if (begin == series) {
             begin = series.next;
         } else {
-            Series ptr = begin;
+            Series<X,Y> ptr = begin;
             while(ptr != null && ptr.next != series) {
                 ptr = ptr.next;
             }
--- a/modules/controls/src/main/java/javafx/scene/control/CheckBoxTreeItem.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/CheckBoxTreeItem.java	Fri Apr 25 12:05:53 2014 +1200
@@ -29,7 +29,6 @@
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.event.Event;
 import javafx.event.EventType;
 import javafx.scene.Node;
--- a/modules/controls/src/main/java/javafx/scene/control/ChoiceBox.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/ChoiceBox.java	Fri Apr 25 12:05:53 2014 +1200
@@ -29,7 +29,6 @@
 import javafx.beans.property.ObjectPropertyBase;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
--- a/modules/controls/src/main/java/javafx/scene/control/ComboBox.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/ComboBox.java	Fri Apr 25 12:05:53 2014 +1200
@@ -27,8 +27,6 @@
 
 import javafx.collections.WeakListChangeListener;
 import com.sun.javafx.scene.control.skin.ComboBoxListViewSkin;
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.property.*;
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableValue;
--- a/modules/controls/src/main/java/javafx/scene/control/DatePicker.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/DatePicker.java	Fri Apr 25 12:05:53 2014 +1200
@@ -43,8 +43,6 @@
 import java.util.Locale;
 
 import com.sun.javafx.scene.control.skin.ComboBoxListViewSkin;
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ReadOnlyObjectProperty;
--- a/modules/controls/src/main/java/javafx/scene/control/FocusModel.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/FocusModel.java	Fri Apr 25 12:05:53 2014 +1200
@@ -25,8 +25,6 @@
 
 package javafx.scene.control;
 
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.property.ReadOnlyIntegerProperty;
 import javafx.beans.property.ReadOnlyIntegerWrapper;
 import javafx.beans.property.ReadOnlyObjectProperty;
--- a/modules/controls/src/main/java/javafx/scene/control/Label.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/Label.java	Fri Apr 25 12:05:53 2014 +1200
@@ -30,7 +30,6 @@
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ObjectPropertyBase;
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.css.StyleableProperty;
 import javafx.scene.Node;
 import javafx.scene.accessibility.Attribute;
--- a/modules/controls/src/main/java/javafx/scene/control/Labeled.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/Labeled.java	Fri Apr 25 12:05:53 2014 +1200
@@ -26,8 +26,6 @@
 package javafx.scene.control;
 
 
-import com.sun.javafx.css.Selector;
-import com.sun.javafx.css.SimpleSelector;
 import com.sun.javafx.css.StyleManager;
 import com.sun.javafx.css.converters.BooleanConverter;
 import com.sun.javafx.css.converters.EnumConverter;
@@ -35,9 +33,6 @@
 import com.sun.javafx.css.converters.PaintConverter;
 import com.sun.javafx.css.converters.SizeConverter;
 import com.sun.javafx.css.converters.StringConverter;
-import com.sun.javafx.css.parser.CSSParser;
-import java.net.MalformedURLException;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -56,7 +51,6 @@
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.image.Image;
 import javafx.scene.image.ImageView;
-import javafx.scene.layout.Region;
 import javafx.scene.paint.Color;
 import javafx.scene.paint.Paint;
 import javafx.scene.text.Font;
--- a/modules/controls/src/main/java/javafx/scene/control/ListCell.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/ListCell.java	Fri Apr 25 12:05:53 2014 +1200
@@ -29,7 +29,6 @@
 import java.util.List;
 
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.WeakInvalidationListener;
 import javafx.beans.property.ReadOnlyObjectProperty;
 import javafx.beans.property.ReadOnlyObjectWrapper;
--- a/modules/controls/src/main/java/javafx/scene/control/ListView.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/ListView.java	Fri Apr 25 12:05:53 2014 +1200
@@ -31,7 +31,6 @@
 import java.util.List;
 
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.ObjectProperty;
@@ -41,7 +40,6 @@
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.beans.value.WeakChangeListener;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
@@ -240,7 +238,7 @@
         return (EventType<ListView.EditEvent<T>>) EDIT_ANY_EVENT;
     }
     private static final EventType<?> EDIT_ANY_EVENT =
-            new EventType(Event.ANY, "LIST_VIEW_EDIT");
+            new EventType<>(Event.ANY, "LIST_VIEW_EDIT");
     
     /**
      * An EventType used to indicate that an edit event has started within the
@@ -251,7 +249,7 @@
         return (EventType<ListView.EditEvent<T>>) EDIT_START_EVENT;
     }
     private static final EventType<?> EDIT_START_EVENT =
-            new EventType(editAnyEvent(), "EDIT_START");
+            new EventType<>(editAnyEvent(), "EDIT_START");
 
     /**
      * An EventType used to indicate that an edit event has just been canceled
@@ -262,7 +260,7 @@
         return (EventType<ListView.EditEvent<T>>) EDIT_CANCEL_EVENT;
     }
     private static final EventType<?> EDIT_CANCEL_EVENT =
-            new EventType(editAnyEvent(), "EDIT_CANCEL");
+            new EventType<>(editAnyEvent(), "EDIT_CANCEL");
 
     /**
      * An EventType used to indicate that an edit event has been committed
@@ -273,7 +271,7 @@
         return (EventType<ListView.EditEvent<T>>) EDIT_COMMIT_EVENT;
     }
     private static final EventType<?> EDIT_COMMIT_EVENT =
-            new EventType(editAnyEvent(), "EDIT_COMMIT");
+            new EventType<>(editAnyEvent(), "EDIT_COMMIT");
     
     
 
@@ -1085,7 +1083,7 @@
             case ROLE: return Role.LIST_VIEW;
             case ROW_COUNT: return getItems().size();
             case MULTIPLE_SELECTION: {
-                MultipleSelectionModel sm = getSelectionModel();
+                MultipleSelectionModel<T> sm = getSelectionModel();
                 return sm != null && sm.getSelectionMode() == SelectionMode.MULTIPLE;
             }
             case ROW_AT_INDEX: //Skin
--- a/modules/controls/src/main/java/javafx/scene/control/Menu.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/Menu.java	Fri Apr 25 12:05:53 2014 +1200
@@ -25,8 +25,6 @@
 
 package javafx.scene.control;
 
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ObjectPropertyBase;
 import javafx.collections.ListChangeListener.Change;
--- a/modules/controls/src/main/java/javafx/scene/control/MultipleSelectionModelBase.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/MultipleSelectionModelBase.java	Fri Apr 25 12:05:53 2014 +1200
@@ -35,8 +35,6 @@
 import java.util.Collections;
 import java.util.List;
 
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
 import javafx.collections.ListChangeListener.Change;
--- a/modules/controls/src/main/java/javafx/scene/control/ScrollToEvent.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/ScrollToEvent.java	Fri Apr 25 12:05:53 2014 +1200
@@ -55,7 +55,6 @@
     /**
      * This event occurs if the user requests scrolling a given index into view.
      */
-    @SuppressWarnings("unchecked")
     public static EventType<ScrollToEvent<Integer>> scrollToTopIndex() {
         return SCROLL_TO_TOP_INDEX;
     }
@@ -72,7 +71,7 @@
         return (EventType<ScrollToEvent<T>>) SCROLL_TO_COLUMN;
     }
     private static final EventType<?> SCROLL_TO_COLUMN = 
-            new EventType(ScrollToEvent.ANY, "SCROLL_TO_COLUMN");
+            new EventType<>(ScrollToEvent.ANY, "SCROLL_TO_COLUMN");
     
     private static final long serialVersionUID = -8557345736849482516L;
     
--- a/modules/controls/src/main/java/javafx/scene/control/SortEvent.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/SortEvent.java	Fri Apr 25 12:05:53 2014 +1200
@@ -22,8 +22,7 @@
         return (EventType<SortEvent<C>>) SORT_EVENT;
     }
     
-    @SuppressWarnings("unchecked")
-    private static final EventType<?> SORT_EVENT = new EventType(SortEvent.ANY, "SORT_EVENT");
+    private static final EventType<?> SORT_EVENT = new EventType<>(SortEvent.ANY, "SORT_EVENT");
     
 //    /**
 //     * Construct a new {@code Event} with the specified event source, target
--- a/modules/controls/src/main/java/javafx/scene/control/Tab.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/Tab.java	Fri Apr 25 12:05:53 2014 +1200
@@ -55,7 +55,6 @@
 
 import javafx.beans.DefaultProperty;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.property.BooleanPropertyBase;
 import javafx.beans.property.ReadOnlyBooleanProperty;
 import javafx.beans.property.ReadOnlyBooleanWrapper;
--- a/modules/controls/src/main/java/javafx/scene/control/TableCell.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TableCell.java	Fri Apr 25 12:05:53 2014 +1200
@@ -27,7 +27,6 @@
 
 import javafx.css.PseudoClass;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.WeakInvalidationListener;
 import javafx.beans.value.ObservableValue;
 import javafx.collections.ListChangeListener;
--- a/modules/controls/src/main/java/javafx/scene/control/TableColumn.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TableColumn.java	Fri Apr 25 12:05:53 2014 +1200
@@ -51,8 +51,6 @@
 
 import java.util.List;
 import java.util.Map;
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.property.ReadOnlyObjectProperty;
 import javafx.beans.property.ReadOnlyObjectWrapper;
 import javafx.beans.value.ObservableValue;
@@ -151,7 +149,7 @@
         return (EventType<CellEditEvent<S,T>>) EDIT_ANY_EVENT;
     }
     private static final EventType<?> EDIT_ANY_EVENT =
-            new EventType(Event.ANY, "TABLE_COLUMN_EDIT");
+            new EventType<>(Event.ANY, "TABLE_COLUMN_EDIT");
 
     /**
      * Indicates that the user has performed some interaction to start an edit
@@ -163,7 +161,7 @@
         return (EventType<CellEditEvent<S,T>>) EDIT_START_EVENT;
     }
     private static final EventType<?> EDIT_START_EVENT =
-            new EventType(editAnyEvent(), "EDIT_START");
+            new EventType<>(editAnyEvent(), "EDIT_START");
 
     /**
      * Indicates that the editing has been canceled, meaning that no change should
@@ -174,7 +172,7 @@
         return (EventType<CellEditEvent<S,T>>) EDIT_CANCEL_EVENT;
     }
     private static final EventType<?> EDIT_CANCEL_EVENT =
-            new EventType(editAnyEvent(), "EDIT_CANCEL");
+            new EventType<>(editAnyEvent(), "EDIT_CANCEL");
 
     /**
      * Indicates that the editing has been committed by the user, meaning that
@@ -186,7 +184,7 @@
         return (EventType<CellEditEvent<S,T>>) EDIT_COMMIT_EVENT;
     }
     private static final EventType<?> EDIT_COMMIT_EVENT =
-            new EventType(editAnyEvent(), "EDIT_COMMIT");
+            new EventType<>(editAnyEvent(), "EDIT_COMMIT");
     
     
     
@@ -417,7 +415,7 @@
         new SimpleObjectProperty<Callback<TableColumn<S,T>, TableCell<S,T>>>(
             this, "cellFactory", (Callback<TableColumn<S,T>, TableCell<S,T>>) ((Callback) DEFAULT_CELL_FACTORY)) {
                 @Override protected void invalidated() {
-                    TableView table = getTableView();
+                    TableView<S> table = getTableView();
                     if (table == null) return;
                     Map<Object,Object> properties = table.getProperties();
                     if (properties.containsKey(TableViewSkinBase.RECREATE)) {
--- a/modules/controls/src/main/java/javafx/scene/control/TableRow.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TableRow.java	Fri Apr 25 12:05:53 2014 +1200
@@ -26,7 +26,6 @@
 package javafx.scene.control;
 
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.WeakInvalidationListener;
 import javafx.collections.ListChangeListener;
 import javafx.scene.accessibility.Action;
--- a/modules/controls/src/main/java/javafx/scene/control/TableView.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TableView.java	Fri Apr 25 12:05:53 2014 +1200
@@ -32,9 +32,7 @@
 import com.sun.javafx.scene.control.SelectedCellsMap;
 import javafx.beans.DefaultProperty;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.WeakInvalidationListener;
-import javafx.beans.binding.BooleanBinding;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.ObjectProperty;
@@ -44,9 +42,6 @@
 import javafx.beans.property.ReadOnlyObjectWrapper;
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleObjectProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.beans.value.WeakChangeListener;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
 import javafx.collections.MapChangeListener;
@@ -2254,7 +2249,7 @@
 
             // fire off a single add/remove/replace notification (rather than
             // individual remove and add notifications) - see RT-33324
-            int changeIndex = selectedCellsSeq.indexOf(new TablePosition(getTableView(), row, column));
+            int changeIndex = selectedCellsSeq.indexOf(new TablePosition<>(getTableView(), row, column));
             ListChangeListener.Change change = new NonIterableChange.GenericAddRemoveChange<TablePosition<S,?>>(
                     changeIndex, changeIndex+1, previousSelection, selectedCellsSeq);
             handleSelectedCellsListChangeEvent(change);
@@ -2475,8 +2470,8 @@
             updateSelectedIndex(maxRow);
             focus(maxRow, (TableColumn<S,?>)maxColumn);
 
-            final int startChangeIndex = selectedCellsMap.indexOf(new TablePosition(tableView, minRow, (TableColumn<S,?>)minColumn));
-            final int endChangeIndex = selectedCellsMap.indexOf(new TablePosition(tableView, maxRow, (TableColumn<S,?>)maxColumn));
+            final int startChangeIndex = selectedCellsMap.indexOf(new TablePosition<>(tableView, minRow, (TableColumn<S,?>)minColumn));
+            final int endChangeIndex = selectedCellsMap.indexOf(new TablePosition<>(tableView, maxRow, (TableColumn<S,?>)maxColumn));
             handleSelectedCellsListChangeEvent(new NonIterableChange.SimpleAddChange<>(startChangeIndex, endChangeIndex + 1, selectedCellsSeq));
         }
 
--- a/modules/controls/src/main/java/javafx/scene/control/ToolBar.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/ToolBar.java	Fri Apr 25 12:05:53 2014 +1200
@@ -195,8 +195,6 @@
      **************************************************************************/
 
     private static final String DEFAULT_STYLE_CLASS = "tool-bar";
-    private static final String PSEUDO_CLASS_VERTICAL = "vertical";
-    private static final String PSEUDO_CLASS_HORIZONTAL = "horizontal";
 
     private static class StyleableProperties {
         private static final CssMetaData<ToolBar,Orientation> ORIENTATION = 
--- a/modules/controls/src/main/java/javafx/scene/control/TreeItem.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeItem.java	Fri Apr 25 12:05:53 2014 +1200
@@ -225,8 +225,8 @@
     public static <T> EventType<TreeModificationEvent<T>> treeNotificationEvent() {
         return (EventType<TreeModificationEvent<T>>) TREE_NOTIFICATION_EVENT;
     }
-    private static final EventType TREE_NOTIFICATION_EVENT
-            = new EventType(Event.ANY, "TreeNotificationEvent");
+    private static final EventType<?> TREE_NOTIFICATION_EVENT
+            = new EventType<>(Event.ANY, "TreeNotificationEvent");
 
     /**
      * The general EventType used when the TreeItem receives a modification that
@@ -243,8 +243,8 @@
     public static <T> EventType<TreeModificationEvent<T>> expandedItemCountChangeEvent() {
         return (EventType<TreeModificationEvent<T>>) EXPANDED_ITEM_COUNT_CHANGE_EVENT;
     }
-    private static final EventType EXPANDED_ITEM_COUNT_CHANGE_EVENT
-            = new EventType(treeNotificationEvent(), "ExpandedItemCountChangeEvent");
+    private static final EventType<?> EXPANDED_ITEM_COUNT_CHANGE_EVENT
+            = new EventType<>(treeNotificationEvent(), "ExpandedItemCountChangeEvent");
 
     /**
      * An EventType used when the TreeItem receives a modification to its
@@ -257,7 +257,7 @@
         return (EventType<TreeModificationEvent<T>>) BRANCH_EXPANDED_EVENT;
     }
     private static final EventType<?> BRANCH_EXPANDED_EVENT
-            = new EventType(expandedItemCountChangeEvent(), "BranchExpandedEvent");
+            = new EventType<>(expandedItemCountChangeEvent(), "BranchExpandedEvent");
 
     /**
      * An EventType used when the TreeItem receives a modification to its
@@ -270,7 +270,7 @@
         return (EventType<TreeModificationEvent<T>>) BRANCH_COLLAPSED_EVENT;
     }
     private static final EventType<?> BRANCH_COLLAPSED_EVENT
-            = new EventType(expandedItemCountChangeEvent(), "BranchCollapsedEvent");
+            = new EventType<>(expandedItemCountChangeEvent(), "BranchCollapsedEvent");
 
     /**
      * An EventType used when the TreeItem receives a direct modification to its
@@ -283,7 +283,7 @@
         return (EventType<TreeModificationEvent<T>>) CHILDREN_MODIFICATION_EVENT;
     }
     private static final EventType<?> CHILDREN_MODIFICATION_EVENT
-            = new EventType(expandedItemCountChangeEvent(), "ChildrenModificationEvent");
+            = new EventType<>(expandedItemCountChangeEvent(), "ChildrenModificationEvent");
 
     /**
      * An EventType used when the TreeItem receives a modification to its
@@ -296,7 +296,7 @@
         return (EventType<TreeModificationEvent<T>>) VALUE_CHANGED_EVENT;
     }
     private static final EventType<?> VALUE_CHANGED_EVENT
-            = new EventType(treeNotificationEvent(), "ValueChangedEvent");
+            = new EventType<>(treeNotificationEvent(), "ValueChangedEvent");
 
     /**
      * An EventType used when the TreeItem receives a modification to its
@@ -309,7 +309,7 @@
         return (EventType<TreeModificationEvent<T>>) GRAPHIC_CHANGED_EVENT;
     }
     private static final EventType<?> GRAPHIC_CHANGED_EVENT
-            = new EventType(treeNotificationEvent(), "GraphicChangedEvent");
+            = new EventType<>(treeNotificationEvent(), "GraphicChangedEvent");
     
     
 
@@ -810,7 +810,7 @@
         // if we're at the root node, we'll fire an event so that the control
         // can update its display
         if (getParent() == null) {
-            TreeModificationEvent e = new TreeModificationEvent<T>(TreeItem.childrenModificationEvent(), this);
+            TreeModificationEvent<T> e = new TreeModificationEvent<T>(TreeItem.childrenModificationEvent(), this);
             e.wasPermutated = true;
             fireEvent(e);
         }
--- a/modules/controls/src/main/java/javafx/scene/control/TreeTableCell.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeTableCell.java	Fri Apr 25 12:05:53 2014 +1200
@@ -28,7 +28,6 @@
 import javafx.css.PseudoClass;
 import com.sun.javafx.scene.control.skin.TreeTableCellSkin;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.WeakInvalidationListener;
 import javafx.beans.value.ObservableValue;
 import javafx.collections.ListChangeListener;
--- a/modules/controls/src/main/java/javafx/scene/control/TreeTableColumn.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeTableColumn.java	Fri Apr 25 12:05:53 2014 +1200
@@ -29,8 +29,6 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ReadOnlyObjectProperty;
 import javafx.beans.property.ReadOnlyObjectWrapper;
@@ -142,7 +140,7 @@
         return (EventType<TreeTableColumn.CellEditEvent<S,T>>) EDIT_ANY_EVENT;
     }
     private static final EventType<?> EDIT_ANY_EVENT =
-            new EventType(Event.ANY, "TREE_TABLE_COLUMN_EDIT");
+            new EventType<>(Event.ANY, "TREE_TABLE_COLUMN_EDIT");
 
     /**
      * Indicates that the user has performed some interaction to start an edit
@@ -155,7 +153,7 @@
         return (EventType<TreeTableColumn.CellEditEvent<S,T>>) EDIT_START_EVENT;
     }
     private static final EventType<?> EDIT_START_EVENT =
-            new EventType(editAnyEvent(), "EDIT_START");
+            new EventType<>(editAnyEvent(), "EDIT_START");
 
     /**
      * Indicates that the editing has been canceled, meaning that no change should
@@ -166,7 +164,7 @@
         return (EventType<TreeTableColumn.CellEditEvent<S,T>>) EDIT_CANCEL_EVENT;
     }
     private static final EventType<?> EDIT_CANCEL_EVENT =
-            new EventType(editAnyEvent(), "EDIT_CANCEL");
+            new EventType<>(editAnyEvent(), "EDIT_CANCEL");
 
     /**
      * Indicates that the editing has been committed by the user, meaning that
@@ -178,7 +176,7 @@
         return (EventType<TreeTableColumn.CellEditEvent<S,T>>) EDIT_COMMIT_EVENT;
     }
     private static final EventType<?> EDIT_COMMIT_EVENT =
-            new EventType(editAnyEvent(), "EDIT_COMMIT");
+            new EventType<>(editAnyEvent(), "EDIT_COMMIT");
     
     
     
@@ -280,7 +278,7 @@
                 }
             };
     
-    private ListChangeListener columnsListener = new ListChangeListener<TreeTableColumn<S,?>>() {
+    private ListChangeListener<TreeTableColumn<S, ?>> columnsListener = new ListChangeListener<TreeTableColumn<S,?>>() {
         @Override public void onChanged(ListChangeListener.Change<? extends TreeTableColumn<S,?>> c) {
             while (c.next()) {
                 // update the TreeTableColumn.treeTableView property
@@ -306,8 +304,8 @@
         }
     };
     
-    private WeakListChangeListener weakColumnsListener = 
-            new WeakListChangeListener(columnsListener);
+    private WeakListChangeListener<TreeTableColumn<S, ?>> weakColumnsListener = 
+            new WeakListChangeListener<>(columnsListener);
     
     
     /***************************************************************************
@@ -410,9 +408,9 @@
         new SimpleObjectProperty<Callback<TreeTableColumn<S,T>, TreeTableCell<S,T>>>(
             this, "cellFactory", (Callback<TreeTableColumn<S,T>, TreeTableCell<S,T>>) ((Callback) DEFAULT_CELL_FACTORY)) {
                 @Override protected void invalidated() {
-                    TreeTableView table = getTreeTableView();
+                    TreeTableView<S> table = getTreeTableView();
                     if (table == null) return;
-                    Map properties = table.getProperties();
+                    Map<Object,Object> properties = table.getProperties();
                     if (properties.containsKey(TableViewSkinBase.RECREATE)) {
                         properties.remove(TableViewSkinBase.RECREATE);
                     }
@@ -812,7 +810,7 @@
 //            List<S> items = getTreeTableView().getItems();
 //            if (items == null) return null;
 
-            TreeTableView treeTable = getTreeTableView();
+            TreeTableView<S> treeTable = getTreeTableView();
             int row = pos.getRow();
             if (row < 0 || row >= treeTable.getExpandedItemCount()) return null;
 
--- a/modules/controls/src/main/java/javafx/scene/control/TreeTableRow.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeTableRow.java	Fri Apr 25 12:05:53 2014 +1200
@@ -1,607 +1,604 @@
-/*
- * Copyright (c) 2012, 2013, 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 javafx.scene.control;
-
-import com.sun.javafx.scene.control.skin.VirtualFlow;
-import javafx.css.PseudoClass;
-import com.sun.javafx.scene.control.skin.TreeTableRowSkin;
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.List;
-
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
-import javafx.beans.WeakInvalidationListener;
-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.collections.ListChangeListener;
-import javafx.collections.WeakListChangeListener;
-import javafx.scene.Node;
-import javafx.scene.Parent;
-import javafx.scene.accessibility.Action;
-import javafx.scene.accessibility.Attribute;
-import javafx.scene.accessibility.Role;
-import javafx.scene.control.TreeTableView.TreeTableViewFocusModel;
-import javafx.scene.control.TreeTableView.TreeTableViewSelectionModel;
-
-/**
- * <p>TreeTableRow is an {@link javafx.scene.control.IndexedCell IndexedCell}, but
- * rarely needs to be used by developers creating TreeTableView instances. The only
- * time TreeTableRow is likely to be encountered at all by a developer is if they
- * wish to create a custom {@link TreeTableView#rowFactoryProperty() rowFactory} 
- * that replaces an entire row of a TreeTableView.</p>
- *
- * <p>More often than not, it is actually easier for a developer to customize
- * individual cells in a row, rather than the whole row itself. To do this,
- * you can specify a custom {@link TreeTableColumn#cellFactoryProperty() cellFactory} 
- * on each TreeTableColumn instance.</p>
- *
- * @see TreeTableView
- * @see TreeTableColumn
- * @see TreeTableCell
- * @see IndexedCell
- * @see Cell
- * @param <T> The type of the item contained within the Cell.
- * @since JavaFX 8.0
- */
-public class TreeTableRow<T> extends IndexedCell<T> {
-    
-    
-    /***************************************************************************
-     *                                                                         *
-     * Constructors                                                            *
-     *                                                                         *
-     **************************************************************************/
-
-    /**
-     * Creates a default TreeTableRow instance.
-     */
-    public TreeTableRow() {
-        getStyleClass().addAll(DEFAULT_STYLE_CLASS);
-    }
-
-
-
-    /***************************************************************************
-     *                                                                         *
-     * Callbacks and events                                                    *
-     *                                                                         *
-     **************************************************************************/
-    
-    private final ListChangeListener<Integer> selectedListener = c -> {
-        updateSelection();
-    };
-
-    private final InvalidationListener focusedListener = valueModel -> {
-        updateFocus();
-    };
-
-    private final InvalidationListener editingListener = valueModel -> {
-        updateEditing();
-    };
-    
-    private final InvalidationListener leafListener = new InvalidationListener() {
-        @Override public void invalidated(Observable valueModel) {
-            // necessary to update the disclosure node in the skin when the
-            // leaf property changes
-            TreeItem<T> treeItem = getTreeItem();
-            if (treeItem != null) {
-                requestLayout();
-            }
-        }
-    };
-    
-    private final InvalidationListener treeItemExpandedInvalidationListener = o -> {
-        final boolean expanded = ((BooleanProperty)o).get();
-        pseudoClassStateChanged(EXPANDED_PSEUDOCLASS_STATE,   expanded);
-        pseudoClassStateChanged(COLLAPSED_PSEUDOCLASS_STATE, !expanded);
-    };
-    
-    private final WeakListChangeListener<Integer> weakSelectedListener = 
-            new WeakListChangeListener<Integer>(selectedListener);
-    private final WeakInvalidationListener weakFocusedListener = 
-            new WeakInvalidationListener(focusedListener);
-    private final WeakInvalidationListener weakEditingListener = 
-            new WeakInvalidationListener(editingListener);
-    private final WeakInvalidationListener weakLeafListener = 
-            new WeakInvalidationListener(leafListener);
-    private final WeakInvalidationListener weakTreeItemExpandedInvalidationListener = 
-            new WeakInvalidationListener(treeItemExpandedInvalidationListener);
-    
-    
-    
-    /***************************************************************************
-     *                                                                         *
-     * Properties                                                              *
-     *                                                                         *
-     **************************************************************************/
-    
-    // --- TreeItem
-    private ReadOnlyObjectWrapper<TreeItem<T>> treeItem = 
-        new ReadOnlyObjectWrapper<TreeItem<T>>(this, "treeItem") {
-            
-            TreeItem<T> oldValue = null;
-            
-            @Override protected void invalidated() {
-                if (oldValue != null) {
-                    oldValue.expandedProperty().removeListener(weakTreeItemExpandedInvalidationListener);
-                }
-                
-                oldValue = get(); 
-                
-                if (oldValue != null) {
-                    oldValue.expandedProperty().addListener(weakTreeItemExpandedInvalidationListener);
-                    // fake an invalidation to ensure updated pseudo-class state
-                    weakTreeItemExpandedInvalidationListener.invalidated(oldValue.expandedProperty());            
-                }
-            }
-    };
-    private void setTreeItem(TreeItem<T> value) {
-        treeItem.set(value); 
-    }
-    
-    /**
-     * Returns the TreeItem currently set in this TreeCell.
-     */
-    public final TreeItem<T> getTreeItem() { return treeItem.get(); }
-    
-    /**
-     * Each TreeTableCell represents at most a single {@link TreeItem}, which is
-     * represented by this property.
-     */
-    public final ReadOnlyObjectProperty<TreeItem<T>> treeItemProperty() { return treeItem.getReadOnlyProperty(); }
-
-    
-    
-    // --- Disclosure Node
-    private ObjectProperty<Node> disclosureNode = new SimpleObjectProperty<Node>(this, "disclosureNode");
-
-    /**
-     * The node to use as the "disclosure" triangle, or toggle, used for
-     * expanding and collapsing items. This is only used in the case of
-     * an item in the tree which contains child items. If not specified, the
-     * TreeTableCell's Skin implementation is responsible for providing a default
-     * disclosure node.
-     */
-    public final void setDisclosureNode(Node value) { disclosureNodeProperty().set(value); }
-    
-    /**
-     * Returns the current disclosure node set in this TreeTableCell.
-     */
-    public final Node getDisclosureNode() { return disclosureNode.get(); }
-    
-    /**
-     * The disclosure node is commonly seen represented as a triangle that rotates
-     * on screen to indicate whether or not the TreeItem that it is placed
-     * beside is expanded or collapsed.
-     */
-    public final ObjectProperty<Node> disclosureNodeProperty() { return disclosureNode; }
-    
-    
-    // --- TreeView
-    private ReadOnlyObjectWrapper<TreeTableView<T>> treeTableView = new ReadOnlyObjectWrapper<TreeTableView<T>>(this, "treeTableView") {
-        private WeakReference<TreeTableView<T>> weakTreeTableViewRef;
-        @Override protected void invalidated() {
-            TreeTableViewSelectionModel<T> sm;
-            TreeTableViewFocusModel<T> fm;
-            
-            if (weakTreeTableViewRef != null) {
-                TreeTableView<T> oldTreeTableView = weakTreeTableViewRef.get();
-                if (oldTreeTableView != null) {
-                    // remove old listeners
-                    sm = oldTreeTableView.getSelectionModel();
-                    if (sm != null) {
-                        sm.getSelectedIndices().removeListener(weakSelectedListener);
-                    }
-
-                    fm = oldTreeTableView.getFocusModel();
-                    if (fm != null) {
-                        fm.focusedIndexProperty().removeListener(weakFocusedListener);
-                    }
-
-                    oldTreeTableView.editingCellProperty().removeListener(weakEditingListener);
-                }
-                
-                weakTreeTableViewRef = null;
-            }
-
-            if (get() != null) {
-                sm = get().getSelectionModel();
-                if (sm != null) {
-                    // listening for changes to treeView.selectedIndex and IndexedCell.index,
-                    // to determine if this cell is selected
-                    sm.getSelectedIndices().addListener(weakSelectedListener);
-                }
-
-                fm = get().getFocusModel();
-                if (fm != null) {
-                    // similar to above, but this time for focus
-                    fm.focusedIndexProperty().addListener(weakFocusedListener);
-                }
-
-                get().editingCellProperty().addListener(weakEditingListener);
-                
-                weakTreeTableViewRef = new WeakReference<TreeTableView<T>>(get());
-            }
-
-            updateItem();
-            requestLayout();
-        }
-    };
-    
-    private void setTreeTableView(TreeTableView<T> value) { treeTableView.set(value); }
-
-    /**
-     * Returns the TreeTableView associated with this TreeTableCell.
-     */
-    public final TreeTableView<T> getTreeTableView() { return treeTableView.get(); }
-    
-    /**
-     * A TreeTableCell is explicitly linked to a single {@link TreeTableView} instance,
-     * which is represented by this property.
-     */
-    public final ReadOnlyObjectProperty<TreeTableView<T>> treeTableViewProperty() { return treeTableView.getReadOnlyProperty(); }
-
-
-
-
-    /***************************************************************************
-     *                                                                         *
-     * Public API                                                              *
-     *                                                                         *
-     *************************************************************************
-     * @param oldIndex
-     * @param newIndex*/
-
-    
-    @Override void indexChanged(int oldIndex, int newIndex) {
-        index = getIndex();
-
-        // when the cell index changes, this may result in the cell
-        // changing state to be selected and/or focused.
-        updateItem();
-        updateSelection();
-        updateFocus();
-//        oldIndex = index;
-    }
-    
-
-    /** {@inheritDoc} */
-    @Override public void startEdit() {
-        final TreeTableView<T> treeTable = getTreeTableView();
-        if (! isEditable() || (treeTable != null && ! treeTable.isEditable())) {
-            return;
-        }
-        
-        // it makes sense to get the cell into its editing state before firing
-        // the event to the TreeView below, so that's what we're doing here
-        // by calling super.startEdit().
-        super.startEdit();
-        
-         // Inform the TreeView of the edit starting.
-        if (treeTable != null) {
-            treeTable.fireEvent(new TreeTableView.EditEvent<T>(treeTable,
-                    TreeTableView.<T>editStartEvent(),
-                    getTreeItem(),
-                    getItem(),
-                    null));
-            
-            treeTable.requestFocus();
-        }
-    }
-
-     /** {@inheritDoc} */
-    @Override public void commitEdit(T newValue) {
-        if (! isEditing()) return;
-        final TreeItem<T> treeItem = getTreeItem();
-        final TreeTableView<T> treeTable = getTreeTableView();
-        if (treeTable != null) {
-            // Inform the TreeView of the edit being ready to be committed.
-            treeTable.fireEvent(new TreeTableView.EditEvent<T>(treeTable,
-                    TreeTableView.<T>editCommitEvent(),
-                    treeItem,
-                    getItem(),
-                    newValue));
-        }
-        
-        // update the item within this cell, so that it represents the new value
-        if (treeItem != null) {
-            treeItem.setValue(newValue);
-            updateTreeItem(treeItem);
-            updateItem(newValue, false);
-        }
-        
-        // inform parent classes of the commit, so that they can switch us
-        // out of the editing state
-        super.commitEdit(newValue);
-
-        if (treeTable != null) {
-            // reset the editing item in the TreetView
-            treeTable.edit(-1, null);
-            treeTable.requestFocus();
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void cancelEdit() {
-        if (! isEditing()) return;
-        
-        TreeTableView<T> treeTable = getTreeTableView();
-        if (treeTable != null) {
-            treeTable.fireEvent(new TreeTableView.EditEvent<T>(treeTable,
-                    TreeTableView.<T>editCancelEvent(),
-                    getTreeItem(),
-                    getItem(),
-                    null));
-        }
-
-        super.cancelEdit();
-
-        if (treeTable != null) {
-            // reset the editing index on the TreeView
-            treeTable.edit(-1, null);
-            treeTable.requestFocus();
-        }
-    }
-
-
-
-    /***************************************************************************
-     *                                                                         *
-     * Private Implementation                                                  *
-     *                                                                         *
-     **************************************************************************/
-    
-    private int index = -1;
-    private boolean isFirstRun = true;
-
-    private void updateItem() {
-        TreeTableView<T> tv = getTreeTableView();
-        if (tv == null) return;
-        
-        // Compute whether the index for this cell is for a real item
-        boolean valid = index >=0 && index < tv.getExpandedItemCount();
-
-        final TreeItem<T> oldTreeItem = getTreeItem();
-        final boolean isEmpty = isEmpty();
-
-        // Cause the cell to update itself
-        if (valid) {
-            // update the TreeCell state.
-            // get the new treeItem that is about to go in to the TreeCell
-            final TreeItem<T> newTreeItem = tv.getTreeItem(index);
-            final T newValue = newTreeItem == null ? null : newTreeItem.getValue();
-            
-            // For the sake of RT-14279, it is important that the order of these
-            // method calls is as shown below. If the order is switched, it is
-            // likely that events will be fired where the item is null, even
-            // though calling cell.getTreeItem().getValue() returns the value
-            // as expected
-
-            // There used to be conditional code here to prevent updateItem from
-            // being called when the value didn't change, but that led us to
-            // issues such as RT-33108, where the value didn't change but the item
-            // we needed to be listening to did. Without calling updateItem we
-            // were breaking things, so once again the conditionals are gone.
-            updateTreeItem(newTreeItem);
-            updateItem(newValue, false);
-        } else {
-            // RT-30484 We need to allow a first run to be special-cased to allow
-            // for the updateItem method to be called at least once to allow for
-            // the correct visual state to be set up. In particular, in RT-30484
-            // refer to Ensemble8PopUpTree.png - in this case the arrows are being
-            // shown as the new cells are instantiated with the arrows in the
-            // children list, and are only hidden in updateItem.
-            if ((!isEmpty && oldTreeItem != null) || isFirstRun) {
-                updateTreeItem(null);
-                updateItem(null, true);
-                isFirstRun = false;
-            }
-        }
-    }
-
-    private void updateSelection() {
-        if (isEmpty()) return;
-        if (index == -1 || getTreeTableView() == null) return;
-        if (getTreeTableView().getSelectionModel() == null) return;
-        
-        boolean isSelected = getTreeTableView().getSelectionModel().isSelected(index);
-        if (isSelected() == isSelected) return;
-        
-        updateSelected(isSelected);
-    }
-
-    private void updateFocus() {
-        if (getIndex() == -1 || getTreeTableView() == null) return;
-        if (getTreeTableView().getFocusModel() == null) return;
-        
-        setFocused(getTreeTableView().getFocusModel().isFocused(getIndex()));
-    }
-
-    private void updateEditing() {
-        if (getIndex() == -1 || getTreeTableView() == null || getTreeItem() == null) return;
-
-        final TreeTablePosition<T,?> editingCell = getTreeTableView().getEditingCell();
-        if (editingCell != null && editingCell.getTableColumn() != null) {
-            return;
-        }
-
-        final TreeItem<T> editItem = editingCell == null ? null : editingCell.getTreeItem();
-        if (! isEditing() && getTreeItem().equals(editItem)) {
-            startEdit();
-        } else if (isEditing() && ! getTreeItem().equals(editItem)) {
-            cancelEdit();
-        }
-    }
-
-
-
-    /***************************************************************************
-     *                                                                         *
-     * Expert API                                                              *
-     *                                                                         *
-     **************************************************************************/
-
-    /**
-     * Updates the TreeTableView associated with this TreeTableCell.
-     * 
-     * @param treeTable The new TreeTableView that should be associated with this
-     *         TreeTableCell.
-     * @expert This function is intended to be used by experts, primarily
-     *         by those implementing new Skins. It is not common
-     *         for developers or designers to access this function directly.
-     */
-    public final void updateTreeTableView(TreeTableView<T> treeTable) {
-        setTreeTableView(treeTable); 
-    }
-
-    /**
-     * Updates the TreeItem associated with this TreeTableCell.
-     *
-     * @param treeItem The new TreeItem that should be associated with this 
-     *      TreeTableCell.
-     * @expert This function is intended to be used by experts, primarily
-     *      by those implementing new Skins. It is not common
-     *      for developers or designers to access this function directly.
-     */
-    public final void updateTreeItem(TreeItem<T> treeItem) {
-        TreeItem<T> _treeItem = getTreeItem();
-        if (_treeItem != null) {
-            _treeItem.leafProperty().removeListener(weakLeafListener);
-        }
-        setTreeItem(treeItem);
-        if (treeItem != null) {
-            treeItem.leafProperty().addListener(weakLeafListener);
-        }
-    }
-
-
-    
-    /***************************************************************************
-     *                                                                         *
-     * Stylesheet Handling                                                     *
-     *                                                                         *
-     **************************************************************************/
-
-    private static final String DEFAULT_STYLE_CLASS = "tree-table-row-cell";
-
-    private static final PseudoClass EXPANDED_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass("expanded");
-    private static final PseudoClass COLLAPSED_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass("collapsed");
-    
-    /** {@inheritDoc} */
-    @Override protected Skin<?> createDefaultSkin() {
-        return new TreeTableRowSkin<T>(this);
-    }
-
-
-    /***************************************************************************
-     *                                                                         *
-     * Accessibility handling                                                  *
-     *                                                                         *
-     **************************************************************************/
-
-    /** @treatAsPrivate */
-    @Override public Object accGetAttribute(Attribute attribute, Object... parameters) {
-        final TreeItem<T> treeItem = getTreeItem();
-        final TreeTableView<T> treeTableView = getTreeTableView();
-        final List<TreeTableColumn<T,?>> visibleColumns = treeTableView.getVisibleLeafColumns();
-
-        TreeTableColumn<T,?> treeColumn = treeTableView.getTreeColumn();
-        treeColumn = treeColumn != null ? treeColumn :
-                    !visibleColumns.isEmpty() ? visibleColumns.get(0) :
-                    null;
-
-        switch (attribute) {
-            case ROLE: return Role.TREE_TABLE_ITEM;
-            case TREE_ITEM_PARENT: {
-                if (treeItem == null) return null;
-                TreeItem<T> parent = treeItem.getParent();
-                if (parent == null) return null;
-                int parentIndex = treeTableView.getRow(parent);
-                return treeTableView.accGetAttribute(Attribute.ROW_AT_INDEX, parentIndex);
-            }
-            case TREE_ITEM_COUNT: {
-                return treeItem == null  ? 0 : treeItem.getChildren().size();
-            }
-            case TREE_ITEM_AT_INDEX:
-                if (treeItem == null) return null;
-                int index = (Integer)parameters[0];
-                if (index >= treeItem.getChildren().size()) return null;
-                TreeItem<T> child = treeItem.getChildren().get(index);
-                if (child == null) return null;
-                int childIndex = treeTableView.getRow(child);
-                return treeTableView.accGetAttribute(Attribute.ROW_AT_INDEX, childIndex);
-            case TITLE: {
-                if (treeItem == null) return "";
-                return treeColumn.getCellData(treeItem);
-            }
-            case ROW_INDEX: return getIndex();
-            case COLUMN_INDEX: return visibleColumns.indexOf(treeColumn);
-            case LEAF: return treeItem == null ? true : treeItem.isLeaf();
-            case EXPANDED: return treeItem == null ? false : treeItem.isExpanded();
-            case INDEX: return getIndex();
-            case SELECTED: return isSelected();
-            case DISCLOSURE_LEVEL: {
-                return treeTableView == null ? 0 : treeTableView.getTreeItemLevel(treeItem);
-            }
-            default: return super.accGetAttribute(attribute, parameters);
-        }
-    }
-
-    /** @treatAsPrivate */
-    @Override public void accExecuteAction(Action action, Object... parameters) {
-        final TreeTableView<T> treeTableView = getTreeTableView();
-        final TreeItem<T> treeItem = getTreeItem();
-        final TreeTableView.TreeTableViewSelectionModel<T> sm = treeTableView == null ? null : treeTableView.getSelectionModel();
-
-        switch (action) {
-            case EXPAND: {
-                if (treeItem != null) treeItem.setExpanded(true);
-                break;
-            }
-            case COLLAPSE: {
-                if (treeItem != null) treeItem.setExpanded(false);
-                break;
-            }
-            case SELECT: {
-                if (sm != null) sm.clearAndSelect(getIndex());
-                break;
-            }
-            case ADD_TO_SELECTION: {
-                if (sm != null) sm.select(getIndex());
-                break;
-            }
-            case REMOVE_FROM_SELECTION: {
-                if (sm != null) sm.clearSelection(getIndex());
-                break;
-            }
-            default: super.accExecuteAction(action);
-        }
-    }
-}
+/*
+ * Copyright (c) 2012, 2013, 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 javafx.scene.control;
+
+import javafx.css.PseudoClass;
+import com.sun.javafx.scene.control.skin.TreeTableRowSkin;
+import java.lang.ref.WeakReference;
+import java.util.List;
+
+import javafx.beans.InvalidationListener;
+import javafx.beans.Observable;
+import javafx.beans.WeakInvalidationListener;
+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.collections.ListChangeListener;
+import javafx.collections.WeakListChangeListener;
+import javafx.scene.Node;
+import javafx.scene.accessibility.Action;
+import javafx.scene.accessibility.Attribute;
+import javafx.scene.accessibility.Role;
+import javafx.scene.control.TreeTableView.TreeTableViewFocusModel;
+import javafx.scene.control.TreeTableView.TreeTableViewSelectionModel;
+
+/**
+ * <p>TreeTableRow is an {@link javafx.scene.control.IndexedCell IndexedCell}, but
+ * rarely needs to be used by developers creating TreeTableView instances. The only
+ * time TreeTableRow is likely to be encountered at all by a developer is if they
+ * wish to create a custom {@link TreeTableView#rowFactoryProperty() rowFactory} 
+ * that replaces an entire row of a TreeTableView.</p>
+ *
+ * <p>More often than not, it is actually easier for a developer to customize
+ * individual cells in a row, rather than the whole row itself. To do this,
+ * you can specify a custom {@link TreeTableColumn#cellFactoryProperty() cellFactory} 
+ * on each TreeTableColumn instance.</p>
+ *
+ * @see TreeTableView
+ * @see TreeTableColumn
+ * @see TreeTableCell
+ * @see IndexedCell
+ * @see Cell
+ * @param <T> The type of the item contained within the Cell.
+ * @since JavaFX 8.0
+ */
+public class TreeTableRow<T> extends IndexedCell<T> {
+    
+    
+    /***************************************************************************
+     *                                                                         *
+     * Constructors                                                            *
+     *                                                                         *
+     **************************************************************************/
+
+    /**
+     * Creates a default TreeTableRow instance.
+     */
+    public TreeTableRow() {
+        getStyleClass().addAll(DEFAULT_STYLE_CLASS);
+    }
+
+
+
+    /***************************************************************************
+     *                                                                         *
+     * Callbacks and events                                                    *
+     *                                                                         *
+     **************************************************************************/
+    
+    private final ListChangeListener<Integer> selectedListener = c -> {
+        updateSelection();
+    };
+
+    private final InvalidationListener focusedListener = valueModel -> {
+        updateFocus();
+    };
+
+    private final InvalidationListener editingListener = valueModel -> {
+        updateEditing();
+    };
+    
+    private final InvalidationListener leafListener = new InvalidationListener() {
+        @Override public void invalidated(Observable valueModel) {
+            // necessary to update the disclosure node in the skin when the
+            // leaf property changes
+            TreeItem<T> treeItem = getTreeItem();
+            if (treeItem != null) {
+                requestLayout();
+            }
+        }
+    };
+    
+    private final InvalidationListener treeItemExpandedInvalidationListener = o -> {
+        final boolean expanded = ((BooleanProperty)o).get();
+        pseudoClassStateChanged(EXPANDED_PSEUDOCLASS_STATE,   expanded);
+        pseudoClassStateChanged(COLLAPSED_PSEUDOCLASS_STATE, !expanded);
+    };
+    
+    private final WeakListChangeListener<Integer> weakSelectedListener = 
+            new WeakListChangeListener<Integer>(selectedListener);
+    private final WeakInvalidationListener weakFocusedListener = 
+            new WeakInvalidationListener(focusedListener);
+    private final WeakInvalidationListener weakEditingListener = 
+            new WeakInvalidationListener(editingListener);
+    private final WeakInvalidationListener weakLeafListener = 
+            new WeakInvalidationListener(leafListener);
+    private final WeakInvalidationListener weakTreeItemExpandedInvalidationListener = 
+            new WeakInvalidationListener(treeItemExpandedInvalidationListener);
+    
+    
+    
+    /***************************************************************************
+     *                                                                         *
+     * Properties                                                              *
+     *                                                                         *
+     **************************************************************************/
+    
+    // --- TreeItem
+    private ReadOnlyObjectWrapper<TreeItem<T>> treeItem = 
+        new ReadOnlyObjectWrapper<TreeItem<T>>(this, "treeItem") {
+            
+            TreeItem<T> oldValue = null;
+            
+            @Override protected void invalidated() {
+                if (oldValue != null) {
+                    oldValue.expandedProperty().removeListener(weakTreeItemExpandedInvalidationListener);
+                }
+                
+                oldValue = get(); 
+                
+                if (oldValue != null) {
+                    oldValue.expandedProperty().addListener(weakTreeItemExpandedInvalidationListener);
+                    // fake an invalidation to ensure updated pseudo-class state
+                    weakTreeItemExpandedInvalidationListener.invalidated(oldValue.expandedProperty());            
+                }
+            }
+    };
+    private void setTreeItem(TreeItem<T> value) {
+        treeItem.set(value); 
+    }
+    
+    /**
+     * Returns the TreeItem currently set in this TreeCell.
+     */
+    public final TreeItem<T> getTreeItem() { return treeItem.get(); }
+    
+    /**
+     * Each TreeTableCell represents at most a single {@link TreeItem}, which is
+     * represented by this property.
+     */
+    public final ReadOnlyObjectProperty<TreeItem<T>> treeItemProperty() { return treeItem.getReadOnlyProperty(); }
+
+    
+    
+    // --- Disclosure Node
+    private ObjectProperty<Node> disclosureNode = new SimpleObjectProperty<Node>(this, "disclosureNode");
+
+    /**
+     * The node to use as the "disclosure" triangle, or toggle, used for
+     * expanding and collapsing items. This is only used in the case of
+     * an item in the tree which contains child items. If not specified, the
+     * TreeTableCell's Skin implementation is responsible for providing a default
+     * disclosure node.
+     */
+    public final void setDisclosureNode(Node value) { disclosureNodeProperty().set(value); }
+    
+    /**
+     * Returns the current disclosure node set in this TreeTableCell.
+     */
+    public final Node getDisclosureNode() { return disclosureNode.get(); }
+    
+    /**
+     * The disclosure node is commonly seen represented as a triangle that rotates
+     * on screen to indicate whether or not the TreeItem that it is placed
+     * beside is expanded or collapsed.
+     */
+    public final ObjectProperty<Node> disclosureNodeProperty() { return disclosureNode; }
+    
+    
+    // --- TreeView
+    private ReadOnlyObjectWrapper<TreeTableView<T>> treeTableView = new ReadOnlyObjectWrapper<TreeTableView<T>>(this, "treeTableView") {
+        private WeakReference<TreeTableView<T>> weakTreeTableViewRef;
+        @Override protected void invalidated() {
+            TreeTableViewSelectionModel<T> sm;
+            TreeTableViewFocusModel<T> fm;
+            
+            if (weakTreeTableViewRef != null) {
+                TreeTableView<T> oldTreeTableView = weakTreeTableViewRef.get();
+                if (oldTreeTableView != null) {
+                    // remove old listeners
+                    sm = oldTreeTableView.getSelectionModel();
+                    if (sm != null) {
+                        sm.getSelectedIndices().removeListener(weakSelectedListener);
+                    }
+
+                    fm = oldTreeTableView.getFocusModel();
+                    if (fm != null) {
+                        fm.focusedIndexProperty().removeListener(weakFocusedListener);
+                    }
+
+                    oldTreeTableView.editingCellProperty().removeListener(weakEditingListener);
+                }
+                
+                weakTreeTableViewRef = null;
+            }
+
+            if (get() != null) {
+                sm = get().getSelectionModel();
+                if (sm != null) {
+                    // listening for changes to treeView.selectedIndex and IndexedCell.index,
+                    // to determine if this cell is selected
+                    sm.getSelectedIndices().addListener(weakSelectedListener);
+                }
+
+                fm = get().getFocusModel();
+                if (fm != null) {
+                    // similar to above, but this time for focus
+                    fm.focusedIndexProperty().addListener(weakFocusedListener);
+                }
+
+                get().editingCellProperty().addListener(weakEditingListener);
+                
+                weakTreeTableViewRef = new WeakReference<TreeTableView<T>>(get());
+            }
+
+            updateItem();
+            requestLayout();
+        }
+    };
+    
+    private void setTreeTableView(TreeTableView<T> value) { treeTableView.set(value); }
+
+    /**
+     * Returns the TreeTableView associated with this TreeTableCell.
+     */
+    public final TreeTableView<T> getTreeTableView() { return treeTableView.get(); }
+    
+    /**
+     * A TreeTableCell is explicitly linked to a single {@link TreeTableView} instance,
+     * which is represented by this property.
+     */
+    public final ReadOnlyObjectProperty<TreeTableView<T>> treeTableViewProperty() { return treeTableView.getReadOnlyProperty(); }
+
+
+
+
+    /***************************************************************************
+     *                                                                         *
+     * Public API                                                              *
+     *                                                                         *
+     *************************************************************************
+     * @param oldIndex
+     * @param newIndex*/
+
+    
+    @Override void indexChanged(int oldIndex, int newIndex) {
+        index = getIndex();
+
+        // when the cell index changes, this may result in the cell
+        // changing state to be selected and/or focused.
+        updateItem();
+        updateSelection();
+        updateFocus();
+//        oldIndex = index;
+    }
+    
+
+    /** {@inheritDoc} */
+    @Override public void startEdit() {
+        final TreeTableView<T> treeTable = getTreeTableView();
+        if (! isEditable() || (treeTable != null && ! treeTable.isEditable())) {
+            return;
+        }
+        
+        // it makes sense to get the cell into its editing state before firing
+        // the event to the TreeView below, so that's what we're doing here
+        // by calling super.startEdit().
+        super.startEdit();
+        
+         // Inform the TreeView of the edit starting.
+        if (treeTable != null) {
+            treeTable.fireEvent(new TreeTableView.EditEvent<T>(treeTable,
+                    TreeTableView.<T>editStartEvent(),
+                    getTreeItem(),
+                    getItem(),
+                    null));
+            
+            treeTable.requestFocus();
+        }
+    }
+
+     /** {@inheritDoc} */
+    @Override public void commitEdit(T newValue) {
+        if (! isEditing()) return;
+        final TreeItem<T> treeItem = getTreeItem();
+        final TreeTableView<T> treeTable = getTreeTableView();
+        if (treeTable != null) {
+            // Inform the TreeView of the edit being ready to be committed.
+            treeTable.fireEvent(new TreeTableView.EditEvent<T>(treeTable,
+                    TreeTableView.<T>editCommitEvent(),
+                    treeItem,
+                    getItem(),
+                    newValue));
+        }
+        
+        // update the item within this cell, so that it represents the new value
+        if (treeItem != null) {
+            treeItem.setValue(newValue);
+            updateTreeItem(treeItem);
+            updateItem(newValue, false);
+        }
+        
+        // inform parent classes of the commit, so that they can switch us
+        // out of the editing state
+        super.commitEdit(newValue);
+
+        if (treeTable != null) {
+            // reset the editing item in the TreetView
+            treeTable.edit(-1, null);
+            treeTable.requestFocus();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public void cancelEdit() {
+        if (! isEditing()) return;
+        
+        TreeTableView<T> treeTable = getTreeTableView();
+        if (treeTable != null) {
+            treeTable.fireEvent(new TreeTableView.EditEvent<T>(treeTable,
+                    TreeTableView.<T>editCancelEvent(),
+                    getTreeItem(),
+                    getItem(),
+                    null));
+        }
+
+        super.cancelEdit();
+
+        if (treeTable != null) {
+            // reset the editing index on the TreeView
+            treeTable.edit(-1, null);
+            treeTable.requestFocus();
+        }
+    }
+
+
+
+    /***************************************************************************
+     *                                                                         *
+     * Private Implementation                                                  *
+     *                                                                         *
+     **************************************************************************/
+    
+    private int index = -1;
+    private boolean isFirstRun = true;
+
+    private void updateItem() {
+        TreeTableView<T> tv = getTreeTableView();
+        if (tv == null) return;
+        
+        // Compute whether the index for this cell is for a real item
+        boolean valid = index >=0 && index < tv.getExpandedItemCount();
+
+        final TreeItem<T> oldTreeItem = getTreeItem();
+        final boolean isEmpty = isEmpty();
+
+        // Cause the cell to update itself
+        if (valid) {
+            // update the TreeCell state.
+            // get the new treeItem that is about to go in to the TreeCell
+            final TreeItem<T> newTreeItem = tv.getTreeItem(index);
+            final T newValue = newTreeItem == null ? null : newTreeItem.getValue();
+            
+            // For the sake of RT-14279, it is important that the order of these
+            // method calls is as shown below. If the order is switched, it is
+            // likely that events will be fired where the item is null, even
+            // though calling cell.getTreeItem().getValue() returns the value
+            // as expected
+
+            // There used to be conditional code here to prevent updateItem from
+            // being called when the value didn't change, but that led us to
+            // issues such as RT-33108, where the value didn't change but the item
+            // we needed to be listening to did. Without calling updateItem we
+            // were breaking things, so once again the conditionals are gone.
+            updateTreeItem(newTreeItem);
+            updateItem(newValue, false);
+        } else {
+            // RT-30484 We need to allow a first run to be special-cased to allow
+            // for the updateItem method to be called at least once to allow for
+            // the correct visual state to be set up. In particular, in RT-30484
+            // refer to Ensemble8PopUpTree.png - in this case the arrows are being
+            // shown as the new cells are instantiated with the arrows in the
+            // children list, and are only hidden in updateItem.
+            if ((!isEmpty && oldTreeItem != null) || isFirstRun) {
+                updateTreeItem(null);
+                updateItem(null, true);
+                isFirstRun = false;
+            }
+        }
+    }
+
+    private void updateSelection() {
+        if (isEmpty()) return;
+        if (index == -1 || getTreeTableView() == null) return;
+        if (getTreeTableView().getSelectionModel() == null) return;
+        
+        boolean isSelected = getTreeTableView().getSelectionModel().isSelected(index);
+        if (isSelected() == isSelected) return;
+        
+        updateSelected(isSelected);
+    }
+
+    private void updateFocus() {
+        if (getIndex() == -1 || getTreeTableView() == null) return;
+        if (getTreeTableView().getFocusModel() == null) return;
+        
+        setFocused(getTreeTableView().getFocusModel().isFocused(getIndex()));
+    }
+
+    private void updateEditing() {
+        if (getIndex() == -1 || getTreeTableView() == null || getTreeItem() == null) return;
+
+        final TreeTablePosition<T,?> editingCell = getTreeTableView().getEditingCell();
+        if (editingCell != null && editingCell.getTableColumn() != null) {
+            return;
+        }
+
+        final TreeItem<T> editItem = editingCell == null ? null : editingCell.getTreeItem();
+        if (! isEditing() && getTreeItem().equals(editItem)) {
+            startEdit();
+        } else if (isEditing() && ! getTreeItem().equals(editItem)) {
+            cancelEdit();
+        }
+    }
+
+
+
+    /***************************************************************************
+     *                                                                         *
+     * Expert API                                                              *
+     *                                                                         *
+     **************************************************************************/
+
+    /**
+     * Updates the TreeTableView associated with this TreeTableCell.
+     * 
+     * @param treeTable The new TreeTableView that should be associated with this
+     *         TreeTableCell.
+     * @expert This function is intended to be used by experts, primarily
+     *         by those implementing new Skins. It is not common
+     *         for developers or designers to access this function directly.
+     */
+    public final void updateTreeTableView(TreeTableView<T> treeTable) {
+        setTreeTableView(treeTable); 
+    }
+
+    /**
+     * Updates the TreeItem associated with this TreeTableCell.
+     *
+     * @param treeItem The new TreeItem that should be associated with this 
+     *      TreeTableCell.
+     * @expert This function is intended to be used by experts, primarily
+     *      by those implementing new Skins. It is not common
+     *      for developers or designers to access this function directly.
+     */
+    public final void updateTreeItem(TreeItem<T> treeItem) {
+        TreeItem<T> _treeItem = getTreeItem();
+        if (_treeItem != null) {
+            _treeItem.leafProperty().removeListener(weakLeafListener);
+        }
+        setTreeItem(treeItem);
+        if (treeItem != null) {
+            treeItem.leafProperty().addListener(weakLeafListener);
+        }
+    }
+
+
+    
+    /***************************************************************************
+     *                                                                         *
+     * Stylesheet Handling                                                     *
+     *                                                                         *
+     **************************************************************************/
+
+    private static final String DEFAULT_STYLE_CLASS = "tree-table-row-cell";
+
+    private static final PseudoClass EXPANDED_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass("expanded");
+    private static final PseudoClass COLLAPSED_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass("collapsed");
+    
+    /** {@inheritDoc} */
+    @Override protected Skin<?> createDefaultSkin() {
+        return new TreeTableRowSkin<T>(this);
+    }
+
+
+    /***************************************************************************
+     *                                                                         *
+     * Accessibility handling                                                  *
+     *                                                                         *
+     **************************************************************************/
+
+    /** @treatAsPrivate */
+    @Override public Object accGetAttribute(Attribute attribute, Object... parameters) {
+        final TreeItem<T> treeItem = getTreeItem();
+        final TreeTableView<T> treeTableView = getTreeTableView();
+        final List<TreeTableColumn<T,?>> visibleColumns = treeTableView.getVisibleLeafColumns();
+
+        TreeTableColumn<T,?> treeColumn = treeTableView.getTreeColumn();
+        treeColumn = treeColumn != null ? treeColumn :
+                    !visibleColumns.isEmpty() ? visibleColumns.get(0) :
+                    null;
+
+        switch (attribute) {
+            case ROLE: return Role.TREE_TABLE_ITEM;
+            case TREE_ITEM_PARENT: {
+                if (treeItem == null) return null;
+                TreeItem<T> parent = treeItem.getParent();
+                if (parent == null) return null;
+                int parentIndex = treeTableView.getRow(parent);
+                return treeTableView.accGetAttribute(Attribute.ROW_AT_INDEX, parentIndex);
+            }
+            case TREE_ITEM_COUNT: {
+                return treeItem == null  ? 0 : treeItem.getChildren().size();
+            }
+            case TREE_ITEM_AT_INDEX:
+                if (treeItem == null) return null;
+                int index = (Integer)parameters[0];
+                if (index >= treeItem.getChildren().size()) return null;
+                TreeItem<T> child = treeItem.getChildren().get(index);
+                if (child == null) return null;
+                int childIndex = treeTableView.getRow(child);
+                return treeTableView.accGetAttribute(Attribute.ROW_AT_INDEX, childIndex);
+            case TITLE: {
+                if (treeItem == null) return "";
+                return treeColumn.getCellData(treeItem);
+            }
+            case ROW_INDEX: return getIndex();
+            case COLUMN_INDEX: return visibleColumns.indexOf(treeColumn);
+            case LEAF: return treeItem == null ? true : treeItem.isLeaf();
+            case EXPANDED: return treeItem == null ? false : treeItem.isExpanded();
+            case INDEX: return getIndex();
+            case SELECTED: return isSelected();
+            case DISCLOSURE_LEVEL: {
+                return treeTableView == null ? 0 : treeTableView.getTreeItemLevel(treeItem);
+            }
+            default: return super.accGetAttribute(attribute, parameters);
+        }
+    }
+
+    /** @treatAsPrivate */
+    @Override public void accExecuteAction(Action action, Object... parameters) {
+        final TreeTableView<T> treeTableView = getTreeTableView();
+        final TreeItem<T> treeItem = getTreeItem();
+        final TreeTableView.TreeTableViewSelectionModel<T> sm = treeTableView == null ? null : treeTableView.getSelectionModel();
+
+        switch (action) {
+            case EXPAND: {
+                if (treeItem != null) treeItem.setExpanded(true);
+                break;
+            }
+            case COLLAPSE: {
+                if (treeItem != null) treeItem.setExpanded(false);
+                break;
+            }
+            case SELECT: {
+                if (sm != null) sm.clearAndSelect(getIndex());
+                break;
+            }
+            case ADD_TO_SELECTION: {
+                if (sm != null) sm.select(getIndex());
+                break;
+            }
+            case REMOVE_FROM_SELECTION: {
+                if (sm != null) sm.clearSelection(getIndex());
+                break;
+            }
+            default: super.accExecuteAction(action);
+        }
+    }
+}
--- a/modules/controls/src/main/java/javafx/scene/control/TreeTableView.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeTableView.java	Fri Apr 25 12:05:53 2014 +1200
@@ -53,7 +53,6 @@
 import javafx.application.Platform;
 import javafx.beans.DefaultProperty;
 import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.beans.WeakInvalidationListener;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.ObjectProperty;
@@ -65,7 +64,6 @@
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.beans.value.WeakChangeListener;
 import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener;
@@ -79,7 +77,6 @@
 import javafx.scene.accessibility.Action;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
-import javafx.scene.layout.GridPane;
 import javafx.scene.layout.Region;
 import javafx.util.Callback;
 
@@ -420,7 +417,7 @@
         return (EventType<TreeTableView.EditEvent<S>>) EDIT_ANY_EVENT;
     }
     private static final EventType<?> EDIT_ANY_EVENT =
-            new EventType(Event.ANY, "TREE_TABLE_VIEW_EDIT");
+            new EventType<>(Event.ANY, "TREE_TABLE_VIEW_EDIT");
 
     /**
      * An EventType used to indicate that an edit event has started within the
@@ -433,7 +430,7 @@
         return (EventType<TreeTableView.EditEvent<S>>) EDIT_START_EVENT;
     }
     private static final EventType<?> EDIT_START_EVENT =
-            new EventType(editAnyEvent(), "EDIT_START");
+            new EventType<>(editAnyEvent(), "EDIT_START");
 
     /**
      * An EventType used to indicate that an edit event has just been canceled
@@ -447,7 +444,7 @@
         return (EventType<TreeTableView.EditEvent<S>>) EDIT_CANCEL_EVENT;
     }
     private static final EventType<?> EDIT_CANCEL_EVENT =
-            new EventType(editAnyEvent(), "EDIT_CANCEL");
+            new EventType<>(editAnyEvent(), "EDIT_CANCEL");
 
     /**
      * An EventType that is used to indicate that an edit in a TreeTableView has been
@@ -462,7 +459,7 @@
         return (EventType<TreeTableView.EditEvent<S>>) EDIT_COMMIT_EVENT;
     }
     private static final EventType<?> EDIT_COMMIT_EVENT =
-            new EventType(editAnyEvent(), "EDIT_COMMIT");
+            new EventType<>(editAnyEvent(), "EDIT_COMMIT");
 
     /**
      * Returns the number of levels of 'indentation' of the given TreeItem, 
@@ -2479,7 +2476,7 @@
             // fire off a single add/remove/replace notification (rather than
             // individual remove and add notifications) - see RT-33324
             int changeIndex = selectedCellsSeq.indexOf(new TreeTablePosition<>(getTreeTableView(), row, (TreeTableColumn<S,?>)column));
-            ListChangeListener.Change change = new NonIterableChange.GenericAddRemoveChange<TreeTablePosition<S,?>>(
+            ListChangeListener.Change<TreeTablePosition<S,?>> change = new NonIterableChange.GenericAddRemoveChange<>(
                     changeIndex, changeIndex+1, previousSelection, selectedCellsSeq);
             handleSelectedCellsListChangeEvent(change);
         }
--- a/modules/controls/src/main/java/javafx/scene/control/TreeUtil.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeUtil.java	Fri Apr 25 12:05:53 2014 +1200
@@ -68,7 +68,7 @@
         
         int idx = itemIndex - 1;
 
-        TreeItem child;
+        TreeItem<T> child;
         for (int i = 0, max = children.size(); i < max; i++) {
             child = children.get(i);
             if (idx == 0) return child;
--- a/modules/controls/src/main/java/javafx/scene/control/TreeView.java	Fri Apr 25 16:44:09 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeView.java	Fri Apr 25 12:05:53 2014 +1200
@@ -41,7 +41,6 @@
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.beans.value.WeakChangeListener;
 import javafx.css.CssMetaData;
 import javafx.css.Styleable;
@@ -1114,7 +1113,7 @@
         switch (attribute) {
             case ROLE: return Role.TREE_VIEW;
             case MULTIPLE_SELECTION: {
-                MultipleSelectionModel sm = getSelectionModel();
+                MultipleSelectionModel<TreeItem<T>> sm = getSelectionModel();
                 return sm != null && sm.getSelectionMode() == SelectionMode.MULTIPLE;
             }
             case ROW_COUNT: return getExpandedItemCount();