changeset 9244:5023330f0526

8077916: Complete development work for project one: make UI control skins public API 8077918: Complete development work for project two: review and make public relevant CSS API Contributed-by: jgiles, leifs Reviewed-by: kcr
author jgiles
date Thu, 10 Sep 2015 11:21:20 +1200
parents 163e4cd3d757
children 51fa62819979
files apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/control/PopoverTreeList.java apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/control/ScrollPaneSkin3.java apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/control/SearchBox.java apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/CatalogPage.java apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/SocialPage.java apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/SpeakersPage.java apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/TimelinePage.java apps/experiments/DukePad/modules/calculator/src/main/java/com/javafx/experiments/dukepad/calculator/CalculatorTheme.java apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/AppPlatform.java apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/DocumentWindowController.java apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/SceneBuilderTest.java apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/about/AboutWindowController.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/TabPaneDesignInfoX.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/TableViewDesignInfoX.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/TreeTableViewDesignInfoX.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssContentMaker.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssPanelController.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssUtils.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssValueConverter.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/NodeCssState.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/treeview/HierarchyTreeCell.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StyleEditor.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/report/CSSParsingReport.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMBuilderFactory.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMImageBuilder.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMLoader.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/CssInternal.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java apps/toys/Hello/src/main/java/hello/HelloButton.java apps/toys/Hello/src/main/java/hello/HelloHighContrast.java apps/toys/Hello/src/main/java/hello/HelloToggleButton.java apps/toys/Hello/src/main/java/hello/dialog/dialogs/CommandLinksDialog.java apps/toys/Hello/src/main/java/hello/dialog/dialogs/ExceptionDialog.java apps/toys/Hello/src/main/java/hello/dialog/dialogs/FontSelectorDialog.java apps/toys/Hello/src/main/java/hello/dialog/wizard/Wizard.java modules/controls/src/android/java/com/sun/javafx/scene/control/skin/TextAreaSkinAndroid.java modules/controls/src/android/java/com/sun/javafx/scene/control/skin/TextFieldSkinAndroid.java modules/controls/src/main/java/com/sun/javafx/scene/control/ContextMenuContent.java modules/controls/src/main/java/com/sun/javafx/scene/control/CustomColorDialog.java modules/controls/src/main/java/com/sun/javafx/scene/control/DatePickerContent.java modules/controls/src/main/java/com/sun/javafx/scene/control/DatePickerHijrahContent.java modules/controls/src/main/java/com/sun/javafx/scene/control/DoubleField.java modules/controls/src/main/java/com/sun/javafx/scene/control/EmbeddedTextContextMenuContent.java modules/controls/src/main/java/com/sun/javafx/scene/control/FakeFocusTextField.java modules/controls/src/main/java/com/sun/javafx/scene/control/InputField.java modules/controls/src/main/java/com/sun/javafx/scene/control/IntegerField.java modules/controls/src/main/java/com/sun/javafx/scene/control/LabeledImpl.java modules/controls/src/main/java/com/sun/javafx/scene/control/LabeledText.java modules/controls/src/main/java/com/sun/javafx/scene/control/LambdaMultiplePropertyChangeListenerHandler.java modules/controls/src/main/java/com/sun/javafx/scene/control/MenuBarButton.java modules/controls/src/main/java/com/sun/javafx/scene/control/MultiplePropertyChangeListenerHandler.java modules/controls/src/main/java/com/sun/javafx/scene/control/Properties.java modules/controls/src/main/java/com/sun/javafx/scene/control/VirtualScrollBar.java modules/controls/src/main/java/com/sun/javafx/scene/control/WebColorField.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/AccordionBehavior.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/ButtonBehavior.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/ChoiceBoxBehavior.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/ComboBoxListViewBehavior.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/FocusTraversalInputMap.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/KeyBinding.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/MenuButtonBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/MenuButtonBehaviorBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/OptionalBoolean.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/OrientedKeyBinding.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/PaginationBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/PasswordFieldBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ScrollBarBehavior.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/SliderBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/SpinnerBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/SplitMenuButtonBehavior.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/TableCellBehavior.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/TableRowBehavior.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/TableViewBehaviorBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextAreaBehavior.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/TextInputControlBindings.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/ToggleButtonBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ToolBarBehavior.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/TreeTableRowBehavior.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/TwoLevelFocusListBehavior.java modules/controls/src/main/java/com/sun/javafx/scene/control/inputmap/InputMap.java modules/controls/src/main/java/com/sun/javafx/scene/control/inputmap/KeyBinding.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/AccordionSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/BehaviorSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ButtonBarSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ButtonSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CellSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CheckBoxSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ChoiceBoxSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPalette.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPickerSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxBaseSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxMode.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxPopupControl.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CustomColorDialog.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DateCellSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DatePickerContent.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DatePickerHijrahContent.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DatePickerSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DoubleField.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DoubleFieldSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/EmbeddedTextContextMenuContent.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/FXVK.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/FXVKSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/HyperlinkSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/InputField.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/InputFieldSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/IntegerField.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/IntegerFieldSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabelSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledImpl.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledText.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ListCellSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ListViewSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuBarSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuButtonSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuButtonSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/NestedTableColumnHeader.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/PaginationSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressBarSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressIndicatorSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/RadioButtonSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollBarSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SeparatorSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SliderSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SpinnerSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SplitMenuButtonSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SplitPaneSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TabPaneSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableCellSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableCellSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableColumnHeader.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableHeaderRow.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableRowSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableRowSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableViewSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableViewSkinBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextAreaSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextFieldSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextInputControlSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TitledPaneSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ToggleButtonSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ToolBarSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TooltipSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeCellSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableCellSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableRowSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableViewSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeViewSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/Utils.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualContainerBase.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualScrollBar.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/WebColorField.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/WebColorFieldSkin.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/CategoryAxis.java modules/controls/src/main/java/javafx/scene/chart/Chart.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/StackedAreaChart.java modules/controls/src/main/java/javafx/scene/chart/StackedBarChart.java modules/controls/src/main/java/javafx/scene/chart/ValueAxis.java modules/controls/src/main/java/javafx/scene/chart/XYChart.java modules/controls/src/main/java/javafx/scene/control/Accordion.java modules/controls/src/main/java/javafx/scene/control/Alert.java modules/controls/src/main/java/javafx/scene/control/Button.java modules/controls/src/main/java/javafx/scene/control/ButtonBar.java modules/controls/src/main/java/javafx/scene/control/CheckBox.java modules/controls/src/main/java/javafx/scene/control/ChoiceBox.java modules/controls/src/main/java/javafx/scene/control/ColorPicker.java modules/controls/src/main/java/javafx/scene/control/ComboBox.java modules/controls/src/main/java/javafx/scene/control/ContextMenu.java modules/controls/src/main/java/javafx/scene/control/Control.java modules/controls/src/main/java/javafx/scene/control/ControlUtils.java modules/controls/src/main/java/javafx/scene/control/DateCell.java modules/controls/src/main/java/javafx/scene/control/DatePicker.java modules/controls/src/main/java/javafx/scene/control/DialogPane.java modules/controls/src/main/java/javafx/scene/control/Hyperlink.java modules/controls/src/main/java/javafx/scene/control/Label.java modules/controls/src/main/java/javafx/scene/control/Labeled.java modules/controls/src/main/java/javafx/scene/control/ListCell.java modules/controls/src/main/java/javafx/scene/control/ListView.java modules/controls/src/main/java/javafx/scene/control/MenuBar.java modules/controls/src/main/java/javafx/scene/control/MenuButton.java modules/controls/src/main/java/javafx/scene/control/MenuItem.java modules/controls/src/main/java/javafx/scene/control/Pagination.java modules/controls/src/main/java/javafx/scene/control/PopupControl.java modules/controls/src/main/java/javafx/scene/control/ProgressBar.java modules/controls/src/main/java/javafx/scene/control/ProgressIndicator.java modules/controls/src/main/java/javafx/scene/control/RadioButton.java modules/controls/src/main/java/javafx/scene/control/ScrollBar.java modules/controls/src/main/java/javafx/scene/control/ScrollPane.java modules/controls/src/main/java/javafx/scene/control/Separator.java modules/controls/src/main/java/javafx/scene/control/SkinBase.java modules/controls/src/main/java/javafx/scene/control/Slider.java modules/controls/src/main/java/javafx/scene/control/Spinner.java modules/controls/src/main/java/javafx/scene/control/SpinnerValueFactory.java modules/controls/src/main/java/javafx/scene/control/SplitMenuButton.java modules/controls/src/main/java/javafx/scene/control/SplitPane.java modules/controls/src/main/java/javafx/scene/control/TabPane.java modules/controls/src/main/java/javafx/scene/control/TableCell.java modules/controls/src/main/java/javafx/scene/control/TableColumn.java modules/controls/src/main/java/javafx/scene/control/TableColumnBase.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/TextArea.java modules/controls/src/main/java/javafx/scene/control/TextField.java modules/controls/src/main/java/javafx/scene/control/TitledPane.java modules/controls/src/main/java/javafx/scene/control/ToggleButton.java modules/controls/src/main/java/javafx/scene/control/ToolBar.java modules/controls/src/main/java/javafx/scene/control/Tooltip.java modules/controls/src/main/java/javafx/scene/control/TreeCell.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/TreeView.java modules/controls/src/main/java/javafx/scene/control/skin/AccordionSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ButtonBarSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ButtonSkin.java modules/controls/src/main/java/javafx/scene/control/skin/CellSkinBase.java modules/controls/src/main/java/javafx/scene/control/skin/CheckBoxSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ChoiceBoxSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ColorPalette.java modules/controls/src/main/java/javafx/scene/control/skin/ColorPickerSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ComboBoxBaseSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ComboBoxListViewSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ComboBoxMode.java modules/controls/src/main/java/javafx/scene/control/skin/ComboBoxPopupControl.java modules/controls/src/main/java/javafx/scene/control/skin/ContextMenuSkin.java modules/controls/src/main/java/javafx/scene/control/skin/DateCellSkin.java modules/controls/src/main/java/javafx/scene/control/skin/DatePickerSkin.java modules/controls/src/main/java/javafx/scene/control/skin/HyperlinkSkin.java modules/controls/src/main/java/javafx/scene/control/skin/LabelSkin.java modules/controls/src/main/java/javafx/scene/control/skin/LabeledSkinBase.java modules/controls/src/main/java/javafx/scene/control/skin/ListCellSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ListViewSkin.java modules/controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java modules/controls/src/main/java/javafx/scene/control/skin/MenuButtonSkin.java modules/controls/src/main/java/javafx/scene/control/skin/MenuButtonSkinBase.java modules/controls/src/main/java/javafx/scene/control/skin/NestedTableColumnHeader.java modules/controls/src/main/java/javafx/scene/control/skin/PaginationSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ProgressBarSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ProgressIndicatorSkin.java modules/controls/src/main/java/javafx/scene/control/skin/RadioButtonSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ScrollBarSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ScrollPaneSkin.java modules/controls/src/main/java/javafx/scene/control/skin/SeparatorSkin.java modules/controls/src/main/java/javafx/scene/control/skin/SliderSkin.java modules/controls/src/main/java/javafx/scene/control/skin/SpinnerSkin.java modules/controls/src/main/java/javafx/scene/control/skin/SplitMenuButtonSkin.java modules/controls/src/main/java/javafx/scene/control/skin/SplitPaneSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TableCellSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TableCellSkinBase.java modules/controls/src/main/java/javafx/scene/control/skin/TableColumnHeader.java modules/controls/src/main/java/javafx/scene/control/skin/TableHeaderRow.java modules/controls/src/main/java/javafx/scene/control/skin/TableRowSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TableRowSkinBase.java modules/controls/src/main/java/javafx/scene/control/skin/TableViewSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TableViewSkinBase.java modules/controls/src/main/java/javafx/scene/control/skin/TextAreaSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TextFieldSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TextInputControlSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TitledPaneSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ToggleButtonSkin.java modules/controls/src/main/java/javafx/scene/control/skin/ToolBarSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TooltipSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TreeCellSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TreeTableCellSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TreeTableRowSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TreeTableViewSkin.java modules/controls/src/main/java/javafx/scene/control/skin/TreeViewSkin.java modules/controls/src/main/java/javafx/scene/control/skin/VirtualContainerBase.java modules/controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java modules/controls/src/main/java/javafx/scene/control/skin/package.html modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/EmailBoard.txt modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/NumericBoard.txt modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/TextBoard.txt modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/UrlBoard.txt modules/controls/src/main/resources/javafx/scene/control/skin/EmailBoard.txt modules/controls/src/main/resources/javafx/scene/control/skin/NumericBoard.txt modules/controls/src/main/resources/javafx/scene/control/skin/TextBoard.txt modules/controls/src/main/resources/javafx/scene/control/skin/UrlBoard.txt modules/controls/src/test/java/com/sun/javafx/scene/control/ContextMenuContentRetriever.java modules/controls/src/test/java/com/sun/javafx/scene/control/LabeledImplTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/LabeledImplTestOther.java modules/controls/src/test/java/com/sun/javafx/scene/control/LabeledTextTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/MenuBarMenuButtonRetriever.java modules/controls/src/test/java/com/sun/javafx/scene/control/behavior/BehaviorBaseTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/behavior/KeyBindingTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/behavior/ListViewAnchorRetriever.java modules/controls/src/test/java/com/sun/javafx/scene/control/behavior/TableViewAnchorRetriever.java modules/controls/src/test/java/com/sun/javafx/scene/control/behavior/TreeTableViewAnchorRetriever.java modules/controls/src/test/java/com/sun/javafx/scene/control/behavior/TreeViewAnchorRetriever.java modules/controls/src/test/java/com/sun/javafx/scene/control/infrastructure/KeyModifier.java modules/controls/src/test/java/com/sun/javafx/scene/control/infrastructure/VirtualFlowTestUtils.java modules/controls/src/test/java/com/sun/javafx/scene/control/inputmap/InputMapTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/inputmap/KeyBindingTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ArrayLinkedListTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/BehaviorSkinBaseTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ButtonSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/CheckBoxSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ChoiceBoxSkinNodesRetriever.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ChoiceBoxSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ColorPickerPaletteRetriever.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ComboBoxListViewSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ContextMenuContentRetriever.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/HyperlinkSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/LabelSkinCreationTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/LabelSkinLayoutTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/LabelSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/LabeledImplTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/LabeledImplTestOther.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/LabeledTextTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/MenuBarMenuButtonRetriever.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/MenuBarSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/MenuButtonSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ProgressBarSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ProgressIndicatorSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/RadioButtonSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ScrollBarSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ScrollPaneSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/SeparatorSkinLayoutTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/SeparatorSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/SliderSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/TableColumnHeaderRetriever.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/TextInputControlSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ToggleButtonSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ToolBarSkinTest.java modules/controls/src/test/java/com/sun/javafx/scene/control/skin/VirtualFlowTest.java modules/controls/src/test/java/javafx/scene/chart/XYChartTest.java modules/controls/src/test/java/javafx/scene/control/ChoiceBoxTest.java modules/controls/src/test/java/javafx/scene/control/ColorPickerTest.java modules/controls/src/test/java/javafx/scene/control/ComboBoxTest.java modules/controls/src/test/java/javafx/scene/control/ContextMenuTest.java modules/controls/src/test/java/javafx/scene/control/ControlTest.java modules/controls/src/test/java/javafx/scene/control/DatePickerTest.java modules/controls/src/test/java/javafx/scene/control/InputMapTest.java modules/controls/src/test/java/javafx/scene/control/ListViewKeyInputTest.java modules/controls/src/test/java/javafx/scene/control/ListViewMouseInputTest.java modules/controls/src/test/java/javafx/scene/control/ListViewTest.java modules/controls/src/test/java/javafx/scene/control/MenuBarTest.java modules/controls/src/test/java/javafx/scene/control/MenuButtonTest.java modules/controls/src/test/java/javafx/scene/control/PopupControlTest.java modules/controls/src/test/java/javafx/scene/control/ScrollBarTest.java modules/controls/src/test/java/javafx/scene/control/SliderTest.java modules/controls/src/test/java/javafx/scene/control/SpinnerTest.java modules/controls/src/test/java/javafx/scene/control/SplitPaneTest.java modules/controls/src/test/java/javafx/scene/control/TabPaneTest.java modules/controls/src/test/java/javafx/scene/control/TableColumnTest.java modules/controls/src/test/java/javafx/scene/control/TableViewKeyInputTest.java modules/controls/src/test/java/javafx/scene/control/TableViewTest.java modules/controls/src/test/java/javafx/scene/control/TitledPaneTest.java modules/controls/src/test/java/javafx/scene/control/ToggleGroupTest.java modules/controls/src/test/java/javafx/scene/control/ToolbarTest.java modules/controls/src/test/java/javafx/scene/control/TreeTableColumnTest.java modules/controls/src/test/java/javafx/scene/control/TreeTableViewKeyInputTest.java modules/controls/src/test/java/javafx/scene/control/TreeTableViewMouseInputTest.java modules/controls/src/test/java/javafx/scene/control/TreeTableViewTest.java modules/controls/src/test/java/javafx/scene/control/TreeViewKeyInputTest.java modules/controls/src/test/java/javafx/scene/control/TreeViewMouseInputTest.java modules/controls/src/test/java/javafx/scene/control/TreeViewTest.java modules/controls/src/test/java/javafx/scene/control/cell/TextFieldTableCellTest.java modules/controls/src/test/java/javafx/scene/control/skin/ArrayLinkedListTest.java modules/controls/src/test/java/javafx/scene/control/skin/ButtonSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/CheckBoxSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/ChoiceBoxSkinNodesRetriever.java modules/controls/src/test/java/javafx/scene/control/skin/ChoiceBoxSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/ColorPickerPaletteRetriever.java modules/controls/src/test/java/javafx/scene/control/skin/ColorPickerSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/ComboBoxListViewSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/HyperlinkSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/LabelSkinBaseRetriever.java modules/controls/src/test/java/javafx/scene/control/skin/LabelSkinCreationTest.java modules/controls/src/test/java/javafx/scene/control/skin/LabelSkinLayoutTest.java modules/controls/src/test/java/javafx/scene/control/skin/LabelSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/MenuBarSkinRetriever.java modules/controls/src/test/java/javafx/scene/control/skin/MenuBarSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/MenuButtonSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/ProgressBarSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/ProgressIndicatorSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/RadioButtonSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/ScrollBarSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/ScrollPaneSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/SeparatorSkinLayoutTest.java modules/controls/src/test/java/javafx/scene/control/skin/SeparatorSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/SliderSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/TableColumnHeaderRetriever.java modules/controls/src/test/java/javafx/scene/control/skin/TableHeaderRowRetriever.java modules/controls/src/test/java/javafx/scene/control/skin/TextInputControlSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/ToggleButtonSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/ToolBarSkinTest.java modules/controls/src/test/java/javafx/scene/control/skin/VirtualFlowTest.java modules/controls/src/test/resources/com/sun/javafx/scene/control/LabeledTextTest.css modules/controls/src/test/resources/com/sun/javafx/scene/control/skin/LabeledTextTest.css modules/controls/src/test/resources/com/sun/javafx/scene/control/skin/VirtualFlowTest.css modules/controls/src/test/resources/javafx/scene/control/skin/VirtualFlowTest.css modules/fxml/src/main/java/com/sun/javafx/fxml/LoadListener.java modules/fxml/src/main/java/javafx/fxml/FXMLLoader.java modules/fxml/src/main/java/javafx/fxml/LoadListener.java modules/fxml/src/test/java/javafx/fxml/FXMLLoader_ScriptTest.java modules/fxml/src/test/java/javafx/fxml/RT_18218Test.java modules/graphics/src/main/docs/javafx/scene/doc-files/cssref.html modules/graphics/src/main/java/com/sun/javafx/css/CascadingStyle.java modules/graphics/src/main/java/com/sun/javafx/css/CompoundSelector.java modules/graphics/src/main/java/com/sun/javafx/css/CssError.java modules/graphics/src/main/java/com/sun/javafx/css/Declaration.java modules/graphics/src/main/java/com/sun/javafx/css/FontFace.java modules/graphics/src/main/java/com/sun/javafx/css/FontFaceImpl.java modules/graphics/src/main/java/com/sun/javafx/css/Match.java modules/graphics/src/main/java/com/sun/javafx/css/ParsedValueImpl.java modules/graphics/src/main/java/com/sun/javafx/css/Rule.java modules/graphics/src/main/java/com/sun/javafx/css/Selector.java modules/graphics/src/main/java/com/sun/javafx/css/SelectorPartitioning.java modules/graphics/src/main/java/com/sun/javafx/css/SimpleSelector.java modules/graphics/src/main/java/com/sun/javafx/css/Size.java modules/graphics/src/main/java/com/sun/javafx/css/SizeUnits.java modules/graphics/src/main/java/com/sun/javafx/css/StringStore.java modules/graphics/src/main/java/com/sun/javafx/css/Style.java modules/graphics/src/main/java/com/sun/javafx/css/StyleClass.java modules/graphics/src/main/java/com/sun/javafx/css/StyleClassSet.java modules/graphics/src/main/java/com/sun/javafx/css/StyleConverterImpl.java modules/graphics/src/main/java/com/sun/javafx/css/StyleManager.java modules/graphics/src/main/java/com/sun/javafx/css/StyleMap.java modules/graphics/src/main/java/com/sun/javafx/css/Stylesheet.java modules/graphics/src/main/java/com/sun/javafx/css/converters/BooleanConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/ColorConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/CursorConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/DurationConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/EffectConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/EnumConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/FontConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/InsetsConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/PaintConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/ShapeConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/SizeConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/StringConverter.java modules/graphics/src/main/java/com/sun/javafx/css/converters/URLConverter.java modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSLexer.java modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java modules/graphics/src/main/java/com/sun/javafx/css/parser/Css2Bin.java modules/graphics/src/main/java/com/sun/javafx/css/parser/DeriveColorConverter.java modules/graphics/src/main/java/com/sun/javafx/css/parser/DeriveSizeConverter.java modules/graphics/src/main/java/com/sun/javafx/css/parser/LadderConverter.java modules/graphics/src/main/java/com/sun/javafx/css/parser/LexerState.java modules/graphics/src/main/java/com/sun/javafx/css/parser/Recognizer.java modules/graphics/src/main/java/com/sun/javafx/css/parser/StopConverter.java modules/graphics/src/main/java/com/sun/javafx/css/parser/Token.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/BackgroundPositionConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/BackgroundSizeConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/BorderImageSliceConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/BorderImageWidthConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/BorderImageWidthsSequenceConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/BorderStrokeStyleSequenceConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/BorderStyleConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/CornerRadiiConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/LayeredBackgroundPositionConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/LayeredBackgroundSizeConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/LayeredBorderPaintConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/LayeredBorderStyleConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/Margins.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/RepeatStructConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/SliceSequenceConverter.java modules/graphics/src/main/java/com/sun/javafx/scene/layout/region/StrokeBorderPaintConverter.java modules/graphics/src/main/java/javafx/css/CascadingStyle.java modules/graphics/src/main/java/javafx/css/CompoundSelector.java modules/graphics/src/main/java/javafx/css/CssLexer.java modules/graphics/src/main/java/javafx/css/CssParser.java modules/graphics/src/main/java/javafx/css/Declaration.java modules/graphics/src/main/java/javafx/css/FontCssMetaData.java modules/graphics/src/main/java/javafx/css/FontFace.java modules/graphics/src/main/java/javafx/css/Match.java modules/graphics/src/main/java/javafx/css/ParsedValue.java modules/graphics/src/main/java/javafx/css/Rule.java modules/graphics/src/main/java/javafx/css/Selector.java modules/graphics/src/main/java/javafx/css/SimpleSelector.java modules/graphics/src/main/java/javafx/css/Size.java modules/graphics/src/main/java/javafx/css/SizeUnits.java modules/graphics/src/main/java/javafx/css/Style.java modules/graphics/src/main/java/javafx/css/StyleClass.java modules/graphics/src/main/java/javafx/css/StyleConverter.java modules/graphics/src/main/java/javafx/css/StyleablePropertyFactory.java modules/graphics/src/main/java/javafx/css/Stylesheet.java modules/graphics/src/main/java/javafx/css/converter/BooleanConverter.java modules/graphics/src/main/java/javafx/css/converter/ColorConverter.java modules/graphics/src/main/java/javafx/css/converter/CursorConverter.java modules/graphics/src/main/java/javafx/css/converter/DeriveColorConverter.java modules/graphics/src/main/java/javafx/css/converter/DeriveSizeConverter.java modules/graphics/src/main/java/javafx/css/converter/DurationConverter.java modules/graphics/src/main/java/javafx/css/converter/EffectConverter.java modules/graphics/src/main/java/javafx/css/converter/EnumConverter.java modules/graphics/src/main/java/javafx/css/converter/FontConverter.java modules/graphics/src/main/java/javafx/css/converter/InsetsConverter.java modules/graphics/src/main/java/javafx/css/converter/LadderConverter.java modules/graphics/src/main/java/javafx/css/converter/PaintConverter.java modules/graphics/src/main/java/javafx/css/converter/ShapeConverter.java modules/graphics/src/main/java/javafx/css/converter/SizeConverter.java modules/graphics/src/main/java/javafx/css/converter/StopConverter.java modules/graphics/src/main/java/javafx/css/converter/StringConverter.java modules/graphics/src/main/java/javafx/css/converter/URLConverter.java modules/graphics/src/main/java/javafx/scene/CssStyleHelper.java modules/graphics/src/main/java/javafx/scene/Node.java modules/graphics/src/main/java/javafx/scene/Parent.java modules/graphics/src/main/java/javafx/scene/image/ImageView.java modules/graphics/src/main/java/javafx/scene/layout/Background.java modules/graphics/src/main/java/javafx/scene/layout/BackgroundConverter.java modules/graphics/src/main/java/javafx/scene/layout/Border.java modules/graphics/src/main/java/javafx/scene/layout/BorderConverter.java modules/graphics/src/main/java/javafx/scene/layout/FlowPane.java modules/graphics/src/main/java/javafx/scene/layout/GridPane.java modules/graphics/src/main/java/javafx/scene/layout/HBox.java modules/graphics/src/main/java/javafx/scene/layout/Region.java modules/graphics/src/main/java/javafx/scene/layout/StackPane.java modules/graphics/src/main/java/javafx/scene/layout/TilePane.java modules/graphics/src/main/java/javafx/scene/layout/VBox.java modules/graphics/src/main/java/javafx/scene/shape/Rectangle.java modules/graphics/src/main/java/javafx/scene/shape/Shape.java modules/graphics/src/main/java/javafx/scene/text/Text.java modules/graphics/src/main/java/javafx/scene/text/TextFlow.java modules/graphics/src/test/java/com/sun/javafx/css/BooleanTypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/CssMetaDataTest.java modules/graphics/src/test/java/com/sun/javafx/css/CursorTypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/DeclarationTest.java modules/graphics/src/test/java/com/sun/javafx/css/EffectTypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/EnumTypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/FontSizeTypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/FontTypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/HonorDeveloperSettingsTest.java modules/graphics/src/test/java/com/sun/javafx/css/InsetsTypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/Node_cssStateTransition_Test.java modules/graphics/src/test/java/com/sun/javafx/css/Node_cssStyleMap_Test.java modules/graphics/src/test/java/com/sun/javafx/css/PaintTypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/ParsedValueTest.java modules/graphics/src/test/java/com/sun/javafx/css/RuleTest.java modules/graphics/src/test/java/com/sun/javafx/css/SelectorPartitioningTest.java modules/graphics/src/test/java/com/sun/javafx/css/SizeTest.java modules/graphics/src/test/java/com/sun/javafx/css/SizeTypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/StringTypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/StyleManagerTest.java modules/graphics/src/test/java/com/sun/javafx/css/StyleTest.java modules/graphics/src/test/java/com/sun/javafx/css/StylesheetTest.java modules/graphics/src/test/java/com/sun/javafx/css/TestNode.java modules/graphics/src/test/java/com/sun/javafx/css/TestNodeBase.java modules/graphics/src/test/java/com/sun/javafx/css/TypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/URLTypeTest.java modules/graphics/src/test/java/com/sun/javafx/css/converters/URLConverterTest.java modules/graphics/src/test/java/com/sun/javafx/css/parser/CSSLexerTest.java modules/graphics/src/test/java/com/sun/javafx/css/parser/CSSParserTest.java modules/graphics/src/test/java/com/sun/javafx/scene/layout/RegionTest.java modules/graphics/src/test/java/javafx/css/CssLexerTest.java modules/graphics/src/test/java/javafx/css/CssMetaDataTest.java modules/graphics/src/test/java/javafx/css/CssParserTest.java modules/graphics/src/test/java/javafx/css/DeclarationTest.java modules/graphics/src/test/java/javafx/css/FontTypeTest.java modules/graphics/src/test/java/javafx/css/HonorDeveloperSettingsTest.java modules/graphics/src/test/java/javafx/css/InsetsTypeTest.java modules/graphics/src/test/java/javafx/css/Node_cssStateTransition_Test.java modules/graphics/src/test/java/javafx/css/Node_cssStyleMap_Test.java modules/graphics/src/test/java/javafx/css/PaintTypeTest.java modules/graphics/src/test/java/javafx/css/ParsedValueTest.java modules/graphics/src/test/java/javafx/css/RuleTest.java modules/graphics/src/test/java/javafx/css/SelectorPartitioningTest.java modules/graphics/src/test/java/javafx/css/SizeTest.java modules/graphics/src/test/java/javafx/css/StyleTest.java modules/graphics/src/test/java/javafx/css/StylesheetTest.java modules/graphics/src/test/java/javafx/css/TypeTest.java modules/graphics/src/test/java/javafx/scene/CSSNode.java modules/graphics/src/test/java/javafx/scene/Node_effectiveOrientation_Css_Test.java modules/graphics/src/test/java/javafx/scene/layout/TilePaneTest.java modules/graphics/src/test/resources/com/sun/javafx/css/HonorDeveloperSettingsTest_AUTHOR.css modules/graphics/src/test/resources/com/sun/javafx/css/HonorDeveloperSettingsTest_UA.css modules/graphics/src/test/resources/com/sun/javafx/css/RT-30953-2.2.21.bss modules/graphics/src/test/resources/com/sun/javafx/css/RT-30953-2.2.4.bss modules/graphics/src/test/resources/com/sun/javafx/css/RT-30953-2.2.45.bss modules/graphics/src/test/resources/com/sun/javafx/css/RT-30953-v4.bss modules/graphics/src/test/resources/com/sun/javafx/css/RT-30953.css modules/graphics/src/test/resources/com/sun/javafx/css/RT-37122.css modules/graphics/src/test/resources/com/sun/javafx/css/converters/some.txt modules/graphics/src/test/resources/javafx/css/HonorDeveloperSettingsTest_AUTHOR.css modules/graphics/src/test/resources/javafx/css/HonorDeveloperSettingsTest_UA.css modules/graphics/src/test/resources/javafx/css/RT-30953-2.2.21.bss modules/graphics/src/test/resources/javafx/css/RT-30953-2.2.4.bss modules/graphics/src/test/resources/javafx/css/RT-30953-2.2.45.bss modules/graphics/src/test/resources/javafx/css/RT-30953-v4.bss modules/graphics/src/test/resources/javafx/css/RT-30953.css modules/graphics/src/test/resources/javafx/css/RT-37122.css modules/graphics/src/test/resources/javafx/css/converter/some.txt modules/web/src/android/java/javafx/scene/web/WebView.java modules/web/src/ios/java/com/sun/javafx/scene/web/skin/HTMLEditorSkin.java modules/web/src/ios/java/javafx/scene/web/WebView.java modules/web/src/main/java/com/sun/javafx/scene/web/behavior/HTMLEditorBehavior.java modules/web/src/main/java/com/sun/javafx/scene/web/skin/HTMLEditorSkin.java modules/web/src/main/java/com/sun/javafx/webkit/theme/RenderThemeImpl.java modules/web/src/main/java/com/sun/javafx/webkit/theme/ScrollBarThemeImpl.java modules/web/src/main/java/javafx/scene/web/WebView.java tests/system/src/test/java/com/sun/javafx/css/StylesheetWithSecurityManagerTest.java
diffstat 625 files changed, 88351 insertions(+), 84567 deletions(-) [+]
line wrap: on
line diff
--- a/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/control/PopoverTreeList.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/control/PopoverTreeList.java	Thu Sep 10 11:21:20 2015 +1200
@@ -32,8 +32,8 @@
 package com.javafx.experiments.scheduleapp.control;
 
 import static com.javafx.experiments.scheduleapp.Theme.*;
-import com.sun.javafx.scene.control.skin.ListCellSkin;
-import com.sun.javafx.scene.control.skin.ListViewSkin;
+import javafx.scene.control.skin.ListCellSkin;
+import javafx.scene.control.skin.ListViewSkin;
 import javafx.event.EventHandler;
 import javafx.geometry.Bounds;
 import javafx.scene.control.ListCell;
--- a/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/control/ScrollPaneSkin3.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/control/ScrollPaneSkin3.java	Thu Sep 10 11:21:20 2015 +1200
@@ -31,7 +31,7 @@
  */
 package com.javafx.experiments.scheduleapp.control;
 
-import com.sun.javafx.scene.control.skin.ScrollPaneSkin;
+import javafx.scene.control.skin.ScrollPaneSkin;
 import java.lang.reflect.Field;
 import javafx.event.EventHandler;
 import javafx.scene.control.ScrollPane;
@@ -99,14 +99,4 @@
         }
         return 0;
     }
-
-    protected void startContentsToViewport() {
-        if (IS_BEAGLE) return;
-        super.startContentsToViewport();
-    }
-
-    protected void startSBReleasedAnimation() {
-        if (IS_BEAGLE) return;
-        super.startSBReleasedAnimation();
-    }
 }
--- a/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/control/SearchBox.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/control/SearchBox.java	Thu Sep 10 11:21:20 2015 +1200
@@ -32,7 +32,7 @@
 package com.javafx.experiments.scheduleapp.control;
 
 import com.javafx.experiments.scheduleapp.Theme;
-import com.sun.javafx.scene.control.skin.ButtonSkin;
+import javafx.scene.control.skin.ButtonSkin;
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableValue;
 import javafx.event.EventHandler;
--- a/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/CatalogPage.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/CatalogPage.java	Thu Sep 10 11:21:20 2015 +1200
@@ -190,7 +190,7 @@
         list = new ListView<Row>(){
             {
                 getStyleClass().setAll("twitter-list-view");
-                skinClassNameProperty().set("com.sun.javafx.scene.control.skin.ListViewSkin");
+                skinClassNameProperty().set("javafx.scene.control.skin.ListViewSkin");
                 setCellFactory(CatalogPage.this);
             }
         };
--- a/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/SocialPage.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/SocialPage.java	Thu Sep 10 11:21:20 2015 +1200
@@ -185,7 +185,7 @@
     private static class TwitterList extends ListView<Tweet> implements Callback<ListView<Tweet>, ListCell<Tweet>>{
         public TwitterList(){
             getStyleClass().setAll("twitter-list-view");
-            skinClassNameProperty().set("com.sun.javafx.scene.control.skin.ListViewSkin");
+            skinClassNameProperty().set("javafx.scene.control.skin.ListViewSkin");
             setCellFactory(this);
             setMinHeight(100);
         }
--- a/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/SpeakersPage.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/SpeakersPage.java	Thu Sep 10 11:21:20 2015 +1200
@@ -61,6 +61,7 @@
 import javafx.scene.control.ListCell;
 import javafx.scene.control.ListView;
 import javafx.scene.control.Skin;
+import javafx.scene.control.skin.ListViewSkin;
 import javafx.scene.image.Image;
 import javafx.scene.image.ImageView;
 import javafx.scene.input.MouseEvent;
@@ -89,16 +90,9 @@
 
 import static com.javafx.experiments.scheduleapp.ConferenceScheduleApp.*;
 import static com.javafx.experiments.scheduleapp.Theme.*;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.net.URL;
+
 import java.util.HashMap;
 import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javafx.embed.swing.SwingFXUtils;
-import javafx.scene.image.WritableImage;
-import javax.imageio.ImageIO;
 
 /**
  * Page showing searchable list of all speakers at the conference
@@ -262,8 +256,8 @@
     private class SpeakerList extends ListView<Speaker> implements Callback<ListView<Speaker>, ListCell<Speaker>>{
         public SpeakerList(){
             getStyleClass().setAll("twitter-list-view");
-//            skinClassNameProperty().set("com.sun.javafx.scene.control.skin.ListViewSkin");
-            setSkin(new com.sun.javafx.scene.control.skin.ListViewSkin(this));
+//            skinClassNameProperty().set("javafx.scene.control.skin.ListViewSkin");
+            setSkin(new ListViewSkin(this));
             setCellFactory(this);
             // hack workaround for cell sizing
             Node node = lookup(".clipped-container");
--- a/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/TimelinePage.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/TimelinePage.java	Thu Sep 10 11:21:20 2015 +1200
@@ -71,7 +71,7 @@
 import com.javafx.experiments.scheduleapp.model.Event;
 import com.javafx.experiments.scheduleapp.model.Session;
 import com.javafx.experiments.scheduleapp.model.Track;
-import com.sun.javafx.scene.control.skin.ListViewSkin;
+import javafx.scene.control.skin.ListViewSkin;
 
 import static com.javafx.experiments.scheduleapp.ConferenceScheduleApp.*;
 import static com.javafx.experiments.scheduleapp.Theme.*;
--- a/apps/experiments/DukePad/modules/calculator/src/main/java/com/javafx/experiments/dukepad/calculator/CalculatorTheme.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/experiments/DukePad/modules/calculator/src/main/java/com/javafx/experiments/dukepad/calculator/CalculatorTheme.java	Thu Sep 10 11:21:20 2015 +1200
@@ -27,13 +27,12 @@
 
 import com.javafx.experiments.dukepad.core.Fonts;
 import com.sun.javafx.util.Utils;
-import com.sun.javafx.scene.control.skin.ButtonSkin;
-import com.sun.javafx.scene.control.skin.TextFieldSkin;
+import javafx.scene.control.skin.ButtonSkin;
+import javafx.scene.control.skin.TextFieldSkin;
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableValue;
 import javafx.geometry.Insets;
 import javafx.geometry.Pos;
-import javafx.scene.Node;
 import javafx.scene.control.Button;
 import javafx.scene.control.ContentDisplay;
 import javafx.scene.control.TextField;
--- a/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/AppPlatform.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/AppPlatform.java	Thu Sep 10 11:21:20 2015 +1200
@@ -96,15 +96,15 @@
             AppNotificationHandler notificationHandler, Application.Parameters parameters)  
     throws IOException {
         if (IS_MAC) {
-            return requestStartMac(notificationHandler, parameters);
+            Platform.setImplicitExit(false);
+        }
+
+        if (EditorPlatform.isAssertionEnabled()) {
+            // Development mode : we do not delegate to the existing instance
+            notificationHandler.handleLaunch(parameters.getUnnamed());
+            return true;
         } else {
-            if (EditorPlatform.isAssertionEnabled()) {
-                // Development mode : we do not delegate to the existing instance
-                notificationHandler.handleLaunch(parameters.getUnnamed());
-                return true;
-            } else {
-                return requestStartGeneric(notificationHandler, parameters);
-            }
+            return requestStartGeneric(notificationHandler, parameters);
         }
     }
     
@@ -193,102 +193,4 @@
         }
         
     } 
-    
-    
-    
-    /*
-     * Private (requestStartMac)
-     */
-    
-    private static boolean requestStartMac(
-            AppNotificationHandler notificationHandler, Application.Parameters parameters) {
-        
-        Platform.setImplicitExit(false);
-        notificationHandler.handleLaunch(Collections.emptyList());
-        Deprecation.setPlatformEventHandler(new MacEventHandler(notificationHandler,
-                Deprecation.getPlatformEventHandler()));
-        
-        return true;
-    }
-    
-    private static class MacEventHandler extends com.sun.glass.ui.Application.EventHandler {
-        
-        private final AppNotificationHandler notificationHandler;
-        private final com.sun.glass.ui.Application.EventHandler oldEventHandler;
-        private int openFilesCount;
-        
-        public MacEventHandler(AppNotificationHandler notificationHandler,
-                com.sun.glass.ui.Application.EventHandler oldEventHandler) {
-            assert notificationHandler != null;
-            this.notificationHandler = notificationHandler;
-            this.oldEventHandler = oldEventHandler;
-        }
-        
-        /*
-         * com.sun.glass.ui.Application.AppNotificationHandler
-         */
-        @Override
-        public void handleDidFinishLaunchingAction(com.sun.glass.ui.Application app, long time) {
-            if (oldEventHandler != null) {
-                oldEventHandler.handleDidFinishLaunchingAction(app, time);
-            }
-        }
-
-        @Override
-        public void handleDidBecomeActiveAction(com.sun.glass.ui.Application app, long time) {
-            if (oldEventHandler != null) {
-                oldEventHandler.handleDidBecomeActiveAction(app, time);
-            }
-        }
-
-        @Override
-        public void handleOpenFilesAction(com.sun.glass.ui.Application app, long time, final String[] files) {
-            if (oldEventHandler != null) {
-                oldEventHandler.handleOpenFilesAction(app, time, files);
-            }
-            
-            /*
-             * When SB is started from NB or test environment on Mac OS, this 
-             * method is called a first time with dummy parameter like this:
-             * files[0] == "com.oracle.javafx.scenebuilder.app.SceneBuilderApp". //NOI18N
-             * We ignore this call here.
-             * 
-             * With Eclipse on Mac, files[0] == System.getProperty("java.class.path") (!) //NOI18N
-             */
-            final boolean openRejected;
-            if (startingFromTestBed) {
-                openRejected = true;
-            } else if (openFilesCount++ == 0) {
-                openRejected = (files.length == 1) 
-                        && ( files[0].equals(SceneBuilderApp.class.getName()) || //NOI18N
-                             files[0].equals(System.getProperty("java.class.path"))); //NOI18N
-            } else {
-                openRejected = false;
-            }
-            
-            if (openRejected == false) {
-                notificationHandler.handleOpenFilesAction(Arrays.asList(files));
-            }
-        }
-
-        @Override
-        public void handleQuitAction(com.sun.glass.ui.Application app, long time) {
-            if (oldEventHandler != null) {
-                oldEventHandler.handleQuitAction(app, time);
-            }
-            notificationHandler.handleQuitAction();
-        }  
-    } 
-    
-    
-    /*
-     * Some code to help starting Scene Builder application from SQE java code.
-     * This is relevant on Mac only.
-     */
-    
-    private static boolean startingFromTestBed;
-    
-    public static void setStartingFromTestBed(boolean macWorkaroundEnabled) {
-        AppPlatform.startingFromTestBed = macWorkaroundEnabled;
-    }
 }
--- a/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/DocumentWindowController.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/DocumentWindowController.java	Thu Sep 10 11:21:20 2015 +1200
@@ -70,7 +70,6 @@
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
 import com.oracle.javafx.scenebuilder.kit.library.Library;
 import com.oracle.javafx.scenebuilder.kit.library.user.UserLibrary;
-import com.sun.javafx.scene.control.behavior.KeyBinding;
 
 import java.io.File;
 import java.io.IOException;
@@ -237,7 +236,7 @@
     private static List<String> videoExtensions;
     private static List<String> mediaExtensions;
 
-    private final EventHandler<KeyEvent> mainKeyEventFilter = event -> {
+    private final EventHandler<KeyEvent> mainKeyEventFilter = (KeyEvent event) -> {
         //------------------------------------------------------------------
         // TEXT INPUT CONTROL
         //------------------------------------------------------------------
@@ -258,19 +257,20 @@
         final KeyCombination accelerator = getAccelerator(event);
         if (isTextInputControlEditing(focusOwner) == true 
                 && accelerator != null) {
-            for (KeyBinding binding : SBTextInputControlBindings.getBindings()) {
-                // The event is handled natively
-                if (binding.getSpecificity(null, event) > 0) {
-                    // 
-                    // When using system menu bar, the event is handled natively 
-                    // before the application receives it : we just consume the event 
-                    // so the editing action is not performed a second time by the app.
-                    if (menuBarController.getMenuBar().isUseSystemMenuBar()) {
-                        event.consume();
-                    }
-                    break;
-                }
-            }
+
+//            focusOwner.getInputMap()
+//                      .lookupMapping(KeyBinding.toKeyBinding(event))
+//                      .ifPresent(mapping -> {
+//                          // The event is handled natively
+//                          if (mapping.getSpecificity(event) > 0) {
+//                              // When using system menu bar, the event is handled natively
+//                              // before the application receives it : we just consume the event
+//                              // so the editing action is not performed a second time by the app.
+//                              if (menuBarController.getMenuBar().isUseSystemMenuBar()) {
+//                                  event.consume();
+//                              }
+//                          }
+//                      });
         }
 
         //------------------------------------------------------------------
@@ -2155,17 +2155,17 @@
     }
 }
 
-/**
- * This class setup key bindings for the TextInputControl type classes and
- * provide a way to access the key binding list.
- */
-class SBTextInputControlBindings extends com.sun.javafx.scene.control.behavior.TextInputControlBindings {
-
-    private SBTextInputControlBindings() {
-        assert false;
-    }
-
-    public static List<KeyBinding> getBindings() {
-        return BINDINGS;
-    }
-}
+///**
+// * This class setup key bindings for the TextInputControl type classes and
+// * provide a way to access the key binding list.
+// */
+//class SBTextInputControlBindings extends TextInputControlBindings {
+//
+//    private SBTextInputControlBindings() {
+//        assert false;
+//    }
+//
+//    public static List<KeyBinding> getBindings() {
+//        return BINDINGS;
+//    }
+//}
--- a/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/SceneBuilderTest.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/SceneBuilderTest.java	Thu Sep 10 11:21:20 2015 +1200
@@ -410,7 +410,6 @@
      * @param args arguments to SceneBuilderApp.main()
      */
     public static void startApplication(String[] args) {
-        AppPlatform.setStartingFromTestBed(true);
         SceneBuilderApp.main(args);
     }
     
--- a/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/about/AboutWindowController.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/about/AboutWindowController.java	Thu Sep 10 11:21:20 2015 +1200
@@ -34,8 +34,6 @@
 import com.oracle.javafx.scenebuilder.app.SceneBuilderApp;
 import com.oracle.javafx.scenebuilder.app.i18n.I18N;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractFxmlWindowController;
-import com.sun.javafx.tk.Toolkit;
-import com.sun.prism.GraphicsPipeline;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -121,7 +119,6 @@
         StringBuilder text = getVersionParagraph()
                 .append(getBuildInfoParagraph())
                 .append(getLoggingParagraph())
-                .append(getFxParagraph())
                 .append(getJavaParagraph())
                 .append(getOsParagraph())
                 .append(I18N.getString(sbAboutCopyrightKeyName));
@@ -178,33 +175,6 @@
         return sb;
     }
     
-    private StringBuilder getFxParagraph() {
-        boolean hwAccelerated = false;
-        String tk = Toolkit.getToolkit().getClass().getSimpleName();
-        StringBuilder fxtra = new StringBuilder("JavaFX\n"); //NOI18N
-        fxtra.append(I18N.getString("about.fx.toolkit"))
-                .append(" = ").append(tk).append("\n"); //NOI18N
-
-        if ("GlassToolkit".equals(tk) || "PrismToolkit".equals(tk) //NOI18N
-                || "QuantumToolkit".equals(tk)) { //NOI18N
-            String ppl = GraphicsPipeline.getPipeline().getClass().getSimpleName();
-            fxtra.append(I18N.getString("about.fx.pipeline"))
-                    .append(" = ").append(ppl).append("\n"); //NOI18N
-            if (ppl.trim().equals("D3DPipeline") //NOI18N
-                    || ppl.trim().equals("ES1Pipeline") //NOI18N
-                    || ppl.trim().equals("ES2Pipeline")) { //NOI18N
-                hwAccelerated = true;
-            }
-        }
-        fxtra.append(I18N.getString("about.fx.hardware.acceleration"))
-                .append(" ") //NOI18N
-                .append(hwAccelerated ? I18N.getString("about.fx.hardware.acceleration.enabled")
-                        : I18N.getString("about.fx.hardware.acceleration.disabled"))
-                .append("\n\n"); //NOI18N
-
-        return fxtra;
-    }
-    
     private StringBuilder getJavaParagraph() {
         StringBuilder sb = new StringBuilder("Java\n"); //NOI18N
         sb.append(System.getProperty("java.runtime.version")).append(", ") //NOI18N
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/TabPaneDesignInfoX.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/TabPaneDesignInfoX.java	Thu Sep 10 11:21:20 2015 +1200
@@ -32,7 +32,7 @@
 package com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver;
 
 import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
-import com.sun.javafx.scene.control.skin.TabPaneSkin;
+import javafx.scene.control.skin.TabPaneSkin;
 import java.util.Iterator;
 import java.util.Set;
 import javafx.geometry.BoundingBox;
@@ -87,13 +87,20 @@
      */
     public Node getContentNode(TabPane tabPane) {
         assert tabPane != null;
-        
+
         final Node result;
        
-        if (tabPane.getSkin() != null) {
-            assert tabPane.getSkin() instanceof TabPaneSkin;
-            final TabPaneSkin tabPaneSkin = (TabPaneSkin) tabPane.getSkin();
-            result = tabPaneSkin.getSelectedTabContentRegion();
+//        if (tabPane.getSkin() != null) {
+//            assert tabPane.getSkin() instanceof TabPaneSkin;
+//            final TabPaneSkin tabPaneSkin = (TabPaneSkin) tabPane.getSkin();
+//            result = tabPaneSkin.getSelectedTabContentRegion();
+//        } else {
+//            result = null;
+//        }
+
+        Tab selectedTab = tabPane.getSelectionModel().getSelectedItem();
+        if (selectedTab != null) {
+            result = selectedTab.getContent();
         } else {
             result = null;
         }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/TableViewDesignInfoX.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/TableViewDesignInfoX.java	Thu Sep 10 11:21:20 2015 +1200
@@ -32,7 +32,7 @@
 package com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver;
 
 import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
-import com.sun.javafx.scene.control.skin.TableColumnHeader;
+import javafx.scene.control.skin.TableColumnHeader;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/TreeTableViewDesignInfoX.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/TreeTableViewDesignInfoX.java	Thu Sep 10 11:21:20 2015 +1200
@@ -32,7 +32,7 @@
 package com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver;
 
 import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
-import com.sun.javafx.scene.control.skin.TableColumnHeader;
+import javafx.scene.control.skin.TableColumnHeader;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssContentMaker.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssContentMaker.java	Thu Sep 10 11:21:20 2015 +1200
@@ -41,9 +41,8 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
 import com.oracle.javafx.scenebuilder.kit.util.CssInternal;
 import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
-import com.sun.javafx.css.ParsedValueImpl;
-import com.sun.javafx.css.Rule;
-import com.sun.javafx.css.Style;
+import javafx.css.Rule;
+import javafx.css.Style;
 import javafx.css.StyleOrigin;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -289,9 +288,7 @@
     protected static CssStyle retrieveStyle(List<Style> styles, Style style) {
         CssStyle st = new CssStyle(style);
         ParsedValue parsedValue = style.getDeclaration().getParsedValue();
-        assert parsedValue instanceof ParsedValueImpl;
-        ParsedValueImpl parsedValueImpl = (ParsedValueImpl) parsedValue;
-        if (parsedValueImpl.isContainsLookups() || parsedValueImpl.isLookup()) {
+        if (parsedValue.isContainsLookups() || parsedValue.isLookup()) {
             retrieveStylesFromParsedValue(styles, st, style.getDeclaration().getParsedValue());
         }
         return st;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssPanelController.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssPanelController.java	Thu Sep 10 11:21:20 2015 +1200
@@ -55,8 +55,8 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
 import com.oracle.javafx.scenebuilder.kit.util.CssInternal;
 import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
-import com.sun.javafx.css.ParsedValueImpl;
-import com.sun.javafx.css.Rule;
+
+import javafx.css.Rule;
 
 import java.io.File;
 import java.io.IOException;
@@ -1981,7 +1981,7 @@
                     boolean lookup = false;
                     if (parsedValues != null) {
                         ParsedValue<?, ?> pv = parsedValues[i];
-                        lookup = ((ParsedValueImpl<?, ?>) pv).isContainsLookups();
+                        lookup = pv.isContainsLookups();
                     }
                     if (lookup) {
                         assert style != null;
@@ -2034,7 +2034,7 @@
                         boolean lookup = false;
                         if (parsedValues != null) {
                             ParsedValue<?, ?> pv = parsedValues[index];
-                            lookup = ((ParsedValueImpl<?, ?>) pv).isContainsLookups();
+                            lookup = pv.isContainsLookups();
                         }
                         if (lookup) {
                             CssStyle lookupRoot = null;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssUtils.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssUtils.java	Thu Sep 10 11:21:20 2015 +1200
@@ -383,7 +383,7 @@
 //    
 //    static {
 //        try {
-//            STYLE_SHEET_TOOL_CSS = CSSParser.getInstance().parse(new URL(TOOL_ROOT_CSS));
+//            STYLE_SHEET_TOOL_CSS = new CssParser().parse(new URL(TOOL_ROOT_CSS));
 //        } catch (IOException ex) {
 //            Utils.println("Failed to parse " + TOOL_ROOT_CSS, ex); //NOI18N
 //        }
@@ -455,7 +455,7 @@
 //        Set<String> styleClasses = new HashSet<>();
 //        Stylesheet s;
 //        try {
-//            s = CSSParser.getInstance().parse(url);
+//            s = new CssParser().parse(url);
 //        } catch (IOException ex) {
 //            Utils.println("Invalid Stylesheet " + url);
 //            return styleClasses;
@@ -1023,7 +1023,7 @@
 //
 //    private static final CssParsingListener cssListener = new CssParsingListener();
 //    static {
-//        StyleManager.errorsProperty().addListener(cssListener);
+//        CssParser.errorsProperty().addListener(cssListener);
 //    }
 //    
 //    public static void updateStylesheets(Project project, Parent parent, File file) {
@@ -1151,11 +1151,11 @@
 //        // Synchronous listener to get errors synchronously.
 //        // Required for synchronous validation
 //        CssInlineStyleListener listener = new CssInlineStyleListener();
-//        StyleManager.errorsProperty().addListener(listener);
+//        CssParser.errorsProperty().addListener(listener);
 //        startListeningToCssErrors(project);
 //        try {
 //            try {
-//                s = CSSParser.getInstance().parseInlineStyle(new StyleableStub(style));
+//                s = new CssParser().parseInlineStyle(new StyleableStub(style));
 //            }catch(final RuntimeException ex){
 //                // Parser exception that has not been tracked by the listener.
 //                // Bug in CSS RT
@@ -1163,7 +1163,7 @@
 //            }
 //        } finally {
 //            stopListeningToCssErrors(project);
-//            StyleManager.errorsProperty().removeListener(listener);
+//            CssParser.errorsProperty().removeListener(listener);
 //        }
 //        
 //        return s != null && listener.getErrors().isEmpty();
@@ -1253,7 +1253,7 @@
 //    public static Set<String> lookupImagesInStyle(String style) {
 //        if (style != null) {
 //            try {
-//                Stylesheet s = CSSParser.getInstance().parseInlineStyle(new StyleableStub(style));
+//                Stylesheet s = new CssParser().parseInlineStyle(new StyleableStub(style));
 //                return lookupImagesInStylesheet(s);
 //            } catch (RuntimeException ex) {
 //                Utils.println(ex.getMessage());
@@ -1268,7 +1268,7 @@
 //                startListeningToCssErrors(project);
 //            }
 //            try {
-//                Stylesheet s = CSSParser.getInstance().parse(uri.toURL());
+//                Stylesheet s = new CssParser().parse(uri.toURL());
 //                return lookupImagesInStylesheet(s);
 //            } catch (Exception ex) {
 //                Utils.println(ex.getMessage());
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssValueConverter.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssValueConverter.java	Thu Sep 10 11:21:20 2015 +1200
@@ -35,14 +35,14 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.util.ColorEncoder;
 import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
 import com.oracle.javafx.scenebuilder.kit.util.MathUtils;
-import com.sun.javafx.css.Declaration;
-import com.sun.javafx.css.Rule;
-import com.sun.javafx.css.Size;
-import com.sun.javafx.css.converters.PaintConverter;
-import com.sun.javafx.css.converters.PaintConverter.LinearGradientConverter;
-import com.sun.javafx.css.parser.DeriveColorConverter;
-import com.sun.javafx.css.parser.DeriveSizeConverter;
-import com.sun.javafx.css.parser.LadderConverter;
+import javafx.css.Declaration;
+import javafx.css.Rule;
+import javafx.css.Size;
+import javafx.css.converter.PaintConverter;
+import javafx.css.converter.PaintConverter.LinearGradientConverter;
+import javafx.css.converter.DeriveColorConverter;
+import javafx.css.converter.DeriveSizeConverter;
+import javafx.css.converter.LadderConverter;
 import java.lang.reflect.Array;
 import java.util.ArrayList;
 import java.util.Collection;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/NodeCssState.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/NodeCssState.java	Thu Sep 10 11:21:20 2015 +1200
@@ -35,8 +35,8 @@
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
 import com.oracle.javafx.scenebuilder.kit.util.CssInternal;
 import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
-import com.sun.javafx.css.Rule;
-import com.sun.javafx.css.Style;
+import javafx.css.Rule;
+import javafx.css.Style;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/treeview/HierarchyTreeCell.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/treeview/HierarchyTreeCell.java	Thu Sep 10 11:21:20 2015 +1200
@@ -65,7 +65,6 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask;
 import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask.Accessory;
 import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
-import com.sun.javafx.css.CssError;
 
 import java.net.URL;
 import java.util.List;
@@ -74,6 +73,7 @@
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.WeakChangeListener;
 import javafx.collections.ObservableList;
+import javafx.css.CssParser;
 import javafx.event.EventHandler;
 import javafx.scene.control.TreeCell;
 import javafx.scene.control.TreeItem;
@@ -908,9 +908,9 @@
         if (r.getIOException() != null) {
             result.append(r.getIOException());
         } else {
-            assert r.getCssErrors().isEmpty() == false;
+            assert r.getParseErrors().isEmpty() == false;
             int errorCount = 0;
-            for (CssError e : r.getCssErrors()) {
+            for (CssParser.ParseError e : r.getParseErrors()) {
                 result.append(e.getMessage());
                 errorCount++;
                 if (errorCount < 5) {
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StyleEditor.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StyleEditor.java	Thu Sep 10 11:21:20 2015 +1200
@@ -35,9 +35,7 @@
 import com.oracle.javafx.scenebuilder.kit.editor.i18n.I18N;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
 import com.oracle.javafx.scenebuilder.kit.util.CssInternal;
-import com.sun.javafx.css.CssError;
-import com.sun.javafx.css.StyleManager;
-import com.sun.javafx.css.parser.CSSParser;
+import javafx.css.CssParser;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -235,7 +233,7 @@
         private String currentValue;
         private EditorItemDelegate editor;
         private boolean parsingError = false;
-        private ListChangeListener<CssError> errorListener;
+        private ListChangeListener<CssParser.ParseError> errorListener;
 
         public StyleItem(EditorItemDelegate editor, List<String> suggestedList) {
 //            System.out.println("New StyleItem.");
@@ -309,8 +307,8 @@
             errorListener = change -> {
                 while (change.next()) {
                     if (change.wasAdded()) {
-                        for (CssError error : change.getAddedSubList()) {
-                            if (error instanceof CssError.InlineStyleParsingError) {
+                        for (CssParser.ParseError error : change.getAddedSubList()) {
+                            if ("InlineStyleParsingError".equals(error.getClass().getSimpleName())) {
                                 parsingError = true;
                                 break;
                             }
@@ -339,9 +337,9 @@
 
             // Parse the style, and set the parsingError boolean if any error
             parsingError = false;
-            StyleManager.errorsProperty().addListener(errorListener);
-            new CSSParser().parseInlineStyle(new StyleableStub(value));
-            StyleManager.errorsProperty().removeListener(errorListener);
+            CssParser.errorsProperty().addListener(errorListener);
+            new CssParser().parseInlineStyle(new StyleableStub(value));
+            CssParser.errorsProperty().removeListener(errorListener);
 
             return value;
         }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/report/CSSParsingReport.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/report/CSSParsingReport.java	Thu Sep 10 11:21:20 2015 +1200
@@ -32,9 +32,7 @@
 
 package com.oracle.javafx.scenebuilder.kit.editor.report;
 
-import com.sun.javafx.css.CssError;
-import com.sun.javafx.css.StyleManager;
-import com.sun.javafx.css.parser.CSSParser;
+import javafx.css.CssParser;
 import java.io.IOException;
 import java.nio.file.Path;
 import java.util.ArrayList;
@@ -49,22 +47,22 @@
 public class CSSParsingReport {
     private final Path stylesheetPath;
     private IOException ioException;
-    private final List<CssError> cssErrors = new ArrayList<>();
+    private final List<CssParser.ParseError> parseErrors = new ArrayList<>();
     
     public CSSParsingReport(Path stylesheetPath) {
         assert stylesheetPath != null;
         
         this.stylesheetPath = stylesheetPath;
-        final Set<CssError> previousErrors = new HashSet<>(StyleManager.errorsProperty());
+        final Set<CssParser.ParseError> previousErrors = new HashSet<>(CssParser.errorsProperty());
         try {
-            new CSSParser().parse(stylesheetPath.toUri().toURL());
+            new CssParser().parse(stylesheetPath.toUri().toURL());
             // Leave this.ioException to null
-            cssErrors.addAll(StyleManager.errorsProperty());
-            cssErrors.removeAll(previousErrors);
+            parseErrors.addAll(CssParser.errorsProperty());
+            parseErrors.removeAll(previousErrors);
         } catch(IOException x) {
             this.ioException = x;
         } finally {
-            StyleManager.errorsProperty().removeAll(cssErrors);
+            CssParser.errorsProperty().removeAll(parseErrors);
         }
     }
 
@@ -73,14 +71,14 @@
     }
     
     public boolean isEmpty() {
-        return (ioException == null) && cssErrors.isEmpty();
+        return (ioException == null) && parseErrors.isEmpty();
     }
     
     public IOException getIOException() {
         return ioException;
     }
     
-    public List<CssError> getCssErrors() {
-        return Collections.unmodifiableList(cssErrors);
+    public List<CssParser.ParseError> getParseErrors() {
+        return Collections.unmodifiableList(parseErrors);
     }
 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMBuilderFactory.java	Tue Sep 08 17:07:09 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.oracle.javafx.scenebuilder.kit.fxom;
-
-import javafx.fxml.JavaFXBuilderFactory;
-import javafx.scene.image.Image;
-import javafx.util.Builder;
-import javafx.util.BuilderFactory;
-
-import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
-
-/**
- *
- */
-class FXOMBuilderFactory implements BuilderFactory {
-
-    final JavaFXBuilderFactory delegate;
-    
-    public FXOMBuilderFactory(ClassLoader classLoader) {
-        assert classLoader != null;
-        
-        this.delegate = Deprecation.newJavaFXBuilderFactory(classLoader);
-    }
-    
-    /*
-     * BuilderFactory
-     */
-    
-    @Override
-    public Builder<?> getBuilder(Class<?> type) {
-        final Builder<?> result;
-        
-        if (Image.class == type) {
-           result = new FXOMImageBuilder();
-        } else {
-           result = delegate.getBuilder(type);
-        }
-        
-        return result;
-    }
-    
-}
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMImageBuilder.java	Tue Sep 08 17:07:09 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package com.oracle.javafx.scenebuilder.kit.fxom;
-
-import com.oracle.javafx.scenebuilder.kit.util.URLUtils;
-import com.sun.javafx.fxml.builder.JavaFXImageBuilder;
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-/**
- *
- */
-class FXOMImageBuilder extends JavaFXImageBuilder {
-    
-    /*
-     * JavaFXImageBuilder
-     */
-    
-    @Override
-    public Object put(String key, Object value) {
-        Object fixedValue;
-        
-        if ("url".equals(key)) { //NOI18N
-            if (value == null) {
-                fixedValue = getMissingImageURL().toExternalForm();
-            } else {
-                try {
-                    // Check that value is a valid URI
-                    final File imageFile = URLUtils.getFile(value.toString());
-                    if (imageFile == null) { // Not a file URI
-                        fixedValue = getMissingImageURL().toExternalForm();
-                    } else if (imageFile.canRead()) {
-                        fixedValue = value;
-                    } else {
-                        fixedValue = getMissingImageURL().toExternalForm();
-                    }
-                } catch(URISyntaxException x) {
-                    fixedValue = getMissingImageURL().toExternalForm();
-                }
-            }
-        } else {
-            fixedValue = value;
-        }
-        
-        return super.put(key, fixedValue);
-    }
-        
-    
-    /*
-     * Private
-     */
-    
-    private static URL missingImageURL;
-    
-    private static URL getMissingImageURL() {
-        if (missingImageURL == null) {
-            missingImageURL = FXOMImageBuilder.class.getResource("missing-image.png"); //NOI18N
-            if (missingImageURL == null) {
-                throw new RuntimeException("Cannot find missing-image.png"); //NOI18N
-            }
-        }
-        return missingImageURL;
-    }
-}
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMLoader.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMLoader.java	Thu Sep 10 11:21:20 2015 +1200
@@ -33,7 +33,7 @@
 
 import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
 import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
-import com.sun.javafx.fxml.LoadListener;
+import javafx.fxml.LoadListener;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -76,10 +76,9 @@
         fxmlLoader.setLocation(document.getLocation());
         fxmlLoader.setResources(new ResourceKeyCollector(document.getResources()));
         fxmlLoader.setClassLoader(new TransientClassLoader(classLoader));
-        fxmlLoader.setBuilderFactory(new FXOMBuilderFactory(classLoader));
+        fxmlLoader.setLoadListener(this);
         Deprecation.setStaticLoad(fxmlLoader, true);
-        Deprecation.setLoadListener(fxmlLoader, this);
-        
+
         final Charset utf8 = Charset.forName("UTF-8");
         try (final InputStream is = new ByteArrayInputStream(fxmlText.getBytes(utf8))) {
             glueCursor = new GlueCursor(document.getGlue());
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/CssInternal.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/CssInternal.java	Thu Sep 10 11:21:20 2015 +1200
@@ -59,13 +59,13 @@
 import com.oracle.javafx.scenebuilder.kit.editor.EditorPlatform.Theme;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
-import com.sun.javafx.css.CompoundSelector;
-import com.sun.javafx.css.Rule;
-import com.sun.javafx.css.Selector;
-import com.sun.javafx.css.SimpleSelector;
-import com.sun.javafx.css.Style;
-import com.sun.javafx.css.Stylesheet;
-import com.sun.javafx.css.parser.CSSParser;
+import javafx.css.CompoundSelector;
+import javafx.css.Rule;
+import javafx.css.Selector;
+import javafx.css.SimpleSelector;
+import javafx.css.Style;
+import javafx.css.Stylesheet;
+import javafx.css.CssParser;
 
 /**
  *
@@ -237,7 +237,7 @@
         Set<String> styleClasses = new HashSet<>();
         Stylesheet s;
         try {
-            s = new CSSParser().parse(url);
+            s = new CssParser().parse(url);
         } catch (IOException ex) {
             System.out.println("Warning: Invalid Stylesheet " + url); //NOI18N
             return styleClasses;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java	Thu Sep 10 11:21:20 2015 +1200
@@ -31,12 +31,8 @@
  */
 package com.oracle.javafx.scenebuilder.kit.util;
 
-import com.sun.glass.ui.Application;
-import com.sun.glass.ui.Application.EventHandler;
-import com.sun.javafx.css.Style;
-import com.sun.javafx.geom.PickRay;
-import com.sun.javafx.scene.control.skin.MenuBarSkin;
-import com.sun.javafx.scene.input.PickResultChooser;
+import javafx.css.Style;
+import javafx.scene.control.skin.MenuBarSkin;
 
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -49,7 +45,6 @@
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
 import javafx.fxml.FXMLLoader;
-import javafx.fxml.JavaFXBuilderFactory;
 import javafx.geometry.Bounds;
 import javafx.geometry.Point2D;
 import javafx.scene.Group;
@@ -100,7 +95,7 @@
     }
 
 //    // RT-21096 : Promote impl_getStyleMap / impl_setStyleMap to public API
-    public static void setStyleMap(Node node, ObservableMap<StyleableProperty<?>, List<com.sun.javafx.css.Style>> map) {
+    public static void setStyleMap(Node node, ObservableMap<StyleableProperty<?>, List<javafx.css.Style>> map) {
         node.impl_setStyleMap(map);
     }
 
@@ -184,18 +179,35 @@
         loader.impl_setStaticLoad(staticLoad);
     }
 
-    // RT-21228 : Promote setLoadListener to public API
-    public static void setLoadListener(FXMLLoader loader, com.sun.javafx.fxml.LoadListener loadListener) {
-        loader.impl_setLoadListener(loadListener);
-    }
-
     // RT-20184 : FX should provide a Parent.pick() routine
     public static Node pick(Node node, double sceneX, double sceneY) {
-        final Point2D p = node.sceneToLocal(sceneX, sceneY, true /* rootScene */);
-        final PickRay pickRay = new PickRay(p.getX(), p.getY(), 1.0, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
-        final PickResultChooser prc = new PickResultChooser();
-        node.impl_pickNode(pickRay, prc);
-        return prc.getIntersectedNode();
+        Point2D p = node.sceneToLocal(sceneX, sceneY, true /* rootScene */);
+
+        // check if the given node has the point inside it, or else we drop out
+        if (!node.contains(p)) return null;
+
+        // at this point we know that _at least_ the given node is a valid
+        // answer to the given point, so we will return that if we don't find
+        // a better child option
+        if (node instanceof Parent) {
+            // we iterate through all children (recursively). We don't stop
+            // iteration when we hit the first child that also contains the bounds,
+            // as we know that later nodes have a higher z-ordering, so they
+            // should be picked before the earlier nodes.
+            Node bestMatchingChild = null;
+            for (Node child : ((Parent)node).getChildrenUnmodifiable()) {
+                p = child.sceneToLocal(sceneX, sceneY, true /* rootScene */);
+                if (child.contains(p)) {
+                    bestMatchingChild = child;
+                }
+            }
+
+            if (bestMatchingChild != null) {
+                return pick(bestMatchingChild, sceneX, sceneY);
+            }
+        }
+
+        return node;
     }
 
     // RT-19857 : Keeping menu in the Mac menu bar when there is no more stage
@@ -208,14 +220,6 @@
 //        return loader.getParseTrace();
 //    }
 
-    public static void setPlatformEventHandler(EventHandler eventHandler) {
-        Application.GetApplication().setEventHandler(eventHandler);
-    }
-
-    public static EventHandler getPlatformEventHandler() {
-        return Application.GetApplication().getEventHandler();
-    }
-
     public static int getGridPaneColumnCount(GridPane gridPane) {
         return gridPane.impl_getColumnCount();
     }
@@ -245,10 +249,6 @@
         }
     }
 
-    public static JavaFXBuilderFactory newJavaFXBuilderFactory(ClassLoader classLoader) {
-        return new JavaFXBuilderFactory(classLoader);
-    }
-    
     // Deprecated as of FX 8 u20, and replaced by new method getTreeItemLevel:
     // using it would break ability to compile over JDK 8 GA, not an option for now.
     public static int getNodeLevel(TreeItem<?> item) {
--- a/apps/toys/Hello/src/main/java/hello/HelloButton.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/toys/Hello/src/main/java/hello/HelloButton.java	Thu Sep 10 11:21:20 2015 +1200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, 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
@@ -30,7 +30,7 @@
 import javafx.scene.Group;
 import javafx.scene.Scene;
 import javafx.scene.control.Button;
-import javafx.scene.input.KeyEvent;
+
 import javafx.stage.Stage;
 
 public class HelloButton extends Application {
@@ -51,7 +51,54 @@
 
         button1.setOnAction(e -> System.out.println("Event: " + e));
 
-        button1.addEventHandler(KeyEvent.KEY_RELEASED, e -> System.out.println("Event: " + e));
+//        // add new mappings
+//        // The J key should fire the button
+//        button1.getInputMap().getMappings().add(new KeyMapping(J, e -> button1.fire()));
+//
+//        // The SPACE key should no longer fire the button (and instead just print text to console)
+//        button1.getInputMap().getMappings().add(new KeyMapping(SPACE, e -> {
+//            System.out.println("This should replace the default action event!");
+//        }));
+//
+//        // The degenerate case where we accept all input - a null KeyCombination matches anything
+//        // and results in firing the button
+//        button1.getInputMap().getMappings().add(new KeyMapping(new KeyBinding(KEY_PRESSED), e -> {
+//            System.out.println("catch-all mapping caught event: " + e);
+//            button1.fire();
+//        }));
+//
+//
+//        // test one: lookup the J mapping and disable it
+//        button1.getInputMap().lookupMapping(new KeyBinding(J)).ifPresent(mapping -> {
+//            System.out.println("disabling J key mapping");
+//            mapping.setDisabled(true);
+//        });
+//
+//        // test two: the degenerate case - we need to iterate through the mappings
+//        // to find the null keyCombination, so that we may install an interceptor
+//        // to block the tab key. This means all keys except tab will work.
+////        button1.getInputMap().lookupMapping(new KeyBinding(KEY_TYPED)).ifPresent(mapping -> {
+////            System.out.println("adding interceptor for Tab key mapping");
+////            mapping.getInterceptors().add(event -> {
+////                if (! (event instanceof KeyEvent)) return true;
+////                return KeyCode.TAB != ((KeyEvent)event).getCode();
+////            });
+////        });
+////        button1.getInputMap().getInterceptors().add(event -> {
+////            if (! (event instanceof KeyEvent)) return true;
+////            return KeyCode.X != ((KeyEvent)event).getCode();
+////        });
+//
+//        button1.getInputMap().getInterceptors().add(new KeyMappingInterceptor(new KeyBinding(SPACE)));
+//
+//        // test three: remove a mapping
+//        button1.getInputMap().lookupMapping(new KeyBinding(J)).ifPresent(mapping -> {
+//            System.out.println("removing J key mapping");
+//            button1.getInputMap().getMappings().remove(mapping);
+//        });
+//
+//        scene.getRoot().addEventHandler(KeyEvent.ANY, e -> System.out.println("e = " + e));
+
 
         ((Group)scene.getRoot()).getChildren().add(button1);
 
@@ -60,12 +107,12 @@
         button2.setLayoutX(25);
         button2.layoutYProperty().bind(button1.heightProperty().add(button1.layoutYProperty()));
         ((Group)scene.getRoot()).getChildren().add(button2);
-
-        Button button3 = new Button();
-        button3.setText("Click Me Three");
-        button3.setLayoutX(25);
-        button3.layoutYProperty().bind(button2.heightProperty().add(button2.layoutYProperty()));
-        ((Group)scene.getRoot()).getChildren().add(button3);
+//
+//        Button button3 = new Button();
+//        button3.setText("Click Me Three");
+//        button3.setLayoutX(25);
+//        button3.layoutYProperty().bind(button2.heightProperty().add(button2.layoutYProperty()));
+//        ((Group)scene.getRoot()).getChildren().add(button3);
 
         stage.setScene(scene);
         stage.show();
--- a/apps/toys/Hello/src/main/java/hello/HelloHighContrast.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/toys/Hello/src/main/java/hello/HelloHighContrast.java	Thu Sep 10 11:21:20 2015 +1200
@@ -25,7 +25,6 @@
 
 package hello;
 
-import com.sun.javafx.css.StyleManager;
 import javafx.application.Application;
 import javafx.geometry.Insets;
 import javafx.scene.Scene;
@@ -34,11 +33,11 @@
 import javafx.scene.layout.VBox;
 import javafx.stage.Stage;
 
+import com.sun.javafx.application.PlatformImpl;
+import com.sun.javafx.css.StyleManager;
+
 public class HelloHighContrast extends Application {
 
-    private static final String MODENA_PATH = "com/sun/javafx/scene/control/skin/modena/";
-    private String lastStyleUsed = null;
-
     public static void main(String[] args) {
         Application.launch(args);
     }
@@ -46,18 +45,13 @@
     @Override public void start(Stage stage) {
         final ToggleGroup group = new ToggleGroup();
         group.selectedToggleProperty().addListener(ov -> {
-            // remove old style
-            if (lastStyleUsed != null) {
-                StyleManager.getInstance().removeUserAgentStylesheet(MODENA_PATH + lastStyleUsed);
-                lastStyleUsed = null;
-            }
-
-            // install new style
             String userData = (String) (group.getSelectedToggle() != null ? group.getSelectedToggle().getUserData() : null);
             if (userData != null) {
-                lastStyleUsed = userData;
-                StyleManager.getInstance().addUserAgentStylesheet(MODENA_PATH + userData);
+                System.setProperty("com.sun.javafx.highContrastTheme", userData);
+            } else {
+                System.clearProperty("com.sun.javafx.highContrastTheme");
             }
+            PlatformImpl.setAccessibilityTheme(null); // Reads the system property
         });
         
         ToggleButton disableHighContrast = new ToggleButton("Disable High Contrast");
@@ -68,17 +62,17 @@
 
         ToggleButton whiteOnBlackBtn = new ToggleButton("White on black");
         whiteOnBlackBtn.setMaxWidth(Double.MAX_VALUE);
-        whiteOnBlackBtn.setUserData("whiteOnBlack.css");
+        whiteOnBlackBtn.setUserData("WHITEONBLACK");
         whiteOnBlackBtn.setToggleGroup(group);
 
         ToggleButton blackOnWhiteBtn = new ToggleButton("Black on white");
         blackOnWhiteBtn.setMaxWidth(Double.MAX_VALUE);
-        blackOnWhiteBtn.setUserData("blackOnWhite.css");
+        blackOnWhiteBtn.setUserData("BLACKONWHITE");
         blackOnWhiteBtn.setToggleGroup(group);
 
         ToggleButton yellowOnBlackBtn = new ToggleButton("Yellow on black");
         yellowOnBlackBtn.setMaxWidth(Double.MAX_VALUE);
-        yellowOnBlackBtn.setUserData("yellowOnBlack.css");
+        yellowOnBlackBtn.setUserData("YELLOWONBLACK");
         yellowOnBlackBtn.setToggleGroup(group);
 
         VBox vbox = new VBox(10, disableHighContrast, whiteOnBlackBtn, blackOnWhiteBtn, yellowOnBlackBtn);
@@ -91,4 +85,4 @@
         stage.setHeight(200);
         stage.show();
     }
-}
\ No newline at end of file
+}
--- a/apps/toys/Hello/src/main/java/hello/HelloToggleButton.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/toys/Hello/src/main/java/hello/HelloToggleButton.java	Thu Sep 10 11:21:20 2015 +1200
@@ -33,6 +33,7 @@
 import javafx.scene.Scene;
 import javafx.scene.control.ToggleButton;
 import javafx.scene.control.ToggleGroup;
+import javafx.scene.layout.VBox;
 import javafx.stage.Stage;
 
 /**
@@ -45,7 +46,7 @@
     }
 
     @Override public void start(Stage stage) {
-        Scene scene = newScene();
+//        Scene scene = newScene();
         
         final ToggleGroup group = new ToggleGroup();
         group.selectedToggleProperty().addListener(ov -> System.out.println("UserData for selected Toggle: " +
@@ -61,27 +62,41 @@
         button2.setUserData("Button 2");
         button2.setLayoutY(40);
         button2.setToggleGroup(group);
-        
 
-        ObservableList<Node> content = ((Group)scene.getRoot()).getChildren();
-        content.add(button1);
-        content.add(button2);
+        ToggleButton button3 = new ToggleButton("No, *I* am your father");
+//        button1.setUserData("Button 1");
+        button3.setToggleGroup(group);
+//        button1.setSelected(true);
+
+        ToggleButton button4 = new ToggleButton("Nooooooooo!");
+//        button2.setUserData("Button 2");
+//        button2.setLayoutY(40);
+        button4.setToggleGroup(group);
+
+        VBox vbox = new VBox(10, button1, button2, button3, button4);
+
+        Scene scene = new Scene(vbox);
+//        ObservableList<Node> content = ((Group)scene.getRoot()).getChildren();
+//        content.add(button1);
+//        content.add(button2);
+//        content.add(button3);
+//        content.add(button4);
 
         stage.setScene(scene);
         stage.show();
     }
 
-    private static Stage newStage() {
-        Stage stage = new Stage();
-        stage.setTitle("Hello ToggleButton");
-        stage.setWidth(600);
-        stage.setHeight(450);
-        return stage;
-    }
+//    private static Stage newStage() {
+//        Stage stage = new Stage();
+//        stage.setTitle("Hello ToggleButton");
+//        stage.setWidth(600);
+//        stage.setHeight(450);
+//        return stage;
+//    }
     
-    private static Scene newScene() {
-        Scene scene = new Scene(new Group());
-        scene.setFill(GHOSTWHITE);
-        return scene;
-    }
+//    private static Scene newScene() {
+//        Scene scene = new Scene(new Group());
+//        scene.setFill(GHOSTWHITE);
+//        return scene;
+//    }
 }
--- a/apps/toys/Hello/src/main/java/hello/dialog/dialogs/CommandLinksDialog.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/toys/Hello/src/main/java/hello/dialog/dialogs/CommandLinksDialog.java	Thu Sep 10 11:21:20 2015 +1200
@@ -28,7 +28,7 @@
 import java.util.Arrays;
 import java.util.List;
 
-import com.sun.javafx.scene.control.skin.AccordionSkin;
+import javafx.scene.control.skin.AccordionSkin;
 import com.sun.javafx.scene.control.skin.resources.ControlResources;
 import hello.HelloAccordion;
 import javafx.beans.binding.DoubleBinding;
--- a/apps/toys/Hello/src/main/java/hello/dialog/dialogs/ExceptionDialog.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/toys/Hello/src/main/java/hello/dialog/dialogs/ExceptionDialog.java	Thu Sep 10 11:21:20 2015 +1200
@@ -27,7 +27,7 @@
 import java.io.PrintWriter;
 import java.io.StringWriter;
 
-import com.sun.javafx.scene.control.skin.AccordionSkin;
+import javafx.scene.control.skin.AccordionSkin;
 import javafx.scene.Node;
 import javafx.scene.control.ButtonType;
 import javafx.scene.control.Dialog;
--- a/apps/toys/Hello/src/main/java/hello/dialog/dialogs/FontSelectorDialog.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/toys/Hello/src/main/java/hello/dialog/dialogs/FontSelectorDialog.java	Thu Sep 10 11:21:20 2015 +1200
@@ -31,7 +31,7 @@
 import java.util.Set;
 import java.util.function.Predicate;
 
-import com.sun.javafx.scene.control.skin.AccordionSkin;
+import javafx.scene.control.skin.AccordionSkin;
 
 import javafx.application.Platform;
 import javafx.beans.binding.DoubleBinding;
--- a/apps/toys/Hello/src/main/java/hello/dialog/wizard/Wizard.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/apps/toys/Hello/src/main/java/hello/dialog/wizard/Wizard.java	Thu Sep 10 11:21:20 2015 +1200
@@ -29,7 +29,7 @@
 import java.util.Optional;
 import java.util.Stack;
 
-import com.sun.javafx.scene.control.skin.AccordionSkin;
+import javafx.scene.control.skin.AccordionSkin;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.collections.FXCollections;
--- a/modules/controls/src/android/java/com/sun/javafx/scene/control/skin/TextAreaSkinAndroid.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/modules/controls/src/android/java/com/sun/javafx/scene/control/skin/TextAreaSkinAndroid.java	Thu Sep 10 11:21:20 2015 +1200
@@ -28,6 +28,7 @@
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableValue;
 import javafx.scene.control.TextArea;
+import javafx.scene.control.skin.TextAreaSkin;
 
 public class TextAreaSkinAndroid extends TextAreaSkin {
 
--- a/modules/controls/src/android/java/com/sun/javafx/scene/control/skin/TextFieldSkinAndroid.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/modules/controls/src/android/java/com/sun/javafx/scene/control/skin/TextFieldSkinAndroid.java	Thu Sep 10 11:21:20 2015 +1200
@@ -30,6 +30,7 @@
 import javafx.scene.control.TextField;
 
 import com.sun.javafx.scene.control.behavior.TextFieldBehavior;
+import javafx.scene.control.skin.TextFieldSkin;
 
 public class TextFieldSkinAndroid extends TextFieldSkin {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/ContextMenuContent.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,1601 @@
+/*
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.scene.control;
+
+import com.sun.javafx.scene.control.behavior.TwoLevelFocusPopupBehavior;
+import com.sun.javafx.scene.control.skin.Utils;
+import javafx.animation.Animation.Status;
+import javafx.animation.KeyFrame;
+import javafx.animation.Timeline;
+import javafx.beans.InvalidationListener;
+import javafx.beans.WeakInvalidationListener;
+import javafx.beans.property.ReadOnlyBooleanProperty;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.collections.ListChangeListener;
+import javafx.collections.ObservableList;
+import javafx.css.CssMetaData;
+import javafx.css.PseudoClass;
+import javafx.css.Styleable;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.geometry.*;
+import javafx.scene.AccessibleAction;
+import javafx.scene.AccessibleAttribute;
+import javafx.scene.AccessibleRole;
+import javafx.scene.Node;
+import javafx.scene.Parent;
+import javafx.scene.control.*;
+import javafx.scene.control.skin.MenuBarSkin;
+import javafx.scene.input.KeyEvent;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.input.ScrollEvent;
+import javafx.scene.layout.Region;
+import javafx.scene.layout.StackPane;
+import javafx.scene.layout.VBox;
+import javafx.scene.shape.Rectangle;
+import javafx.stage.Window;
+import javafx.util.Duration;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * This is a the SkinBase for ContextMenu based controls so that the CSS parts
+ * work right, because otherwise we would have to copy the Keys from there to here.
+ */
+public class ContextMenuContent extends Region {
+
+    private ContextMenu contextMenu;
+
+    /***************************************************************************
+     * UI subcomponents
+     **************************************************************************/
+
+    private double maxGraphicWidth = 0; // we keep this margin to left for graphic
+    private double maxRightWidth = 0;
+    private double maxLabelWidth = 0;
+    private double maxRowHeight = 0;
+    private double maxLeftWidth = 0;
+    private double oldWidth = 0;
+
+    private Rectangle clipRect;
+    MenuBox itemsContainer;
+    private ArrowMenuItem upArrow;
+    private ArrowMenuItem downArrow;
+
+    /*
+     * We maintain a current focused index which is used
+     * in keyboard navigation of menu items.
+     */
+    private int currentFocusedIndex = -1;
+    
+    private boolean itemsDirty = true;
+    private InvalidationListener popupShowingListener = arg0 -> {
+        updateItems();
+    };
+    private WeakInvalidationListener weakPopupShowingListener = 
+            new WeakInvalidationListener(popupShowingListener);
+
+    /***************************************************************************
+     * Constructors
+     **************************************************************************/
+    public ContextMenuContent(final ContextMenu popupMenu) {
+        this.contextMenu = popupMenu;
+        clipRect = new Rectangle();
+         clipRect.setSmooth(false);
+        itemsContainer = new MenuBox();
+//        itemsContainer = new VBox();
+        itemsContainer.setClip(clipRect);
+        
+        upArrow = new ArrowMenuItem(this);
+        upArrow.setUp(true);
+        upArrow.setFocusTraversable(false);
+
+        downArrow = new ArrowMenuItem(this);
+        downArrow.setUp(false);
+        downArrow.setFocusTraversable(false);
+        getChildren().add(itemsContainer);
+        getChildren().add(upArrow);
+        getChildren().add(downArrow);
+        initialize();
+        setUpBinds();
+        updateItems();
+        // RT-20197 add menuitems only on first show.
+        popupMenu.showingProperty().addListener(weakPopupShowingListener);
+
+        /*
+        ** only add this if we're on an embedded
+        ** platform that supports 5-button navigation 
+        */
+        if (Utils.isTwoLevelFocus()) {
+            new TwoLevelFocusPopupBehavior(this);
+        }
+    }
+    
+    //For access from controls
+    public VBox getItemsContainer() {
+        return itemsContainer;
+    }
+    //For testing purpose only
+    int getCurrentFocusIndex() {
+        return currentFocusedIndex;
+    }
+    //For testing purpose only
+    void setCurrentFocusedIndex(int index) {
+        if (index < itemsContainer.getChildren().size()) {
+            currentFocusedIndex = index;
+        }
+    }
+    
+    private void updateItems() {
+        if (itemsDirty) {
+            updateVisualItems();
+            itemsDirty = false;
+        }
+    }
+
+    private void computeVisualMetrics() {
+        maxRightWidth = 0;
+        maxLabelWidth = 0;
+        maxRowHeight = 0;
+        maxGraphicWidth = 0;
+        maxLeftWidth = 0;
+
+        for (int i = 0; i < itemsContainer.getChildren().size(); i++) {
+            Node child = itemsContainer.getChildren().get(i);
+            if (child instanceof MenuItemContainer) {
+                final MenuItemContainer menuItemContainer = (MenuItemContainer)itemsContainer.getChildren().get(i);
+                
+                if (! menuItemContainer.isVisible()) continue;
+                
+                double alt = -1;
+                Node n = menuItemContainer.left;
+                if (n != null) {
+                    if (n.getContentBias() == Orientation.VERTICAL) { // width depends on height
+                        alt = snapSize(n.prefHeight(-1));
+                    } else alt = -1;
+                    maxLeftWidth = Math.max(maxLeftWidth, snapSize(n.prefWidth(alt)));
+                    maxRowHeight = Math.max(maxRowHeight, n.prefHeight(-1));
+                }
+
+                n = menuItemContainer.graphic;
+                if (n != null) {
+                    if (n.getContentBias() == Orientation.VERTICAL) { // width depends on height
+                        alt = snapSize(n.prefHeight(-1));
+                    } else alt = -1;
+                    maxGraphicWidth = Math.max(maxGraphicWidth, snapSize(n.prefWidth(alt)));
+                    maxRowHeight = Math.max(maxRowHeight, n.prefHeight(-1));
+                }
+
+                n = menuItemContainer.label;
+                if (n != null) {
+                    if (n.getContentBias() == Orientation.VERTICAL) {
+                        alt = snapSize(n.prefHeight(-1));
+                    } else alt = -1;
+                    maxLabelWidth = Math.max(maxLabelWidth, snapSize(n.prefWidth(alt)));
+                    maxRowHeight = Math.max(maxRowHeight, n.prefHeight(-1));
+                }
+
+                n = menuItemContainer.right;
+                if (n != null) {
+                    if (n.getContentBias() == Orientation.VERTICAL) { // width depends on height
+                        alt = snapSize(n.prefHeight(-1));
+                    } else alt = -1;
+                    maxRightWidth = Math.max(maxRightWidth, snapSize(n.prefWidth(alt)));
+                    maxRowHeight = Math.max(maxRowHeight, n.prefHeight(-1));
+                }
+            }
+        }
+
+        // Fix for RT-38838.
+        // This fixes the issue where CSS is applied to a menu after it has been
+        // showing, resulting in its bounds changing. In this case, we need to
+        // shift the submenu such that it is properly aligned with its parent menu.
+        //
+        // To do this, we must firstly determine if the open submenu is shifted
+        // horizontally to appear on the other side of this menu, as this is the
+        // only situation where shifting has to happen. If so, we need to check
+        // if we should shift the submenu due to changes in width.
+        //
+        // We need to get the parent menu of this contextMenu, so that we only
+        // modify the X value in the following conditions:
+        // 1) There exists a parent menu
+        // 2) The parent menu is in the correct position (i.e. to the left of this
+        //    menu in normal LTR systems).
+        final double newWidth = maxRightWidth + maxLabelWidth + maxGraphicWidth + maxLeftWidth;
+        Window ownerWindow = contextMenu.getOwnerWindow();
+        if (ownerWindow instanceof ContextMenu) {
+            if (contextMenu.getX() < ownerWindow.getX()) {
+                if (oldWidth != newWidth) {
+                    contextMenu.setX(contextMenu.getX() + oldWidth - newWidth);
+                }
+            }
+        }
+
+        oldWidth = newWidth;
+    }
+    
+    private void updateVisualItems() {
+        ObservableList<Node> itemsContainerChilder = itemsContainer.getChildren();
+
+        disposeVisualItems();
+        
+        for (int row = 0; row < getItems().size(); row++) {
+            final MenuItem item = getItems().get(row);
+            if (item instanceof CustomMenuItem && ((CustomMenuItem) item).getContent() == null) {
+                continue;
+            }
+            
+            if (item instanceof SeparatorMenuItem) {
+                // we don't want the hover highlight for separators, so for
+                // now this is the simplest approach - just remove the
+                // background entirely. This may cause issues if people
+                // intend to style the background differently.
+                Node node = ((CustomMenuItem) item).getContent();
+                node.visibleProperty().bind(item.visibleProperty());
+                itemsContainerChilder.add(node);
+                // Add the (separator) menu item to properties map of this node.
+                // Special casing this for separator :
+                // This allows associating this container with SeparatorMenuItem.
+                node.getProperties().put(MenuItem.class, item);
+            } else {
+                MenuItemContainer menuItemContainer = new MenuItemContainer(item);
+                menuItemContainer.visibleProperty().bind(item.visibleProperty());
+                itemsContainerChilder.add(menuItemContainer);
+            }
+        }
+        
+        // Add the Menu to properties map of this skin. Used by QA for testing
+        // This enables associating a parent menu for this skin showing menu items.
+        if (getItems().size() > 0) {
+            final MenuItem item = getItems().get(0);
+            getProperties().put(Menu.class, item.getParentMenu());
+        }
+
+        // RT-36513 made this applyCss(). Modified by RT-36995 to impl_reapplyCSS()
+        impl_reapplyCSS();
+    }
+
+    private void disposeVisualItems() {
+        // clean up itemsContainer
+        ObservableList<Node> itemsContainerChilder = itemsContainer.getChildren();
+        for (int i = 0, max = itemsContainerChilder.size(); i < max; i++) {
+            Node n = itemsContainerChilder.get(i);
+
+            if (n instanceof MenuItemContainer) {
+                MenuItemContainer container = (MenuItemContainer) n;
+                container.visibleProperty().unbind();
+                container.dispose();
+            }
+        }
+        itemsContainerChilder.clear();
+    }
+
+    /**
+     * Can be called by Skins when they need to clean up the content of any 
+     * ContextMenu instances they might have created. This ensures that contents 
+     * of submenus if any, also get cleaned up.
+     */
+    public void dispose() {
+        disposeBinds();
+        disposeVisualItems();
+
+        disposeContextMenu(submenu);
+        submenu = null;
+        openSubmenu = null;
+        selectedBackground = null;
+        if (contextMenu != null) {
+            contextMenu.getItems().clear();
+            contextMenu = null;
+        }
+    }
+
+    public void disposeContextMenu(ContextMenu menu) {
+        if (menu == null) return;
+
+        Skin<?> skin = menu.getSkin();
+        if (skin == null) return;
+
+        ContextMenuContent cmContent = (ContextMenuContent)skin.getNode();
+        if (cmContent == null) return;
+
+        cmContent.dispose(); // recursive call to dispose submenus.
+    }
+
+    @Override protected void layoutChildren() {
+        if (itemsContainer.getChildren().size() == 0) return;
+        final double x = snappedLeftInset();
+        final double y = snappedTopInset();
+        final double w = getWidth() - x - snappedRightInset();
+        final double h = getHeight() - y - snappedBottomInset();
+        final double contentHeight =  snapSize(getContentHeight()); // itemsContainer.prefHeight(-1);
+
+        itemsContainer.resize(w,contentHeight);
+        itemsContainer.relocate(x, y);
+
+        if (isFirstShow && ty == 0) {
+            upArrow.setVisible(false);
+            isFirstShow = false;
+        } else {
+            upArrow.setVisible(ty < y && ty < 0);
+        }
+        downArrow.setVisible(ty + contentHeight > (y + h));
+
+        clipRect.setX(0);
+        clipRect.setY(0);
+        clipRect.setWidth(w);
+        clipRect.setHeight(h);
+
+        if (upArrow.isVisible()) {
+            final double prefHeight = snapSize(upArrow.prefHeight(-1));
+            clipRect.setHeight(snapSize(clipRect.getHeight() - prefHeight));
+            clipRect.setY(snapSize(clipRect.getY()) + prefHeight);
+            upArrow.resize(snapSize(upArrow.prefWidth(-1)), prefHeight);
+            positionInArea(upArrow, x, y, w, prefHeight, /*baseline ignored*/0,
+                    HPos.CENTER, VPos.CENTER);
+        }
+
+        if (downArrow.isVisible()) {
+            final double prefHeight = snapSize(downArrow.prefHeight(-1));
+            clipRect.setHeight(snapSize(clipRect.getHeight()) - prefHeight);
+            downArrow.resize(snapSize(downArrow.prefWidth(-1)), prefHeight);
+            positionInArea(downArrow, x, (y + h - prefHeight), w, prefHeight, /*baseline ignored*/0,
+                    HPos.CENTER, VPos.CENTER);
+        }
+    }
+
+     @Override protected double computePrefWidth(double height) {
+         computeVisualMetrics();
+         double prefWidth = 0;
+         if (itemsContainer.getChildren().size() == 0) return 0;
+         for (Node n : itemsContainer.getChildren()) {
+             if (! n.isVisible()) continue;
+             prefWidth = Math.max(prefWidth, snapSize(n.prefWidth(-1)));
+         }
+         return snappedLeftInset() + snapSize(prefWidth) + snappedRightInset();
+    }
+
+    @Override protected double computePrefHeight(double width) {
+        if (itemsContainer.getChildren().size() == 0) return 0;
+        final double screenHeight = getScreenHeight();
+        final double contentHeight = getContentHeight(); // itemsContainer.prefHeight(width);
+        double totalHeight = snappedTopInset() + snapSize(contentHeight) + snappedBottomInset();
+        // the pref height of this menu is the smaller value of the
+        // actual pref height and the height of the screens _visual_ bounds.
+        double prefHeight = (screenHeight <= 0) ? (totalHeight) : (Math.min(totalHeight, screenHeight));
+        return prefHeight;
+    }
+
+    @Override protected double computeMinHeight(double width) {
+        return 0.0;
+    }
+
+    @Override protected double computeMaxHeight(double height) {
+        return getScreenHeight();
+    }
+
+    private double getScreenHeight() {
+        if (contextMenu == null || contextMenu.getOwnerWindow() == null ||
+                contextMenu.getOwnerWindow().getScene() == null) {
+            return -1;
+        }
+        return snapSize(com.sun.javafx.util.Utils.getScreen(
+            contextMenu.getOwnerWindow().getScene().getRoot()).getVisualBounds().getHeight());
+        
+    }
+
+    private double getContentHeight() {
+        double h = 0.0d;
+        for (Node i : itemsContainer.getChildren()) {
+            if (i.isVisible()) {
+               h += snapSize(i.prefHeight(-1));
+            }
+        }
+        return h;
+    }
+  
+    // This handles shifting ty when doing keyboard navigation.
+    private void ensureFocusedMenuItemIsVisible(Node node) {
+        if (node == null) return;
+
+        final Bounds nodeBounds = node.getBoundsInParent();
+        final Bounds clipBounds = clipRect.getBoundsInParent();
+
+        if (nodeBounds.getMaxY() >= clipBounds.getMaxY()) {
+            // this is for moving down the menu
+            scroll(-nodeBounds.getMaxY() + clipBounds.getMaxY());
+        } else if (nodeBounds.getMinY() <= clipBounds.getMinY()) {
+            // this is for moving up the menu
+            scroll(-nodeBounds.getMinY() + clipBounds.getMinY());
+        }
+    }
+    
+    protected ObservableList<MenuItem> getItems() {
+        return contextMenu.getItems();
+    }
+
+    /**
+     * Finds the index of currently focused item.
+     */
+    private int findFocusedIndex() {
+         for (int i = 0; i < itemsContainer.getChildren().size(); i++) {
+            Node n = itemsContainer.getChildren().get(i);
+            if (n.isFocused()) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    private boolean isFirstShow = true;
+    private double ty;
+
+    private void initialize() {
+        // keyboard navigation support. Initially focus goes to this ContextMenu,
+        // but when the user first hits the up or down arrow keys, the focus
+        // is transferred to the first or last item respectively. Once this
+        // happens, it is up to the menu items to navigate between themselves.
+        contextMenu.focusedProperty().addListener((observable, oldValue, newValue) -> {
+            if (newValue) {
+                // initialize the focused index for keyboard navigation.
+                currentFocusedIndex = -1;
+                requestFocus();
+            }
+        });
+        
+        // RT-19624 calling requestFocus inside layout was casuing repeated layouts.
+        contextMenu.addEventHandler(Menu.ON_SHOWN, event -> {
+            for (Node child : itemsContainer.getChildren()) {
+                if (child instanceof MenuItemContainer) {
+                    final MenuItem item = ((MenuItemContainer)child).item;
+                    // When the choiceBox popup is shown, if this menu item is selected
+                    // do a requestFocus so CSS kicks in and the item is highlighted.
+                    if ("choice-box-menu-item".equals(item.getId())) {
+                        if (((RadioMenuItem)item).isSelected()) {
+                            child.requestFocus();
+                            break;
+                        }
+                    }
+                }
+
+            }
+        });
+
+//        // FIXME For some reason getSkinnable()Behavior traversal functions don't
+//        // get called as expected, so I've just put the important code below.
+        // We use setOnKeyPressed here as we are not adding a listener to a public
+        // event type (ContextMenuContent is not public API), and without this
+        // we get the issue shown in RT-34429
+        setOnKeyPressed(new EventHandler<KeyEvent>() {
+            @Override public void handle(KeyEvent ke) {
+                switch (ke.getCode()) {
+                    case LEFT:
+                        if (getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT) {
+                            processRightKey(ke);
+                        } else {
+                            processLeftKey(ke);
+                        }
+                        break;
+                    case RIGHT:
+                        if (getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT) {
+                            processLeftKey(ke);
+                        } else {
+                            processRightKey(ke);
+                        }
+                        break;
+                    case CANCEL:
+                        ke.consume();
+                        break;
+                    case ESCAPE:
+                        // if the owner is not a menubar button, just close the
+                        // menu - this will move focus up to the parent menu
+                        // as required. In the case of the parent being a
+                        // menubar button we special case in the conditional code
+                        // beneath this switch statement. See RT-34429 for more context.
+                        final Node ownerNode = contextMenu.getOwnerNode();
+                        if (! (ownerNode instanceof MenuBarButton)) {
+                            contextMenu.hide();
+                            ke.consume();
+                        }
+                        break;
+                    case DOWN:
+                        // move to the next sibling
+                        moveToNextSibling();
+                        ke.consume();
+                        break;
+                    case UP:
+                        // move to previous sibling
+                        moveToPreviousSibling();
+                        ke.consume();
+                        break;
+                    case SPACE:
+                    case ENTER:
+                        // select the menuitem
+                        selectMenuItem();
+                        ke.consume();
+                        break;
+                    default:
+                        break;
+                }
+
+                if (!ke.isConsumed()) {
+                    final Node ownerNode = contextMenu.getOwnerNode();
+                    if (ownerNode instanceof MenuItemContainer) {
+                        // Forward to parent menu
+                        Parent parent = ownerNode.getParent();
+                        while (parent != null && !(parent instanceof ContextMenuContent)) {
+                            parent = parent.getParent();
+                        }
+                        if (parent instanceof ContextMenuContent) {
+                            parent.getOnKeyPressed().handle(ke);
+                        }
+                    } else if (ownerNode instanceof MenuBarButton) {
+                        // the following code no longer appears necessary, but
+                        // leaving in intact for now...
+//                        // This is a top-level MenuBar Menu, so forward event to MenuBar
+//                        MenuBarSkin mbs = ((MenuBarButton)ownerNode).getMenuBarSkin();
+//                        if (mbs != null && mbs.getKeyEventHandler() != null) {
+//                            mbs.getKeyEventHandler().handle(ke);
+//                        }
+                    }
+                }
+            }
+        });
+
+        addEventHandler(ScrollEvent.SCROLL, event -> {
+            /*
+             * we'll only scroll if the arrows are visible in the direction
+             * that we're going, otherwise we go into empty space.
+             */
+            final double textDeltaY = event.getTextDeltaY();
+            final double deltaY = event.getDeltaY();
+            if ((downArrow.isVisible() && (textDeltaY < 0.0 || deltaY < 0.0)) ||
+                (upArrow.isVisible() && (textDeltaY > 0.0 || deltaY > 0.0))) {
+
+                switch(event.getTextDeltaYUnits()) {
+                  case LINES:
+                      /*
+                      ** scroll lines, use the row height of selected row,
+                      ** or row 0 if none selected
+                      */
+                      int focusedIndex = findFocusedIndex();
+                      if (focusedIndex == -1) {
+                          focusedIndex = 0;
+                      }
+                      double rowHeight = itemsContainer.getChildren().get(focusedIndex).prefHeight(-1);
+                      scroll(textDeltaY * rowHeight);
+                      break;
+                  case PAGES:
+                      /*
+                      ** page scroll, scroll the menu height
+                      */
+                      scroll(textDeltaY * itemsContainer.getHeight());
+                      break;
+                  case NONE:
+                      /*
+                      ** pixel scroll
+                      */
+                      scroll(deltaY);
+                      break;
+                }
+                event.consume();
+            }
+        });
+    }
+
+    private void processLeftKey(KeyEvent ke) {
+        if (currentFocusedIndex != -1) {
+            Node n = itemsContainer.getChildren().get(currentFocusedIndex);
+            if (n instanceof MenuItemContainer) {
+                MenuItem item = ((MenuItemContainer)n).item;
+                if (item instanceof Menu) {
+                    final Menu menu = (Menu) item;
+
+                    // if the submenu for this menu is showing, hide it
+                    if (menu == openSubmenu && submenu != null && submenu.isShowing()) {
+                        hideSubmenu();
+                        ke.consume();
+                    }
+                }
+            }
+        }
+    }
+
+    private void processRightKey(KeyEvent ke) {
+        if (currentFocusedIndex != -1) {
+            Node n = itemsContainer.getChildren().get(currentFocusedIndex);
+            if (n instanceof MenuItemContainer) {
+                MenuItem item = ((MenuItemContainer)n).item;
+                if (item instanceof Menu) {
+                    final Menu menu = (Menu) item;
+                    if (menu.isDisable()) return;
+                    selectedBackground = ((MenuItemContainer)n);
+
+                    // RT-15103
+                    // if submenu for this menu is already showing then do nothing
+                    // Menubar will process the right key and move to the next menu
+                    if (openSubmenu == menu && submenu != null && submenu.isShowing()) {
+                        return;
+                    }
+
+                    showMenu(menu);
+                    ke.consume();
+                }
+            }
+        }
+    }
+
+    private void showMenu(Menu menu) {
+        menu.show();
+        // request focus on the first item of the submenu after it is shown
+        ContextMenuContent cmContent = (ContextMenuContent)submenu.getSkin().getNode();
+        if (cmContent != null) {
+           if (cmContent.itemsContainer.getChildren().size() > 0) {
+               cmContent.itemsContainer.getChildren().get(0).requestFocus();
+               cmContent.currentFocusedIndex = 0;
+           } else {
+               cmContent.requestFocus();
+           }
+        }
+    }
+
+    private void selectMenuItem() {
+        if (currentFocusedIndex != -1) {
+            Node n = itemsContainer.getChildren().get(currentFocusedIndex);
+            if (n instanceof MenuItemContainer) {
+                MenuItem item = ((MenuItemContainer)n).item;
+                if (item instanceof Menu) {
+                    final Menu menu = (Menu) item;
+                    if (openSubmenu != null) {
+                        hideSubmenu();
+                    }
+                    if (menu.isDisable()) return;
+                    selectedBackground = ((MenuItemContainer)n);
+                    menu.show();
+                } else {
+                    ((MenuItemContainer)n).doSelect();
+                }
+            }
+        }
+    }
+    /*
+     * Find the index of the next MenuItemContainer in the itemsContainer children.
+     */
+    private int findNext(int from) {
+        for (int i = from; i < itemsContainer.getChildren().size(); i++) {
+            Node n = itemsContainer.getChildren().get(i);
+            if (n instanceof MenuItemContainer) {
+                return i;
+            }
+        }
+        // find from top
+        for (int i = 0; i < from; i++) {
+            Node n = itemsContainer.getChildren().get(i);
+            if (n instanceof MenuItemContainer) {
+                return i;
+            }
+        }
+        return -1; // should not happen
+    }
+    
+    private void moveToNextSibling() {
+        // If focusedIndex is -1 then start from 0th menu item.
+        // Note that this will cycle through such that when you move to last item,
+        // it will move to 1st item on the next Down key press.
+        if (currentFocusedIndex != -1) {
+            currentFocusedIndex = findNext(currentFocusedIndex + 1);
+        } else if (currentFocusedIndex == -1 || currentFocusedIndex == (itemsContainer.getChildren().size() - 1)) {
+            currentFocusedIndex = findNext(0);
+        }
+
+        // request focus on the next sibling which currentFocusIndex points to
+        if (currentFocusedIndex != -1) {
+            Node n = itemsContainer.getChildren().get(currentFocusedIndex);
+            selectedBackground = ((MenuItemContainer)n);
+            n.requestFocus();
+            ensureFocusedMenuItemIsVisible(n);
+        }
+    }
+    
+    /*
+     * Find the index the previous MenuItemContaner in the itemsContainer children.
+     */
+    private int findPrevious(int from) {
+        for (int i = from; i >= 0; i--) {
+            Node n = itemsContainer.getChildren().get(i);
+            if (n instanceof MenuItemContainer) {
+                return(i);
+            }
+        }
+        for (int i = itemsContainer.getChildren().size() - 1 ; i > from; i--) {
+            Node n = itemsContainer.getChildren().get(i);
+            if (n instanceof MenuItemContainer) {
+                return(i);
+            }
+        }
+        return -1;
+    }
+
+     private void moveToPreviousSibling() {
+        // If focusedIndex is -1 then start from the last menu item to go up.
+        // Note that this will cycle through such that when you move to first item,
+        // it will move to last item on the next Up key press.
+        if (currentFocusedIndex != -1) {
+            currentFocusedIndex = findPrevious(currentFocusedIndex - 1);
+        } else if(currentFocusedIndex == -1 || currentFocusedIndex == 0) {
+            currentFocusedIndex = findPrevious(itemsContainer.getChildren().size() - 1);
+        }
+
+        // request focus on the previous sibling which currentFocusIndex points to
+        if (currentFocusedIndex != -1) {
+            Node n = itemsContainer.getChildren().get(currentFocusedIndex);
+            selectedBackground = ((MenuItemContainer)n);
+            n.requestFocus();
+            ensureFocusedMenuItemIsVisible(n);
+        }
+    }
+
+    /*
+     * Get the Y offset from the top of the popup to the menu item whose index
+     * is given.
+     */
+    public double getMenuYOffset(int menuIndex) {
+        double offset = 0;
+        if (itemsContainer.getChildren().size() > menuIndex) {
+            offset = snappedTopInset();
+            Node menuitem = itemsContainer.getChildren().get(menuIndex);
+            offset += menuitem.getLayoutY() + menuitem.prefHeight(-1);
+        }
+        return offset;
+    }
+
+    private void setUpBinds() {
+        updateMenuShowingListeners(contextMenu.getItems(), true);
+        contextMenu.getItems().addListener(contextMenuItemsListener);
+    }
+
+    private void disposeBinds() {
+        updateMenuShowingListeners(contextMenu.getItems(), false);
+        contextMenu.getItems().removeListener(contextMenuItemsListener);
+    }
+
+    private ChangeListener<Boolean> menuShowingListener = (observable, wasShowing, isShowing) -> {
+        ReadOnlyBooleanProperty isShowingProperty = (ReadOnlyBooleanProperty) observable;
+        Menu menu = (Menu) isShowingProperty.getBean();
+
+        if (wasShowing && ! isShowing) {
+            // hide the submenu popup
+            hideSubmenu();
+        } else if (! wasShowing && isShowing) {
+            // show the submenu popup
+            showSubmenu(menu);
+        }
+    };
+
+    private ListChangeListener<MenuItem> contextMenuItemsListener = (ListChangeListener<MenuItem>) c -> {
+        // Add listeners to the showing property of all menus that have
+        // been added, and remove listeners from menus that have been removed
+        // FIXME this is temporary - we should be adding and removing
+        // listeners such that they use the one listener defined above
+        // - but that can't be done until we have the bean in the
+        // ObservableValue
+        while (c.next()) {
+            updateMenuShowingListeners(c.getRemoved(), false);
+            updateMenuShowingListeners(c.getAddedSubList(), true);
+        }
+
+        // Listener to items in PopupMenu to update items in PopupMenuContent
+        itemsDirty = true;
+        updateItems(); // RT-29761
+    };
+
+    private ChangeListener<Boolean> menuItemVisibleListener = (observable, oldValue, newValue) -> {
+        // re layout as item's visibility changed
+        requestLayout();
+    };
+
+    private void updateMenuShowingListeners(List<? extends MenuItem> items, boolean addListeners) {
+        for (MenuItem item : items) {
+            if (item instanceof Menu) {
+                final Menu menu = (Menu) item;
+
+                if (addListeners) {
+                    menu.showingProperty().addListener(menuShowingListener);
+                } else {
+                    menu.showingProperty().removeListener(menuShowingListener);
+                }
+            }
+
+             // listen to menu items's visible property.
+            if (addListeners) {
+                item.visibleProperty().addListener(menuItemVisibleListener);
+            } else {
+                item.visibleProperty().removeListener(menuItemVisibleListener);
+            }
+        }
+    }
+
+    // For test purpose only
+    ContextMenu getSubMenu() {
+        return submenu;
+    }
+
+    Menu getOpenSubMenu() {
+        return openSubmenu;
+    }
+
+    private void createSubmenu() {
+        if (submenu == null) {
+            submenu = new ContextMenu();
+            submenu.showingProperty().addListener(new ChangeListener<Boolean>() {
+                @Override public void changed(ObservableValue<? extends Boolean> observable,
+                                              Boolean oldValue, Boolean newValue) {
+                    if (!submenu.isShowing()) {
+                        // Maybe user clicked outside or typed ESCAPE.
+                        // Make sure menus are in sync.
+                        for (Node node : itemsContainer.getChildren()) {
+                            if (node instanceof MenuItemContainer
+                                  && ((MenuItemContainer)node).item instanceof Menu) {
+                                Menu menu = (Menu)((MenuItemContainer)node).item;
+                                if (menu.isShowing()) {
+                                    menu.hide();
+                                }
+                            }
+                        }
+                    }
+                }
+            });
+        }
+    }
+   
+    private void showSubmenu(Menu menu) {
+        openSubmenu = menu;
+        createSubmenu();
+        submenu.getItems().setAll(menu.getItems());
+        submenu.show(selectedBackground, Side.RIGHT, 0, 0);
+    }
+    
+    private void hideSubmenu() {
+        if (submenu == null) return;
+
+        submenu.hide();
+        openSubmenu = null;
+
+        // Fix for RT-37022 - we dispose content so that we do not process CSS
+        // on hidden submenus
+        disposeContextMenu(submenu);
+        submenu = null;
+    }
+    
+    private void hideAllMenus(MenuItem item) {
+        if (contextMenu != null) contextMenu.hide();
+        
+        Menu parentMenu;
+        while ((parentMenu = item.getParentMenu()) != null) {
+            parentMenu.hide();
+            item = parentMenu;
+        }
+        if (item.getParentPopup() != null) {
+            item.getParentPopup().hide();
+        }
+    }
+    
+    private Menu openSubmenu;
+    private ContextMenu submenu;
+    
+    // FIXME: HACKY. We use this so that a submenu knows where to open from
+    // but this will only work for mouse hovers currently - and won't work
+    // programmatically.
+    // package protected for testing only!
+    Region selectedBackground;
+    
+    void scroll(double delta) {
+        double newTy = ty + delta;
+        if (ty == newTy) return;
+
+        // translation should never be positive (this would mean the top of the
+        // menu content is detaching from the top of the menu!)
+        if (newTy > 0.0) {
+            newTy = 0.0;
+        }
+
+        // translation should never be greater than the preferred height of the
+        // menu content (otherwise the menu content will be detaching from the
+        // bottom of the menu).
+        // RT-37185: We check the direction of the scroll, to prevent it locking
+        // up when scrolling upwards from the very bottom (using the on-screen
+        // up arrow).
+        if (delta < 0 && (getHeight() - newTy) > itemsContainer.getHeight() - downArrow.getHeight()) {
+            newTy = getHeight() - itemsContainer.getHeight() - downArrow.getHeight();
+        }
+
+        ty = newTy;
+        itemsContainer.requestLayout();
+    }
+
+    /***************************************************************************
+     *                                                                         *
+     *                         Stylesheet Handling                             *
+     *                                                                         *
+     **************************************************************************/
+    @Override public Styleable getStyleableParent() {
+        return contextMenu;
+    }
+
+     /** @treatAsPrivate */
+    private static class StyleableProperties {
+
+        private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES;
+        static {
+
+            final List<CssMetaData<? extends Styleable, ?>> styleables =
+                new ArrayList<CssMetaData<? extends Styleable, ?>>(Region.getClassCssMetaData());
+
+            //
+            // SkinBase only has Region's unique StlyleableProperty's, none of Nodes
+            // So, we need to add effect back in. The effect property is in a
+            // private inner class, so get the property from Node the hard way.
+            final List<CssMetaData<? extends Styleable, ?>> nodeStyleables = Node.getClassCssMetaData();
+            for(int n=0, max=nodeStyleables.size(); n<max; n++) {
+                CssMetaData<? extends Styleable, ?> styleable = nodeStyleables.get(n);
+                if ("effect".equals(styleable.getProperty())) {
+                    styleables.add(styleable);
+                    break;
+                }
+            }
+            STYLEABLES = Collections.unmodifiableList(styleables);
+        }
+    }
+
+    /**
+     * @return The CssMetaData associated with this class, which may include the
+     * CssMetaData of its super classes.
+     */
+    public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() {
+        return StyleableProperties.STYLEABLES;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<CssMetaData<? extends Styleable, ?>> getCssMetaData() {
+        return getClassCssMetaData();
+    }
+    
+    public Label getLabelAt(int index) {
+        return ((MenuItemContainer)itemsContainer.getChildren().get(index)).getLabel();
+    }
+
+    /**
+     * Custom VBox to enable scrolling of items. Scrolling effect is achieved by
+     * controlling the translate Y coordinate of the menu item "ty" which is set by a
+     * timeline when mouse is over up/down arrow.
+     */
+    class MenuBox extends VBox {
+        MenuBox() {
+            setAccessibleRole(AccessibleRole.CONTEXT_MENU);
+        }
+
+        @Override protected void layoutChildren() {
+            double yOffset = ty;
+            for (Node n : getChildren()) {
+                if (n.isVisible()) {
+                    final double prefHeight = snapSize(n.prefHeight(-1));
+                    n.resize(snapSize(getWidth()), prefHeight);
+                    n.relocate(snappedLeftInset(), yOffset);
+                    yOffset += prefHeight;
+                }
+            }
+        }
+
+        @Override
+        public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) {
+            switch (attribute) {
+                case VISIBLE: return contextMenu.isShowing();
+                case PARENT_MENU: return contextMenu.getOwnerNode();
+                default: return super.queryAccessibleAttribute(attribute, parameters); 
+            }
+        }
+    }
+
+    class ArrowMenuItem extends StackPane {
+         private StackPane upDownArrow;
+         private ContextMenuContent popupMenuContent;
+         private boolean up = false;
+         public final boolean isUp() { return up; }
+         public void setUp(boolean value) {
+            up = value;
+            upDownArrow.getStyleClass().setAll(isUp() ? "menu-up-arrow" : "menu-down-arrow");
+        }
+
+        // used to automatically scroll through menu items when the user performs
+        // certain interactions, e.g. pressing and holding the arrow buttons
+        private Timeline scrollTimeline;
+
+        public ArrowMenuItem(ContextMenuContent pmc) {
+            getStyleClass().setAll("scroll-arrow");
+            upDownArrow = new StackPane();
+            this.popupMenuContent = pmc;
+            upDownArrow.setMouseTransparent(true);
+            upDownArrow.getStyleClass().setAll(isUp() ? "menu-up-arrow" : "menu-down-arrow");
+    //        setMaxWidth(Math.max(upDownArrow.prefWidth(-1), getWidth()));
+            addEventHandler(MouseEvent.MOUSE_ENTERED, me -> {
+                if (scrollTimeline != null && (scrollTimeline.getStatus() != Status.STOPPED)) {
+                    return;
+                }
+                startTimeline();
+            });
+            addEventHandler(MouseEvent.MOUSE_EXITED, me -> {
+                stopTimeline();
+            });
+            setVisible(false);
+            setManaged(false);
+            getChildren().add(upDownArrow);
+        }
+
+        @Override protected double computePrefWidth(double height) {
+//            return snapSize(getInsets().getLeft()) + snapSize(getInsets().getRight());
+            return itemsContainer.getWidth();
+        }
+
+        @Override protected double computePrefHeight(double width) {
+            return snappedTopInset() + upDownArrow.prefHeight(-1) + snappedBottomInset();
+        }
+
+        @Override protected void layoutChildren() {
+            double w = snapSize(upDownArrow.prefWidth(-1));
+            double h = snapSize(upDownArrow.prefHeight(-1));
+
+            upDownArrow.resize(w, h);
+            positionInArea(upDownArrow, 0, 0, getWidth(), getHeight(),
+                    /*baseline ignored*/0, HPos.CENTER, VPos.CENTER);
+        }
+
+        private void adjust() {
+            if(up) popupMenuContent.scroll(12); else popupMenuContent.scroll(-12);
+        }
+
+        private void startTimeline() {
+            scrollTimeline = new Timeline();
+            scrollTimeline.setCycleCount(Timeline.INDEFINITE);
+            KeyFrame kf = new KeyFrame(
+                Duration.millis(60),
+                    event -> {
+                        adjust();
+                    }
+            );
+            scrollTimeline.getKeyFrames().clear();
+            scrollTimeline.getKeyFrames().add(kf);
+            scrollTimeline.play();
+        }
+
+        private void stopTimeline() {
+            scrollTimeline.stop();
+            scrollTimeline = null;
+        }
+    }
+    
+    /*
+     * Container responsible for laying out a single row in the menu - in other
+     * words, this contains and lays out a single MenuItem, regardless of it's 
+     * specific subtype.
+     */
+    public class MenuItemContainer extends Region {
+
+        private final MenuItem item;
+
+        private Node left;
+        private Node graphic;
+        private Node label;
+        private Node right;
+
+        private final LambdaMultiplePropertyChangeListenerHandler listener =
+            new LambdaMultiplePropertyChangeListenerHandler();
+
+        private EventHandler<MouseEvent> mouseEnteredEventHandler;
+        private EventHandler<MouseEvent> mouseReleasedEventHandler;
+
+        private EventHandler<ActionEvent> actionEventHandler;
+
+        protected Label getLabel(){
+            return (Label) label;
+        }
+        
+        public MenuItem getItem() {
+            return item;
+        }
+
+        public MenuItemContainer(MenuItem item){
+            if (item == null) {
+                throw new NullPointerException("MenuItem can not be null");
+            }
+            
+            getStyleClass().addAll(item.getStyleClass());
+            setId(item.getId());
+            setFocusTraversable(!(item instanceof CustomMenuItem));
+            this.item = item;
+
+            createChildren();
+            
+            // listen to changes in the state of certain MenuItem types
+            ReadOnlyBooleanProperty pseudoProperty;
+            if (item instanceof Menu) {
+                pseudoProperty = ((Menu)item).showingProperty();
+                listener.registerChangeListener(pseudoProperty,
+                        e -> pseudoClassStateChanged(SELECTED_PSEUDOCLASS_STATE, ((Menu) item).isShowing()));
+                pseudoClassStateChanged(SELECTED_PSEUDOCLASS_STATE, pseudoProperty.get());
+                setAccessibleRole(AccessibleRole.MENU);
+            } else if (item instanceof RadioMenuItem) {
+                pseudoProperty = ((RadioMenuItem)item).selectedProperty();
+                listener.registerChangeListener(pseudoProperty,
+                        e -> pseudoClassStateChanged(CHECKED_PSEUDOCLASS_STATE, ((RadioMenuItem) item).isSelected()));
+                pseudoClassStateChanged(CHECKED_PSEUDOCLASS_STATE, pseudoProperty.get());
+                setAccessibleRole(AccessibleRole.RADIO_MENU_ITEM);
+            } else if (item instanceof CheckMenuItem) {
+                pseudoProperty = ((CheckMenuItem)item).selectedProperty();
+                listener.registerChangeListener(pseudoProperty,
+                        e -> pseudoClassStateChanged(CHECKED_PSEUDOCLASS_STATE, ((CheckMenuItem) item).isSelected()));
+                pseudoClassStateChanged(CHECKED_PSEUDOCLASS_STATE, pseudoProperty.get());
+                setAccessibleRole(AccessibleRole.CHECK_MENU_ITEM);
+            } else {
+                setAccessibleRole(AccessibleRole.MENU_ITEM);
+            }
+            
+            pseudoClassStateChanged(DISABLED_PSEUDOCLASS_STATE, item.disableProperty().get());
+            listener.registerChangeListener(item.disableProperty(),
+                    e -> pseudoClassStateChanged(DISABLED_PSEUDOCLASS_STATE, item.isDisable()));
+            
+            // Add the menu item to properties map of this node. Used by QA for testing
+            // This allows associating this container with corresponding MenuItem.
+            getProperties().put(MenuItem.class, item);
+            
+            listener.registerChangeListener(item.graphicProperty(), e -> {
+                createChildren();
+                computeVisualMetrics();
+            });
+
+            actionEventHandler = e -> {
+                if (item instanceof Menu) {
+                    final Menu menu = (Menu) item;
+                    if (openSubmenu == menu && submenu.isShowing()) return;
+                    if (openSubmenu != null) {
+                        hideSubmenu();
+                    }
+
+                    selectedBackground = MenuItemContainer.this;
+                    showMenu(menu);
+                } else {
+                    doSelect();
+                }
+            };
+            addEventHandler(ActionEvent.ACTION, actionEventHandler);
+        }
+        
+        public void dispose() {
+            if (item instanceof CustomMenuItem) {
+                Node node = ((CustomMenuItem)item).getContent();
+                if (node != null) {
+                    node.removeEventHandler(MouseEvent.MOUSE_CLICKED, customMenuItemMouseClickedHandler);
+                }
+            }
+
+            listener.dispose();
+            removeEventHandler(ActionEvent.ACTION, actionEventHandler);
+            
+            if (label != null) {
+                ((Label)label).textProperty().unbind();
+            }
+            
+            left = null;
+            graphic = null;
+            label = null;
+            right = null;
+        }
+        
+        private void createChildren() {
+            getChildren().clear();
+            
+            // draw background region for hover effects. All content (other
+            // than Nodes from NodeMenuItems) are set to be mouseTransparent, so
+            // this background also acts as the receiver of user input
+            if (item instanceof CustomMenuItem) {
+                createNodeMenuItemChildren((CustomMenuItem)item);
+
+                if (mouseEnteredEventHandler == null) {
+                    mouseEnteredEventHandler = event -> {
+                        requestFocus(); // request Focus on hover
+                    };
+                } else {
+                    removeEventHandler(MouseEvent.MOUSE_ENTERED, mouseEnteredEventHandler);
+                }
+                addEventHandler(MouseEvent.MOUSE_ENTERED, mouseEnteredEventHandler);
+            } else {
+                // --- add check / radio to left column
+                Node leftNode = getLeftGraphic(item);
+                if (leftNode != null) {
+                    StackPane leftPane = new StackPane();
+                    leftPane.getStyleClass().add("left-container");
+                    leftPane.getChildren().add(leftNode);
+                    left = leftPane;
+                    getChildren().add(left);
+                    left.setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
+                }
+                // -- add graphic to graphic pane
+                if (item.getGraphic() != null) {
+                    Node graphicNode = item.getGraphic();
+                    StackPane graphicPane = new StackPane();
+                    graphicPane.getStyleClass().add("graphic-container");
+                    graphicPane.getChildren().add(graphicNode);
+                    graphic = graphicPane;
+                    getChildren().add(graphic);
+                }
+                
+                // --- add text to center column
+                label = new MenuLabel(item, this);  // make this a menulabel to handle mnemonics fire()
+                label.setStyle(item.getStyle());
+
+                // bind to text property in menu item
+                ((Label)label).textProperty().bind(item.textProperty());
+
+                label.setMouseTransparent(true);
+                getChildren().add(label);
+
+                listener.unregisterChangeListener(focusedProperty());
+                // RT-19546 update currentFocusedIndex when MenuItemContainer gets focused.
+                // e.g this happens when you press the Right key to open a submenu; the first
+                // menuitem is focused.
+                listener.registerChangeListener(focusedProperty(), e -> {
+                    if (isFocused()) {
+                        currentFocusedIndex = itemsContainer.getChildren().indexOf(MenuItemContainer.this);
+                    }
+                });
+
+                // --- draw in right column - this depends on whether we are
+                // a Menu or not. A Menu gets an arrow, whereas other MenuItems
+                // get the ability to draw an accelerator
+                if (item instanceof Menu) {
+                    // --- add arrow / accelerator / mnemonic to right column
+                    Region rightNode = new Region();
+                    rightNode.setMouseTransparent(true);
+                    rightNode.getStyleClass().add("arrow");
+                    
+                    StackPane rightPane = new StackPane();
+                    rightPane.setMaxWidth(Math.max(rightNode.prefWidth(-1), 10));
+                    rightPane.setMouseTransparent(true);
+                    rightPane.getStyleClass().add("right-container");
+                    rightPane.getChildren().add(rightNode);
+                    right = rightPane;
+                    getChildren().add(rightPane);
+
+                    if (mouseEnteredEventHandler == null) {
+                        mouseEnteredEventHandler = event -> {
+                            if (openSubmenu != null && item != openSubmenu) {
+                                // if a submenu of a different menu is already
+                                // open then close it (RT-15049)
+                                hideSubmenu();
+                            }
+
+                            final Menu menu = (Menu) item;
+                            if (menu.isDisable()) return;
+                            selectedBackground = MenuItemContainer.this;
+                            menu.show();
+                            requestFocus();  // request Focus on hover
+                        };
+                    } else {
+                        removeEventHandler(MouseEvent.MOUSE_ENTERED, mouseEnteredEventHandler);
+                    }
+
+                    if (mouseReleasedEventHandler == null) {
+                        mouseReleasedEventHandler = event -> {
+                            item.fire();
+                        };
+                    } else {
+                        removeEventHandler(MouseEvent.MOUSE_RELEASED, mouseReleasedEventHandler);
+                    }
+                    
+                    // show submenu when the menu is hovered over
+                    addEventHandler(MouseEvent.MOUSE_ENTERED, mouseEnteredEventHandler);
+                    addEventHandler(MouseEvent.MOUSE_RELEASED, mouseReleasedEventHandler);
+                } else { // normal MenuItem
+                    // remove old listeners
+                    listener.unregisterChangeListener(item.acceleratorProperty());
+
+                    // accelerator support
+                    updateAccelerator();
+
+                    if (mouseEnteredEventHandler == null) {
+                        mouseEnteredEventHandler = event -> {
+                            if (openSubmenu != null) {
+                                openSubmenu.hide();
+                            }
+                            requestFocus();  // request Focus on hover
+                        };
+                    } else {
+                        removeEventHandler(MouseEvent.MOUSE_ENTERED, mouseEnteredEventHandler);
+                    }
+
+                    if (mouseReleasedEventHandler == null) {
+                        mouseReleasedEventHandler = event -> {
+                            doSelect();
+                        };
+                    } else {
+                        removeEventHandler(MouseEvent.MOUSE_RELEASED, mouseReleasedEventHandler);
+                    }
+
+                    addEventHandler(MouseEvent.MOUSE_ENTERED, mouseEnteredEventHandler);
+                    addEventHandler(MouseEvent.MOUSE_RELEASED, mouseReleasedEventHandler);
+
+                    listener.registerChangeListener(item.acceleratorProperty(), e -> updateAccelerator());
+                }
+            }
+        }
+        
+        private void updateAccelerator() {
+            if (item.getAccelerator() != null) {
+                if (right != null) {
+                    getChildren().remove(right);
+                }
+
+                String text = item.getAccelerator().getDisplayText();
+                right = new Label(text);
+                right.setStyle(item.getStyle());
+                right.getStyleClass().add("accelerator-text");
+                getChildren().add(right);
+            } else {
+                getChildren().remove(right);
+            }
+        }
+
+        void doSelect() {
+            // don't do anything on disabled menu items
+            if (item.isDisable()) return;
+            // toggle state of check or radio items
+            if (item instanceof CheckMenuItem) {
+                CheckMenuItem checkItem = (CheckMenuItem)item;
+                checkItem.setSelected(!checkItem.isSelected());
+            } else if (item instanceof RadioMenuItem) {
+                // this is a radio button. If there is a toggleGroup specified, we
+                // simply set selected to true. If no toggleGroup is specified, we
+                // toggle the selected state, as there is no assumption of mutual
+                // exclusivity when no toggleGroup is set.
+                final RadioMenuItem radioItem = (RadioMenuItem) item;
+                radioItem.setSelected(radioItem.getToggleGroup() != null ? true : !radioItem.isSelected());
+            }
+
+            // fire the action before hiding the menu
+            item.fire();
+
+            if (item instanceof CustomMenuItem) {
+                CustomMenuItem customMenuItem = (CustomMenuItem) item;
+                if (customMenuItem.isHideOnClick()) {
+                    hideAllMenus(item);
+                }
+            } else {
+                hideAllMenus(item);
+            }
+        }
+
+        private EventHandler<MouseEvent> customMenuItemMouseClickedHandler;
+        
+        private void createNodeMenuItemChildren(final CustomMenuItem item) {
+            Node node = item.getContent();
+            getChildren().add(node);
+
+            // handle hideOnClick
+            customMenuItemMouseClickedHandler = event -> {
+                if (item == null || item.isDisable()) return;
+
+                item.fire();
+                if (item.isHideOnClick()) {
+                    hideAllMenus(item);
+                }
+            };
+            node.addEventHandler(MouseEvent.MOUSE_CLICKED, customMenuItemMouseClickedHandler);
+        }
+        
+        @Override protected void layoutChildren() {
+            double xOffset;
+        
+            final double prefHeight = prefHeight(-1);
+            if (left != null) {
+                xOffset = snappedLeftInset();
+                left.resize(left.prefWidth(-1), left.prefHeight(-1));
+                positionInArea(left, xOffset, 0,
+                        maxLeftWidth, prefHeight, 0, HPos.LEFT, VPos.CENTER);
+            }
+            if (graphic != null) {
+                xOffset = snappedLeftInset() + maxLeftWidth;
+                graphic.resize(graphic.prefWidth(-1), graphic.prefHeight(-1));
+                positionInArea(graphic, xOffset, 0,
+                        maxGraphicWidth, prefHeight, 0, HPos.LEFT, VPos.CENTER);
+            }
+            
+            if (label != null) {
+                xOffset = snappedLeftInset() + maxLeftWidth + maxGraphicWidth;
+                label.resize(label.prefWidth(-1), label.prefHeight(-1));
+                positionInArea(label, xOffset, 0,
+                        maxLabelWidth, prefHeight, 0, HPos.LEFT, VPos.CENTER);
+            }
+            
+            if (right != null) {
+                xOffset = snappedLeftInset() + maxLeftWidth + maxGraphicWidth + maxLabelWidth;
+                right.resize(right.prefWidth(-1), right.prefHeight(-1));
+                positionInArea(right, xOffset, 0,
+                    maxRightWidth, prefHeight, 0, HPos.RIGHT, VPos.CENTER);
+            }
+            
+            if ( item instanceof CustomMenuItem) {
+                Node n = ((CustomMenuItem) item).getContent();
+                if (item instanceof SeparatorMenuItem) {
+                    double width = prefWidth(-1) - (snappedLeftInset() + maxGraphicWidth + snappedRightInset());
+                    n.resize(width, n.prefHeight(-1));
+                    positionInArea(n, snappedLeftInset() + maxGraphicWidth, 0, prefWidth(-1), prefHeight, 0, HPos.LEFT, VPos.CENTER);
+                } else {
+                    n.resize(n.prefWidth(-1), n.prefHeight(-1));
+                    //the node should be left aligned 
+                    positionInArea(n, snappedLeftInset(), 0, getWidth(), prefHeight, 0, HPos.LEFT, VPos.CENTER);
+                }
+            }
+        }
+        
+        @Override protected double computePrefHeight(double width) {
+            double prefHeight = 0;
+            if (item instanceof CustomMenuItem || item instanceof SeparatorMenuItem) {
+                prefHeight = (getChildren().isEmpty()) ? 0 : getChildren().get(0).prefHeight(-1);
+            } else {
+                prefHeight = Math.max(prefHeight, (left != null) ? left.prefHeight(-1) : 0);
+                prefHeight = Math.max(prefHeight, (graphic != null) ? graphic.prefHeight(-1) : 0);
+                prefHeight = Math.max(prefHeight, (label != null) ? label.prefHeight(-1) : 0);
+                prefHeight = Math.max(prefHeight, (right != null) ? right.prefHeight(-1) : 0);
+            }
+             return snappedTopInset() + prefHeight + snappedBottomInset();
+        }
+
+        @Override protected double computePrefWidth(double height) {
+            double nodeMenuItemWidth = 0;
+            if (item instanceof CustomMenuItem && !(item instanceof SeparatorMenuItem)) {
+                nodeMenuItemWidth = snappedLeftInset() + ((CustomMenuItem) item).getContent().prefWidth(-1) +
+                        snappedRightInset();
+            }
+            return Math.max(nodeMenuItemWidth,
+                    snappedLeftInset() + maxLeftWidth + maxGraphicWidth +
+                    maxLabelWidth + maxRightWidth + snappedRightInset());
+        }
+
+        // Responsible for returning a graphic (if necessary) to position in the
+        // left column of the menu. This may be a Node from the MenuItem.graphic
+        // property, or it may be a check/radio item if necessary.
+        private Node getLeftGraphic(MenuItem item) {
+            if (item instanceof RadioMenuItem) {
+                 final Region _graphic = new Region();
+                _graphic.getStyleClass().add("radio");
+                return _graphic;
+            } else if (item instanceof CheckMenuItem) {
+                final StackPane _graphic = new StackPane();
+                _graphic.getStyleClass().add("check");
+                return _graphic;
+            } 
+            
+            return null;
+        }
+
+        @Override
+        public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) {
+            switch (attribute) {
+                case SELECTED:
+                    if (item instanceof CheckMenuItem) {
+                        return ((CheckMenuItem)item).isSelected();
+                    }
+                    if (item instanceof RadioMenuItem) {
+                        return ((RadioMenuItem) item).isSelected();
+                    }
+                    return false;
+                case ACCELERATOR: return item.getAccelerator();
+                case TEXT: {
+                    String title = "";
+                    if (graphic != null) {
+                        String t = (String)graphic.queryAccessibleAttribute(AccessibleAttribute.TEXT);
+                        if (t != null) title += t;
+                    }                  
+                    final Label label = getLabel();
+                    if (label != null) {
+                        String t = (String)label.queryAccessibleAttribute(AccessibleAttribute.TEXT);
+                        if (t != null) title += t;
+                    }
+                    if (item instanceof CustomMenuItem) {
+                        Node content = ((CustomMenuItem) item).getContent();
+                        if (content != null) {
+                            String t = (String)content.queryAccessibleAttribute(AccessibleAttribute.TEXT);
+                            if (t != null) title += t;
+                        }
+                    }
+                    return title;
+                }
+                case MNEMONIC: {
+                    final Label label = getLabel();
+                    if (label != null) {
+                        String mnemonic = (String)label.queryAccessibleAttribute(AccessibleAttribute.MNEMONIC);
+                        if (mnemonic != null) return mnemonic;
+                    }
+                    return null;
+                }
+                case DISABLED: return item.isDisable();
+                case SUBMENU:
+                    createSubmenu();
+                    // Accessibility might need to see the menu node before the window
+                    // is visible (i.e. before the skin is applied).
+                    if (submenu.getSkin() == null) {
+                        submenu.impl_styleableGetNode().impl_processCSS(true);
+                    }
+                    ContextMenuContent cmContent = (ContextMenuContent)submenu.getSkin().getNode();
+                    return cmContent.itemsContainer;
+                default: return super.queryAccessibleAttribute(attribute, parameters); 
+            }
+        }
+
+        @Override
+        public void executeAccessibleAction(AccessibleAction action, Object... parameters) {
+            switch (action) {
+                case SHOW_MENU:{
+                    if (item instanceof Menu) {
+                        final Menu menuItem = (Menu) item;
+                        if (menuItem.isShowing()) {
+                            menuItem.hide();
+                        } else {
+                            menuItem.show();
+                        }
+                    }
+                    break;
+                }
+                case FIRE: 
+                    doSelect();
+                    break;
+                default: super.executeAccessibleAction(action);
+            }
+        }
+    }
+
+
+    private static final PseudoClass SELECTED_PSEUDOCLASS_STATE =
+            PseudoClass.getPseudoClass("selected");
+    private static final PseudoClass DISABLED_PSEUDOCLASS_STATE =
+            PseudoClass.getPseudoClass("disabled");
+    private static final PseudoClass CHECKED_PSEUDOCLASS_STATE =
+            PseudoClass.getPseudoClass("checked");
+
+    private class MenuLabel extends Label {
+
+        public MenuLabel(MenuItem item, MenuItemContainer mic) {
+            super(item.getText());
+            setMnemonicParsing(item.isMnemonicParsing());
+            setLabelFor(mic);
+        }
+    }
+        
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/CustomColorDialog.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,741 @@
+/*
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.scene.control;
+
+import com.sun.javafx.scene.control.IntegerField;
+import com.sun.javafx.scene.control.WebColorField;
+import com.sun.javafx.scene.control.skin.IntegerFieldSkin;
+import com.sun.javafx.scene.control.skin.WebColorFieldSkin;
+import javafx.beans.InvalidationListener;
+import javafx.beans.Observable;
+import javafx.beans.property.*;
+import javafx.event.EventHandler;
+import javafx.scene.Scene;
+import javafx.scene.control.*;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.layout.*;
+import javafx.scene.paint.*;
+import javafx.stage.Modality;
+import javafx.stage.Stage;
+import javafx.stage.StageStyle;
+import javafx.stage.Window;
+import javafx.beans.binding.Bindings;
+import javafx.beans.binding.ObjectBinding;
+import javafx.geometry.Insets;
+import javafx.geometry.Orientation;
+import javafx.geometry.Pos;
+import javafx.geometry.Rectangle2D;
+import javafx.scene.input.KeyEvent;
+import javafx.stage.Screen;
+import javafx.stage.WindowEvent;
+
+/**
+ *
+ */
+public class CustomColorDialog extends HBox {
+    
+    private final Stage dialog = new Stage();
+    private ColorRectPane colorRectPane;
+    private ControlsPane controlsPane;
+
+    private ObjectProperty<Color> currentColorProperty = new SimpleObjectProperty<>(Color.WHITE);
+    private ObjectProperty<Color> customColorProperty = new SimpleObjectProperty<>(Color.TRANSPARENT);
+    private Runnable onSave;
+    private Runnable onUse;
+    private Runnable onCancel;
+    
+    private WebColorField webField = null;
+    private Scene customScene;
+    
+    public CustomColorDialog(Window owner) {
+        getStyleClass().add("custom-color-dialog");
+        if (owner != null) dialog.initOwner(owner);
+        dialog.setTitle(Properties.getColorPickerString("customColorDialogTitle"));
+        dialog.initModality(Modality.APPLICATION_MODAL);
+        dialog.initStyle(StageStyle.UTILITY);
+        dialog.setResizable(false);
+        colorRectPane = new ColorRectPane();
+        controlsPane = new ControlsPane();
+        setHgrow(controlsPane, Priority.ALWAYS);
+        
+        customScene = new Scene(this);
+        final Scene ownerScene = owner.getScene();
+        if (ownerScene != null) {
+            if (ownerScene.getUserAgentStylesheet() != null) {
+                customScene.setUserAgentStylesheet(ownerScene.getUserAgentStylesheet());
+            }
+            customScene.getStylesheets().addAll(ownerScene.getStylesheets());
+        }
+        getChildren().addAll(colorRectPane, controlsPane);
+        
+        dialog.setScene(customScene);
+        dialog.addEventHandler(KeyEvent.ANY, keyEventListener);
+    }
+
+    private final EventHandler<KeyEvent> keyEventListener = e -> {
+        switch (e.getCode()) {
+            case ESCAPE :
+                dialog.setScene(null);
+                dialog.close();
+        default:
+            break;
+        }
+    };
+    
+    public void setCurrentColor(Color currentColor) {
+        this.currentColorProperty.set(currentColor);
+    }
+
+    public final Color getCurrentColor() {
+        return currentColorProperty.get();
+    }
+    
+    public final ObjectProperty<Color> customColorProperty() {
+        return customColorProperty;
+    }
+
+    public final void setCustomColor(Color color) {
+        customColorProperty.set(color);
+    }
+
+    public final Color getCustomColor() {
+        return customColorProperty.get();
+    }
+    
+    public Runnable getOnSave() {
+        return onSave;
+    }
+
+    public void setOnSave(Runnable onSave) {
+        this.onSave = onSave;
+    }
+
+    public Runnable getOnUse() {
+        return onUse;
+    }
+
+    public void setOnUse(Runnable onUse) {
+        this.onUse = onUse;
+    }
+
+    public Runnable getOnCancel() {
+        return onCancel;
+    }
+
+    public void setOnCancel(Runnable onCancel) {
+        this.onCancel = onCancel;
+    }
+
+    public void setOnHidden(EventHandler<WindowEvent> onHidden) {
+        dialog.setOnHidden(onHidden);
+    }
+
+    public Stage getDialog() {
+        return dialog;
+    }
+    
+    public void show() {
+        if (dialog.getOwner() != null) {
+            // Workaround of RT-29871: Instead of just invoking fixPosition() 
+            // here need to use listener that fixes dialog position once both
+            // width and height are determined
+            dialog.widthProperty().addListener(positionAdjuster);
+            dialog.heightProperty().addListener(positionAdjuster);
+            positionAdjuster.invalidated(null);
+        }
+        if (dialog.getScene() == null) dialog.setScene(customScene);
+        colorRectPane.updateValues();
+        dialog.show();
+    }
+    
+    private InvalidationListener positionAdjuster = new InvalidationListener() {
+
+        @Override
+        public void invalidated(Observable ignored) {
+            if (Double.isNaN(dialog.getWidth()) || Double.isNaN(dialog.getHeight())) {
+                return;
+            }
+            dialog.widthProperty().removeListener(positionAdjuster);
+            dialog.heightProperty().removeListener(positionAdjuster);
+            fixPosition();
+        }
+
+    };
+    
+    private void fixPosition() {
+        Window w = dialog.getOwner();
+        Screen s = com.sun.javafx.util.Utils.getScreen(w);
+        Rectangle2D sb = s.getBounds();
+        double xR = w.getX() + w.getWidth();
+        double xL = w.getX() - dialog.getWidth();
+        double x, y;
+        if (sb.getMaxX() >= xR + dialog.getWidth()) {
+            x = xR;
+        } else if (sb.getMinX() <= xL) {
+            x = xL;
+        } else {
+            x = Math.max(sb.getMinX(), sb.getMaxX() - dialog.getWidth());
+        }
+        y = Math.max(sb.getMinY(), Math.min(sb.getMaxY() - dialog.getHeight(), w.getY()));
+        dialog.setX(x);
+        dialog.setY(y);
+    }
+    
+    @Override public void layoutChildren() {
+        super.layoutChildren();
+        if (dialog.getMinWidth() > 0 && dialog.getMinHeight() > 0) {
+            // don't recalculate min size once it's set
+            return;
+        }
+
+        // Math.max(0, ...) added for RT-34704 to ensure the dialog is at least 0 x 0
+        double minWidth = Math.max(0, computeMinWidth(getHeight()) + (dialog.getWidth() - customScene.getWidth()));
+        double minHeight = Math.max(0, computeMinHeight(getWidth()) + (dialog.getHeight() - customScene.getHeight()));
+        dialog.setMinWidth(minWidth);
+        dialog.setMinHeight(minHeight);
+    }
+       
+    /* ------------------------------------------------------------------------*/
+    
+    private class ColorRectPane extends HBox {
+
+        private Pane colorRect;
+        private Pane colorBar;
+        private Pane colorRectOverlayOne;
+        private Pane colorRectOverlayTwo;
+        private Region colorRectIndicator;
+        private Region colorBarIndicator;
+        
+        private boolean changeIsLocal = false;
+        private DoubleProperty hue = new SimpleDoubleProperty(-1) {
+            @Override protected void invalidated() {
+                if (!changeIsLocal) {
+                    changeIsLocal = true;
+                    updateHSBColor();
+                    changeIsLocal = false;
+                }
+            }
+        };
+        private DoubleProperty sat = new SimpleDoubleProperty(-1) {
+            @Override protected void invalidated() {
+                if (!changeIsLocal) {
+                    changeIsLocal = true;
+                    updateHSBColor();
+                    changeIsLocal = false;
+                }
+            }
+        };
+        private DoubleProperty bright = new SimpleDoubleProperty(-1) {
+            @Override protected void invalidated() {
+                if (!changeIsLocal) {
+                    changeIsLocal = true;
+                    updateHSBColor();
+                    changeIsLocal = false;
+                }
+            }
+        };
+        private IntegerProperty red = new SimpleIntegerProperty(-1) {
+            @Override protected void invalidated() {
+                if (!changeIsLocal) {
+                    changeIsLocal = true;
+                    updateRGBColor();
+                    changeIsLocal = false;
+                }
+            }
+        };
+        
+        private IntegerProperty green = new SimpleIntegerProperty(-1) {
+            @Override protected void invalidated() {
+                if (!changeIsLocal) {
+                    changeIsLocal = true;
+                    updateRGBColor();
+                    changeIsLocal = false;
+                }
+            }
+        };
+        
+        private IntegerProperty blue = new SimpleIntegerProperty(-1) {
+            @Override protected void invalidated() {
+                if (!changeIsLocal) {
+                    changeIsLocal = true;
+                    updateRGBColor();
+                    changeIsLocal = false;
+                }
+            }
+        };
+        
+        private DoubleProperty alpha = new SimpleDoubleProperty(100) {
+            @Override protected void invalidated() {
+                if (!changeIsLocal) {
+                    changeIsLocal = true;
+                    setCustomColor(new Color(
+                            getCustomColor().getRed(), 
+                            getCustomColor().getGreen(), 
+                            getCustomColor().getBlue(), 
+                            clamp(alpha.get() / 100)));
+                    changeIsLocal = false;
+                }
+            }
+        };
+         
+        private void updateRGBColor() {
+            Color newColor = Color.rgb(red.get(), green.get(), blue.get(), clamp(alpha.get() / 100));
+            hue.set(newColor.getHue());
+            sat.set(newColor.getSaturation() * 100);
+            bright.set(newColor.getBrightness() * 100);
+            setCustomColor(newColor);
+        }
+        
+        private void updateHSBColor() {
+            Color newColor = Color.hsb(hue.get(), clamp(sat.get() / 100), 
+                            clamp(bright.get() / 100), clamp(alpha.get() / 100));
+            red.set(doubleToInt(newColor.getRed()));
+            green.set(doubleToInt(newColor.getGreen()));
+            blue.set(doubleToInt(newColor.getBlue()));
+            setCustomColor(newColor);
+        }
+       
+        private void colorChanged() {
+            if (!changeIsLocal) {
+                changeIsLocal = true;
+                hue.set(getCustomColor().getHue());
+                sat.set(getCustomColor().getSaturation() * 100);
+                bright.set(getCustomColor().getBrightness() * 100);
+                red.set(doubleToInt(getCustomColor().getRed()));
+                green.set(doubleToInt(getCustomColor().getGreen()));
+                blue.set(doubleToInt(getCustomColor().getBlue()));
+                changeIsLocal = false;
+            }
+        }
+        
+        public ColorRectPane() {
+            
+            getStyleClass().add("color-rect-pane");
+            
+            customColorProperty().addListener((ov, t, t1) -> {
+                colorChanged();
+            });
+            
+            colorRectIndicator = new Region();
+            colorRectIndicator.setId("color-rect-indicator");
+            colorRectIndicator.setManaged(false);
+            colorRectIndicator.setMouseTransparent(true);
+            colorRectIndicator.setCache(true);
+        
+            final Pane colorRectOpacityContainer = new StackPane();
+            
+            colorRect = new StackPane() {
+                // This is an implementation of square control that chooses its
+                // size to fill the available height
+                @Override
+                public Orientation getContentBias() {
+                    return Orientation.VERTICAL;
+                }
+                @Override
+                protected double computePrefWidth(double height) {
+                    return height;
+                }
+                @Override
+                protected double computeMaxWidth(double height) {
+                    return height;
+                }
+            };
+            colorRect.getStyleClass().addAll("color-rect", "transparent-pattern");
+            
+            Pane colorRectHue = new Pane();
+            colorRectHue.backgroundProperty().bind(new ObjectBinding<Background>() {
+                
+                {
+                    bind(hue);
+                }
+
+                @Override protected Background computeValue() {
+                    return new Background(new BackgroundFill(
+                            Color.hsb(hue.getValue(), 1.0, 1.0), 
+                            CornerRadii.EMPTY, Insets.EMPTY));
+                }
+            });            
+            
+            colorRectOverlayOne = new Pane();
+            colorRectOverlayOne.getStyleClass().add("color-rect");
+            colorRectOverlayOne.setBackground(new Background(new BackgroundFill(
+                    new LinearGradient(0, 0, 1, 0, true, CycleMethod.NO_CYCLE, 
+                    new Stop(0, Color.rgb(255, 255, 255, 1)), 
+                    new Stop(1, Color.rgb(255, 255, 255, 0))), 
+                    CornerRadii.EMPTY, Insets.EMPTY)));
+        
+            EventHandler<MouseEvent> rectMouseHandler = event -> {
+                final double x = event.getX();
+                final double y = event.getY();
+                sat.set(clamp(x / colorRect.getWidth()) * 100);
+                bright.set(100 - (clamp(y / colorRect.getHeight()) * 100));
+            };
+        
+            colorRectOverlayTwo = new Pane();
+            colorRectOverlayTwo.getStyleClass().addAll("color-rect");
+            colorRectOverlayTwo.setBackground(new Background(new BackgroundFill(
+                    new LinearGradient(0, 0, 0, 1, true, CycleMethod.NO_CYCLE, 
+                    new Stop(0, Color.rgb(0, 0, 0, 0)), new Stop(1, Color.rgb(0, 0, 0, 1))), 
+                    CornerRadii.EMPTY, Insets.EMPTY)));
+            colorRectOverlayTwo.setOnMouseDragged(rectMouseHandler);
+            colorRectOverlayTwo.setOnMousePressed(rectMouseHandler);
+            
+            Pane colorRectBlackBorder = new Pane();
+            colorRectBlackBorder.setMouseTransparent(true);
+            colorRectBlackBorder.getStyleClass().addAll("color-rect", "color-rect-border");
+            
+            colorBar = new Pane();
+            colorBar.getStyleClass().add("color-bar");
+            colorBar.setBackground(new Background(new BackgroundFill(createHueGradient(), 
+                    CornerRadii.EMPTY, Insets.EMPTY)));
+
+            colorBarIndicator = new Region();
+            colorBarIndicator.setId("color-bar-indicator");
+            colorBarIndicator.setMouseTransparent(true);
+            colorBarIndicator.setCache(true);
+            
+            colorRectIndicator.layoutXProperty().bind(sat.divide(100).multiply(colorRect.widthProperty()));
+            colorRectIndicator.layoutYProperty().bind(Bindings.subtract(1, bright.divide(100)).multiply(colorRect.heightProperty()));
+            colorBarIndicator.layoutYProperty().bind(hue.divide(360).multiply(colorBar.heightProperty()));
+            colorRectOpacityContainer.opacityProperty().bind(alpha.divide(100));
+                    
+            EventHandler<MouseEvent> barMouseHandler = event -> {
+                final double y = event.getY();
+                hue.set(clamp(y / colorRect.getHeight()) * 360);
+            };
+            
+            colorBar.setOnMouseDragged(barMouseHandler);
+            colorBar.setOnMousePressed(barMouseHandler);
+        
+            colorBar.getChildren().setAll(colorBarIndicator);
+            colorRectOpacityContainer.getChildren().setAll(colorRectHue, colorRectOverlayOne, colorRectOverlayTwo);
+            colorRect.getChildren().setAll(colorRectOpacityContainer, colorRectBlackBorder, colorRectIndicator);
+            HBox.setHgrow(colorRect, Priority.SOMETIMES);
+            getChildren().addAll(colorRect, colorBar);
+        }
+        
+        private void updateValues() {
+            if (getCurrentColor() == null) {
+                setCurrentColor(Color.TRANSPARENT);
+            }
+            changeIsLocal = true;
+            //Initialize hue, sat, bright, color, red, green and blue
+            hue.set(getCurrentColor().getHue());
+            sat.set(getCurrentColor().getSaturation()*100);
+            bright.set(getCurrentColor().getBrightness()*100);
+            alpha.set(getCurrentColor().getOpacity()*100);
+            setCustomColor(Color.hsb(hue.get(), clamp(sat.get() / 100), clamp(bright.get() / 100), 
+                    clamp(alpha.get()/100)));
+            red.set(doubleToInt(getCustomColor().getRed()));
+            green.set(doubleToInt(getCustomColor().getGreen()));
+            blue.set(doubleToInt(getCustomColor().getBlue()));
+            changeIsLocal = false;
+        }
+        
+        @Override protected void layoutChildren() {
+            super.layoutChildren();
+            
+            // to maintain default size
+            colorRectIndicator.autosize();
+            // to maintain square size
+            double size = Math.min(colorRect.getWidth(), colorRect.getHeight());
+            colorRect.resize(size, size);
+            colorBar.resize(colorBar.getWidth(), size);
+        }
+    }
+    
+    /* ------------------------------------------------------------------------*/
+    
+    private class ControlsPane extends VBox {
+        
+        private Label currentColorLabel;
+        private Label newColorLabel;
+        private Region currentColorRect;
+        private Region newColorRect;
+        private Region currentTransparent; // for opacity
+        private GridPane currentAndNewColor;
+        private Region currentNewColorBorder;
+        private ToggleButton hsbButton;
+        private ToggleButton rgbButton;
+        private ToggleButton webButton;
+        private HBox hBox;
+        
+        private Label labels[] = new Label[4];
+        private Slider sliders[] = new Slider[4];
+        private IntegerField fields[] = new IntegerField[4];
+        private Label units[] = new Label[4];
+        private HBox buttonBox;
+        private Region whiteBox;
+        
+        private GridPane settingsPane = new GridPane();
+        
+        public ControlsPane() {
+            getStyleClass().add("controls-pane");
+            
+            currentNewColorBorder = new Region();
+            currentNewColorBorder.setId("current-new-color-border");
+            
+            currentTransparent = new Region();
+            currentTransparent.getStyleClass().addAll("transparent-pattern");
+            
+            currentColorRect = new Region();
+            currentColorRect.getStyleClass().add("color-rect");
+            currentColorRect.setId("current-color");
+            currentColorRect.backgroundProperty().bind(new ObjectBinding<Background>() {
+                {
+                    bind(currentColorProperty);
+                }
+                @Override protected Background computeValue() {
+                    return new Background(new BackgroundFill(currentColorProperty.get(), CornerRadii.EMPTY, Insets.EMPTY));
+                }
+            });
+
+            newColorRect = new Region();
+            newColorRect.getStyleClass().add("color-rect");
+            newColorRect.setId("new-color");
+            newColorRect.backgroundProperty().bind(new ObjectBinding<Background>() {
+                {
+                    bind(customColorProperty);
+                }
+                @Override protected Background computeValue() {
+                    return new Background(new BackgroundFill(customColorProperty.get(), CornerRadii.EMPTY, Insets.EMPTY));
+                }
+            });
+
+            currentColorLabel = new Label(Properties.getColorPickerString("currentColor"));
+            newColorLabel = new Label(Properties.getColorPickerString("newColor"));
+            
+            whiteBox = new Region();
+            whiteBox.getStyleClass().add("customcolor-controls-background");
+            
+            hsbButton = new ToggleButton(Properties.getColorPickerString("colorType.hsb"));
+            hsbButton.getStyleClass().add("left-pill");
+            rgbButton = new ToggleButton(Properties.getColorPickerString("colorType.rgb"));
+            rgbButton.getStyleClass().add("center-pill");
+            webButton = new ToggleButton(Properties.getColorPickerString("colorType.web"));
+            webButton.getStyleClass().add("right-pill");
+            final ToggleGroup group = new ToggleGroup();
+            
+            hBox = new HBox();
+            hBox.setAlignment(Pos.CENTER);
+            hBox.getChildren().addAll(hsbButton, rgbButton, webButton);
+            
+            Region spacer1 = new Region();
+            spacer1.setId("spacer1");
+            Region spacer2 = new Region();
+            spacer2.setId("spacer2");            
+            Region leftSpacer = new Region();
+            leftSpacer.setId("spacer-side");
+            Region rightSpacer = new Region();
+            rightSpacer.setId("spacer-side");
+            Region bottomSpacer = new Region();
+            bottomSpacer.setId("spacer-bottom");
+            
+            currentAndNewColor = new GridPane();
+            currentAndNewColor.getColumnConstraints().addAll(new ColumnConstraints(), new ColumnConstraints());
+            currentAndNewColor.getColumnConstraints().get(0).setHgrow(Priority.ALWAYS);
+            currentAndNewColor.getColumnConstraints().get(1).setHgrow(Priority.ALWAYS);
+            currentAndNewColor.getRowConstraints().addAll(new RowConstraints(), new RowConstraints(), new RowConstraints());
+            currentAndNewColor.getRowConstraints().get(2).setVgrow(Priority.ALWAYS);
+            VBox.setVgrow(currentAndNewColor, Priority.ALWAYS);
+            
+            currentAndNewColor.getStyleClass().add("current-new-color-grid");
+            currentAndNewColor.add(currentColorLabel, 0, 0);
+            currentAndNewColor.add(newColorLabel, 1, 0);
+            currentAndNewColor.add(spacer1, 0, 1, 2, 1);
+            currentAndNewColor.add(currentTransparent, 0, 2, 2, 1);
+            currentAndNewColor.add(currentColorRect, 0, 2);
+            currentAndNewColor.add(newColorRect, 1, 2);
+            currentAndNewColor.add(currentNewColorBorder, 0, 2, 2, 1);
+            currentAndNewColor.add(spacer2, 0, 3, 2, 1);
+            
+            settingsPane = new GridPane();
+            settingsPane.setId("settings-pane");
+            settingsPane.getColumnConstraints().addAll(new ColumnConstraints(), 
+                    new ColumnConstraints(), new ColumnConstraints(), 
+                    new ColumnConstraints(), new ColumnConstraints(), 
+                    new ColumnConstraints());
+            settingsPane.getColumnConstraints().get(0).setHgrow(Priority.NEVER);
+            settingsPane.getColumnConstraints().get(2).setHgrow(Priority.ALWAYS);
+            settingsPane.getColumnConstraints().get(3).setHgrow(Priority.NEVER);
+            settingsPane.getColumnConstraints().get(4).setHgrow(Priority.NEVER);
+            settingsPane.getColumnConstraints().get(5).setHgrow(Priority.NEVER);
+            settingsPane.add(whiteBox, 0, 0, 6, 5);
+            settingsPane.add(hBox, 0, 0, 6, 1);
+            settingsPane.add(leftSpacer, 0, 0);
+            settingsPane.add(rightSpacer, 5, 0);
+            settingsPane.add(bottomSpacer, 0, 4);   
+            
+            webField = new WebColorField();
+            webField.getStyleClass().add("web-field");
+            webField.setSkin(new WebColorFieldSkin(webField));
+            webField.valueProperty().bindBidirectional(customColorProperty);
+            webField.visibleProperty().bind(group.selectedToggleProperty().isEqualTo(webButton));
+            settingsPane.add(webField, 2, 1);
+            
+            // Color settings Grid Pane
+            for (int i = 0; i < 4; i++) {
+                labels[i] = new Label();
+                labels[i].getStyleClass().add("settings-label");
+
+                sliders[i] = new Slider();
+
+                fields[i] = new IntegerField();
+                fields[i].getStyleClass().add("color-input-field");
+                fields[i].setSkin(new IntegerFieldSkin(fields[i]));
+                
+                units[i] = new Label(i == 0 ? "\u00B0" : "%");                
+                units[i].getStyleClass().add("settings-unit");
+
+                if (i > 0 && i < 3) {
+                    // first row and opacity labels are always visible
+                    // second and third row labels are not visible in Web page
+                    labels[i].visibleProperty().bind(group.selectedToggleProperty().isNotEqualTo(webButton));
+                }
+                if (i < 3) {
+                    // sliders and fields shouldn't be visible in Web page
+                    sliders[i].visibleProperty().bind(group.selectedToggleProperty().isNotEqualTo(webButton));
+                    fields[i].visibleProperty().bind(group.selectedToggleProperty().isNotEqualTo(webButton));
+                    units[i].visibleProperty().bind(group.selectedToggleProperty().isEqualTo(hsbButton));
+                }
+                int row = 1 + i;
+                if (i == 3) {
+                    // opacity row is shifted one gridPane row down
+                    row++;
+                }
+                
+                settingsPane.add(labels[i], 1, row);
+                settingsPane.add(sliders[i], 2, row);
+                settingsPane.add(fields[i], 3, row);
+                settingsPane.add(units[i], 4, row);
+            }
+            
+            set(3, Properties.getColorPickerString("opacity_colon"), 100, colorRectPane.alpha);
+            
+            hsbButton.setToggleGroup(group);
+            rgbButton.setToggleGroup(group);
+            webButton.setToggleGroup(group);
+            group.selectedToggleProperty().addListener((observable, oldValue, newValue) -> {
+                if (newValue == null) {
+                    group.selectToggle(oldValue);
+                } else {
+                    if (newValue == hsbButton) {
+                        showHSBSettings();
+                    } else if (newValue == rgbButton) {
+                        showRGBSettings();
+                    } else {
+                        showWebSettings();
+                    }
+                }
+            });
+            group.selectToggle(hsbButton);            
+            
+            buttonBox = new HBox();
+            buttonBox.setId("buttons-hbox");
+            
+            Button saveButton = new Button(Properties.getColorPickerString("Save"));
+            saveButton.setDefaultButton(true);
+            saveButton.setOnAction(t -> {
+                if (onSave != null) {
+                    onSave.run();
+                }
+                dialog.hide();
+            });
+            
+            Button useButton = new Button(Properties.getColorPickerString("Use"));
+            useButton.setOnAction(t -> {
+                if (onUse != null) {
+                    onUse.run();
+                }
+                dialog.hide();
+            });
+            
+            Button cancelButton = new Button(Properties.getColorPickerString("Cancel"));
+            cancelButton.setCancelButton(true);
+            cancelButton.setOnAction(e -> {
+                customColorProperty.set(getCurrentColor());
+                if (onCancel != null) {
+                    onCancel.run();
+                }
+                dialog.hide();
+            });
+            buttonBox.getChildren().addAll(saveButton, useButton, cancelButton);
+            
+            getChildren().addAll(currentAndNewColor, settingsPane, buttonBox);
+        }
+        
+        private void showHSBSettings() {
+            set(0, Properties.getColorPickerString("hue_colon"), 360, colorRectPane.hue);
+            set(1, Properties.getColorPickerString("saturation_colon"), 100, colorRectPane.sat);
+            set(2, Properties.getColorPickerString("brightness_colon"), 100, colorRectPane.bright);
+        }
+        
+        private void showRGBSettings() {
+            set(0, Properties.getColorPickerString("red_colon"), 255, colorRectPane.red);
+            set(1, Properties.getColorPickerString("green_colon"), 255, colorRectPane.green);
+            set(2, Properties.getColorPickerString("blue_colon"), 255, colorRectPane.blue);
+        }
+        
+        private void showWebSettings() {
+            labels[0].setText(Properties.getColorPickerString("web_colon"));
+        }
+                
+        private Property<Number>[] bindedProperties = new Property[4];
+            
+        private void set(int row, String caption, int maxValue, Property<Number> prop) {
+            labels[row].setText(caption);
+            if (bindedProperties[row] != null) {
+                sliders[row].valueProperty().unbindBidirectional(bindedProperties[row]);
+                fields[row].valueProperty().unbindBidirectional(bindedProperties[row]);
+            } 
+            sliders[row].setMax(maxValue);
+            sliders[row].valueProperty().bindBidirectional(prop);
+            labels[row].setLabelFor(sliders[row]);
+            fields[row].setMaxValue(maxValue);
+            fields[row].valueProperty().bindBidirectional(prop);
+            bindedProperties[row] = prop;
+        }
+    }
+    
+    static double clamp(double value) {
+        return value < 0 ? 0 : value > 1 ? 1 : value;
+    }
+    
+    private static LinearGradient createHueGradient() {
+        double offset;
+        Stop[] stops = new Stop[255];
+        for (int y = 0; y < 255; y++) {
+            offset = (double)(1 - (1.0 / 255) * y);
+            int h = (int)((y / 255.0) * 360);
+            stops[y] = new Stop(offset, Color.hsb(h, 1.0, 1.0));
+        }
+        return new LinearGradient(0f, 1f, 0f, 0f, true, CycleMethod.NO_CYCLE, stops);
+    }
+    
+    private static int doubleToInt(double value) {
+        return (int) (value * 255 + 0.5); // Adding 0.5 for rounding only
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/DatePickerContent.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,795 @@
+/*
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.scene.control;
+
+import java.time.DateTimeException;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DecimalStyle;
+import java.time.chrono.Chronology;
+import java.time.chrono.ChronoLocalDate;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.ValueRange;
+import java.time.temporal.WeekFields;
+import java.time.YearMonth;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import static java.time.temporal.ChronoField.*;
+import static java.time.temporal.ChronoUnit.*;
+
+import com.sun.javafx.scene.control.skin.*;
+import javafx.application.Platform;
+import javafx.beans.property.ObjectProperty;
+import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.value.WeakChangeListener;
+import javafx.event.EventHandler;
+import javafx.scene.Node;
+import javafx.scene.Scene;
+import javafx.scene.control.Button;
+import javafx.scene.control.DatePicker;
+import javafx.scene.control.DateCell;
+import javafx.scene.control.Label;
+import javafx.scene.input.KeyEvent;
+import javafx.scene.input.MouseButton;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.layout.BorderPane;
+import javafx.scene.layout.ColumnConstraints;
+import javafx.scene.layout.GridPane;
+import javafx.scene.layout.HBox;
+import javafx.scene.layout.VBox;
+import javafx.scene.layout.StackPane;
+
+import com.sun.javafx.scene.control.skin.resources.ControlResources;
+import com.sun.javafx.scene.traversal.Direction;
+
+import static com.sun.javafx.PlatformUtil.*;
+
+/**
+ * The full content for the DatePicker popup. This class could
+ * probably be used more or less as-is with an embeddable type of date
+ * picker that doesn't use a popup.
+ */
+public class DatePickerContent extends VBox {
+    protected DatePicker datePicker;
+    private Button backMonthButton;
+    private Button forwardMonthButton;
+    private Button backYearButton;
+    private Button forwardYearButton;
+    private Label monthLabel;
+    private Label yearLabel;
+    protected GridPane gridPane;
+
+    private int daysPerWeek;
+    private List<DateCell> dayNameCells = new ArrayList<DateCell>();
+    private List<DateCell> weekNumberCells = new ArrayList<DateCell>();
+    protected List<DateCell> dayCells = new ArrayList<DateCell>();
+    private LocalDate[] dayCellDates;
+    private DateCell lastFocusedDayCell = null;
+
+    final DateTimeFormatter monthFormatter =
+        DateTimeFormatter.ofPattern("MMMM");
+
+    final DateTimeFormatter monthFormatterSO =
+            DateTimeFormatter.ofPattern("LLLL"); // Standalone month name
+
+    final DateTimeFormatter yearFormatter =
+        DateTimeFormatter.ofPattern("y");
+
+    final DateTimeFormatter yearWithEraFormatter =
+        DateTimeFormatter.ofPattern("GGGGy"); // For Japanese. What to use for others??
+
+    final DateTimeFormatter weekNumberFormatter =
+        DateTimeFormatter.ofPattern("w");
+
+    final DateTimeFormatter weekDayNameFormatter =
+            DateTimeFormatter.ofPattern("ccc"); // Standalone day name
+
+    final DateTimeFormatter dayCellFormatter =
+        DateTimeFormatter.ofPattern("d");
+
+    static String getString(String key) {
+        return ControlResources.getString("DatePicker."+key);
+    }
+
+    public DatePickerContent(final DatePicker datePicker) {
+        this.datePicker = datePicker;
+
+        getStyleClass().add("date-picker-popup");
+
+        daysPerWeek = getDaysPerWeek();
+
+        {
+            LocalDate date = datePicker.getValue();
+            displayedYearMonth.set((date != null) ? YearMonth.from(date) : YearMonth.now());
+        }
+
+        displayedYearMonth.addListener((observable, oldValue, newValue) -> {
+            updateValues();
+        });
+
+
+        getChildren().add(createMonthYearPane());
+
+        gridPane = new GridPane() {
+            @Override protected double computePrefWidth(double height) {
+                final double width = super.computePrefWidth(height);
+
+                // RT-30903: Make sure width snaps to pixel when divided by
+                // number of columns. GridPane doesn't do this with percentage
+                // width constraints. See GridPane.adjustColumnWidths().
+                final int nCols = daysPerWeek + (datePicker.isShowWeekNumbers() ? 1 : 0);
+                final double snaphgap = snapSpace(getHgap());
+                final double left = snapSpace(getInsets().getLeft());
+                final double right = snapSpace(getInsets().getRight());
+                final double hgaps = snaphgap * (nCols - 1);
+                final double contentWidth = width - left - right - hgaps;
+                return ((snapSize(contentWidth / nCols)) * nCols) + left + right + hgaps;
+            }
+
+            @Override protected void layoutChildren() {
+                // Prevent AssertionError in GridPane
+                if (getWidth() > 0 && getHeight() > 0) {
+                    super.layoutChildren();
+                }
+            }
+        };
+        gridPane.setFocusTraversable(true);
+        gridPane.getStyleClass().add("calendar-grid");
+        gridPane.setVgap(-1);
+        gridPane.setHgap(-1);
+
+        // Add a focus owner listener to Scene when it becomes available.
+        final WeakChangeListener<Node> weakFocusOwnerListener =
+            new WeakChangeListener<Node>((ov2, oldFocusOwner, newFocusOwner) -> {
+                if (newFocusOwner == gridPane) {
+                    if (oldFocusOwner instanceof DateCell) {
+                        // Backwards traversal, skip gridPane.
+                        gridPane.impl_traverse(Direction.PREVIOUS);
+                    } else {
+                        // Forwards traversal, pass focus to day cell.
+                        if (lastFocusedDayCell != null) {
+                            Platform.runLater(() -> {
+                                lastFocusedDayCell.requestFocus();
+                            });
+                        } else {
+                            clearFocus();
+                        }
+                    }
+                }
+            });
+        gridPane.sceneProperty().addListener(new WeakChangeListener<Scene>((ov, oldScene, newScene) -> {
+            if (oldScene != null) {
+                oldScene.focusOwnerProperty().removeListener(weakFocusOwnerListener);
+            }
+            if (newScene != null) {
+                Platform.runLater(() -> {
+                    newScene.focusOwnerProperty().addListener(weakFocusOwnerListener);
+                });
+            }
+        }));
+        if (gridPane.getScene() != null) {
+            gridPane.getScene().focusOwnerProperty().addListener(weakFocusOwnerListener);
+        }
+
+        // get the weekday labels starting with the weekday that is the
+        // first-day-of-the-week according to the locale in the
+        // displayed LocalDate
+        for (int i = 0; i < daysPerWeek; i++) {
+            DateCell cell = new DateCell();
+            cell.getStyleClass().add("day-name-cell");
+            dayNameCells.add(cell);
+        }
+
+        // Week number column
+        for (int i = 0; i < 6; i++) {
+            DateCell cell = new DateCell();
+            cell.getStyleClass().add("week-number-cell");
+            weekNumberCells.add(cell);
+        }
+
+        createDayCells();
+        updateGrid();
+        getChildren().add(gridPane);
+
+        refresh();
+
+        // RT-30511: This prevents key events from reaching the popup's owner.
+        addEventHandler(KeyEvent.ANY, e -> {
+            Node node = getScene().getFocusOwner();
+            if (node instanceof DateCell) {
+                lastFocusedDayCell = (DateCell)node;
+            }
+
+            if (e.getEventType() == KeyEvent.KEY_PRESSED) {
+                switch (e.getCode()) {
+                  case HOME:
+                      goToDate(LocalDate.now(), true);
+                      e.consume();
+                      break;
+
+
+                  case PAGE_UP:
+                      if ((isMac() && e.isMetaDown()) || (!isMac() && e.isControlDown())) {
+                          if (!backYearButton.isDisabled()) {
+                              forward(-1, YEARS, true);
+                          }
+                      } else {
+                          if (!backMonthButton.isDisabled()) {
+                              forward(-1, MONTHS, true);
+                          }
+                      }
+                      e.consume();
+                      break;
+
+                  case PAGE_DOWN:
+                      if ((isMac() && e.isMetaDown()) || (!isMac() && e.isControlDown())) {
+                          if (!forwardYearButton.isDisabled()) {
+                              forward(1, YEARS, true);
+                          }
+                      } else {
+                          if (!forwardMonthButton.isDisabled()) {
+                              forward(1, MONTHS, true);
+                          }
+                      }
+                      e.consume();
+                      break;
+                }
+
+                node = getScene().getFocusOwner();
+                if (node instanceof DateCell) {
+                    lastFocusedDayCell = (DateCell)node;
+                }
+            }
+
+            // Consume all key events except those that control
+            // showing the popup and traversal.
+            switch (e.getCode()) {
+              case F4:
+              case F10:
+              case UP:
+              case DOWN:
+              case LEFT:
+              case RIGHT:
+              case TAB:
+                    break;
+
+              case ESCAPE:
+                datePicker.hide();
+                e.consume();
+                break;
+
+              default:
+                e.consume();
+            }
+        });
+    }
+
+    private ObjectProperty<YearMonth> displayedYearMonth =
+        new SimpleObjectProperty<YearMonth>(this, "displayedYearMonth");
+
+    public ObjectProperty<YearMonth> displayedYearMonthProperty() {
+        return displayedYearMonth;
+    }
+
+
+    protected BorderPane createMonthYearPane() {
+        BorderPane monthYearPane = new BorderPane();
+        monthYearPane.getStyleClass().add("month-year-pane");
+
+        // Month spinner
+
+        HBox monthSpinner = new HBox();
+        monthSpinner.getStyleClass().add("spinner");
+
+        backMonthButton = new Button();
+        backMonthButton.getStyleClass().add("left-button");
+
+        forwardMonthButton = new Button();
+        forwardMonthButton.getStyleClass().add("right-button");
+
+        StackPane leftMonthArrow = new StackPane();
+        leftMonthArrow.getStyleClass().add("left-arrow");
+        leftMonthArrow.setMaxSize(USE_PREF_SIZE, USE_PREF_SIZE);
+        backMonthButton.setGraphic(leftMonthArrow);
+
+        StackPane rightMonthArrow = new StackPane();
+        rightMonthArrow.getStyleClass().add("right-arrow");
+        rightMonthArrow.setMaxSize(USE_PREF_SIZE, USE_PREF_SIZE);
+        forwardMonthButton.setGraphic(rightMonthArrow);
+
+
+        backMonthButton.setOnAction(t -> {
+            forward(-1, MONTHS, false);
+        });
+
+        monthLabel = new Label();
+        monthLabel.getStyleClass().add("spinner-label");
+
+        forwardMonthButton.setOnAction(t -> {
+            forward(1, MONTHS, false);
+        });
+
+        monthSpinner.getChildren().addAll(backMonthButton, monthLabel, forwardMonthButton);
+        monthYearPane.setLeft(monthSpinner);
+
+        // Year spinner
+
+        HBox yearSpinner = new HBox();
+        yearSpinner.getStyleClass().add("spinner");
+
+        backYearButton = new Button();
+        backYearButton.getStyleClass().add("left-button");
+
+        forwardYearButton = new Button();
+        forwardYearButton.getStyleClass().add("right-button");
+
+        StackPane leftYearArrow = new StackPane();
+        leftYearArrow.getStyleClass().add("left-arrow");
+        leftYearArrow.setMaxSize(USE_PREF_SIZE, USE_PREF_SIZE);
+        backYearButton.setGraphic(leftYearArrow);
+
+        StackPane rightYearArrow = new StackPane();
+        rightYearArrow.getStyleClass().add("right-arrow");
+        rightYearArrow.setMaxSize(USE_PREF_SIZE, USE_PREF_SIZE);
+        forwardYearButton.setGraphic(rightYearArrow);
+
+
+        backYearButton.setOnAction(t -> {
+            forward(-1, YEARS, false);
+        });
+
+        yearLabel = new Label();
+        yearLabel.getStyleClass().add("spinner-label");
+
+        forwardYearButton.setOnAction(t -> {
+            forward(1, YEARS, false);
+        });
+
+        yearSpinner.getChildren().addAll(backYearButton, yearLabel, forwardYearButton);
+        yearSpinner.setFillHeight(false);
+        monthYearPane.setRight(yearSpinner);
+
+        return monthYearPane;
+    }
+
+    private void refresh() {
+        updateMonthLabelWidth();
+        updateDayNameCells();
+        updateValues();
+    }
+
+    public void updateValues() {
+        // Note: Preserve this order, as DatePickerHijrahContent needs
+        // updateDayCells before updateMonthYearPane().
+        updateWeeknumberDateCells();
+        updateDayCells();
+        updateMonthYearPane();
+    }
+
+    public void updateGrid() {
+        gridPane.getColumnConstraints().clear();
+        gridPane.getChildren().clear();
+
+        int nCols = daysPerWeek + (datePicker.isShowWeekNumbers() ? 1 : 0);
+
+        ColumnConstraints columnConstraints = new ColumnConstraints();
+        columnConstraints.setPercentWidth(100); // Treated as weight
+        for (int i = 0; i < nCols; i++) {
+            gridPane.getColumnConstraints().add(columnConstraints);
+        }
+
+        for (int i = 0; i < daysPerWeek; i++) {
+            gridPane.add(dayNameCells.get(i), i + nCols - daysPerWeek, 1);  // col, row
+        }
+
+        // Week number column
+        if (datePicker.isShowWeekNumbers()) {
+            for (int i = 0; i < 6; i++) {
+                gridPane.add(weekNumberCells.get(i), 0, i + 2);  // col, row
+            }
+        }
+
+        // setup: 6 rows of daysPerWeek (which is the maximum number of cells required in the worst case layout)
+        for (int row = 0; row < 6; row++) {
+            for (int col = 0; col < daysPerWeek; col++) {
+                gridPane.add(dayCells.get(row*daysPerWeek+col), col + nCols - daysPerWeek, row + 2);
+            }
+        }
+    }
+
+    public void updateDayNameCells() {
+        // first day of week, 1 = monday, 7 = sunday
+        int firstDayOfWeek = WeekFields.of(getLocale()).getFirstDayOfWeek().getValue();
+
+        // july 13th 2009 is a Monday, so a firstDayOfWeek=1 must come out of the 13th
+        LocalDate date = LocalDate.of(2009, 7, 12 + firstDayOfWeek);
+        for (int i = 0; i < daysPerWeek; i++) {
+            String name = weekDayNameFormatter.withLocale(getLocale()).format(date.plus(i, DAYS));
+            dayNameCells.get(i).setText(titleCaseWord(name));
+        }
+    }
+
+    public void updateWeeknumberDateCells() {
+        if (datePicker.isShowWeekNumbers()) {
+            final Locale locale = getLocale();
+            final int maxWeeksPerMonth = 6; // TODO: Get this from chronology?
+
+            LocalDate firstOfMonth = displayedYearMonth.get().atDay(1);
+            for (int i = 0; i < maxWeeksPerMonth; i++) {
+                LocalDate date = firstOfMonth.plus(i, WEEKS);
+                // Use a formatter to ensure correct localization,
+                // such as when Thai numerals are required.
+                String cellText =
+                    weekNumberFormatter.withLocale(locale)
+                                       .withDecimalStyle(DecimalStyle.of(locale))
+                                       .format(date);
+                weekNumberCells.get(i).setText(cellText);
+            }
+        }
+    }
+
+    public void updateDayCells() {
+        Locale locale = getLocale();
+        Chronology chrono = getPrimaryChronology();
+        int firstOfMonthIdx = determineFirstOfMonthDayOfWeek();
+        YearMonth curMonth = displayedYearMonth.get();
+
+        // RT-31075: The following are now set in the try-catch block.
+        YearMonth prevMonth = null;
+        YearMonth nextMonth = null;
+        int daysInCurMonth = -1;
+        int daysInPrevMonth = -1;
+        int daysInNextMonth = -1;
+
+        for (int i = 0; i < 6 * daysPerWeek; i++) {
+            DateCell dayCell = dayCells.get(i);
+            dayCell.getStyleClass().setAll("cell", "date-cell", "day-cell");
+            dayCell.setDisable(false);
+            dayCell.setStyle(null);
+            dayCell.setGraphic(null);
+            dayCell.setTooltip(null);
+
+            try {
+                if (daysInCurMonth == -1) {
+                    daysInCurMonth = curMonth.lengthOfMonth();
+                }
+                YearMonth month = curMonth;
+                int day = i - firstOfMonthIdx + 1;
+                //int index = firstOfMonthIdx + i - 1;
+                if (i < firstOfMonthIdx) {
+                    if (prevMonth == null) {
+                        prevMonth = curMonth.minusMonths(1);
+                        daysInPrevMonth = prevMonth.lengthOfMonth();
+                    }
+                    month = prevMonth;
+                    day = i + daysInPrevMonth - firstOfMonthIdx + 1;
+                    dayCell.getStyleClass().add("previous-month");
+                } else if (i >= firstOfMonthIdx + daysInCurMonth) {
+                    if (nextMonth == null) {
+                        nextMonth = curMonth.plusMonths(1);
+                        daysInNextMonth = nextMonth.lengthOfMonth();
+                    }
+                    month = nextMonth;
+                    day = i - daysInCurMonth - firstOfMonthIdx + 1;
+                    dayCell.getStyleClass().add("next-month");
+                }
+                LocalDate date = month.atDay(day);
+                dayCellDates[i] = date;
+                ChronoLocalDate cDate = chrono.date(date);
+
+                dayCell.setDisable(false);
+
+                if (isToday(date)) {
+                    dayCell.getStyleClass().add("today");
+                }
+
+                if (date.equals(datePicker.getValue())) {
+                    dayCell.getStyleClass().add("selected");
+                }
+
+                String cellText =
+                    dayCellFormatter.withLocale(locale)
+                                    .withChronology(chrono)
+                                    .withDecimalStyle(DecimalStyle.of(locale))
+                                    .format(cDate);
+                dayCell.setText(cellText);
+
+                dayCell.updateItem(date, false);
+            } catch (DateTimeException ex) {
+                // Date is out of range.
+                // System.err.println(dayCellDate(dayCell) + " " + ex);
+                dayCell.setText(" ");
+                dayCell.setDisable(true);
+            }
+        }
+    }
+
+    private int getDaysPerWeek() {
+        ValueRange range = getPrimaryChronology().range(DAY_OF_WEEK);
+        return (int)(range.getMaximum() - range.getMinimum() + 1);
+    }
+
+    private int getMonthsPerYear() {
+        ValueRange range = getPrimaryChronology().range(MONTH_OF_YEAR);
+        return (int)(range.getMaximum() - range.getMinimum() + 1);
+    }
+
+    private void updateMonthLabelWidth() {
+        if (monthLabel != null) {
+            int monthsPerYear = getMonthsPerYear();
+            double width = 0;
+            for (int i = 0; i < monthsPerYear; i++) {
+                YearMonth yearMonth = displayedYearMonth.get().withMonth(i + 1);
+                String name = monthFormatterSO.withLocale(getLocale()).format(yearMonth);
+                if (Character.isDigit(name.charAt(0))) {
+                    // Fallback. The standalone format returned a number, so use standard format instead.
+                    name = monthFormatter.withLocale(getLocale()).format(yearMonth);
+                }
+                width = Math.max(width, Utils.computeTextWidth(monthLabel.getFont(), name, 0));
+            }
+            monthLabel.setMinWidth(width);
+        }
+    }
+
+    protected void updateMonthYearPane() {
+        YearMonth yearMonth = displayedYearMonth.get();
+        String str = formatMonth(yearMonth);
+        monthLabel.setText(str);
+
+        str = formatYear(yearMonth);
+        yearLabel.setText(str);
+        double width = Utils.computeTextWidth(yearLabel.getFont(), str, 0);
+        if (width > yearLabel.getMinWidth()) {
+            yearLabel.setMinWidth(width);
+        }
+
+        Chronology chrono = datePicker.getChronology();
+        LocalDate firstDayOfMonth = yearMonth.atDay(1);
+        backMonthButton.setDisable(!isValidDate(chrono, firstDayOfMonth, -1, DAYS));
+        forwardMonthButton.setDisable(!isValidDate(chrono, firstDayOfMonth, +1, MONTHS));
+        backYearButton.setDisable(!isValidDate(chrono, firstDayOfMonth, -1, YEARS));
+        forwardYearButton.setDisable(!isValidDate(chrono, firstDayOfMonth, +1, YEARS));
+    }
+
+    private String formatMonth(YearMonth yearMonth) {
+        Locale locale = getLocale();
+        Chronology chrono = getPrimaryChronology();
+        try {
+            ChronoLocalDate cDate = chrono.date(yearMonth.atDay(1));
+
+            String str = monthFormatterSO.withLocale(getLocale())
+                                         .withChronology(chrono)
+                                         .format(cDate);
+            if (Character.isDigit(str.charAt(0))) {
+                // Fallback. The standalone format returned a number, so use standard format instead.
+                str = monthFormatter.withLocale(getLocale())
+                                    .withChronology(chrono)
+                                    .format(cDate);
+            }
+            return titleCaseWord(str);
+        } catch (DateTimeException ex) {
+            // Date is out of range.
+            return "";
+        }
+    }
+
+    private String formatYear(YearMonth yearMonth) {
+        Locale locale = getLocale();
+        Chronology chrono = getPrimaryChronology();
+        try {
+            DateTimeFormatter formatter = yearFormatter;
+            ChronoLocalDate cDate = chrono.date(yearMonth.atDay(1));
+            int era = cDate.getEra().getValue();
+            int nEras = chrono.eras().size();
+
+            /*if (cDate.get(YEAR) < 0) {
+                formatter = yearForNegYearFormatter;
+            } else */
+            if ((nEras == 2 && era == 0) || nEras > 2) {
+                formatter = yearWithEraFormatter;
+            }
+
+            // Fixme: Format Japanese era names with Japanese text.
+            String str = formatter.withLocale(getLocale())
+                                  .withChronology(chrono)
+                                  .withDecimalStyle(DecimalStyle.of(getLocale()))
+                                  .format(cDate);
+
+            return str;
+        } catch (DateTimeException ex) {
+            // Date is out of range.
+            return "";
+        }
+    }
+
+    // Ensures that month and day names are titlecased (capitalized).
+    private String titleCaseWord(String str) {
+        if (str.length() > 0) {
+            int firstChar = str.codePointAt(0);
+            if (!Character.isTitleCase(firstChar)) {
+                str = new String(new int[] { Character.toTitleCase(firstChar) }, 0, 1) +
+                      str.substring(Character.offsetByCodePoints(str, 0, 1));
+            }
+        }
+        return str;
+    }
+
+
+
+    /**
+     * determine on which day of week idx the first of the months is
+     */
+    private int determineFirstOfMonthDayOfWeek() {
+        // determine with which cell to start
+        int firstDayOfWeek = WeekFields.of(getLocale()).getFirstDayOfWeek().getValue();
+        int firstOfMonthIdx = displayedYearMonth.get().atDay(1).getDayOfWeek().getValue() - firstDayOfWeek;
+        if (firstOfMonthIdx < 0) {
+            firstOfMonthIdx += daysPerWeek;
+        }
+        return firstOfMonthIdx;
+    }
+
+    private boolean isToday(LocalDate localDate) {
+        return (localDate.equals(LocalDate.now()));
+    }
+
+    protected LocalDate dayCellDate(DateCell dateCell) {
+        assert (dayCellDates != null);
+        return dayCellDates[dayCells.indexOf(dateCell)];
+    }
+
+    // public for behavior class
+    public void goToDayCell(DateCell dateCell, int offset, ChronoUnit unit, boolean focusDayCell) {
+        goToDate(dayCellDate(dateCell).plus(offset, unit), focusDayCell);
+    }
+
+    protected void forward(int offset, ChronoUnit unit, boolean focusDayCell) {
+        YearMonth yearMonth = displayedYearMonth.get();
+        DateCell dateCell = lastFocusedDayCell;
+        if (dateCell == null || !dayCellDate(dateCell).getMonth().equals(yearMonth.getMonth())) {
+            dateCell = findDayCellForDate(yearMonth.atDay(1));
+        }
+        goToDayCell(dateCell, offset, unit, focusDayCell);
+    }
+
+    // public for behavior class
+    public void goToDate(LocalDate date, boolean focusDayCell) {
+        if (isValidDate(datePicker.getChronology(), date)) {
+            displayedYearMonth.set(YearMonth.from(date));
+            if (focusDayCell) {
+                findDayCellForDate(date).requestFocus();
+            }
+        }
+    }
+
+    // public for behavior class
+    public void selectDayCell(DateCell dateCell) {
+        datePicker.setValue(dayCellDate(dateCell));
+        datePicker.hide();
+    }
+
+    private DateCell findDayCellForDate(LocalDate date) {
+        for (int i = 0; i < dayCellDates.length; i++) {
+            if (date.equals(dayCellDates[i])) {
+                return dayCells.get(i);
+            }
+        }
+        return dayCells.get(dayCells.size()/2+1);
+    }
+
+    public void clearFocus() {
+        LocalDate focusDate = datePicker.getValue();
+        if (focusDate == null) {
+            focusDate = LocalDate.now();
+        }
+        if (YearMonth.from(focusDate).equals(displayedYearMonth.get())) {
+            // focus date
+            goToDate(focusDate, true);
+        } else {
+            // focus month spinner (should not happen)
+            backMonthButton.requestFocus();
+        }
+
+        // RT-31857
+        if (backMonthButton.getWidth() == 0) {
+            backMonthButton.requestLayout();
+            forwardMonthButton.requestLayout();
+            backYearButton.requestLayout();
+            forwardYearButton.requestLayout();
+        }
+    }
+
+    protected void createDayCells() {
+        final EventHandler<MouseEvent> dayCellActionHandler = ev -> {
+            if (ev.getButton() != MouseButton.PRIMARY) {
+                return;
+            }
+
+            DateCell dayCell = (DateCell)ev.getSource();
+            selectDayCell(dayCell);
+            lastFocusedDayCell = dayCell;
+        };
+
+        for (int row = 0; row < 6; row++) {
+            for (int col = 0; col < daysPerWeek; col++) {
+                DateCell dayCell = createDayCell();
+                dayCell.addEventHandler(MouseEvent.MOUSE_CLICKED, dayCellActionHandler);
+                dayCells.add(dayCell);
+            }
+        }
+
+        dayCellDates = new LocalDate[6 * daysPerWeek];
+    }
+
+    private DateCell createDayCell() {
+        DateCell cell = null;
+        if (datePicker.getDayCellFactory() != null) {
+            cell = datePicker.getDayCellFactory().call(datePicker);
+        }
+        if (cell == null) {
+            cell = new DateCell();
+        }
+
+        return cell;
+    }
+
+    protected Locale getLocale() {
+        return Locale.getDefault(Locale.Category.FORMAT);
+    }
+
+    /**
+     * The primary chronology for display. This may be overridden to
+     * be different than the DatePicker chronology. For example
+     * DatePickerHijrahContent uses ISO as primary and Hijrah as a
+     * secondary chronology.
+     */
+    protected Chronology getPrimaryChronology() {
+        return datePicker.getChronology();
+    }
+
+    protected boolean isValidDate(Chronology chrono, LocalDate date, int offset, ChronoUnit unit) {
+        if (date != null) {
+            try {
+                return isValidDate(chrono, date.plus(offset, unit));
+            } catch (DateTimeException ex) {
+            }
+        }
+        return false;
+    }
+
+    protected boolean isValidDate(Chronology chrono, LocalDate date) {
+        try {
+            if (date != null) {
+                chrono.date(date);
+            }
+            return true;
+        } catch (DateTimeException ex) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/DatePickerHijrahContent.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.scene.control;
+
+import java.time.LocalDate;
+import java.time.DateTimeException;
+import java.time.YearMonth;
+import java.time.format.DecimalStyle;
+import java.time.chrono.Chronology;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.HijrahDate;
+import java.time.chrono.IsoChronology;
+import java.util.Locale;
+
+import static java.time.temporal.ChronoField.*;
+
+import javafx.geometry.Pos;
+import javafx.scene.control.DatePicker;
+import javafx.scene.control.DateCell;
+import javafx.scene.control.Label;
+import javafx.scene.layout.BorderPane;
+import javafx.scene.text.Text;
+
+/**
+ * Extends DatePickerContent to add a secondary calendar, allowing the
+ * ISO and Islamic calendars to be displayed simultaneously.  The
+ * secondary month, day, and year values are displayed as a colored
+ * overlay, offset from the primary values.
+ *
+ * If the current DatePicker Chronology is HijrahChronology, then sets
+ * the content's primary Chronology to be IsoChronology, and sets
+ * HijrahChronology as the secondary.
+ */
+public class DatePickerHijrahContent extends DatePickerContent {
+    private Label hijrahMonthYearLabel;
+
+    public DatePickerHijrahContent(final DatePicker datePicker) {
+        super(datePicker);
+    }
+
+    /**
+     * The primary chronology for display. This is overridden because
+     * DatePickerHijrahContent uses ISO as primary and Hijrah as a
+     * secondary chronology.
+     */
+    @Override protected Chronology getPrimaryChronology() {
+        return IsoChronology.INSTANCE;
+    }
+
+    @Override protected BorderPane createMonthYearPane() {
+        BorderPane monthYearPane = super.createMonthYearPane();
+
+        hijrahMonthYearLabel = new Label();
+        hijrahMonthYearLabel.getStyleClass().add("secondary-label");
+        monthYearPane.setBottom(hijrahMonthYearLabel);
+        BorderPane.setAlignment(hijrahMonthYearLabel, Pos.CENTER);
+
+        return monthYearPane;
+    }
+
+
+    @Override protected void updateMonthYearPane() {
+        super.updateMonthYearPane();
+
+        Locale locale = getLocale();
+        HijrahChronology chrono = HijrahChronology.INSTANCE;
+        long firstMonth = -1;
+        long firstYear = -1;
+        String firstMonthStr = null;
+        String firstYearStr = null;
+        String hijrahStr = null;
+        YearMonth displayedYearMonth = displayedYearMonthProperty().get();
+
+        for (DateCell dayCell : dayCells) {
+            LocalDate date = dayCellDate(dayCell);
+
+            // Display Hijra month names only for current ISO month.
+            if (!displayedYearMonth.equals(YearMonth.from(date))) {
+                continue;
+            }
+
+            try {
+                HijrahDate cDate = chrono.date(date);
+                long month = cDate.getLong(MONTH_OF_YEAR);
+                long year = cDate.getLong(YEAR);
+
+                if (hijrahStr == null || month != firstMonth) {
+                    String monthStr = monthFormatter.withLocale(locale)
+                                                    .withChronology(chrono)
+                                                    .withDecimalStyle(DecimalStyle.of(locale))
+                                                    .format(cDate);
+                    String yearStr = yearFormatter.withLocale(locale)
+                                                    .withChronology(chrono)
+                                                    .withDecimalStyle(DecimalStyle.of(locale))
+                                                    .format(cDate);
+                    if (hijrahStr == null) {
+                        firstMonth = month;
+                        firstYear = year;
+                        firstMonthStr = monthStr;
+                        firstYearStr = yearStr;
+                        hijrahStr = firstMonthStr + " " + firstYearStr;
+                    } else {
+                        if (year > firstYear) {
+                            hijrahStr = firstMonthStr + " " + firstYearStr + " - " + monthStr + " " + yearStr;
+                        } else {
+                            hijrahStr = firstMonthStr + " - " + monthStr + " " + firstYearStr;
+                        }
+                        break;
+                    }
+                }
+            } catch (DateTimeException ex) {
+                // Date is out of range, ignore.
+
+                //System.err.println(dayCellDate(dayCell) + " " + ex);
+            }
+        }
+
+        hijrahMonthYearLabel.setText(hijrahStr);
+    }
+
+    @Override protected void createDayCells() {
+        super.createDayCells();
+
+        for (DateCell dayCell : dayCells) {
+            Text secondaryText = new Text();
+            dayCell.getProperties().put("DateCell.secondaryText", secondaryText);
+        }
+    }
+
+    @Override public void updateDayCells() {
+        super.updateDayCells();
+
+        Locale locale = getLocale();
+        HijrahChronology chrono = HijrahChronology.INSTANCE;
+
+        int majorityMonth = -1;
+        int visibleDaysInMajorityMonth = -1;
+        int curMonth = -1;
+        int visibleDaysInCurMonth = 0;
+
+        for (DateCell dayCell : dayCells) {
+            Text secondaryText = (Text)dayCell.getProperties().get("DateCell.secondaryText");
+            dayCell.getStyleClass().add("hijrah-day-cell");
+            secondaryText.getStyleClass().setAll("text", "secondary-text");
+
+            try {
+                HijrahDate cDate = chrono.date(dayCellDate(dayCell));
+//             long month = cDate.getLong(MONTH_OF_YEAR);
+
+                String hijrahStr =
+                    dayCellFormatter.withLocale(locale)
+                                    .withChronology(chrono)
+                                    .withDecimalStyle(DecimalStyle.of(locale))
+                                    .format(cDate);
+
+                secondaryText.setText(hijrahStr);
+                dayCell.requestLayout();
+            } catch (DateTimeException ex) {
+                // Date is out of range.
+                // System.err.println(dayCellDate(dayCell) + " " + ex);
+                secondaryText.setText(" ");
+                dayCell.setDisable(true);
+            }
+
+//             if (month == curMonth) {
+//                 visibleDaysInCurMonth++;
+//             } else {
+//                 curMonth = month;
+//                 visibleDaysInCurMonth = 1;
+//             }
+//             if (visibleDaysInCurMonth > visibleDaysInMajorityMonth) {
+//                 majorityMonth = month;
+//                 visibleDaysInMajorityMonth = visibleDaysInCurMonth;
+//             }
+        }
+
+//         boolean seenMajorityMonth = false;
+//         for (DateCell dayCell : dayCells) {
+//             HijrahDate cDate = chrono.date(dayCellDate(dayCell));
+//             int month = cDate.get(MONTH_OF_YEAR);
+//             Text secondaryText = (Text)dayCell.getProperties().get("DateCell.secondaryText");
+
+//             if (month == majorityMonth) {
+//                 seenMajorityMonth = true;
+//                 secondaryText.getStyleClass().add("current-month");
+//             } else {
+//                 secondaryText.getStyleClass().add(seenMajorityMonth ? "next-month" : "previous-month");
+//             }
+//         }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/DoubleField.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,63 @@
+/*
+ * 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 com.sun.javafx.scene.control;
+
+import javafx.beans.property.DoubleProperty;
+import javafx.beans.property.SimpleDoubleProperty;
+import javafx.scene.control.Skin;
+import com.sun.javafx.scene.control.skin.DoubleFieldSkin;
+
+/**
+ *
+ */
+public class DoubleField extends InputField {
+    /**
+     * The value of the DoubleField. If null, the value will be treated as "0", but
+     * will still actually be null.
+     */
+    private DoubleProperty value = new SimpleDoubleProperty(this, "value");
+    public final double getValue() { return value.get(); }
+    public final void setValue(double value) { this.value.set(value); }
+    public final DoubleProperty valueProperty() { return value; }
+
+    /**
+     * Creates a new DoubleField. The style class is set to "money-field".
+     */
+    public DoubleField() {
+        getStyleClass().setAll("double-field");
+    }
+
+    /***************************************************************************
+     *                                                                         *
+     * Methods                                                                 *
+     *                                                                         *
+     **************************************************************************/
+
+    /** {@inheritDoc} */
+    @Override protected Skin<?> createDefaultSkin() {
+        return new DoubleFieldSkin(this);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/EmbeddedTextContextMenuContent.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.scene.control;
+
+import java.util.Map;
+
+import com.sun.javafx.scene.control.skin.*;
+import javafx.beans.InvalidationListener;
+import javafx.beans.Observable;
+import javafx.collections.ListChangeListener;
+import javafx.event.ActionEvent;
+import javafx.event.Event;
+import javafx.geometry.HPos;
+import javafx.geometry.VPos;
+import javafx.scene.control.*;
+import javafx.scene.control.skin.TextAreaSkin;
+import javafx.scene.control.skin.TextFieldSkin;
+import javafx.scene.layout.HBox;
+import javafx.scene.layout.StackPane;
+
+/**
+ * The embedded context menu for a text input control.  
+ * The menu will be displayed horizontally underneath the cursor 
+ * with the available text editing options i.e. cut, copy, paste, select all.
+ *
+ */
+public class EmbeddedTextContextMenuContent extends StackPane {
+
+    private ContextMenu contextMenu;
+    private StackPane pointer;
+    private HBox menuBox;
+
+    public EmbeddedTextContextMenuContent(final ContextMenu popupMenu) {
+        this.contextMenu = popupMenu;
+        this.menuBox = new HBox();
+        this.pointer = new StackPane();
+        pointer.getStyleClass().add("pointer");
+
+        updateMenuItemContainer();
+        getChildren().addAll(pointer, menuBox);
+
+        contextMenu.ownerNodeProperty().addListener(arg0 -> {
+            if (contextMenu.getOwnerNode() instanceof TextArea) {
+                TextAreaSkin tas = (TextAreaSkin)((TextArea)contextMenu.getOwnerNode()).getSkin();
+                tas.getSkinnable().getProperties().addListener(new InvalidationListener() {
+                    @Override public void invalidated(Observable arg0) {
+                        requestLayout();
+                    }
+                });
+            } else if (contextMenu.getOwnerNode() instanceof TextField) {
+                TextFieldSkin tfs = (TextFieldSkin)((TextField)contextMenu.getOwnerNode()).getSkin();
+                tfs.getSkinnable().getProperties().addListener(new InvalidationListener() {
+                    @Override public void invalidated(Observable arg0) {
+                        requestLayout();
+                    }
+                });
+            }
+        });
+
+        contextMenu.getItems().addListener((ListChangeListener<MenuItem>) c -> {
+            // Listener to items in PopupMenu to update items in PopupMenuContent
+            updateMenuItemContainer();
+        });
+    }
+
+    private void updateMenuItemContainer() {
+        menuBox.getChildren().clear();
+        for (MenuItem item: contextMenu.getItems()) {
+            MenuItemContainer menuItemContainer = new MenuItemContainer(item);
+            menuItemContainer.visibleProperty().bind(item.visibleProperty());
+            menuBox.getChildren().add(menuItemContainer);
+        }
+    }
+
+    private void hideAllMenus(MenuItem item) {
+        contextMenu.hide();
+
+        Menu parentMenu;
+        while ((parentMenu = item.getParentMenu()) != null) {
+            parentMenu.hide();
+            item = parentMenu;
+        }
+        if (parentMenu == null && item.getParentPopup() != null) {
+            item.getParentPopup().hide();
+        }
+    }
+
+    @Override protected double computePrefHeight(double width) {
+        final double pointerHeight = snapSize(pointer.prefHeight(width));
+        final double menuBoxHeight = snapSize(menuBox.prefHeight(width));
+        return snappedTopInset() + pointerHeight + menuBoxHeight + snappedBottomInset();
+    }
+
+    @Override protected double computePrefWidth(double height) {
+        final double menuBoxWidth = snapSize(menuBox.prefWidth(height));
+        return snappedLeftInset() + menuBoxWidth + snappedRightInset();
+    }
+    
+    @Override protected void layoutChildren() {
+        final double left = snappedLeftInset();
+        final double right = snappedRightInset();
+        final double top = snappedTopInset();
+        final double width = getWidth() - (left + right);
+        final double pointerWidth = snapSize(Utils.boundedSize(pointer.prefWidth(-1), pointer.minWidth(-1), pointer.maxWidth(-1)));
+        final double pointerHeight = snapSize(Utils.boundedSize(pointer.prefWidth(-1), pointer.minWidth(-1), pointer.maxWidth(-1)));
+        final double menuBoxWidth = snapSize(Utils.boundedSize(menuBox.prefWidth(-1), menuBox.minWidth(-1), menuBox.maxWidth(-1)));
+        final double menuBoxHeight = snapSize(Utils.boundedSize(menuBox.prefWidth(-1), menuBox.minWidth(-1), menuBox.maxWidth(-1)));
+        double sceneX = 0;
+        double screenX = 0;
+        double pointerX = 0;
+
+        // Get the positions of the cursor from the TextArea/TextField and draw the arrow underneath it.
+        Map<Object,Object> properties = null;
+        if (contextMenu.getOwnerNode() instanceof TextArea) {
+            properties = ((TextArea)contextMenu.getOwnerNode()).getProperties();
+        } else if (contextMenu.getOwnerNode() instanceof TextField) {
+            properties = ((TextField)contextMenu.getOwnerNode()).getProperties();
+        }
+
+        if (properties != null) {
+            if (properties.containsKey("CONTEXT_MENU_SCENE_X")) {
+                sceneX = Double.valueOf(properties.get("CONTEXT_MENU_SCENE_X").toString());
+                properties.remove("CONTEXT_MENU_SCENE_X");
+            }
+
+            if (properties.containsKey("CONTEXT_MENU_SCREEN_X")) {
+                screenX = Double.valueOf(properties.get("CONTEXT_MENU_SCREEN_X").toString());
+                properties.remove("CONTEXT_MENU_SCREEN_X");
+            }
+        }
+
+        if (sceneX == 0) {
+            pointerX = width/2;
+        } else {
+            pointerX = (screenX - sceneX - contextMenu.getX()) + sceneX;
+        }
+
+        pointer.resize(pointerWidth, pointerHeight);
+        positionInArea(pointer, pointerX, top, pointerWidth, pointerHeight, 0, HPos.CENTER, VPos.CENTER);
+        menuBox.resize(menuBoxWidth, menuBoxHeight);
+        positionInArea(menuBox, left, top + pointerHeight, menuBoxWidth, menuBoxHeight, 0, HPos.CENTER, VPos.CENTER);
+    }
+
+    class MenuItemContainer extends Button {
+        private MenuItem item;
+
+        public MenuItemContainer(MenuItem item){
+            getStyleClass().addAll(item.getStyleClass());
+            setId(item.getId());
+            this.item = item;
+            setText(item.getText());
+            setStyle(item.getStyle());
+
+            // bind to text property in menu item
+            textProperty().bind(item.textProperty());
+        }
+
+        public MenuItem getItem() {
+            return item;
+        }
+
+        @Override public void fire() {
+            Event.fireEvent(item, new ActionEvent());
+            if (Boolean.TRUE.equals((Boolean)item.getProperties().get("refreshMenu"))) {
+                //refreshMenu();
+            } else {
+                hideAllMenus(item);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/FakeFocusTextField.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.scene.control;
+
+import javafx.scene.AccessibleAttribute;
+import javafx.scene.control.TextField;
+
+public final class FakeFocusTextField extends TextField {
+
+    @Override public void requestFocus() {
+        if (getParent() != null) {
+            getParent().requestFocus();
+        }
+    }
+
+    public void setFakeFocus(boolean b) {
+        setFocused(b);
+    }
+
+    @Override
+    public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) {
+        switch (attribute) {
+            case FOCUS_ITEM:
+                /* Internally comboBox reassign its focus the text field.
+                 * For the accessibility perspective it is more meaningful
+                 * if the focus stays with the comboBox control.
+                 */
+                return getParent();
+            default: return super.queryAccessibleAttribute(attribute, parameters);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/InputField.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,131 @@
+/*
+ * 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 com.sun.javafx.scene.control;
+
+import javafx.beans.property.*;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.scene.control.Control;
+
+/**
+ *
+ */
+public abstract class InputField extends Control {
+    /**
+     * The default value for {@link #prefColumnCount}.
+     */
+    public static final int DEFAULT_PREF_COLUMN_COUNT = 12;
+
+    /**
+     * Indicates whether this InputField can be edited by the user. If true, the
+     * "readonly" pseudo class will be false, but if false, the "readonly"
+     * pseudo class will be true.
+     */
+    private BooleanProperty editable = new SimpleBooleanProperty(this, "editable", true);
+    public final boolean isEditable() { return editable.getValue(); }
+    public final void setEditable(boolean value) { editable.setValue(value); }
+    public final BooleanProperty editableProperty() { return editable; }
+
+    /**
+     * The {@code InputField}'s prompt text to display, or
+     * <tt>null</tt> if no prompt text is displayed.
+     */
+    private StringProperty promptText = new StringPropertyBase("") {
+        @Override protected void invalidated() {
+            // Strip out newlines
+            String txt = get();
+            if (txt != null && txt.contains("\n")) {
+                txt = txt.replace("\n", "");
+                set(txt);
+            }
+        }
+
+        @Override public Object getBean() { return InputField.this; }
+        @Override public String getName() { return "promptText"; }
+    };
+    public final StringProperty promptTextProperty() { return promptText; }
+    public final String getPromptText() { return promptText.get(); }
+    public final void setPromptText(String value) { promptText.set(value); }
+
+
+    /**
+     * The preferred number of text columns. This is used for
+     * calculating the {@code InputField}'s preferred width.
+     */
+    private IntegerProperty prefColumnCount = new IntegerPropertyBase(DEFAULT_PREF_COLUMN_COUNT) {
+        private int oldValue = get();
+        
+        @Override
+        protected void invalidated() {
+            int value = get();
+            
+            if (value < 0) {
+                if (isBound()) {
+                    unbind();
+                }
+                set(oldValue);
+                throw new IllegalArgumentException("value cannot be negative.");
+            }
+            
+            oldValue = value;
+        }
+
+        @Override public Object getBean() { return InputField.this; }
+        @Override public String getName() { return "prefColumnCount"; }
+    };
+    public final IntegerProperty prefColumnCountProperty() { return prefColumnCount; }
+    public final int getPrefColumnCount() { return prefColumnCount.getValue(); }
+    public final void setPrefColumnCount(int value) { prefColumnCount.setValue(value); }
+
+    /**
+     * The action handler associated with this InputField, or
+     * <tt>null</tt> if no action handler is assigned.
+     *
+     * The action handler is normally called when the user types the ENTER key.
+     */
+    private ObjectProperty<EventHandler<ActionEvent>> onAction = new ObjectPropertyBase<EventHandler<ActionEvent>>() {
+        @Override protected void invalidated() {
+            setEventHandler(ActionEvent.ACTION, get());
+        }
+
+        @Override public Object getBean() { return InputField.this; }
+        @Override public String getName() { return "onAction"; }
+    };
+    public final ObjectProperty<EventHandler<ActionEvent>> onActionProperty() { return onAction; }
+    public final EventHandler<ActionEvent> getOnAction() { return onActionProperty().get(); }
+    public final void setOnAction(EventHandler<ActionEvent> value) { onActionProperty().set(value); }
+
+    /**
+     * Creates a new InputField. The style class is set to "money-field".
+     */
+    public InputField() {
+        getStyleClass().setAll("input-field");
+    }
+
+    //    @Override protected String getUserAgentStylesheet() {
+//        return getClass().getResource("InputField.css").toExternalForm();
+//    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/IntegerField.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.scene.control;
+
+import javafx.beans.property.IntegerProperty;
+import javafx.beans.property.SimpleIntegerProperty;
+import javafx.scene.control.Skin;
+import com.sun.javafx.scene.control.skin.IntegerFieldSkin;
+
+/**
+ *
+ */
+public class IntegerField extends InputField {
+    /**
+     * The value of the IntegerField. If null, the value will be treated as "0", but
+     * will still actually be null.
+     */
+    private IntegerProperty value = new SimpleIntegerProperty(this, "value");
+    public final int getValue() { return value.get(); }
+    public final void setValue(int value) { this.value.set(value); }
+    public final IntegerProperty valueProperty() { return value; }
+    
+    private IntegerProperty maxValue = new SimpleIntegerProperty(this, "maxValue", -1);
+    public final int getMaxValue() { return maxValue.get(); }
+    public final void setMaxValue(int maxVal) {this.maxValue.set(maxVal); }
+    public final IntegerProperty maxValueProperty() { return maxValue; }
+    /**
+     * Creates a new IntegerField. The style class is set to "money-field".
+     */
+    public IntegerField() {
+       this(-1); // setting to default
+    }
+    public IntegerField(int maxVal) {
+        getStyleClass().setAll("integer-field");
+        setMaxValue(maxVal);
+    }
+
+    /***************************************************************************
+     *                                                                         *
+     * Methods                                                                 *
+     *                                                                         *
+     **************************************************************************/
+
+    /** {@inheritDoc} */
+    @Override protected Skin<?> createDefaultSkin() {
+        return new IntegerFieldSkin(this);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/LabeledImpl.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2011, 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.
+ */
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package com.sun.javafx.scene.control;
+
+import javafx.beans.InvalidationListener;
+import javafx.beans.Observable;
+import javafx.scene.control.Label;
+import javafx.scene.control.Labeled;
+
+import javafx.css.CssMetaData;
+import javafx.css.StyleOrigin;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import javafx.css.Styleable;
+import javafx.css.StyleableProperty;
+import javafx.scene.layout.Region;
+
+
+public class LabeledImpl extends Label {
+
+    public LabeledImpl(final Labeled labeled) {
+        shuttler = new Shuttler(this, labeled);
+    }
+    private final Shuttler shuttler;
+    
+    private static void initialize(Shuttler shuttler, LabeledImpl labeledImpl, Labeled labeled) {
+    
+        labeledImpl.setText(labeled.getText());
+        labeled.textProperty().addListener(shuttler);
+        
+        labeledImpl.setGraphic(labeled.getGraphic());
+        labeled.graphicProperty().addListener(shuttler);
+        
+        final List<CssMetaData<? extends Styleable, ?>> styleables = StyleableProperties.STYLEABLES_TO_MIRROR;
+        
+        for(int n=0, nMax=styleables.size(); n<nMax; n++) {
+            @SuppressWarnings("unchecked")
+            final CssMetaData<Styleable,Object> styleable = (CssMetaData<Styleable,Object>)styleables.get(n);
+            
+            // the Labeled isn't necessarily a Label, so skip the skin or
+            // we'll get an argument type mismatch on the invocation of the
+            // skin constructor. 
+            if ("-fx-skin".equals(styleable.getProperty())) continue;
+            
+            final StyleableProperty<?> fromVal = styleable.getStyleableProperty(labeled);
+            if (fromVal instanceof Observable) {
+                // listen for changes to this property
+                ((Observable)fromVal).addListener(shuttler);
+                // set this LabeledImpl's property to the same value as the Labeled. 
+                final StyleOrigin origin = fromVal.getStyleOrigin();
+                if (origin == null) continue;
+                final StyleableProperty<Object> styleableProperty = styleable.getStyleableProperty(labeledImpl);
+                styleableProperty.applyStyle(origin, fromVal.getValue());
+            }
+        }
+    }
+    
+    private static class Shuttler implements InvalidationListener {
+        
+        private final LabeledImpl labeledImpl;
+        private final Labeled labeled; 
+        
+        Shuttler(LabeledImpl labeledImpl, Labeled labeled) {
+            this.labeledImpl = labeledImpl;
+            this.labeled = labeled;
+            initialize(this, labeledImpl, labeled);
+
+        }
+        
+        @Override public void invalidated(Observable valueModel) {
+          
+            if (valueModel == labeled.textProperty()) {
+                labeledImpl.setText(labeled.getText());
+            } else if (valueModel == labeled.graphicProperty()) {
+                // If the user set the graphic, then mirror that.
+                // Otherwise, the graphic was set via the imageUrlProperty which
+                // will be mirrored onto the labeledImpl by the next block.
+                StyleOrigin origin = ((StyleableProperty<?>)labeled.graphicProperty()).getStyleOrigin();
+                if (origin == null || origin == StyleOrigin.USER) {
+                    labeledImpl.setGraphic(labeled.getGraphic());
+                }
+                
+            } else if (valueModel instanceof StyleableProperty) { 
+                StyleableProperty<?> styleableProperty = (StyleableProperty<?>)valueModel;
+                @SuppressWarnings("unchecked")
+                CssMetaData<Styleable,Object> cssMetaData = (CssMetaData<Styleable,Object>)styleableProperty.getCssMetaData();
+                if (cssMetaData != null) {
+                    StyleOrigin origin = styleableProperty.getStyleOrigin();
+                    StyleableProperty<Object> targetProperty = cssMetaData.getStyleableProperty(labeledImpl);
+                    targetProperty.applyStyle(origin, styleableProperty.getValue());
+                }
+            }
+        }
+    }
+
+    /** Protected for unit test purposes */
+    static final class StyleableProperties {
+
+        static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES_TO_MIRROR;
+        static {
+            //
+            // We do this as we only want to mirror the Labeled's keys,
+            // none of Parent's, otherwise all of the properties on Parent,
+            // like opacity, would be applied twice (once to the Labeled and 
+            // again to the LabeledImpl). 
+            //
+            // Note, however, that this subset is not the list of properties
+            // for this LabeledImpl that can be styled. For that, we want all
+            // the properites that are inherited by virtue of LabeledImpl 
+            // being a Label. This allows for the LabledImpl to be styled
+            // with styles like .menu-button .label { -fx-opacity: 80%; }
+            // If just this subset were returned (by impl_CSS_STYLEABLE) then
+            // -fx-opacity (for example) would be meaningless to the Labeled. 
+            // 
+            final List<CssMetaData<? extends Styleable, ?>> labeledStyleables = Labeled.getClassCssMetaData();
+            final List<CssMetaData<? extends Styleable, ?>> parentStyleables = Region.getClassCssMetaData();
+            final List<CssMetaData<? extends Styleable, ?>> styleables = 
+                new ArrayList<CssMetaData<? extends Styleable, ?>>(labeledStyleables);
+            styleables.removeAll(parentStyleables);
+            STYLEABLES_TO_MIRROR = Collections.unmodifiableList(styleables);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/LabeledText.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.scene.control;
+
+import javafx.css.converter.BooleanConverter;
+import javafx.css.converter.EnumConverter;
+import javafx.css.converter.PaintConverter;
+import javafx.css.converter.SizeConverter;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javafx.beans.InvalidationListener;
+import javafx.beans.Observable;
+import javafx.beans.value.ObservableValue;
+import javafx.beans.value.WritableValue;
+import javafx.css.*;
+import javafx.scene.control.Labeled;
+import javafx.scene.paint.Color;
+import javafx.scene.paint.Paint;
+import javafx.scene.text.Font;
+import javafx.scene.text.Text;
+import javafx.scene.text.TextAlignment;
+
+/**
+ * LabeledText allows the Text to be styled by the CSS properties of Labeled
+ * that are meant to style the textual component of the Labeled.
+ *
+ * LabeledText has the style class "text"
+ */
+public class LabeledText extends Text {
+
+   private final Labeled labeled;
+
+   public LabeledText(Labeled labeled) {
+       super();
+
+       if (labeled == null) {
+           throw new IllegalArgumentException("labeled cannot be null");
+       }
+
+       this.labeled = labeled;
+
+       //
+       // init the state of this Text object to that of the Labeled
+       //
+       this.setFill(this.labeled.getTextFill());
+       this.setFont(this.labeled.getFont());
+       this.setTextAlignment(this.labeled.getTextAlignment());
+       this.setUnderline(this.labeled.isUnderline());
+       this.setLineSpacing(this.labeled.getLineSpacing());
+
+       //
+       // Bind the state of this Text object to that of the Labeled.
+       // Binding these properties prevents CSS from setting them
+       //
+       this.fillProperty().bind(this.labeled.textFillProperty());
+       this.fontProperty().bind(this.labeled.fontProperty());
+       // do not bind text - Text doesn't have -fx-text
+       this.textAlignmentProperty().bind(this.labeled.textAlignmentProperty());
+       this.underlineProperty().bind(this.labeled.underlineProperty());
+       this.lineSpacingProperty().bind(this.labeled.lineSpacingProperty());
+
+       getStyleClass().addAll("text");
+   }
+
+    /**
+     * @return The CssMetaData associated with this class, which may include the
+     * CssMetaData of its super classes.
+     */
+    public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() {
+        return STYLEABLES;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<CssMetaData<? extends Styleable, ?>> getCssMetaData() {
+        return getClassCssMetaData();
+    }
+
+   //
+   // Replace all of Text's CssMetaData instances that overlap with Labeled
+   // with instances of CssMetaData that redirect to Labeled. Thus, when
+   // the Labeled is styled,
+   //
+
+    private StyleablePropertyMirror<Font> fontMirror = null;
+    private StyleableProperty<Font> fontMirror() {
+        if (fontMirror == null) {
+            fontMirror = new StyleablePropertyMirror<Font>(FONT, "fontMirror", Font.getDefault(), (StyleableProperty<Font>)(WritableValue<Font>)labeled.fontProperty());
+            fontProperty().addListener(fontMirror);
+        }
+        return fontMirror;
+    }
+
+    private static final CssMetaData<LabeledText,Font> FONT =
+        new FontCssMetaData<LabeledText>("-fx-font", Font.getDefault()) {
+
+        @Override
+        public boolean isSettable(LabeledText node) {
+            return node.labeled != null ? node.labeled.fontProperty().isBound() == false : true;
+        }
+
+        @Override
+        public StyleableProperty<Font> getStyleableProperty(LabeledText node) {
+            return node.fontMirror();
+        }
+    };
+
+    private StyleablePropertyMirror<Paint> fillMirror;
+    private StyleableProperty<Paint> fillMirror() {
+        if (fillMirror == null) {
+            fillMirror = new StyleablePropertyMirror<Paint>(FILL, "fillMirror", Color.BLACK, (StyleableProperty<Paint>)(WritableValue<Paint>)labeled.textFillProperty());
+            fillProperty().addListener(fillMirror);
+        }
+        return fillMirror;        
+    }
+
+    private static final CssMetaData<LabeledText,Paint> FILL =
+        new CssMetaData<LabeledText,Paint>("-fx-fill",
+            PaintConverter.getInstance(), Color.BLACK) {
+
+            @Override
+            public boolean isSettable(LabeledText node) {
+                return node.labeled.textFillProperty().isBound() == false;
+            }
+
+            @Override
+            public StyleableProperty<Paint> getStyleableProperty(LabeledText node) {
+                return node.fillMirror();
+            }
+        };
+
+    private StyleablePropertyMirror<TextAlignment> textAlignmentMirror;
+    private StyleableProperty<TextAlignment> textAlignmentMirror() {
+        if (textAlignmentMirror == null) {
+            textAlignmentMirror = new StyleablePropertyMirror<TextAlignment>(TEXT_ALIGNMENT, "textAlignmentMirror", TextAlignment.LEFT, (StyleableProperty<TextAlignment>)(WritableValue<TextAlignment>)labeled.textAlignmentProperty());
+            textAlignmentProperty().addListener(textAlignmentMirror);
+        }
+        return textAlignmentMirror;        
+    }
+    
+    private static final CssMetaData<LabeledText,TextAlignment> TEXT_ALIGNMENT =
+        new CssMetaData<LabeledText,TextAlignment>("-fx-text-alignment",
+        new EnumConverter<TextAlignment>(TextAlignment.class),
+        TextAlignment.LEFT) {
+
+            @Override
+            public boolean isSettable(LabeledText node) {
+                return node.labeled.textAlignmentProperty().isBound() == false;
+            }
+
+            @Override
+            public StyleableProperty<TextAlignment> getStyleableProperty(LabeledText node) {
+                return node.textAlignmentMirror();
+            }
+        };
+
+    private StyleablePropertyMirror<Boolean> underlineMirror;
+    private StyleableProperty<Boolean> underlineMirror() {
+        if (underlineMirror == null) {
+            underlineMirror = new StyleablePropertyMirror<Boolean>(UNDERLINE, "underLineMirror", Boolean.FALSE, (StyleableProperty<Boolean>)(WritableValue<Boolean>)labeled.underlineProperty());
+            underlineProperty().addListener(underlineMirror);
+        }
+        return underlineMirror;        
+    }
+    
+    private static final CssMetaData<LabeledText,Boolean> UNDERLINE =
+            new CssMetaData<LabeledText,Boolean>("-fx-underline",
+            BooleanConverter.getInstance(),
+            Boolean.FALSE) {
+ 
+            @Override
+            public boolean isSettable(LabeledText node) {
+                return node.labeled.underlineProperty().isBound() == false;
+            }
+
+            @Override
+            public StyleableProperty<Boolean> getStyleableProperty(LabeledText node) {
+                return node.underlineMirror();
+            }
+        };
+
+    private StyleablePropertyMirror<Number> lineSpacingMirror;
+    private StyleableProperty<Number> lineSpacingMirror() {
+        if (lineSpacingMirror == null) {
+            lineSpacingMirror = new StyleablePropertyMirror<Number>(LINE_SPACING, "lineSpacingMirror", 0d, (StyleableProperty<Number>)(WritableValue<Number>)labeled.lineSpacingProperty());
+            lineSpacingProperty().addListener(lineSpacingMirror);
+        }
+        return lineSpacingMirror;        
+    }
+    
+    private static final CssMetaData<LabeledText,Number> LINE_SPACING =
+        new CssMetaData<LabeledText,Number>("-fx-line-spacing",
+            SizeConverter.getInstance(),
+                0) {
+
+            @Override
+            public boolean isSettable(LabeledText node) {
+                return node.labeled.lineSpacingProperty().isBound() == false;
+            }
+
+            @Override
+            public StyleableProperty<Number> getStyleableProperty(LabeledText node) {
+                return node.lineSpacingMirror();
+            }
+        };
+
+    private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES;
+    static {
+
+       final List<CssMetaData<? extends Styleable, ?>> styleables =
+           new ArrayList<CssMetaData<? extends Styleable, ?>>(Text.getClassCssMetaData());
+
+       for (int n=0,nMax=styleables.size(); n<nMax; n++) {
+           final String prop = styleables.get(n).getProperty();
+
+           if ("-fx-fill".equals(prop)) {
+               styleables.set(n, FILL);
+           } else if ("-fx-font".equals(prop)) {
+               styleables.set(n, FONT);
+           } else if ("-fx-text-alignment".equals(prop)) {
+               styleables.set(n, TEXT_ALIGNMENT);
+           } else if ("-fx-underline".equals(prop)) {
+               styleables.set(n, UNDERLINE);
+           } else if ("-fx-line-spacing".equals(prop)) {
+               styleables.set(n, LINE_SPACING);
+           }
+       }
+
+       STYLEABLES = Collections.unmodifiableList(styleables);
+    }       
+
+    private class StyleablePropertyMirror<T> extends SimpleStyleableObjectProperty<T> implements InvalidationListener {
+        
+        private StyleablePropertyMirror(CssMetaData<LabeledText, T> cssMetaData, String name, T initialValue, StyleableProperty<T> property) {
+            super(cssMetaData, LabeledText.this, name, initialValue);
+            this.property = property;
+            this.applying = false;
+        }
+
+        @Override
+        public void invalidated(Observable observable) {
+            // if Text's property is changing but not because a style is being applied,
+            // then it's either because the set method was called on the Labeled's property or
+            // because CSS is resetting Labeled's property to its initial value
+            // (see CssStyleHelper#resetToInitialValues(Styleable))
+            if (applying == false) {
+                super.applyStyle(null, ((ObservableValue<T>)observable).getValue());
+            }
+        }
+
+        @Override
+        public void applyStyle(StyleOrigin newOrigin, T value) {
+
+            applying = true;
+            //
+            // In the case where the Labeled's property was set by an
+            // inline style, this inline style should override values
+            // from lesser origins.
+            //
+            StyleOrigin propOrigin = property.getStyleOrigin();
+
+            //
+            // if propOrigin is null, then the property is in init state
+            // if newOrigin is null, then CSS is resetting this property -
+            //    but don't let CSS overwrite a user set value
+            // if propOrigin is greater than origin, then the style should
+            //    not override
+            //
+            if (propOrigin == null ||
+                    (newOrigin != null
+                            ? propOrigin.compareTo(newOrigin) <= 0
+                            : propOrigin != StyleOrigin.USER)) {
+                super.applyStyle(newOrigin, value);
+                property.applyStyle(newOrigin, value);
+            }
+            applying = false;
+        }
+
+        @Override public StyleOrigin getStyleOrigin() {
+            return property.getStyleOrigin();
+        }
+
+        boolean applying;
+        private final StyleableProperty<T> property;
+    } 
+       
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/LambdaMultiplePropertyChangeListenerHandler.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.scene.control;
+
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.beans.value.WeakChangeListener;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Consumer;
+
+public final class LambdaMultiplePropertyChangeListenerHandler {
+
+    private final Map<ObservableValue<?>, List<Consumer<ObservableValue<?>>>> propertyReferenceMap;
+    private final ChangeListener<Object> propertyChangedListener;
+    private final WeakChangeListener<Object> weakPropertyChangedListener;
+
+    public LambdaMultiplePropertyChangeListenerHandler() {
+        this.propertyReferenceMap = new HashMap<>();
+        this.propertyChangedListener = (observable, oldValue, newValue) -> {
+            List<Consumer<ObservableValue<?>>> callbacks = propertyReferenceMap.getOrDefault(observable, Collections.emptyList());
+            for (Consumer<ObservableValue<?>> callback : callbacks) {
+                callback.accept(observable);
+            }
+        };
+        this.weakPropertyChangedListener = new WeakChangeListener<>(propertyChangedListener);
+    }
+    
+    /**
+     * Subclasses can invoke this method to register that we want to listen to
+     * property change events for the given property.
+     *
+     * @param property
+     */
+    public final void registerChangeListener(ObservableValue<?> property, Consumer<ObservableValue<?>> consumer) {
+        if (consumer == null) return;
+        List<Consumer<ObservableValue<?>>> callbacks = propertyReferenceMap.computeIfAbsent(property, p -> new ArrayList<>());
+        callbacks.add(consumer);
+
+        // we only add a listener if the callbacks list contains only one element
+        // (that is, we've added a consumer to this specific property for the first
+        // time).
+        if (callbacks.size() == 1) {
+            property.addListener(weakPropertyChangedListener);
+        }
+    }
+
+    // need to be careful here - removing all listeners on the specific property!
+    public final void unregisterChangeListener(ObservableValue<?> property) {
+        if (propertyReferenceMap.containsKey(property)) {
+            propertyReferenceMap.remove(property);
+            property.removeListener(weakPropertyChangedListener);
+        }
+    }
+
+    public void dispose() {
+        // unhook listeners
+        for (ObservableValue<?> value : propertyReferenceMap.keySet()) {
+            value.removeListener(weakPropertyChangedListener);
+        }
+        propertyReferenceMap.clear();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/MenuBarButton.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,73 @@
+package com.sun.javafx.scene.control;
+
+import javafx.beans.value.ChangeListener;
+import javafx.collections.ListChangeListener;
+import javafx.scene.AccessibleAttribute;
+import javafx.scene.AccessibleRole;
+import javafx.scene.control.Menu;
+import javafx.scene.control.MenuButton;
+import javafx.scene.control.MenuItem;
+import javafx.scene.control.skin.MenuBarSkin;
+
+public class MenuBarButton extends MenuButton {
+    public ChangeListener<Boolean> menuListener;
+    public MenuBarSkin menuBarSkin;
+    public Menu menu;
+
+    private final ListChangeListener<MenuItem> itemsListener;
+    private final ListChangeListener<String> styleClassListener;
+
+    public MenuBarButton(MenuBarSkin menuBarSkin, Menu menu) {
+        super(menu.getText(), menu.getGraphic());
+        this.menuBarSkin = menuBarSkin;
+        setAccessibleRole(AccessibleRole.MENU);
+
+        // listen to changes in menu items & update menuButton items
+        menu.getItems().addListener(itemsListener = c -> {
+            while (c.next()) {
+                getItems().removeAll(c.getRemoved());
+                getItems().addAll(c.getFrom(), c.getAddedSubList());
+            }
+        });
+        menu.getStyleClass().addListener(styleClassListener = c -> {
+            while(c.next()) {
+                for(int i=c.getFrom(); i<c.getTo(); i++) {
+                    getStyleClass().add(menu.getStyleClass().get(i));
+                }
+                for (String str : c.getRemoved()) {
+                    getStyleClass().remove(str);
+                }
+            }
+        });
+        idProperty().bind(menu.idProperty());
+    }
+
+    public MenuBarSkin getMenuBarSkin() {
+        return menuBarSkin;
+    }
+
+    public void clearHover() {
+        setHover(false);
+    }
+
+    public void setHover() {
+        setHover(true);
+
+            /* Transfer the a11y focus to an item in the menu bar. */
+        menuBarSkin.getSkinnable().notifyAccessibleAttributeChanged(AccessibleAttribute.FOCUS_NODE);
+    }
+
+    public void dispose() {
+        menu.getItems().removeListener(itemsListener);
+        menu.getStyleClass().removeListener(styleClassListener);
+        idProperty().unbind();
+    }
+
+    @Override
+    public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) {
+        switch (attribute) {
+            case FOCUS_ITEM: return MenuBarButton.this;
+            default: return super.queryAccessibleAttribute(attribute, parameters);
+        }
+    }
+}
\ No newline at end of file
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/MultiplePropertyChangeListenerHandler.java	Tue Sep 08 17:07:09 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * 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 com.sun.javafx.scene.control;
-
-import java.util.HashMap;
-import java.util.Map;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.beans.value.WeakChangeListener;
-import javafx.util.Callback;
-
-public final class MultiplePropertyChangeListenerHandler {
-    
-    private final Callback<String, Void> propertyChangedHandler;
-    
-    public MultiplePropertyChangeListenerHandler(Callback<String, Void> propertyChangedHandler) {
-        this.propertyChangedHandler = propertyChangedHandler;
-    }
-    
-    /**
-     * This is part of the workaround introduced during delomboking. We probably will
-     * want to adjust the way listeners are added rather than continuing to use this
-     * map (although it doesn't really do much harm).
-     */
-    private Map<ObservableValue<?>,String> propertyReferenceMap =
-            new HashMap<ObservableValue<?>,String>();
-    
-    private final ChangeListener<Object> propertyChangedListener = new ChangeListener<Object>() {
-        @Override public void changed(ObservableValue<?> property, 
-                @SuppressWarnings("unused") Object oldValue, 
-                @SuppressWarnings("unused") Object newValue) {
-            propertyChangedHandler.call(propertyReferenceMap.get(property));
-        }
-    };
-    
-    private final WeakChangeListener<Object> weakPropertyChangedListener = 
-            new WeakChangeListener<Object>(propertyChangedListener);
-    
-    /**
-     * Subclasses can invoke this method to register that we want to listen to
-     * property change events for the given property.
-     *
-     * @param property
-     * @param reference
-     */
-    public final void registerChangeListener(ObservableValue<?> property, String reference) {
-        if (!propertyReferenceMap.containsKey(property)) {
-            propertyReferenceMap.put(property, reference);
-            property.addListener(weakPropertyChangedListener);
-        }
-    }
-    
-    public final void unregisterChangeListener(ObservableValue<?> property) {
-        if (propertyReferenceMap.containsKey(property)) {
-            propertyReferenceMap.remove(property);
-            property.removeListener(weakPropertyChangedListener);
-        }
-    }
-
-    public void dispose() {
-        // unhook listeners
-        for (ObservableValue<?> value : propertyReferenceMap.keySet()) {
-            value.removeListener(weakPropertyChangedListener);
-        }
-        propertyReferenceMap.clear();
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/Properties.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.scene.control;
+
+import com.sun.javafx.scene.control.skin.resources.ControlResources;
+import javafx.application.ConditionalFeature;
+import javafx.application.Platform;
+
+public class Properties {
+
+    /***************************************************************************
+     *
+     * SkinBase
+     *
+     **************************************************************************/
+
+    /**
+     * A static final reference to whether the platform we are on supports touch.
+     */
+    public final static boolean IS_TOUCH_SUPPORTED = Platform.isSupported(ConditionalFeature.INPUT_TOUCH);
+
+
+
+
+    /***************************************************************************
+     *
+     * ButtonBar
+     *
+     **************************************************************************/
+
+    // represented as a ButtonData
+    public static final String BUTTON_DATA_PROPERTY  = "javafx.scene.control.ButtonBar.ButtonData"; //$NON-NLS-1$
+
+    // allows to exclude button from uniform resizing
+    public static final String BUTTON_SIZE_INDEPENDENCE = "javafx.scene.control.ButtonBar.independentSize"; //$NON-NLS-1$
+
+
+
+    /***************************************************************************
+     *
+     * ComboBox
+     *
+     **************************************************************************/
+
+    public static final String COMBO_BOX_STYLE_CLASS = "combo-box-popup";
+
+
+
+    /***************************************************************************
+     *
+     * ColorPicker
+     *
+     **************************************************************************/
+
+    public static String getColorPickerString(String key) {
+        return ControlResources.getString("ColorPicker." + key);
+    }
+
+
+
+    /***************************************************************************
+     *
+     * ListView, TableView
+     *
+     **************************************************************************/
+
+    public static final String REFRESH = "refreshKey";
+    public static final String RECREATE = "recreateKey";
+
+
+
+    /***************************************************************************
+     *
+     * ScrollBar
+     *
+     **************************************************************************/
+
+    public final static int DEFAULT_LENGTH = 100;
+    public final static int DEFAULT_WIDTH = 20;
+    public static final double DEFAULT_EMBEDDED_SB_BREADTH = 8.0;
+
+
+
+    /***************************************************************************
+     *
+     * TableCell
+     *
+     **************************************************************************/
+    // This property is set on the cell when we want to know its actual
+    // preferred width, not the width of the associated TableColumn.
+    // This is primarily used in NestedTableColumnHeader such that user double
+    // clicks result in the column being resized to fit the widest content in
+    // the column
+    // FIXME make package-protected before merging into main repo
+    public static final String DEFER_TO_PARENT_PREF_WIDTH = "deferToParentPrefWidth";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/VirtualScrollBar.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.scene.control;
+
+import com.sun.javafx.util.Utils;
+import javafx.beans.property.BooleanProperty;
+import javafx.beans.property.SimpleBooleanProperty;
+import javafx.scene.control.IndexedCell;
+import javafx.scene.control.ScrollBar;
+import javafx.scene.control.skin.VirtualFlow;
+
+/**
+ * This custom ScrollBar is used to map the increment & decrement features
+ * to pixel based scrolling rather than thumb/track based scrolling, if the
+ * "virtual" attribute is true.
+ */
+public class VirtualScrollBar extends ScrollBar {
+
+    /**************************************************************************
+     *
+     * Private fields
+     *
+     **************************************************************************/
+
+    private final VirtualFlow flow;
+
+    private boolean adjusting;
+
+
+
+    /**************************************************************************
+     *
+     * Constructors
+     *
+     **************************************************************************/
+
+    /**
+     * Creates a new VirtualScrollBar, for use by the VirtualFlow control.
+     */
+    public VirtualScrollBar(final VirtualFlow flow) {
+        this.flow = flow;
+        
+        super.valueProperty().addListener(valueModel -> {
+            if (isVirtual()/* && oldValue != newValue*/) {
+                if (adjusting) {
+                    // no-op
+                } else {
+                    flow.setPosition(getValue());
+                }
+            }
+        });
+    }
+
+
+
+    /**************************************************************************
+     *
+     * Properties
+     *
+     **************************************************************************/
+
+    // --- virtual
+    private BooleanProperty virtual = new SimpleBooleanProperty(this, "virtual");
+    public final void setVirtual(boolean value) {
+        virtual.set(value);
+    }
+
+    public final boolean isVirtual() {
+        return virtual.get();
+    }
+
+    public final BooleanProperty virtualProperty() {
+        return virtual;
+    }
+
+
+    /**************************************************************************
+     *
+     * Public API
+     *
+     **************************************************************************/
+
+    /** {@inheritDoc} */
+    @Override public void decrement() {
+        if (isVirtual()) {
+            flow.scrollPixels(-10);
+        } else {
+            super.decrement();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public void increment() {
+        if (isVirtual()) {
+            flow.scrollPixels(10);
+        } else {
+            super.increment();
+        }
+    }
+    
+    // this method is called when the user clicks in the scrollbar track, so
+    // we special-case it to allow for page-up and page-down clicking to work
+    // as expected.
+    /** {@inheritDoc} */
+    @Override public void adjustValue(double pos) {
+        if (isVirtual()) {
+            adjusting = true;
+            double oldValue = flow.getPosition();
+            
+            double newValue = ((getMax() - getMin()) * Utils.clamp(0, pos, 1))+getMin();
+            if (newValue < oldValue) {
+                IndexedCell cell = flow.getFirstVisibleCell();
+                if (cell == null) return;
+                flow.scrollToBottom(cell);
+            } else if (newValue > oldValue) {
+                IndexedCell cell = flow.getLastVisibleCell();
+                if (cell == null) return;
+                flow.scrollToTop(cell);
+            }
+
+            adjusting = false;
+        } else {
+            super.adjustValue(pos);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/WebColorField.java	Thu Sep 10 11:21:20 2015 +1200
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.scene.control;
+
+import com.sun.javafx.scene.control.skin.WebColorFieldSkin;
+import javafx.beans.property.ObjectProperty;
+import javafx.beans.property.SimpleObjectProperty;
+import javafx.scene.control.Skin;
+import javafx.scene.paint.Color;
+
+/**
+ *
+ */
+public class WebColorField extends InputField {
+    /**
+     * The value of the WebColorField. If null, the value will be treated as "#000000" black, but
+     * will still actually be null.
+     */
+    private ObjectProperty<Color> value = new SimpleObjectProperty<Color>(this, "value");
+    public final Color getValue() { return value.get(); }
+    public final void setValue(Color value) { this.value.set(value); }
+    public final ObjectProperty<Color> valueProperty() { return value; }
+
+    /**
+     * Creates a new WebColorField. The style class is set to "webcolor-field".
+     */
+    public WebColorField() {
+        getStyleClass().setAll("webcolor-field");
+    }
+
+    /***************************************************************************
+     *                                                                         *
+     * Methods                                                                 *
+     *                                                                         *
+     **************************************************************************/
+
+    /** {@inheritDoc} */
+    @Override protected Skin<?> createDefaultSkin() {
+        return new WebColorFieldSkin(this);
+    }
+}
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/AccordionBehavior.java	Tue Sep 08 17:07:09 2015 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/AccordionBehavior.java	Thu Sep 10 11:21:20 2015 +1200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free so