--- old/./build.xml 2017-02-15 15:57:34.959250085 +0300 +++ new/./build.xml 2017-02-15 15:57:34.875249303 +0300 @@ -1,5 +1,5 @@ - + + + @@ -63,9 +63,9 @@ - + --- old/./detect_javafx.xml 2017-02-15 15:57:35.195252284 +0300 +++ new/./detect_javafx.xml 2017-02-15 15:57:35.139251762 +0300 @@ -9,24 +9,21 @@ - + - - - - - - - - + + + + + - + - \ No newline at end of file + --- old/functional/ControlsTests/build.xml 2017-02-15 15:57:35.495255079 +0300 +++ new/functional/ControlsTests/build.xml 2017-02-15 15:57:35.383254035 +0300 @@ -1,5 +1,5 @@ - Builds, tests, and runs the project ControlsTests. - + - + - + @@ -48,7 +48,7 @@ - + Must set test.subdir with short name of root dir of tests; eg ListView @@ -58,8 +58,8 @@ - - + + @@ -68,15 +68,15 @@ - - + + - + @@ -89,18 +89,18 @@ - - + + - - + + - + --- old/functional/ControlsTests/coverage.fcov 2017-02-15 15:57:35.715257128 +0300 +++ new/functional/ControlsTests/coverage.fcov 2017-02-15 15:57:35.663256644 +0300 @@ -1,96 +1,96 @@ -javafx.scene.control.ScrollPane.prefViewportWidth.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPrefViewPortWidthOptionTest();FULL -javafx.scene.control.ColorPicker.value.GET;javafx.scene.control.test.colorpicker.ColorPickerTest.colorPropertyTest();FULL -com.sun.javafx.scene.control.Pagination.currentpageindex.DEFAULT;javafx.scene.control.test.pagination.PaginationTest.currentPageIndexPropertyTest();FULL -com.sun.javafx.scene.control.Pagination.pageindicatorcount.GET;javafx.scene.control.test.pagination.PaginationTest.pageIndicatorCountTest();FULL -javafx.scene.control.Button.cancelButton.SET;javafx.scene.control.test.ButtonsTest.cancelButtonTest();FULL -javafx.scene.control.Button.text.GET;javafx.scene.control.test.ButtonsTest.binding();FULL -javafx.scene.control.MenuItem.onHidden.GET;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest();FULL -com.sun.javafx.scene.control.Pagination.pageindicatorcount.BIND;javafx.scene.control.test.pagination.PaginationTest.pageIndicatorCountTest();FULL -javafx.scene.control.Button.defaultButton.BIND;javafx.scene.control.test.ButtonsTest.defaultButtonTest();FULL -javafx.scene.control.ScrollPane.hmin.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHMinOptionTest();FULL -javafx.scene.control.Button.cancelButton.GET;javafx.scene.control.test.ButtonsTest.cancelButtonTest();FULL -javafx.scene.control.MenuItem.onHidden.SET;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest();FULL -javafx.scene.control.CheckBox.indeterminate.SET;javafx.scene.control.test.ChecksTest.checks();FULL -javafx.scene.control.CheckBox.selected.GET;javafx.scene.control.test.tableview.TableViewApp.getControlsContainer(),javafx.scene.control.test.ChecksTest.checks();FULL -javafx.scene.control.Button.text.SET;javafx.scene.control.test.ButtonsTest.binding();FULL -javafx.scene.control.Tooltip.activated.GET;javafx.scene.control.test.TooltipTest.enabled();FULL -javafx.scene.control.ChoiceBox.showing.BIND;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL -javafx.scene.control.SingleSelectionModel.selectedItem.BIND;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL -javafx.scene.control.ChoiceBox.showing.GET;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL -com.sun.javafx.scene.control.Pagination.currentpageindex.BEHAVIOR;javafx.scene.control.test.pagination.PaginationTest.currentPageIndexPropertyTest();FULL -javafx.scene.control.ColorPicker.value.SET;javafx.scene.control.test.colorpicker.ColorPickerTest.colorPropertyTest();FULL -javafx.scene.control.ColorPicker.value.DEFAULT;javafx.scene.control.test.colorpicker.ColorPickerTest.colorPropertyTest();FULL -javafx.scene.control.CheckBox.indeterminate.GET;javafx.scene.control.test.ChecksTest.checks();FULL -javafx.scene.control.CheckBox.selected.SET;javafx.scene.control.test.tableview.TableViewApp.getControlsContainer(),javafx.scene.control.test.ChecksTest.checks();FULL -javafx.scene.control.MenuItem.onHiding.SET;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest();FULL -javafx.scene.control.ScrollPane.vbarPolicy.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHVBarPolicyOptionTest();FULL -javafx.scene.control.ScrollPane.fitToWidth.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkFitToWidthAndHeightOptionTest();FULL -javafx.scene.control.Tooltip.activated.SET;javafx.scene.control.test.TooltipTest.enabled();FULL -javafx.scene.control.ScrollPane.pannable.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPannableOptionTest();FULL -com.sun.javafx.scene.control.Pagination.pagecount.DEFAULT;javafx.scene.control.test.pagination.PaginationTest.pageCountPropertyTest();FULL -javafx.scene.control.CheckMenuItem.selected.SET;javafx.scene.control.test.tableview.TableViewApp.createColumn();FULL -javafx.scene.control.ScrollPane.vmin.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkVMinOptionTest();FULL -javafx.scene.control.SingleSelectionModel.selectedItem.GET;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL -com.sun.javafx.scene.control.Pagination.currentpageindex.BIND;javafx.scene.control.test.pagination.PaginationTest.currentPageIndexPropertyTest();FULL -javafx.scene.control.SingleSelectionModel.selectedItem.SET;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL -javafx.scene.control.MenuItem.onHiding.GET;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest();FULL -TreeView.onEditStartProperty.SET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditStartCancel();FULL -TreeView.onEditCommitProperty.GET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditOnCancelEventSequence();FULL -com.sun.javafx.scene.control.Pagination.pagefactory.BEHAVIOR;javafx.scene.control.test.pagination.PaginationTest.factoryChangingTest();FULL -com.sun.javafx.scene.control.Pagination.pagecount.BIND;javafx.scene.control.test.pagination.PaginationTest.pageCountPropertyTest();FULL -javafx.scene.control.ScrollPane.prefViewportWidth.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPrefViewPortWidthOptionTest();FULL -com.sun.javafx.scene.control.Pagination.pagecount.BEHAVIOR;javafx.scene.control.test.pagination.PaginationTest.pageCountPropertyTest();FULL -javafx.scene.control.ScrollPane.prefViewportHeight.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPrefViewPortHeightOptionTest();FULL -javafx.scene.control.MenuItem.disable.SET;javafx.scene.control.test.MenuItemTest.disableTest();FULL -TreeView.onEditStartProperty.GET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditOnCancelEventSequence();FULL -TreeView.onEditCommitProperty.SET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditCommit();FULL -javafx.scene.control.CheckMenuItem.selected.GET;javafx.scene.control.test.tableview.TableViewApp.createColumn();FULL -javafx.scene.control.ScrollPane.fitToHeight.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkFitToWidthAndHeightOptionTest();FULL -javafx.scene.control.ScrollPane.hbarPolicy.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHVBarPolicyOptionTest();FULL -javafx.scene.control.MenuItem.visible.BIND;javafx.scene.control.test.MenuItemTest.visibleTest();FULL -javafx.scene.control.ScrollPane.hmax.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHMaxOptionTest();FULL -javafx.scene.control.ScrollPane.vmax.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkVMaxOptionTest();FULL -javafx.scene.control.ScrollPane.prefViewportHeight.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPrefViewPortHeightOptionTest();FULL -javafx.scene.control.ScrollPane.hmin.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHMinOptionTest();FULL -javafx.scene.control.MenuItem.disable.GET;javafx.scene.control.test.MenuItemTest.disableTest();FULL -javafx.scene.control.MenuItem.onHidden.BIND;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest();FULL -javafx.scene.control.MenuItem.disable.BIND;javafx.scene.control.test.MenuItemTest.disableTest();FULL -javafx.scene.control.ScrollPane.viewportBounds.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.boundsTest();FULL -TreeView.onEditCancelProperty.GET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditOnCancelEventSequence();FULL -javafx.scene.control.ScrollPane.pannable.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPannableOptionTest();FULL -javafx.scene.control.ScrollPane.hbarPolicy.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHVBarPolicyOptionTest();FULL -javafx.scene.control.ColorPicker.value.BIND;javafx.scene.control.test.colorpicker.ColorPickerTest.colorPropertyTest();FULL -com.sun.javafx.scene.control.Pagination.pagefactory.DEFAULT;javafx.scene.control.test.pagination.PaginationTest.factoryChangingTest();FULL -javafx.scene.control.ListView.selectionModel.SET;javafx.scene.control.test.ListView.ListViewApp.getTestContainer();FULL -com.sun.javafx.scene.control.Pagination.currentpageindex.SET;javafx.scene.control.test.pagination.PaginationTest.currentPageIndexPropertyTest();FULL -javafx.scene.control.ScrollPane.vbarPolicy.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHVBarPolicyOptionTest();FULL -javafx.scene.control.ListView.selectionModel.GET;javafx.scene.control.test.ListView.ListViewApp.getTestContainer();FULL -javafx.scene.control.MenuItem.visible.SET;javafx.scene.control.test.MenuItemTest.visibleTest();FULL -javafx.scene.control.ScrollPane.fitToWidth.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkFitToWidthAndHeightOptionTest();FULL -javafx.scene.control.Button.cancelButton.BIND;javafx.scene.control.test.ButtonsTest.cancelButtonTest();FULL -javafx.scene.control.CheckBox.selected.DEFAULT;javafx.scene.control.test.ChecksTest.checks();FULL -javafx.scene.control.ChoiceBox.showing.DEFAULT;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL -javafx.scene.control.MenuItem.visible.GET;javafx.scene.control.test.MenuItemTest.visibleTest();FULL -com.sun.javafx.scene.control.Pagination.currentpageindex.GET;javafx.scene.control.test.pagination.PaginationTest.currentPageIndexPropertyTest();FULL -TreeView.onEditCancelProperty.SET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditStartCancel();FULL -javafx.scene.control.ChoiceBox.showing.SET;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL -com.sun.javafx.scene.control.Pagination.pagecount.GET;javafx.scene.control.test.pagination.PaginationTest.pageCountPropertyTest();FULL -javafx.scene.control.Button.defaultButton.GET;javafx.scene.control.test.ButtonsTest.defaultButtonTest();FULL -javafx.scene.control.MenuItem.onHiding.BIND;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest();FULL -com.sun.javafx.scene.control.Pagination.pageindicatorcounts.SET;javafx.scene.control.test.pagination.PaginationTest.pageIndicatorCountTest();FULL -javafx.scene.control.ScrollPane.vmax.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkVMaxOptionTest();FULL -com.sun.javafx.scene.control.Pagination.pageindicatorcount.BEHAVIOR;javafx.scene.control.test.pagination.PaginationTest.pageIndicatorCountTest();FULL -javafx.scene.control.CheckBox.indeterminate.DEFAULT;javafx.scene.control.test.ChecksTest.checks();FULL -com.sun.javafx.scene.control.Pagination.pagecount.SET;javafx.scene.control.test.pagination.PaginationTest.pageCountPropertyTest();FULL -com.sun.javafx.scene.control.Pagination.pagefactory.GET;javafx.scene.control.test.pagination.PaginationTest.factoryChangingTest();FULL -javafx.scene.control.Button.defaultButton.SET;javafx.scene.control.test.ButtonsTest.defaultButtonTest();FULL -javafx.scene.control.Button.cancelButton.DEFAULT;javafx.scene.control.test.ButtonsTest.cancelButtonTest();FULL -javafx.scene.control.Button.defaultButton.DEFAULT;javafx.scene.control.test.ButtonsTest.defaultButtonTest();FULL -javafx.scene.control.Button.text.BIND;javafx.scene.control.test.ButtonsTest.binding();FULL -com.sun.javafx.scene.control.Pagination.pageindicatorcount.DEFAULT;javafx.scene.control.test.pagination.PaginationTest.pageIndicatorCountTest();FULL -javafx.scene.control.Button.text.DEFAULT;javafx.scene.control.test.ButtonsTest.binding();FULL -javafx.scene.control.ScrollPane.hmax.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHMaxOptionTest();FULL -javafx.scene.control.ScrollPane.fitToHeight.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkFitToWidthAndHeightOptionTest();FULL -javafx.scene.control.ScrollPane.vmin.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkVMinOptionTest();FULL -javafx.scene.control.ColorPicker.value.BEHAVIOR;javafx.scene.control.test.colorpicker.ColorPickerTest.colorPropertyTest();FULL -com.sun.javafx.scene.control.Pagination.pagefactory.SET;javafx.scene.control.test.pagination.PaginationTest.factoryChangingTest();FULL +javafx.scene.control.ScrollPane.prefViewportWidth.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPrefViewPortWidthOptionTest(),javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkMinViewPortWidthSetTest();FULL +javafx.scene.control.ColorPicker.value.GET;javafx.scene.control.test.colorpicker.ColorPickerTest.colorPropertyTest();FULL +com.sun.javafx.scene.control.Pagination.currentpageindex.DEFAULT;javafx.scene.control.test.pagination.PaginationTest.currentPageIndexPropertyTest();FULL +com.sun.javafx.scene.control.Pagination.pageindicatorcount.GET;javafx.scene.control.test.pagination.PaginationTest.pageIndicatorCountTest();FULL +javafx.scene.control.Button.cancelButton.SET;javafx.scene.control.test.ButtonsTest.cancelButtonTest(),javafx.scene.control.test.mix.ButtonsTest.cancelButtonTest();FULL +javafx.scene.control.Button.text.GET;javafx.scene.control.test.ButtonsTest.binding(),javafx.scene.control.test.mix.ButtonsTest.binding();FULL +javafx.scene.control.MenuItem.onHidden.GET;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest(),javafx.scene.control.test.mix.MenuTest.apiTest(),javafx.scene.control.test.mix.MenuTest.dropTest();FULL +com.sun.javafx.scene.control.Pagination.pageindicatorcount.BIND;javafx.scene.control.test.pagination.PaginationTest.pageIndicatorCountTest();FULL +javafx.scene.control.Button.defaultButton.BIND;javafx.scene.control.test.ButtonsTest.defaultButtonTest(),javafx.scene.control.test.mix.ButtonsTest.defaultButtonTest();FULL +javafx.scene.control.ScrollPane.hmin.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHMinOptionTest();FULL +javafx.scene.control.Button.cancelButton.GET;javafx.scene.control.test.ButtonsTest.cancelButtonTest(),javafx.scene.control.test.mix.ButtonsTest.cancelButtonTest();FULL +javafx.scene.control.MenuItem.onHidden.SET;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest(),javafx.scene.control.test.mix.MenuTest.apiTest(),javafx.scene.control.test.mix.MenuTest.dropTest();FULL +javafx.scene.control.CheckBox.indeterminate.SET;javafx.scene.control.test.ChecksTest.checks(),javafx.scene.control.test.mix.ChecksTest.checks();FULL +javafx.scene.control.CheckBox.selected.GET;javafx.scene.control.test.tableview.TableViewApp.getControlsContainer(),javafx.scene.control.test.ChecksTest.checks(),javafx.scene.control.test.mix.ChecksTest.checks();FULL +javafx.scene.control.Button.text.SET;javafx.scene.control.test.ButtonsTest.binding(),javafx.scene.control.test.mix.ButtonsTest.binding();FULL +javafx.scene.control.Tooltip.activated.GET;javafx.scene.control.test.TooltipTest.enabled(),javafx.scene.control.test.mix.TooltipTest.enabled();FULL +javafx.scene.control.ChoiceBox.showing.BIND;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL +javafx.scene.control.SingleSelectionModel.selectedItem.BIND;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL +javafx.scene.control.ChoiceBox.showing.GET;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL +com.sun.javafx.scene.control.Pagination.currentpageindex.BEHAVIOR;javafx.scene.control.test.pagination.PaginationTest.currentPageIndexPropertyTest();FULL +javafx.scene.control.ColorPicker.value.SET;javafx.scene.control.test.colorpicker.ColorPickerTest.colorPropertyTest();FULL +javafx.scene.control.ColorPicker.value.DEFAULT;javafx.scene.control.test.colorpicker.ColorPickerTest.colorPropertyTest();FULL +javafx.scene.control.CheckBox.indeterminate.GET;javafx.scene.control.test.ChecksTest.checks(),javafx.scene.control.test.mix.ChecksTest.checks();FULL +javafx.scene.control.CheckBox.selected.SET;javafx.scene.control.test.tableview.TableViewApp.getControlsContainer(),javafx.scene.control.test.ChecksTest.checks(),javafx.scene.control.test.mix.ChecksTest.checks();FULL +javafx.scene.control.MenuItem.onHiding.SET;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest(),javafx.scene.control.test.mix.MenuTest.apiTest(),javafx.scene.control.test.mix.MenuTest.dropTest();FULL +javafx.scene.control.ScrollPane.vbarPolicy.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHVBarPolicyOptionTest();FULL +javafx.scene.control.ScrollPane.fitToWidth.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkFitToWidthAndHeightOptionTest();FULL +javafx.scene.control.Tooltip.activated.SET;javafx.scene.control.test.TooltipTest.enabled(),javafx.scene.control.test.mix.TooltipTest.enabled();FULL +javafx.scene.control.ScrollPane.pannable.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPannableOptionTest();FULL +com.sun.javafx.scene.control.Pagination.pagecount.DEFAULT;javafx.scene.control.test.pagination.PaginationTest.pageCountPropertyTest();FULL +javafx.scene.control.CheckMenuItem.selected.SET;javafx.scene.control.test.tableview.TableViewApp.createColumn();FULL +javafx.scene.control.ScrollPane.vmin.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkVMinOptionTest();FULL +javafx.scene.control.SingleSelectionModel.selectedItem.GET;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL +com.sun.javafx.scene.control.Pagination.currentpageindex.BIND;javafx.scene.control.test.pagination.PaginationTest.currentPageIndexPropertyTest();FULL +javafx.scene.control.SingleSelectionModel.selectedItem.SET;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL +javafx.scene.control.MenuItem.onHiding.GET;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest(),javafx.scene.control.test.mix.MenuTest.apiTest(),javafx.scene.control.test.mix.MenuTest.dropTest();FULL +TreeView.onEditStartProperty.SET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditStartCancel();FULL +TreeView.onEditCommitProperty.GET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditOnCancelEventSequence();FULL +com.sun.javafx.scene.control.Pagination.pagefactory.BEHAVIOR;javafx.scene.control.test.pagination.PaginationTest.factoryChangingTest();FULL +com.sun.javafx.scene.control.Pagination.pagecount.BIND;javafx.scene.control.test.pagination.PaginationTest.pageCountPropertyTest();FULL +javafx.scene.control.ScrollPane.prefViewportWidth.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPrefViewPortWidthOptionTest(),javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkMinViewPortWidthSetTest();FULL +com.sun.javafx.scene.control.Pagination.pagecount.BEHAVIOR;javafx.scene.control.test.pagination.PaginationTest.pageCountPropertyTest();FULL +javafx.scene.control.ScrollPane.prefViewportHeight.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPrefViewPortHeightOptionTest();FULL +javafx.scene.control.MenuItem.disable.SET;javafx.scene.control.test.MenuItemTest.disableTest(),javafx.scene.control.test.mix.MenuItemTest.disableTest();FULL +TreeView.onEditStartProperty.GET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditOnCancelEventSequence();FULL +TreeView.onEditCommitProperty.SET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditCommit();FULL +javafx.scene.control.CheckMenuItem.selected.GET;javafx.scene.control.test.tableview.TableViewApp.createColumn();FULL +javafx.scene.control.ScrollPane.fitToHeight.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkFitToWidthAndHeightOptionTest();FULL +javafx.scene.control.ScrollPane.hbarPolicy.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHVBarPolicyOptionTest();FULL +javafx.scene.control.MenuItem.visible.BIND;javafx.scene.control.test.MenuItemTest.visibleTest(),javafx.scene.control.test.mix.MenuItemTest.visibleTest();FULL +javafx.scene.control.ScrollPane.hmax.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHMaxOptionTest();FULL +javafx.scene.control.ScrollPane.vmax.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkVMaxOptionTest();FULL +javafx.scene.control.ScrollPane.prefViewportHeight.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPrefViewPortHeightOptionTest();FULL +javafx.scene.control.ScrollPane.hmin.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHMinOptionTest();FULL +javafx.scene.control.MenuItem.disable.GET;javafx.scene.control.test.MenuItemTest.disableTest(),javafx.scene.control.test.mix.MenuItemTest.disableTest();FULL +javafx.scene.control.MenuItem.onHidden.BIND;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest(),javafx.scene.control.test.mix.MenuTest.apiTest(),javafx.scene.control.test.mix.MenuTest.dropTest();FULL +javafx.scene.control.MenuItem.disable.BIND;javafx.scene.control.test.MenuItemTest.disableTest(),javafx.scene.control.test.mix.MenuItemTest.disableTest();FULL +javafx.scene.control.ScrollPane.viewportBounds.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.boundsTest();FULL +TreeView.onEditCancelProperty.GET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditOnCancelEventSequence();FULL +javafx.scene.control.ScrollPane.pannable.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkPannableOptionTest();FULL +javafx.scene.control.ScrollPane.hbarPolicy.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHVBarPolicyOptionTest();FULL +javafx.scene.control.ColorPicker.value.BIND;javafx.scene.control.test.colorpicker.ColorPickerTest.colorPropertyTest();FULL +com.sun.javafx.scene.control.Pagination.pagefactory.DEFAULT;javafx.scene.control.test.pagination.PaginationTest.factoryChangingTest();FULL +javafx.scene.control.ListView.selectionModel.SET;javafx.scene.control.test.ListView.ListViewApp.getTestContainer();FULL +com.sun.javafx.scene.control.Pagination.currentpageindex.SET;javafx.scene.control.test.pagination.PaginationTest.currentPageIndexPropertyTest();FULL +javafx.scene.control.ScrollPane.vbarPolicy.GET;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHVBarPolicyOptionTest();FULL +javafx.scene.control.ListView.selectionModel.GET;javafx.scene.control.test.ListView.ListViewApp.getTestContainer();FULL +javafx.scene.control.MenuItem.visible.SET;javafx.scene.control.test.MenuItemTest.visibleTest(),javafx.scene.control.test.mix.MenuItemTest.visibleTest();FULL +javafx.scene.control.ScrollPane.fitToWidth.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkFitToWidthAndHeightOptionTest();FULL +javafx.scene.control.Button.cancelButton.BIND;javafx.scene.control.test.ButtonsTest.cancelButtonTest(),javafx.scene.control.test.mix.ButtonsTest.cancelButtonTest();FULL +javafx.scene.control.CheckBox.selected.DEFAULT;javafx.scene.control.test.ChecksTest.checks(),javafx.scene.control.test.mix.ChecksTest.checks();FULL +javafx.scene.control.ChoiceBox.showing.DEFAULT;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL +javafx.scene.control.MenuItem.visible.GET;javafx.scene.control.test.MenuItemTest.visibleTest(),javafx.scene.control.test.mix.MenuItemTest.visibleTest();FULL +com.sun.javafx.scene.control.Pagination.currentpageindex.GET;javafx.scene.control.test.pagination.PaginationTest.currentPageIndexPropertyTest();FULL +TreeView.onEditCancelProperty.SET;javafx.scene.control.test.treeview.TreeViewTest.testOnEditStartCancel();FULL +javafx.scene.control.ChoiceBox.showing.SET;javafx.scene.control.test.choicebox.ChoiceBoxApp.getScene();FULL +com.sun.javafx.scene.control.Pagination.pagecount.GET;javafx.scene.control.test.pagination.PaginationTest.pageCountPropertyTest();FULL +javafx.scene.control.Button.defaultButton.GET;javafx.scene.control.test.ButtonsTest.defaultButtonTest(),javafx.scene.control.test.mix.ButtonsTest.defaultButtonTest();FULL +javafx.scene.control.MenuItem.onHiding.BIND;javafx.scene.control.test.MenuTest.apiTest(),javafx.scene.control.test.MenuTest.dropTest(),javafx.scene.control.test.mix.MenuTest.apiTest(),javafx.scene.control.test.mix.MenuTest.dropTest();FULL +com.sun.javafx.scene.control.Pagination.pageindicatorcounts.SET;javafx.scene.control.test.pagination.PaginationTest.pageIndicatorCountTest();FULL +javafx.scene.control.ScrollPane.vmax.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkVMaxOptionTest();FULL +com.sun.javafx.scene.control.Pagination.pageindicatorcount.BEHAVIOR;javafx.scene.control.test.pagination.PaginationTest.pageIndicatorCountTest();FULL +javafx.scene.control.CheckBox.indeterminate.DEFAULT;javafx.scene.control.test.ChecksTest.checks(),javafx.scene.control.test.mix.ChecksTest.checks();FULL +com.sun.javafx.scene.control.Pagination.pagecount.SET;javafx.scene.control.test.pagination.PaginationTest.pageCountPropertyTest();FULL +com.sun.javafx.scene.control.Pagination.pagefactory.GET;javafx.scene.control.test.pagination.PaginationTest.factoryChangingTest();FULL +javafx.scene.control.Button.defaultButton.SET;javafx.scene.control.test.ButtonsTest.defaultButtonTest(),javafx.scene.control.test.mix.ButtonsTest.defaultButtonTest();FULL +javafx.scene.control.Button.cancelButton.DEFAULT;javafx.scene.control.test.ButtonsTest.cancelButtonTest(),javafx.scene.control.test.mix.ButtonsTest.cancelButtonTest();FULL +javafx.scene.control.Button.defaultButton.DEFAULT;javafx.scene.control.test.ButtonsTest.defaultButtonTest(),javafx.scene.control.test.mix.ButtonsTest.defaultButtonTest();FULL +javafx.scene.control.Button.text.BIND;javafx.scene.control.test.ButtonsTest.binding(),javafx.scene.control.test.mix.ButtonsTest.binding();FULL +com.sun.javafx.scene.control.Pagination.pageindicatorcount.DEFAULT;javafx.scene.control.test.pagination.PaginationTest.pageIndicatorCountTest();FULL +javafx.scene.control.Button.text.DEFAULT;javafx.scene.control.test.ButtonsTest.binding(),javafx.scene.control.test.mix.ButtonsTest.binding();FULL +javafx.scene.control.ScrollPane.hmax.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkHMaxOptionTest();FULL +javafx.scene.control.ScrollPane.fitToHeight.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkFitToWidthAndHeightOptionTest();FULL +javafx.scene.control.ScrollPane.vmin.DEFAULT;javafx.scene.control.test.ScrollPane.ScrollPaneTest.checkVMinOptionTest();FULL +javafx.scene.control.ColorPicker.value.BEHAVIOR;javafx.scene.control.test.colorpicker.ColorPickerTest.colorPropertyTest();FULL +com.sun.javafx.scene.control.Pagination.pagefactory.SET;javafx.scene.control.test.pagination.PaginationTest.factoryChangingTest();FULL --- old/functional/ControlsTests/nbproject/project.properties 2017-02-15 15:57:35.943259252 +0300 +++ new/functional/ControlsTests/nbproject/project.properties 2017-02-15 15:57:35.891258768 +0300 @@ -25,7 +25,7 @@ file.reference.JemmyFX.jar=../../tools/Jemmy/JemmyFX/dist/JemmyFX.jar file.reference.JemmyFXBrowser.jar=../../tools/Jemmy/JemmyFXBrowser/dist/JemmyFXBrowser.jar file.reference.JemmySWT.jar=../../tools/lib/JemmySWT.jar -file.reference.jfxswt.jar=${java.home}/lib/jfxswt.jar +file.reference.jfxswt.jar=${java.home}/lib/javafx-swt.jar build.test.results.dir=${external.output}/${application.title}/build/test/results file.reference.junit.jar=../../tools/Jemmy/jemmy_core/junit.jar file.reference.SharedTestUtilsOpen.jar=../../tools/SharedTestUtilsOpen/dist/SharedTestUtilsOpen.jar --- old/functional/ControlsTests/src/javafx/commons/ControlChooserApp.java 2017-02-15 15:57:36.175261414 +0300 +++ new/functional/ControlsTests/src/javafx/commons/ControlChooserApp.java 2017-02-15 15:57:36.119260892 +0300 @@ -39,9 +39,7 @@ import javafx.scene.control.test.utils.ptables.PropertiesTable; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; -import javafx.scene.layout.PaneBuilder; import javafx.scene.layout.VBox; -import javafx.scene.layout.VBoxBuilder; import test.javaclient.shared.InteroperabilityApp; import test.javaclient.shared.Utils; @@ -55,9 +53,7 @@ private VBox spaceForNode; private PropertiesTable propertiesTable; - private Pane propertiesPane = PaneBuilder.create() - .style("-fx-border-color:BLUE") - .build(); + private Pane propertiesPane; public static void main(String[] args) { Utils.launch(javafx.commons.ControlChooserApp.class, args); @@ -106,6 +102,9 @@ } private Parent getContent() { + propertiesPane = new Pane(); + propertiesPane.setStyle("-fx-border-color:BLUE"); + spaceForNode = new VBox(10); spaceForNode.setAlignment(Pos.CENTER); spaceForNode.setMinWidth(300); @@ -121,11 +120,8 @@ controls.getChildren().add(createNodeChooser()); controls.setStyle("-fx-border-color:GREEN"); - VBox vBox = VBoxBuilder.create() - .children(spaceForNode, controls) - .spacing(10d) - .build(); - + VBox vBox = new VBox(spaceForNode, controls); + vBox.setSpacing(10d); HBox hBox = new HBox(10); hBox.setAlignment(Pos.TOP_LEFT); hBox.getChildren().addAll( --- old/functional/ControlsTests/src/javafx/draganddrop/DragDropWithControls.java 2017-02-15 15:57:36.447263948 +0300 +++ new/functional/ControlsTests/src/javafx/draganddrop/DragDropWithControls.java 2017-02-15 15:57:36.379263314 +0300 @@ -50,14 +50,13 @@ import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.CheckBox; import javafx.scene.control.ChoiceBox; import javafx.scene.control.Label; import javafx.scene.control.Separator; import javafx.scene.control.TextField; import javafx.scene.image.Image; -import javafx.scene.image.ImageViewBuilder; +import javafx.scene.image.ImageView; import javafx.scene.input.Clipboard; import javafx.scene.input.ClipboardContent; import javafx.scene.input.DataFormat; @@ -293,15 +292,16 @@ createTMSelect(sourceModes)); VBox rbox = new VBox(10); - rbox.getChildren().addAll(new Text("Data formats:"), - createFormatSelect(sourceFormats), - ButtonBuilder.create().text("Put to clipboard") - .id(ID_TO_CLIPBOARD_BUTTON) - .onAction(new EventHandler() { + Button b = new Button("Put to clipboard"); + b.setId(ID_TO_CLIPBOARD_BUTTON); + b.setOnAction(new EventHandler() { public void handle(ActionEvent t) { Clipboard.getSystemClipboard().setContent(prepareClipboardContent()); } - }).build()); + }); + rbox.getChildren().addAll(new Text("Data formats:"), + createFormatSelect(sourceFormats), + b); HBox hbox = new HBox(10); hbox.getChildren().addAll(lbox, new Separator(Orientation.VERTICAL), rbox); @@ -342,10 +342,13 @@ useCustomViewCB = new CheckBox("Use custom drag view."); VBox box = new VBox(10); + ImageView i = new ImageView(); + i.setImage(CONTENT_IMAGE); + i.setId(ID_SRC_IMAGE); box.getChildren().addAll(hbox, new Separator(), fileHdr, fileNames, tb, btns, useCustomViewCB, new Text("Image: "), - ImageViewBuilder.create().image(CONTENT_IMAGE).id(ID_SRC_IMAGE).build(), + i, log); if (parameters.size() > 0) { box.setStyle("-fx-background-color: " + parameters.get(0) + ";"); @@ -370,12 +373,14 @@ createControlCombo(targetControlPane, false), new Text("Target transfer modes:"), createTMSelect(targetModes)); VBox rbox = new VBox(10); - rbox.getChildren().addAll(new Text("Data formats:"), createFormatSelect(targetFormats), - ButtonBuilder.create().text("paste from clipboard").id(ID_FROM_CLIPBOARD_BUTTON).onAction(new EventHandler() { + Button b = new Button("paste from clipboard"); + b.setId(ID_FROM_CLIPBOARD_BUTTON); + b.setOnAction(new EventHandler() { public void handle(ActionEvent t) { getDataFromClipboard(Clipboard.getSystemClipboard()); } - }).build()); + }); + rbox.getChildren().addAll(new Text("Data formats:"), createFormatSelect(targetFormats), b); VBox content = new VBox(10); content.getChildren().addAll(new Text("Transfered content:"), transferedContentPane); @@ -400,6 +405,9 @@ public void changed(ObservableValue ov, NodeFactory t, NodeFactory t1) { Node ctrl = null; ctrl = t1.createNode(); + if (ctrl instanceof ImageView) { + ctrl.setPickOnBounds(true); + } if (source) { ctrl.setId(ID_DRAG_SOURCE); } else { @@ -569,7 +577,9 @@ } if (targetFormats.contains(DataFormat.IMAGE) && cb.hasImage()) { receivedContent.put(DataFormat.IMAGE, cb.getImage()); - transferedContentPane.getChildren().addAll(new Text("Image: "), ImageViewBuilder.create().image(cb.getImage()).id(ID_RECEIVED_IMAGE).build()); + ImageView i = new ImageView(cb.getImage()); + i.setId(ID_RECEIVED_IMAGE); + transferedContentPane.getChildren().addAll(new Text("Image: "), i); log("Dropped image: " + cb.getImage()); gotData = true; } --- old/functional/ControlsTests/src/javafx/factory/ControlsFactory.java 2017-02-15 15:57:36.703266332 +0300 +++ new/functional/ControlsTests/src/javafx/factory/ControlsFactory.java 2017-02-15 15:57:36.647265811 +0300 @@ -46,54 +46,38 @@ import javafx.scene.Node; import javafx.scene.control.Accordion; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.CheckBox; -import javafx.scene.control.CheckBoxBuilder; import javafx.scene.control.ChoiceBox; import javafx.scene.control.ColorPicker; import javafx.scene.control.ComboBox; import javafx.scene.control.Control; import javafx.scene.control.DatePicker; import javafx.scene.control.Hyperlink; -import javafx.scene.control.HyperlinkBuilder; import javafx.scene.control.Label; -import javafx.scene.control.LabelBuilder; import javafx.scene.control.ListView; import javafx.scene.control.Menu; import javafx.scene.control.MenuBar; import javafx.scene.control.MenuItem; import javafx.scene.control.Pagination; import javafx.scene.control.PasswordField; -import javafx.scene.control.PasswordFieldBuilder; import javafx.scene.control.ProgressBar; -import javafx.scene.control.ProgressBarBuilder; import javafx.scene.control.ProgressIndicator; -import javafx.scene.control.ProgressIndicatorBuilder; import javafx.scene.control.RadioButton; -import javafx.scene.control.RadioButtonBuilder; import javafx.scene.control.ScrollBar; -import javafx.scene.control.ScrollBarBuilder; import javafx.scene.control.ScrollPane; import javafx.scene.control.Separator; -import javafx.scene.control.SeparatorBuilder; import javafx.scene.control.Slider; -import javafx.scene.control.SliderBuilder; import javafx.scene.control.SplitMenuButton; -import javafx.scene.control.SplitMenuButtonBuilder; import javafx.scene.control.SplitPane; -import javafx.scene.control.SplitPaneBuilder; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.scene.control.TableColumn; import javafx.scene.control.TableColumn.CellDataFeatures; import javafx.scene.control.TableView; import javafx.scene.control.TextArea; -import javafx.scene.control.TextAreaBuilder; import javafx.scene.control.TextField; -import javafx.scene.control.TextFieldBuilder; import javafx.scene.control.TitledPane; import javafx.scene.control.ToggleButton; -import javafx.scene.control.ToggleButtonBuilder; import javafx.scene.control.ToolBar; import javafx.scene.control.TreeItem; import javafx.scene.control.TreeTableColumn; @@ -102,7 +86,7 @@ import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.HBox; -import javafx.scene.layout.StackPaneBuilder; +import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; @@ -114,7 +98,10 @@ Buttons(new ControlFactory() { public Control createControl() { - return ButtonBuilder.create().text("Button the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).graphic(new Rectangle(10, 10, Color.RED)).build(); + Button b = new Button("Button the first line" + "\nthe sec long line" + "\nthe third line"); + b.setFocusTraversable(false); + b.setGraphic(new Rectangle(10, 10, Color.RED)); + return b; } public Class getControlClass() { @@ -183,7 +170,10 @@ }), CheckBoxes(new ControlFactory() { public Control createControl() { - return CheckBoxBuilder.create().text("Check box the first line" + "\nthe sec long line" + "\nthe third line").graphic(new Rectangle(20, 20, Color.web("lightblue"))).focusTraversable(false).build(); + CheckBox cb = new CheckBox("Check box the first line" + "\nthe sec long line" + "\nthe third line"); + cb.setFocusTraversable(false); + cb.setGraphic(new Rectangle(20, 20, Color.web("lightblue"))); + return cb; } public Class getControlClass() { @@ -192,7 +182,11 @@ }), RadioButtons(new ControlFactory() { public Control createControl() { - return RadioButtonBuilder.create().text("Radio the first line" + "\nthe sec long line" + "\nthe third line").graphic(new Rectangle(20, 20, Color.web("lightblue"))).focusTraversable(false).textAlignment(TextAlignment.RIGHT).build(); + RadioButton rb = new RadioButton("Radio the first line" + "\nthe sec long line" + "\nthe third line"); + rb.setFocusTraversable(false); + rb.setGraphic(new Rectangle(20, 20, Color.web("lightblue"))); + rb.setTextAlignment(TextAlignment.RIGHT); + return rb; } public Class getControlClass() { @@ -201,7 +195,9 @@ }), TextFields(new ControlFactory() { public Control createControl() { - return TextFieldBuilder.create().text("Text box the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).build(); + TextField tf = new TextField("Text box the first line" + "\nthe sec long line" + "\nthe third line"); + tf.setFocusTraversable(false); + return tf; } public Class getControlClass() { @@ -210,7 +206,10 @@ }), TextAreas(new ControlFactory() { public Control createControl() { - return TextAreaBuilder.create().maxWidth(100).maxHeight(50).text("Text area the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).build(); + TextArea ta = new TextArea("Text area the first line" + "\nthe sec long line" + "\nthe third line"); + ta.setFocusTraversable(false); + ta.setMaxSize(100, 50); + return ta; } public Class getControlClass() { @@ -219,7 +218,10 @@ }), PasswordFields(new ControlFactory() { public Control createControl() { - return PasswordFieldBuilder.create().promptText("Password box the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).build(); + PasswordField pf = new PasswordField(); + pf.setPromptText("Password box the first line" + "\nthe sec long line" + "\nthe third line"); + pf.setFocusTraversable(false); + return pf; } public Class getControlClass() { @@ -228,7 +230,12 @@ }), Sliders(new ControlFactory() { public Control createControl() { - return SliderBuilder.create().min(0).max(100).value(20).focusTraversable(false).build(); + Slider s = new Slider(); + s.setMin(0); + s.setMax(100); + s.setValue(20); + s.setFocusTraversable(false); + return s; } public Class getControlClass() { @@ -237,7 +244,10 @@ }), Labels(new ControlFactory() { public Control createControl() { - return LabelBuilder.create().text("Label the first line" + "\nthe sec longlong line" + "\nthe third line").focusTraversable(false).graphic(new Rectangle(20, 20, Color.web("lightblue"))).build(); + Label l = new Label("Label the first line" + "\nthe sec longlong line" + "\nthe third line"); + l.setFocusTraversable(false); + l.setGraphic(new Rectangle(20, 20, Color.web("lightblue"))); + return l; } public Class getControlClass() { @@ -246,7 +256,10 @@ }), Hyperlinks(new ControlFactory() { public Control createControl() { - return HyperlinkBuilder.create().text("Hyperlink the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).graphic(new Circle(10, Color.BLUE)).build(); + Hyperlink hl = new Hyperlink("Hyperlink the first line" + "\nthe sec long line" + "\nthe third line"); + hl.setFocusTraversable(false); + hl.setGraphic(new Circle(10, Color.BLUE)); + return hl; } public Class getControlClass() { @@ -299,7 +312,8 @@ }), Separators(new ControlFactory() { public Control createControl() { - Separator sep = SeparatorBuilder.create().halignment(HPos.CENTER).build(); + Separator sep = new Separator(); + sep.setHalignment(HPos.CENTER); sep.setPrefWidth(80); return sep; } @@ -310,7 +324,12 @@ }), ScrollBars(new ControlFactory() { public Control createControl() { - return ScrollBarBuilder.create().value(45).min(0).max(100).focusTraversable(false).build(); + ScrollBar sb = new ScrollBar(); + sb.setValue(45); + sb.setMin(0); + sb.setMax(100); + sb.setFocusTraversable(false); + return sb; } public Class getControlClass() { @@ -337,7 +356,9 @@ }), ProgressIndicators(new ControlFactory() { public Node createControl() { - return ProgressIndicatorBuilder.create().progress(0.85).focusTraversable(false).build(); + ProgressIndicator pi = new ProgressIndicator(0.85); + pi.setFocusTraversable(false); + return pi; } public Class getControlClass() { @@ -346,7 +367,9 @@ }), ProgressBars(new ControlFactory() { public Node createControl() { - return ProgressBarBuilder.create().progress(0.25).focusTraversable(false).build(); + ProgressBar pb = new ProgressBar(0.25); + pb.setFocusTraversable(false); + return pb; } public Class getControlClass() { @@ -356,6 +379,8 @@ ListViews(new ControlFactory() { public Node createControl() { ListView list = new ListView(); + + // The following requires --add-exports javafx.base/com.sun.javafx.collections=ALL-UNNAMED ObservableListWrapper items = new ObservableListWrapper(Arrays.asList("One", "Two", "Three", "Four", "Five", "Six", "long line long line long line long line")); list.setItems(items); list.setPrefWidth(100); @@ -370,7 +395,11 @@ }), PressedToggleButtons(new ControlFactory() { public Control createControl() { - return ToggleButtonBuilder.create().selected(true).text("Button the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).graphic(new Rectangle(10, 10, Color.RED)).build(); + ToggleButton tb = new ToggleButton("Button the first line" + "\nthe sec long line" + "\nthe third line"); + tb.setFocusTraversable(false); + tb.setGraphic(new Rectangle(10, 10, Color.RED)); + tb.setSelected(true); + return tb; } public Class getControlClass() { @@ -379,7 +408,11 @@ }), UnPressedToggleButtons(new ControlFactory() { public Control createControl() { - return ToggleButtonBuilder.create().selected(false).text("Button the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).graphic(new Rectangle(10, 10, Color.RED)).build(); + ToggleButton tb = new ToggleButton("Button the first line" + "\nthe sec long line" + "\nthe third line"); + tb.setFocusTraversable(false); + tb.setGraphic(new Rectangle(10, 10, Color.RED)); + tb.setSelected(false); + return tb; } public Class getControlClass() { @@ -389,7 +422,9 @@ Toolbars(new ControlFactory() { public Node createControl() { ToolBar toolbar = new ToolBar(); - toolbar.getItems().addAll(new Button("One"), new Button("Two"), new Separator(), SplitMenuButtonBuilder.create().text("three").build()); + SplitMenuButton smb = new SplitMenuButton(); + smb.setText("three"); + toolbar.getItems().addAll(new Button("One"), new Button("Two"), new Separator(), smb); toolbar.setFocusTraversable(false); return toolbar; } @@ -412,12 +447,10 @@ }), SplitMenuButtons(new ControlFactory() { public Node createControl() { - SplitMenuButton smb = SplitMenuButtonBuilder.create() - .text("Split box the first line" + "\nthe sec long line" + "\nthe third line") - .items(new MenuItem("Split box the first line" + "\nthe sec long line" + "\nthe third line", - new Rectangle(10, 10, Color.BLUE))) - .graphic(new Rectangle(10, 10, Color.RED)) - .build(); + SplitMenuButton smb = new SplitMenuButton(new MenuItem("Split box the first line" + "\nthe sec long line" + "\nthe third line", + new Rectangle(10, 10, Color.BLUE))); + smb.setText("Split box the first line" + "\nthe sec long line" + "\nthe third line"); + smb.setGraphic(new Rectangle(10, 10, Color.RED)); smb.setMinWidth(100); smb.setFocusTraversable(false); return smb; @@ -491,7 +524,6 @@ table.getColumns().setAll(column1, column2); table.setPrefHeight(100); table.setPrefWidth(100); - table.setMinHeight(Control.USE_PREF_SIZE); table.setFocusTraversable(false); return table; } @@ -531,7 +563,6 @@ treeTable.getColumns().setAll(column1, column2); treeTable.setPrefHeight(100); treeTable.setPrefWidth(100); - treeTable.setMinHeight(Control.USE_PREF_SIZE); treeTable.setFocusTraversable(false); return treeTable; } @@ -584,10 +615,11 @@ }), SplitPanes(new ControlFactory() { public Node createControl() { - SplitPane pane = SplitPaneBuilder.create().items( - StackPaneBuilder.create().children(new Rectangle(40, 40, Color.WHITESMOKE)).build(), - StackPaneBuilder.create().children(new Rectangle(40, 40, Color.BLUE)).build(), - StackPaneBuilder.create().children(new Rectangle(40, 40, Color.RED)).build()).prefWidth(150).prefHeight(150).build(); + StackPane sp1 = new StackPane(new Rectangle(40, 40, Color.WHITESMOKE)); + StackPane sp2 = new StackPane(new Rectangle(40, 40, Color.BLUE)); + StackPane sp3 = new StackPane(new Rectangle(40, 40, Color.RED)); + SplitPane pane = new SplitPane(sp1, sp2, sp3); + pane.setPrefSize(150, 150); pane.setMinWidth(100); pane.setDividerPositions(0.33, 0.67); pane.setFocusTraversable(false); --- old/functional/ControlsTests/src/javafx/scene/control/test/ListView/NewListViewApp.java 2017-02-15 15:57:36.987268978 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/ListView/NewListViewApp.java 2017-02-15 15:57:36.915268309 +0300 @@ -118,7 +118,9 @@ PropertyTablesFactory.explorePropertiesList(testedListView, tb); SpecialTablePropertiesProvider.provideForControl(testedControl, tb); - final TextField tf = TextFieldBuilder.create().id(LIST_VIEW_CONTROL_ADD_INDEX_TEXT_FIELD_ID).text("0").prefWidth(40).build(); + final TextField tf = new TextField("0"); + tf.setId(LIST_VIEW_CONTROL_ADD_INDEX_TEXT_FIELD_ID); + tf.setPrefWidth(40); HBox nodeshb = new NodesChoserFactory("Add!", new NodesChoserFactory.NodeAction() { @Override @@ -128,7 +130,8 @@ }, tf); HBox resetButtons = new HBox(); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -138,7 +141,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { softReset(); @@ -154,7 +158,8 @@ } }); - Button changeSelectionModel = ButtonBuilder.create().text("Change selection model to custom").id(CHANGE_SELECTION_MODEL_BUTTON_ID).build(); + Button changeSelectionModel = new Button("Change selection model to custom"); + changeSelectionModel.setId(CHANGE_SELECTION_MODEL_BUTTON_ID); changeSelectionModel.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedListView.setSelectionModel(cmsm); @@ -180,7 +185,6 @@ ListView lv = new ListView(); lv.setId(TESTED_LIST_VIEW_ID); return lv; - //return ListViewBuilder.create().id(TESTED_LIST_VIEW_ID).build(); } private void softReset() { @@ -225,12 +229,17 @@ private HBox getAddItemHBox() { HBox hb = new HBox(); Label lb = new Label("Add item"); - final TextField tf = TextFieldBuilder.create().prefWidth(50).id(ADD_ITEM_TEXT_FIELD_ID).build(); + final TextField tf = new TextField(); + tf.setPrefWidth(50); + tf.setId(ADD_ITEM_TEXT_FIELD_ID); Label atLb = new Label("at pos"); - final TextField tfPos = TextFieldBuilder.create().prefWidth(50).id(ADD_ITEM_POSITION_TEXT_FIELD_ID).build(); + final TextField tfPos = new TextField(); + tfPos.setPrefWidth(50); + tfPos.setId(ADD_ITEM_POSITION_TEXT_FIELD_ID); - Button bt = ButtonBuilder.create().text("Add!").id(ADD_ITEM_BUTTON_ID).build(); + Button bt = new Button("Add!"); + bt.setId(ADD_ITEM_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { ((ListView) testedControl).getItems().add(Integer.parseInt(tfPos.getText()), tf.getText()); @@ -243,8 +252,11 @@ private HBox getRemoveItemHBox() { HBox hb = new HBox(); Label lb = new Label("From position"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_ITEM_POS_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Remove!").id(REMOVE_BUTTON_ID).build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + tf.setId(REMOVE_ITEM_POS_TEXT_FIELD_ID); + Button bt = new Button("Remove!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -257,8 +269,10 @@ private HBox getScrollToHBox() { HBox hb = new HBox(); - Button button = ButtonBuilder.create().text("ScrollTo").id(SCROLL_TO_BUTTON_ID).build(); - final TextField tf = TextFieldBuilder.create().text("0").id(SCROLL_TO_TEXT_FIELD_ID).build(); + Button button = new Button("ScrollTo"); + button.setId(SCROLL_TO_BUTTON_ID); + final TextField tf = new TextField("0"); + tf.setId(SCROLL_TO_TEXT_FIELD_ID); button.setOnAction(new EventHandler() { public void handle(ActionEvent t) { @@ -273,8 +287,11 @@ private HBox getAddRectangleHbox() { HBox hb = new HBox(); Label lb = new Label("Add rectangle at pos"); - final TextField tfPos = TextFieldBuilder.create().prefWidth(50).id(ADD_RECTANGLE_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Add!").id(ADD_RECTANGLE_BUTTON_ID).build(); + final TextField tfPos = new TextField(); + tfPos.setPrefWidth(50); + tfPos.setId(ADD_RECTANGLE_TEXT_FIELD_ID); + Button bt = new Button("Add!"); + bt.setId(ADD_RECTANGLE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tfPos.getText()); @@ -288,8 +305,11 @@ private HBox getAddFormHbox() { HBox hb = new HBox(); Label lb = new Label("Add form at pos"); - final TextField tfPos = TextFieldBuilder.create().prefWidth(50).id(ADD_FORM_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Add!").id(ADD_FORM_BUTTON_ID).build(); + final TextField tfPos = new TextField(); + tfPos.setPrefWidth(50); + tfPos.setId(ADD_FORM_TEXT_FIELD_ID); + Button bt = new Button("Add!"); + bt.setId(ADD_FORM_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tfPos.getText()); @@ -303,8 +323,11 @@ private HBox getAddTextFieldHbox() { HBox hb = new HBox(); Label lb = new Label("Add textField at pos"); - final TextField tfPos = TextFieldBuilder.create().prefWidth(50).id(ADD_TEXT_FIELD_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Add!").id(ADD_TEXT_FIELD_BUTTON_ID).build(); + final TextField tfPos = new TextField(); + tfPos.setPrefWidth(50); + tfPos.setId(ADD_TEXT_FIELD_TEXT_FIELD_ID); + Button bt = new Button("Add!"); + bt.setId(ADD_TEXT_FIELD_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tfPos.getText()); @@ -317,9 +340,11 @@ private HBox getStartMotionHBox() { HBox hb = new HBox(); - Button startMotion = ButtonBuilder.create().text("start motion").id(START_MOTION_BUTTON_ID).build(); + Button startMotion = new Button("start motion"); + startMotion.setId(START_MOTION_BUTTON_ID); Label label = new Label(" of element at position "); - final TextField tf = TextFieldBuilder.create().text("0").id(START_MOTION_TEXT_FIELD_ID).build(); + final TextField tf = new TextField("0"); + tf.setId(START_MOTION_TEXT_FIELD_ID); startMotion.setOnAction(new EventHandler() { public void handle(Event t) { cm.applyTransition((Node) ((ListView) testedControl).getItems().get(Integer.parseInt(tf.getText()))); @@ -332,9 +357,11 @@ private HBox getIncreaseScaleHBox() { HBox hb = new HBox(); - final TextField tf = TextFieldBuilder.create().text("0").id(INCREASE_SCALE_TEXT_FIELD_ID).build(); + final TextField tf = new TextField("0"); + tf.setId(INCREASE_SCALE_TEXT_FIELD_ID); Label label = new Label(" of node on position "); - Button increaseScaleButton = ButtonBuilder.create().id(INCREASE_SCALE_BUTTON_ID).text("Increase scale").build(); + Button increaseScaleButton = new Button("Increase scale"); + increaseScaleButton.setId(INCREASE_SCALE_BUTTON_ID); increaseScaleButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { Node content = (Node) ((ListView) testedControl).getItems().get(Integer.parseInt(tf.getText())); @@ -348,9 +375,11 @@ private HBox getDecreaseScaleHBox() { HBox hb = new HBox(); - final TextField tf = TextFieldBuilder.create().text("0").id(DECREASE_SCALE_TEXT_FIELD_ID).build(); + final TextField tf = new TextField("0"); + tf.setId(DECREASE_SCALE_TEXT_FIELD_ID); Label label = new Label(" of node on position "); - Button increaseScaleButton = ButtonBuilder.create().id(DECREASE_SCALE_BUTTON_ID).text("Decrease scale").build(); + Button increaseScaleButton = new Button("Decrease scale"); + increaseScaleButton.setId(DECREASE_SCALE_BUTTON_ID); increaseScaleButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { Node content = (Node) ((ListView) testedControl).getItems().get(Integer.parseInt(tf.getText())); @@ -371,7 +400,9 @@ } private TextField getNewTextField() { - return TextFieldBuilder.create().id("CONTENT_TEXT_FIELD_" + (textFieldsCounter++) + "_ID").build(); + TextField tf = new TextField(); + tf.setId("CONTENT_TEXT_FIELD_" + (textFieldsCounter++) + "_ID"); + return tf; } } } --- old/functional/ControlsTests/src/javafx/scene/control/test/ScrollPane/NewScrollPaneApp.java 2017-02-15 15:57:37.215271102 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/ScrollPane/NewScrollPaneApp.java 2017-02-15 15:57:37.147270469 +0300 @@ -113,14 +113,13 @@ public ScrollPaneScene() { super("ScrollPane", 800, 600); - - prepareScene(); } @Override protected final void prepareScene() { Utils.addBrowser(this); - testedScrollPane = ScrollPaneBuilder.create().id(TESTED_SCROLLPANE_ID).build(); + testedScrollPane = new ScrollPane(); + testedScrollPane.setId(TESTED_SCROLLPANE_ID); final Node content = setCustomContent(customContentHeight, customContentWidth); final ContentMotion cm = new ContentMotion(); @@ -136,7 +135,8 @@ testedScrollPane.setPrefViewportHeight(scrollPaneHeight); } - Button changeContentButton = ButtonBuilder.create().id(CHANGE_CONTENT_BUTTON_ID).text("ChangeContent").build(); + Button changeContentButton = new Button("ChangeContent"); + changeContentButton.setId(CHANGE_CONTENT_BUTTON_ID); changeContentButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { changeContent(); @@ -144,7 +144,8 @@ } }); - Button addPrefWidthAndHeightButton = ButtonBuilder.create().id(ADD_SIZE_BUTTON_ID).text("Add pref sizes").build(); + Button addPrefWidthAndHeightButton = new Button("Add pref sizes"); + addPrefWidthAndHeightButton.setId(ADD_SIZE_BUTTON_ID); addPrefWidthAndHeightButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { tb.addDoublePropertyLine(testedScrollPane.prefWidthProperty(), -100, 200, 100); @@ -152,7 +153,8 @@ } }); - Button setTextAreaAsContentButton = ButtonBuilder.create().id(CHANGE_CONTENT_TO_RESIZABLE_BUTTON_ID).text("Set blue pane as content").build(); + Button setTextAreaAsContentButton = new Button("Set blue pane as content"); + setTextAreaAsContentButton.setId(CHANGE_CONTENT_TO_RESIZABLE_BUTTON_ID); setTextAreaAsContentButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { setResizableContent(); @@ -162,35 +164,40 @@ } }); - Button setCustomContentButton = ButtonBuilder.create().id(CHANGE_CONTENT_TO_CUSTOM_BUTTON_ID).text("Set custom content").build(); + Button setCustomContentButton = new Button("Set custom content"); + setCustomContentButton.setId(CHANGE_CONTENT_TO_CUSTOM_BUTTON_ID); setCustomContentButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { setCustomContent(); } }); - Button buttonStart = ButtonBuilder.create().id(START_MOTION_BUTTON_ID).text("Start motion").build(); + Button buttonStart = new Button("Start motion"); + buttonStart.setId(START_MOTION_BUTTON_ID); buttonStart.setOnAction(new EventHandler() { public void handle(ActionEvent t) { cm.getTimeline().play(); } }); - Button rotateButton = ButtonBuilder.create().id(ROTATE_BUTTON_ID).text("Rotate on 30deg").build(); + Button rotateButton = new Button("Rotate on 30deg"); + rotateButton.setId(ROTATE_BUTTON_ID); rotateButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { content.setRotate(content.getRotate() + 30); } }); - Button rotateScrollPaneButton = ButtonBuilder.create().id(ROTATE_SCROLLPANE_BUTTON_ID).text("Rotate scrollpane on 30deg").build(); + Button rotateScrollPaneButton = new Button("Rotate scrollpane on 30deg"); + rotateScrollPaneButton.setId(ROTATE_SCROLLPANE_BUTTON_ID); rotateScrollPaneButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedScrollPane.setRotate(testedScrollPane.getRotate() + 30); } }); - Button increaseScaleButton = ButtonBuilder.create().id(INCREASE_SCALE_BUTTON_ID).text("Increase scale").build(); + Button increaseScaleButton = new Button("Increase scale"); + increaseScaleButton.setId(INCREASE_SCALE_BUTTON_ID); increaseScaleButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { content.setScaleX(content.getScaleX() + 0.15); @@ -198,7 +205,8 @@ } }); - Button decreaseScaleButton = ButtonBuilder.create().id(DECREASE_SCALE_BUTTON_ID).text("Decrease scale").build(); + Button decreaseScaleButton = new Button("Decrease scale"); + decreaseScaleButton.setId(DECREASE_SCALE_BUTTON_ID); decreaseScaleButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { content.setScaleX(content.getScaleX() - 0.15); @@ -206,7 +214,8 @@ } }); - Button increaseScrollPaneScaleButton = ButtonBuilder.create().id(INCREASE_SCROLLPANE_SCALE_BUTTON_ID).text("Increase ScrollPane scale").build(); + Button increaseScrollPaneScaleButton = new Button("Increase ScrollPane scale"); + increaseScrollPaneScaleButton.setId(INCREASE_SCROLLPANE_SCALE_BUTTON_ID); increaseScrollPaneScaleButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedScrollPane.setScaleX(testedScrollPane.getScaleX() + 0.15); @@ -214,7 +223,8 @@ } }); - Button decreaseScrollPaneScaleButton = ButtonBuilder.create().id(DECREASE_SCROLLPANE_SCALE_BUTTON_ID).text("Decrease ScrollPane scale").build(); + Button decreaseScrollPaneScaleButton = new Button("Decrease ScrollPane scale"); + decreaseScrollPaneScaleButton.setId(DECREASE_SCROLLPANE_SCALE_BUTTON_ID); decreaseScrollPaneScaleButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedScrollPane.setScaleX(testedScrollPane.getScaleX() - 0.15); @@ -222,7 +232,8 @@ } }); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -246,8 +257,12 @@ } private Node getAddGridPaneForm() { - final TextField dimension = TextFieldBuilder.create().id(GRID_DIMENSION_TEXTFIELD_ID).promptText("int-dimension").maxWidth(50).build(); - Button addButton = ButtonBuilder.create().id(ADD_GRID_BUTTON_ID).text("Add grid").build(); + final TextField dimension = new TextField(); + dimension.setId(GRID_DIMENSION_TEXTFIELD_ID); + dimension.setPromptText("int-dimension"); + dimension.setMaxWidth(50); + Button addButton = new Button("Add grid"); + addButton.setId(ADD_GRID_BUTTON_ID); addButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { int c = Integer.parseInt(dimension.getText()); @@ -256,7 +271,11 @@ for (int i = 0; i < c; i++) { for (int j = 0; j < c; j++) { final String name = "B-" + String.valueOf(i) + "-" + String.valueOf(j); - gridPane.add(ButtonBuilder.create().text(name).id(name).minHeight(10 * i).minWidth(10 * j).build(), i, j); + Button temp = new Button(name); + temp.setId(name); + temp.setMinHeight(10 * i); + temp.setMinWidth(10 * j); + gridPane.add(temp, i, j); } } testedScrollPane.setContent(gridPane); @@ -291,18 +310,23 @@ private void changeContent() { VBox vb = new VBox(); - Button button = ButtonBuilder.create().id(CONTENT_BUTTON).text("Press me").build(); - final TextField tf1 = TextFieldBuilder.create().id(CONTENT_TEXT_FIELD_ID).text("0").build(); + Button button = new Button("Press me"); + button.setId(CONTENT_BUTTON); + final TextField tf1 = new TextField("0"); + tf1.setId(CONTENT_TEXT_FIELD_ID); button.setOnAction(new EventHandler() { public void handle(ActionEvent t) { tf1.setText(String.valueOf(Integer.parseInt(tf1.getText()) + 1)); } }); - TextArea tf2 = TextAreaBuilder.create().prefHeight(100).id(CONTENT_TEXT_AREA_ID).build(); + TextArea tf2 = new TextArea(); + tf2.setPrefHeight(100); + tf2.setId(CONTENT_TEXT_AREA_ID); for (int i = 0; i < 15; i++) { tf2.appendText("text" + i + "\n"); } - Button empty = ButtonBuilder.create().text("This is empty-action button").id(WITHOUT_ACTION_BUTTON).build(); + Button empty = new Button("This is empty-action button"); + empty.setId(WITHOUT_ACTION_BUTTON); vb.getChildren().addAll(button, tf1, tf2, empty); vb.setStyle("-fx-border-color: blue;"); --- old/functional/ControlsTests/src/javafx/scene/control/test/ToggleButtonNewApp.java 2017-02-15 15:57:37.463273413 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/ToggleButtonNewApp.java 2017-02-15 15:57:37.399272816 +0300 @@ -31,14 +31,10 @@ import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.CheckBox; -import javafx.scene.control.CheckBoxBuilder; import javafx.scene.control.Label; -import javafx.scene.control.LabelBuilder; -import javafx.scene.control.RadioButtonBuilder; +import javafx.scene.control.RadioButton; import javafx.scene.control.ToggleButton; -import javafx.scene.control.ToggleButtonBuilder; import javafx.scene.control.ToggleGroup; import javafx.scene.input.MouseEvent; import javafx.scene.layout.HBox; @@ -80,21 +76,45 @@ ToggleButton toggleButton1; ToggleButton toggleButton2; - CheckBox checkBox1 = CheckBoxBuilder.create().wrapText(true).text("Unidirectionally binded to\ntoggle button 1 selection property").id(CHECK_BOX_LISTENING_1_ID).build(); - CheckBox checkBox2 = CheckBoxBuilder.create().wrapText(true).text("Unidirectionally binded to\ntoggle button 2 selection property").id(CHECK_BOX_LISTENING_2_ID).build(); - CheckBox checkBox3 = CheckBoxBuilder.create().wrapText(true).text("This check box is bidirectionally binded\nto Toggle Button 1 selection property").id(CHECK_BOX_SETTING_1_BIDIR_ID).build(); - CheckBox checkBox4 = CheckBoxBuilder.create().wrapText(true).text("This check box unidirectionally sets\ntoggle button 2 selection property").id(CHECK_BOX_SETTING_2_UNIDIR_ID).build(); + CheckBox checkBox1; + CheckBox checkBox2; + CheckBox checkBox3; + CheckBox checkBox4; ToggleGroup toggleGroup = new ToggleGroup(); - ToggleButton bindingsSettingButton = ToggleButtonBuilder.create().text("State: Unbinded").id(BINDING_SET_TOGGLE_BUTTON_ID).build(); - ToggleButton groupingButton = ToggleButtonBuilder.create().text("State: Ungrouped").id(GROUPING_TOGGLE_BUTTON_ID).build(); - ToggleButton testedControlChangeButton = ToggleButtonBuilder.create().text("Control: radio button").id(SETTING_CONTROL_TOGGLE_BUTTON_ID).build(); - Button resetButton = ButtonBuilder.create().text("Reset state").id(RESET_BUTTON_ID).build(); - Label mouseEventsLogger = LabelBuilder.create().text("0").id(MOUSE_EVENTS_LOGGER_LABEL_ID).build(); + ToggleButton bindingsSettingButton; + ToggleButton groupingButton; + ToggleButton testedControlChangeButton; + Button resetButton; + Label mouseEventsLogger; VBox vb1 = new VBox(); public ToggleButtonNewAppScene() { super(new HBox(), 800, 320); + checkBox1 = new CheckBox("Unidirectionally binded to\ntoggle button 1 selection property"); + checkBox1.setWrapText(true); + checkBox1.setId(CHECK_BOX_LISTENING_1_ID); + checkBox2 = new CheckBox("Unidirectionally binded to\ntoggle button 2 selection property"); + checkBox2.setWrapText(true); + checkBox2.setId(CHECK_BOX_LISTENING_2_ID); + checkBox3 = new CheckBox("This check box is bidirectionally binded\nto Toggle Button 1 selection property"); + checkBox3.setWrapText(true); + checkBox3.setId(CHECK_BOX_SETTING_1_BIDIR_ID); + checkBox4 = new CheckBox("This check box unidirectionally sets\ntoggle button 2 selection property"); + checkBox4.setWrapText(true); + checkBox4.setId(CHECK_BOX_SETTING_2_UNIDIR_ID); + + bindingsSettingButton = new ToggleButton("State: Unbinded"); + bindingsSettingButton.setId(BINDING_SET_TOGGLE_BUTTON_ID); + groupingButton = new ToggleButton("State: Ungrouped"); + groupingButton.setId(GROUPING_TOGGLE_BUTTON_ID); + testedControlChangeButton = new ToggleButton("Control: radio button"); + testedControlChangeButton.setId(SETTING_CONTROL_TOGGLE_BUTTON_ID); + resetButton = new Button("Reset state"); + resetButton.setId(RESET_BUTTON_ID); + mouseEventsLogger = new Label("0"); + mouseEventsLogger.setId(MOUSE_EVENTS_LOGGER_LABEL_ID); + setControl(ControlType.RADIO_BUTTON); addButtonsListeners(); @@ -131,11 +151,15 @@ private void setControl(ControlType type) { if (type == ControlType.RADIO_BUTTON) { - toggleButton1 = RadioButtonBuilder.create().text("Radio button 1").id(TOGGLE_BUTTON_1_ID).build(); - toggleButton2 = RadioButtonBuilder.create().text("Radio button 2").id(TOGGLE_BUTTON_2_ID).build(); + toggleButton1 = new RadioButton("Radio button 1"); + toggleButton1.setId(TOGGLE_BUTTON_1_ID); + toggleButton2 = new RadioButton("Radio button 2"); + toggleButton2.setId(TOGGLE_BUTTON_2_ID); } else { - toggleButton1 = ToggleButtonBuilder.create().text("Toggle button 1").id(TOGGLE_BUTTON_1_ID).build(); - toggleButton2 = ToggleButtonBuilder.create().text("Toggle button 2").id(TOGGLE_BUTTON_2_ID).build(); + toggleButton1 = new ToggleButton("Toggle button 1"); + toggleButton1.setId(TOGGLE_BUTTON_1_ID); + toggleButton2 = new ToggleButton("Toggle button 2"); + toggleButton2.setId(TOGGLE_BUTTON_2_ID); } vb1.getChildren().clear(); --- old/functional/ControlsTests/src/javafx/scene/control/test/accordion/NewAccordionApp.java 2017-02-15 15:57:37.695275574 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/accordion/NewAccordionApp.java 2017-02-15 15:57:37.643275090 +0300 @@ -78,14 +78,17 @@ private void prepareScene() { pane = new Pane(); - testedAccordion = AccordionBuilder.create().id(TESTED_ACCORDION_ID).build(); + testedAccordion = new Accordion(); + testedAccordion.setId(TESTED_ACCORDION_ID); PropertiesTable tb = new PropertiesTable(testedAccordion); PropertyTablesFactory.explorePropertiesList(testedAccordion, tb); final TabPaneWithControl tabPane = new TabPaneWithControl("Accordion", tb); - final TextField tf = TextFieldBuilder.create().id(ACCORDION_ADD_INDEX_TEXT_FIELD_ID).text("0").prefWidth(40).build(); + final TextField tf = new TextField("0"); + tf.setId(ACCORDION_ADD_INDEX_TEXT_FIELD_ID); + tf.setPrefWidth(40); HBox nodeshb = new NodesChoserFactory("Add!", new NodesChoserFactory.NodeAction() { @@ -110,7 +113,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { --- old/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewAreaChartApp.java 2017-02-15 15:57:37.935277810 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewAreaChartApp.java 2017-02-15 15:57:37.879277288 +0300 @@ -43,6 +43,7 @@ import javafx.scene.chart.XYChart; import javafx.scene.chart.XYChart.Series; import javafx.scene.control.*; +import static javafx.scene.control.test.chart.apps.ChartIDsInterface.HARD_RESET_BUTTON_ID; import static javafx.scene.control.test.chart.apps.CommonFunctions.*; import javafx.scene.control.test.utils.CommonPropertiesScene; import javafx.scene.control.test.utils.ptables.PropertiesTable; @@ -99,7 +100,8 @@ testedAreaChart = getNewChart(); testedAreaChart.setId(TESTED_CHART_ID); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -109,7 +111,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { //throw new UnsupportedOperationException("Not supported yet."); @@ -134,15 +137,22 @@ HBox hb = new HBox(); Label lb1 = new Label("To area"); - final TextField tf1 = TextFieldBuilder.create().text("0").prefWidth(50).id(ADD_AREA_POS_TEXT_FIELD_ID).build(); + final TextField tf1 = new TextField("0"); + tf1.setPrefWidth(50); + tf1.setId(ADD_AREA_POS_TEXT_FIELD_ID); Label lb2 = new Label("to index"); - final TextField tf2 = TextFieldBuilder.create().text("0").prefWidth(50).id(ADD_INDEX_TEXT_FIELD_ID).build(); + final TextField tf2 = new TextField("0"); + tf2.setPrefWidth(50); + tf2.setId(ADD_INDEX_TEXT_FIELD_ID); Label lb3 = new Label("value"); - final TextField tf3 = TextFieldBuilder.create().text("0").prefWidth(50).id(ADD_VALUE_TEXT_FIELD_ID).build(); + final TextField tf3 = new TextField("0"); + tf3.setPrefWidth(50); + tf3.setId(ADD_VALUE_TEXT_FIELD_ID); - Button bt = ButtonBuilder.create().text("add point!").id(REMOVE_BUTTON_ID).build(); + Button bt = new Button("add point!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int area = Integer.parseInt(tf1.getText()); @@ -164,12 +174,17 @@ HBox hb = new HBox(); Label lb1 = new Label("From area"); - final TextField tf1 = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_AREA_POS_TEXT_FIELD_ID).build(); + final TextField tf1 = new TextField("0"); + tf1.setPrefWidth(50); + tf1.setId(REMOVE_AREA_POS_TEXT_FIELD_ID); Label lb2 = new Label("From index"); - final TextField tf2 = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_INDEX_TEXT_FIELD_ID).build(); + final TextField tf2 = new TextField("0"); + tf2.setPrefWidth(50); + tf2.setId(REMOVE_INDEX_TEXT_FIELD_ID); - Button bt = ButtonBuilder.create().text("remove point!").id(REMOVE_BUTTON_ID).build(); + Button bt = new Button("remove point!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int area = Integer.parseInt(tf1.getText()); @@ -184,8 +199,11 @@ public HBox getRemoveDataDialog() { HBox hb = new HBox(); Label lb = new Label("From index"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_AREA_INDEX_TEXTFIELD_ID).build(); - Button bt = ButtonBuilder.create().text("remove area!").id(REMOVE_AREA_BUTTON_ID).build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + tf.setId(REMOVE_AREA_INDEX_TEXTFIELD_ID); + Button bt = new Button("remove area!"); + bt.setId(REMOVE_AREA_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -199,18 +217,27 @@ public HBox getAddAreaHBox() { HBox hb = new HBox(); Label lb = new Label("Add series named "); - final TextField tf = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_NAME_TEXTFIELD_ID).build(); + final TextField tf = new TextField(); + tf.setPrefWidth(50); + tf.setId(ADDED_SERIES_NAME_TEXTFIELD_ID); Label minLabel = new Label(" minX "); - final TextField minText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID).build(); + final TextField minText = new TextField(); + minText.setPrefWidth(50); + minText.setId(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID); Label maxLabel = new Label(" maxX "); - final TextField maxText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID).build(); + final TextField maxText = new TextField(); + maxText.setPrefWidth(50); + maxText.setId(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID); Label amountLabel = new Label(" with "); - final TextField amountText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID).build(); + final TextField amountText = new TextField(); + amountText.setPrefWidth(50); + amountText.setId(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID); - Button bt = ButtonBuilder.create().text("add area!").id(ADD_SERIES_COMMAND_BUTTON_ID).build(); + Button bt = new Button("add area!"); + bt.setId(ADD_SERIES_COMMAND_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { String serieName = tf.getText(); --- old/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewBarChartApp.java 2017-02-15 15:57:38.171280009 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewBarChartApp.java 2017-02-15 15:57:38.115279487 +0300 @@ -95,7 +95,8 @@ testedBarChart = getNewChart(); testedBarChart.setId(TESTED_CHART_ID); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -105,7 +106,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { //throw new UnsupportedOperationException("Not supported yet."); @@ -129,8 +131,11 @@ public HBox getRemoveDataDialog() { HBox hb = new HBox(); Label lb = new Label("From position"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_ITEM_POS_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Remove!").id(REMOVE_BUTTON_ID).build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + tf.setId(REMOVE_ITEM_POS_TEXT_FIELD_ID); + Button bt = new Button("Remove!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -144,8 +149,9 @@ public HBox getRemoveCategoryDialog() { HBox hb = new HBox(); Label lb = new Label("From index"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).build(); - Button bt = ButtonBuilder.create().text("Remove category!").build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + Button bt = new Button("Remove category!"); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -160,12 +166,14 @@ public HBox getAddCategoryDialog() { HBox hb = new HBox(); Label lb = new Label("Category"); - final TextField tf = TextFieldBuilder.create().text("").prefWidth(50).build(); + final TextField tf = new TextField(""); + tf.setPrefWidth(50); Label lind = new Label("to index"); - final TextField tfind = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tfind = new TextField("0"); + tfind.setPrefWidth(50); - Button bt = ButtonBuilder.create().text("Add!").build(); + Button bt = new Button("Add!"); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tfind.getText()); @@ -180,18 +188,27 @@ public HBox getAddItemHBox() { HBox hb = new HBox(); Label lb = new Label("Add series named "); - final TextField tf = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_NAME_TEXTFIELD_ID).build(); + final TextField tf = new TextField(); + tf.setPrefWidth(50); + tf.setId(ADDED_SERIES_NAME_TEXTFIELD_ID); Label minLabel = new Label(" min "); - final TextField minText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID).build(); + final TextField minText = new TextField(); + minText.setPrefWidth(50); + minText.setId(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID); Label maxLabel = new Label(" max "); - final TextField maxText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID).build(); + final TextField maxText = new TextField(); + maxText.setPrefWidth(50); + maxText.setId(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID); Label amountLabel = new Label(" amount "); - final TextField amountText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID).build(); + final TextField amountText = new TextField(); + amountText.setPrefWidth(50); + amountText.setId(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID); - Button bt = ButtonBuilder.create().text("Add!").id(ADD_SERIES_COMMAND_BUTTON_ID).build(); + Button bt = new Button("Add!"); + bt.setId(ADD_SERIES_COMMAND_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { String serieName = tf.getText(); --- old/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewBubbleChartApp.java 2017-02-15 15:57:38.415282282 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewBubbleChartApp.java 2017-02-15 15:57:38.355281723 +0300 @@ -92,7 +92,8 @@ testedBubbleChart = getNewChart(); testedBubbleChart.setId(TESTED_CHART_ID); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -102,7 +103,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { //throw new UnsupportedOperationException("Not supported yet."); @@ -126,8 +128,11 @@ public HBox getRemoveDataDialog() { HBox hb = new HBox(); Label lb = new Label("From position"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_ITEM_POS_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Remove serie!").id(REMOVE_BUTTON_ID).build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + tf.setId(REMOVE_ITEM_POS_TEXT_FIELD_ID); + Button bt = new Button("Remove serie!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -141,12 +146,15 @@ public HBox getRemoveDataFromSerieDialog() { HBox hb = new HBox(); Label lb1 = new Label("From serie"); - final TextField tf1 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf1 = new TextField("0"); + tf1.setPrefWidth(50); Label lb2 = new Label("from index"); - final TextField tf2 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf2 = new TextField("0"); + tf2.setPrefWidth(50); - Button bt = ButtonBuilder.create().text("remove bubble!").id(REMOVE_BUTTON_ID).build(); + Button bt = new Button("remove bubble!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int serie = Integer.parseInt(tf1.getText()); @@ -161,21 +169,27 @@ public HBox getAddBubbleToSerieDialog() { HBox hb = new HBox(); Label lb1 = new Label("To serie"); - final TextField tf1 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf1 = new TextField("0"); + tf1.setPrefWidth(50); Label lb2 = new Label("to index"); - final TextField tf2 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf2 = new TextField("0"); + tf2.setPrefWidth(50); Label lb3 = new Label("X"); - final TextField tf3 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf3 = new TextField("0"); + tf3.setPrefWidth(50); Label lb4 = new Label("Y"); - final TextField tf4 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf4 = new TextField("0"); + tf4.setPrefWidth(50); Label lb5 = new Label("R"); - final TextField tf5 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf5 = new TextField("0"); + tf5.setPrefWidth(50); - Button bt = ButtonBuilder.create().text("add bubble!").id(REMOVE_BUTTON_ID).build(); + Button bt = new Button("add bubble!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int serie = Integer.parseInt(tf1.getText()); @@ -199,18 +213,27 @@ public HBox getAddItemHBox() { HBox hb = new HBox(); Label lb = new Label("Add series named "); - final TextField tf = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_NAME_TEXTFIELD_ID).build(); + final TextField tf = new TextField(); + tf.setPrefWidth(50); + tf.setId(ADDED_SERIES_NAME_TEXTFIELD_ID); Label minLabel = new Label(" min X,Y "); - final TextField minText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID).build(); + final TextField minText = new TextField(); + minText.setPrefWidth(50); + minText.setId(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID); Label maxLabel = new Label(" max X,Y "); - final TextField maxText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID).build(); + final TextField maxText = new TextField(); + maxText.setPrefWidth(50); + maxText.setId(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID); Label amountLabel = new Label(" add "); - final TextField amountText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID).build(); + final TextField amountText = new TextField(); + amountText.setPrefWidth(50); + amountText.setId(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID); - Button bt = ButtonBuilder.create().text(" bubbles!").id(ADD_SERIES_COMMAND_BUTTON_ID).build(); + Button bt = new Button(" bubbles!"); + bt.setId(ADD_SERIES_COMMAND_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { String serieName = tf.getText(); --- old/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewLineChartApp.java 2017-02-15 15:57:38.695284891 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewLineChartApp.java 2017-02-15 15:57:38.635284332 +0300 @@ -98,7 +98,8 @@ testedLineChart = getNewChart(); testedLineChart.setId(TESTED_CHART_ID); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -108,7 +109,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { //throw new UnsupportedOperationException("Not supported yet."); @@ -133,15 +135,22 @@ HBox hb = new HBox(); Label lb1 = new Label("To area"); - final TextField tf1 = TextFieldBuilder.create().text("0").prefWidth(50).id(ADD_LINE_POS_TEXT_FIELD_ID).build(); + final TextField tf1 = new TextField("0"); + tf1.setPrefWidth(50); + tf1.setId(ADD_LINE_POS_TEXT_FIELD_ID); Label lb2 = new Label("to index"); - final TextField tf2 = TextFieldBuilder.create().text("0").prefWidth(50).id(ADD_INDEX_TEXT_FIELD_ID).build(); + final TextField tf2 = new TextField("0"); + tf2.setPrefWidth(50); + tf2.setId(ADD_INDEX_TEXT_FIELD_ID); Label lb3 = new Label("value"); - final TextField tf3 = TextFieldBuilder.create().text("0").prefWidth(50).id(ADD_VALUE_TEXT_FIELD_ID).build(); + final TextField tf3 = new TextField("0"); + tf3.setPrefWidth(50); + tf3.setId(ADD_VALUE_TEXT_FIELD_ID); - Button bt = ButtonBuilder.create().text("add point!").id(REMOVE_BUTTON_ID).build(); + Button bt = new Button("add point!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int area = Integer.parseInt(tf1.getText()); @@ -163,12 +172,17 @@ HBox hb = new HBox(); Label lb1 = new Label("From area"); - final TextField tf1 = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_LINE_FROM_POS_TEXT_FIELD_ID).build(); + final TextField tf1 = new TextField("0"); + tf1.setPrefWidth(50); + tf1.setId(REMOVE_LINE_FROM_POS_TEXT_FIELD_ID); Label lb2 = new Label("From index"); - final TextField tf2 = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_INDEX_TEXT_FIELD_ID).build(); + final TextField tf2 = new TextField("0"); + tf2.setPrefWidth(50); + tf2.setId(REMOVE_INDEX_TEXT_FIELD_ID); - Button bt = ButtonBuilder.create().text("remove point!").id(REMOVE_BUTTON_ID).build(); + Button bt = new Button("remove point!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int area = Integer.parseInt(tf1.getText()); @@ -183,8 +197,11 @@ public HBox getRemoveDataDialog() { HBox hb = new HBox(); Label lb = new Label("From index"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_ITEM_POS_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("remove line!").id(REMOVE_BUTTON_ID).build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + tf.setId(REMOVE_ITEM_POS_TEXT_FIELD_ID); + Button bt = new Button("remove line!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -198,18 +215,27 @@ public HBox getAddLineHBox() { HBox hb = new HBox(); Label lb = new Label("Add series named "); - final TextField tf = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_NAME_TEXTFIELD_ID).build(); + final TextField tf = new TextField(); + tf.setPrefWidth(50); + tf.setId(ADDED_SERIES_NAME_TEXTFIELD_ID); Label minLabel = new Label(" minX "); - final TextField minText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID).build(); + final TextField minText = new TextField(); + minText.setPrefWidth(50); + minText.setId(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID); Label maxLabel = new Label(" maxX "); - final TextField maxText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID).build(); + final TextField maxText = new TextField(); + maxText.setPrefWidth(50); + maxText.setId(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID); Label amountLabel = new Label(" with "); - final TextField amountText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID).build(); + final TextField amountText = new TextField(); + amountText.setPrefWidth(50); + amountText.setId(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID); - Button bt = ButtonBuilder.create().text(" points add!").id(ADD_SERIES_COMMAND_BUTTON_ID).build(); + Button bt = new Button(" points add!"); + bt.setId(ADD_SERIES_COMMAND_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { String serieName = tf.getText(); --- old/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewNumberScatterChartApp.java 2017-02-15 15:57:38.931287090 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewNumberScatterChartApp.java 2017-02-15 15:57:38.879286605 +0300 @@ -93,7 +93,8 @@ testedScatterChart = getNewChart(); testedScatterChart.setId(TESTED_CHART_ID); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -103,7 +104,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { //throw new UnsupportedOperationException("Not supported yet."); @@ -127,8 +129,11 @@ public HBox getRemoveDataDialog() { HBox hb = new HBox(); Label lb = new Label("From position"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_ITEM_POS_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Remove!").id(REMOVE_BUTTON_ID).build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + tf.setId(REMOVE_ITEM_POS_TEXT_FIELD_ID); + Button bt = new Button("Remove!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -142,12 +147,15 @@ public HBox getRemoveDataFromSerieDialog() { HBox hb = new HBox(); Label lb1 = new Label("From serie"); - final TextField tf1 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf1 = new TextField("0"); + tf1.setPrefWidth(50); Label lb2 = new Label("from index"); - final TextField tf2 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf2 = new TextField("0"); + tf2.setPrefWidth(50); - Button bt = ButtonBuilder.create().text("remove point!").id(REMOVE_BUTTON_ID).build(); + Button bt = new Button("remove point!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int serie = Integer.parseInt(tf1.getText()); @@ -162,18 +170,23 @@ public HBox getAddPointToSerieDialog() { HBox hb = new HBox(); Label lb1 = new Label("To serie"); - final TextField tf1 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf1 = new TextField("0"); + tf1.setPrefWidth(50); Label lb2 = new Label("to index"); - final TextField tf2 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf2 = new TextField("0"); + tf2.setPrefWidth(50); Label lb3 = new Label("X"); - final TextField tf3 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf3 = new TextField("0"); + tf3.setPrefWidth(50); Label lb4 = new Label("Y"); - final TextField tf4 = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tf4 = new TextField("0"); + tf4.setPrefWidth(50); - Button bt = ButtonBuilder.create().text("add point!").id(REMOVE_BUTTON_ID).build(); + Button bt = new Button("add point!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int serie = Integer.parseInt(tf1.getText()); @@ -195,18 +208,27 @@ public HBox getAddItemHBox() { HBox hb = new HBox(); Label lb = new Label("Add series named "); - final TextField tf = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_NAME_TEXTFIELD_ID).build(); + final TextField tf = new TextField(); + tf.setPrefWidth(50); + tf.setId(ADDED_SERIES_NAME_TEXTFIELD_ID); Label minLabel = new Label(" min "); - final TextField minText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID).build(); + final TextField minText = new TextField(); + minText.setPrefWidth(50); + minText.setId(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID); Label maxLabel = new Label(" max "); - final TextField maxText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID).build(); + final TextField maxText = new TextField(); + maxText.setPrefWidth(50); + maxText.setId(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID); Label amountLabel = new Label(" amount "); - final TextField amountText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID).build(); + final TextField amountText = new TextField(); + amountText.setPrefWidth(50); + amountText.setId(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID); - Button bt = ButtonBuilder.create().text("Add!").id(ADD_SERIES_COMMAND_BUTTON_ID).build(); + Button bt = new Button("Add!"); + bt.setId(ADD_SERIES_COMMAND_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { String serieName = tf.getText(); --- old/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewPieChartApp.java 2017-02-15 15:57:39.175289363 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewPieChartApp.java 2017-02-15 15:57:39.127288915 +0300 @@ -104,7 +104,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -114,7 +115,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { throw new UnsupportedOperationException("Not supported yet."); @@ -150,8 +152,11 @@ public HBox getRemoveDataDialog() { HBox hb = new HBox(); Label lb = new Label("From position"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_ITEM_POS_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Remove!").id(REMOVE_BUTTON_ID).build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + tf.setId(REMOVE_ITEM_POS_TEXT_FIELD_ID); + Button bt = new Button("Remove!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -165,12 +170,19 @@ public HBox getAddItemHBox() { HBox hb = new HBox(); Label lb = new Label("Add item"); - final TextField tf = TextFieldBuilder.create().prefWidth(50).id(ADD_ITEM_VALUE_TEXT_FIELD_ID).build(); + final TextField tf = new TextField(); + tf.setPrefWidth(50); + tf.setId(ADD_ITEM_VALUE_TEXT_FIELD_ID); Label namedLabel = new Label(" named "); - final TextField name = TextFieldBuilder.create().prefWidth(50).id(ADD_ITEM_TEXT_FIELD_ID).build(); + final TextField name = new TextField(); + name.setPrefWidth(50); + name.setId(ADD_ITEM_TEXT_FIELD_ID); Label atLb = new Label("at pos"); - final TextField tfPos = TextFieldBuilder.create().prefWidth(50).id(ADD_ITEM_POSITION_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Add!").id(ADD_ITEM_BUTTON_ID).build(); + final TextField tfPos = new TextField(); + tfPos.setPrefWidth(50); + tfPos.setId(ADD_ITEM_POSITION_TEXT_FIELD_ID); + Button bt = new Button("Add!"); + bt.setId(ADD_ITEM_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tfPos.getText()); --- old/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewStackedAreaChartApp.java 2017-02-15 15:57:39.419291635 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewStackedAreaChartApp.java 2017-02-15 15:57:39.363291114 +0300 @@ -87,7 +87,8 @@ testedStackedAreaChart = getNewChart(); testedStackedAreaChart.setId(TESTED_CHART_ID); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -97,7 +98,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { //throw new UnsupportedOperationException("Not supported yet."); @@ -121,8 +123,11 @@ public HBox getRemoveDataDialog() { HBox hb = new HBox(); Label lb = new Label("From position"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_AREA_INDEX_TEXTFIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Remove!").id(REMOVE_AREA_BUTTON_ID).build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + tf.setId(REMOVE_AREA_INDEX_TEXTFIELD_ID); + Button bt = new Button("Remove!"); + bt.setId(REMOVE_AREA_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -136,18 +141,27 @@ public HBox getAddItemHBox() { HBox hb = new HBox(); Label lb = new Label("Add series named "); - final TextField tf = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_NAME_TEXTFIELD_ID).build(); + final TextField tf = new TextField(); + tf.setPrefWidth(50); + tf.setId(ADDED_SERIES_NAME_TEXTFIELD_ID); Label minLabel = new Label(" min "); - final TextField minText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID).build(); + final TextField minText = new TextField(); + minText.setPrefWidth(50); + minText.setId(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID); Label maxLabel = new Label(" max "); - final TextField maxText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID).build(); + final TextField maxText = new TextField(); + maxText.setPrefWidth(50); + maxText.setId(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID); Label amountLabel = new Label(" amount "); - final TextField amountText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID).build(); + final TextField amountText = new TextField(); + amountText.setPrefWidth(50); + amountText.setId(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID); - Button bt = ButtonBuilder.create().text("Add!").id(ADD_SERIES_COMMAND_BUTTON_ID).build(); + Button bt = new Button("Add!"); + bt.setId(ADD_SERIES_COMMAND_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { String serieName = tf.getText(); --- old/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewStackedBarChartApp.java 2017-02-15 15:57:39.671293983 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewStackedBarChartApp.java 2017-02-15 15:57:39.607293387 +0300 @@ -95,7 +95,8 @@ testedStackedBarChart = getNewChart(); testedStackedBarChart.setId(TESTED_CHART_ID); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -105,7 +106,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { //throw new UnsupportedOperationException("Not supported yet."); @@ -129,8 +131,11 @@ public HBox getRemoveDataDialog() { HBox hb = new HBox(); Label lb = new Label("From position"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_ITEM_POS_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Remove!").id(REMOVE_BUTTON_ID).build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + tf.setId(REMOVE_ITEM_POS_TEXT_FIELD_ID); + Button bt = new Button("Remove!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -144,8 +149,9 @@ public HBox getRemoveCategoryDialog() { HBox hb = new HBox(); Label lb = new Label("From index"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).build(); - Button bt = ButtonBuilder.create().text("Remove category!").build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + Button bt = new Button("Remove category!"); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -160,12 +166,14 @@ public HBox getAddCategoryDialog() { HBox hb = new HBox(); Label lb = new Label("Category"); - final TextField tf = TextFieldBuilder.create().text("").prefWidth(50).build(); + final TextField tf = new TextField(""); + tf.setPrefWidth(50); Label lind = new Label("to index"); - final TextField tfind = TextFieldBuilder.create().text("0").prefWidth(50).build(); + final TextField tfind = new TextField("0"); + tfind.setPrefWidth(50); - Button bt = ButtonBuilder.create().text("Add!").build(); + Button bt = new Button("Add!"); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tfind.getText()); @@ -180,18 +188,27 @@ public HBox getAddItemHBox() { HBox hb = new HBox(); Label lb = new Label("Add series named "); - final TextField tf = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_NAME_TEXTFIELD_ID).build(); + final TextField tf = new TextField(); + tf.setPrefWidth(50); + tf.setId(ADDED_SERIES_NAME_TEXTFIELD_ID); Label minLabel = new Label(" min "); - final TextField minText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID).build(); + final TextField minText = new TextField(); + minText.setPrefWidth(50); + minText.setId(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID); Label maxLabel = new Label(" max "); - final TextField maxText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID).build(); + final TextField maxText = new TextField(); + maxText.setPrefWidth(50); + maxText.setId(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID); Label amountLabel = new Label(" amount "); - final TextField amountText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID).build(); + final TextField amountText = new TextField(); + amountText.setPrefWidth(50); + amountText.setId(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID); - Button bt = ButtonBuilder.create().text("Add!").id(ADD_SERIES_COMMAND_BUTTON_ID).build(); + Button bt = new Button("Add!"); + bt.setId(ADD_SERIES_COMMAND_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { String serieName = tf.getText(); --- old/functional/ControlsTests/src/javafx/scene/control/test/chart/manual/PieChartManualApp.java 2017-02-15 15:57:39.935296443 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/chart/manual/PieChartManualApp.java 2017-02-15 15:57:39.883295958 +0300 @@ -33,7 +33,6 @@ import javafx.scene.chart.PieChart; import javafx.scene.Scene; import javafx.scene.control.*; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.test.utils.CommonPropertiesScene; import javafx.geometry.Side; import javafx.scene.layout.HBox; @@ -104,7 +103,7 @@ } }); - Button hardResetButton = ButtonBuilder.create().text("Reset").build(); + Button hardResetButton = new Button("Reset"); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); --- old/functional/ControlsTests/src/javafx/scene/control/test/choicebox/NewChoiceBoxApp.java 2017-02-15 15:57:40.155298492 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/choicebox/NewChoiceBoxApp.java 2017-02-15 15:57:40.103298007 +0300 @@ -85,7 +85,8 @@ pane.setStyle("-fx-border-color : red;"); pane.getChildren().add(testedChoiceBox); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); --- old/functional/ControlsTests/src/javafx/scene/control/test/chooser/FXChooser.java 2017-02-15 15:57:40.399300765 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/chooser/FXChooser.java 2017-02-15 15:57:40.343300243 +0300 @@ -33,7 +33,6 @@ import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextField; -import javafx.scene.control.TextFieldBuilder; import javafx.scene.control.Tooltip; import javafx.scene.layout.GridPane; import javafx.scene.text.Text; @@ -59,8 +58,10 @@ public void start(final Stage stage) throws Exception { try { extensionFilter = new FileChooser.ExtensionFilter("File with extension (*.extension)", "*.extension"); - initialFileNameTextField = TextFieldBuilder.create().text("").promptText("Initial file name").build(); - titleTextField = TextFieldBuilder.create().text("").promptText("Title").build(); + initialFileNameTextField = new TextField(""); + initialFileNameTextField.setPromptText("Initial file name"); + titleTextField = new TextField(""); + titleTextField.setPromptText("Title"); errorText = new Label("No errors"); // OPEN FOLDER --- old/functional/ControlsTests/src/javafx/scene/control/test/colorpicker/ColorPickerApp.java 2017-02-15 15:57:40.639303001 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/colorpicker/ColorPickerApp.java 2017-02-15 15:57:40.587302517 +0300 @@ -134,7 +134,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -144,7 +145,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { tb.refresh(); @@ -168,8 +170,11 @@ private HBox setColorHbox() { HBox hb = new HBox(); Label lb = new Label("Set color"); - final TextField colorTf = TextFieldBuilder.create().prefWidth(100).id(SET_COLOR_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Set!").id(SET_COLOR_BUTTON_ID).build(); + final TextField colorTf = new TextField(); + colorTf.setPrefWidth(100); + colorTf.setId(SET_COLOR_TEXT_FIELD_ID); + Button bt = new Button("Set!"); + bt.setId(SET_COLOR_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { testedColorPicker.setValue(Color.web(colorTf.getText())); --- old/functional/ControlsTests/src/javafx/scene/control/test/combobox/ComboBoxApp.java 2017-02-15 15:57:40.883305274 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/combobox/ComboBoxApp.java 2017-02-15 15:57:40.823304715 +0300 @@ -167,21 +167,24 @@ // } // }); - Button applyCustomSelectionModel = ButtonBuilder.create().text("Apply custom selection model").id(APPLY_CUSTOM_SELECTION_MODEL_BUTTON_ID).build(); + Button applyCustomSelectionModel = new Button("Apply custom selection model"); + applyCustomSelectionModel.setId(APPLY_CUSTOM_SELECTION_MODEL_BUTTON_ID); applyCustomSelectionModel.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedComboBox.selectionModelProperty().setValue(selectionModel); } }); - Button applyCustomStringConverter = ButtonBuilder.create().text("Apply custom string converter").id(APPLY_CUSTOM_STRING_CONVERTER_BUTTON_ID).build(); + Button applyCustomStringConverter = new Button("Apply custom string converter"); + applyCustomStringConverter.setId(APPLY_CUSTOM_STRING_CONVERTER_BUTTON_ID); applyCustomStringConverter.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedComboBox.setConverter(new CustomStringConverter()); } }); - Button applyCustomCellFactory = ButtonBuilder.create().text("Apply custom cell factory").id(APPLY_CUSTOM_CELL_FACTORY_BUTTON_ID).build(); + Button applyCustomCellFactory = new Button("Apply custom cell factory"); + applyCustomCellFactory.setId(APPLY_CUSTOM_CELL_FACTORY_BUTTON_ID); applyCustomCellFactory.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedComboBox.setCellFactory(new Callback, ListCell>() { @@ -193,7 +196,8 @@ } }); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -203,7 +207,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { tb.refresh(); @@ -228,11 +233,8 @@ HBox resetButtonsHBox = new HBox(); resetButtonsHBox.getChildren().addAll(hardResetButton, softResetButton); - Button setAddingElementsOnShowing = ButtonBuilder.create() - .id(SET_ADDING_ELEMENTS_ON_SHOWING) - .text("Set adding elements on showing") - .build(); - + Button setAddingElementsOnShowing = new Button("Set adding elements on showing"); + setAddingElementsOnShowing.setId(SET_ADDING_ELEMENTS_ON_SHOWING); setAddingElementsOnShowing.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedComboBox.setOnShowing(new EventHandler() { @@ -246,11 +248,8 @@ } }); - Button restoreDefaultOnShowingHandler = ButtonBuilder.create() - .id(RESTORE_ON_SHOWING_EVENT_HANDLER) - .text("Restore default onShowing handler") - .build(); - + Button restoreDefaultOnShowingHandler = new Button("Restore default onShowing handler"); + restoreDefaultOnShowingHandler.setId(RESTORE_ON_SHOWING_EVENT_HANDLER); restoreDefaultOnShowingHandler.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedComboBox.setOnShowing(new EventHandler() { @@ -261,11 +260,8 @@ } }); - Button populateComboBoxWithFontSizes = ButtonBuilder.create() - .id(POPULATE_COMBOBOX_WITH_FONT_SIZES) - .text("Populate ComboBox with font sizes") - .build(); - + Button populateComboBoxWithFontSizes = new Button("Populate ComboBox with font sizes"); + populateComboBoxWithFontSizes.setId(POPULATE_COMBOBOX_WITH_FONT_SIZES); populateComboBoxWithFontSizes.setOnAction(new EventHandler() { public void handle(ActionEvent t) { @@ -317,10 +313,15 @@ private HBox getAddItemHBox() { HBox hb = new HBox(); Label lb = new Label("Add item"); - final TextField tf = TextFieldBuilder.create().prefWidth(50).id(ADD_ITEM_TEXT_FIELD_ID).build(); + final TextField tf = new TextField(); + tf.setPrefWidth(50); + tf.setId(ADD_ITEM_TEXT_FIELD_ID); Label atLb = new Label("at pos"); - final TextField tfPos = TextFieldBuilder.create().prefWidth(50).id(ADD_ITEM_POSITION_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Add!").id(ADD_ITEM_BUTTON_ID).build(); + final TextField tfPos = new TextField(); + tfPos.setPrefWidth(50); + tfPos.setId(ADD_ITEM_POSITION_TEXT_FIELD_ID); + Button bt = new Button("Add!"); + bt.setId(ADD_ITEM_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tfPos.getText()); @@ -334,8 +335,11 @@ private HBox getRemoveItemHBox() { HBox hb = new HBox(); Label lb = new Label("From position"); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_ITEM_POS_TEXT_FIELD_ID).build(); - Button bt = ButtonBuilder.create().text("Remove!").id(REMOVE_BUTTON_ID).build(); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + tf.setId(REMOVE_ITEM_POS_TEXT_FIELD_ID); + Button bt = new Button("Remove!"); + bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); @@ -349,7 +353,8 @@ private HBox getSetItemsNullHBox() { HBox hb = new HBox(); - Button bt = ButtonBuilder.create().text("Set items null").id(SET_ITEMS_NULL_BUTTON_ID).build(); + Button bt = new Button("Set items null"); + bt.setId(SET_ITEMS_NULL_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { ((ComboBox) testedComboBox).setItems(null); --- old/functional/ControlsTests/src/javafx/scene/control/test/datepicker/DatePickerApp.java 2017-02-15 15:57:41.147307734 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/datepicker/DatePickerApp.java 2017-02-15 15:57:41.091307212 +0300 @@ -37,7 +37,6 @@ import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.DateCell; import javafx.scene.control.DatePicker; import javafx.scene.control.test.utils.CommonPropertiesScene; @@ -126,7 +125,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -136,7 +136,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { propertiesTable.refresh(); --- old/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasBrowserApp.java 2017-02-15 15:57:41.391310007 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasBrowserApp.java 2017-02-15 15:57:41.331309448 +0300 @@ -132,8 +132,6 @@ } public static void main(String[] args) { - System.setProperty("proxyHost", "www-proxy.ru.oracle.com"); - System.setProperty("proxyPort", "80"); try { startAndWaitShell(); } catch (InterruptedException ex) { --- old/functional/ControlsTests/src/javafx/scene/control/test/labeleds/newapps/LabeledsApp.java 2017-02-15 15:57:41.619312131 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/labeleds/newapps/LabeledsApp.java 2017-02-15 15:57:41.567311647 +0300 @@ -29,7 +29,6 @@ import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.Label; import javafx.scene.control.Labeled; import javafx.scene.control.test.utils.CommonPropertiesScene; @@ -87,7 +86,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); --- old/functional/ControlsTests/src/javafx/scene/control/test/labeleds/newapps/TextNodeApp.java 2017-02-15 15:57:41.855314330 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/labeleds/newapps/TextNodeApp.java 2017-02-15 15:57:41.799313808 +0300 @@ -36,7 +36,6 @@ import javafx.geometry.Orientation; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.CheckBox; import javafx.scene.control.Label; import javafx.scene.control.Separator; @@ -103,7 +102,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); --- old/functional/ControlsTests/src/javafx/scene/control/test/menubar/NewMenuApp.java 2017-02-15 15:57:42.099316603 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/menubar/NewMenuApp.java 2017-02-15 15:57:42.035316007 +0300 @@ -79,7 +79,8 @@ private void prepareScene() { pane = new Pane(); - testedMenuBar = MenuBarBuilder.create().id(TESTED_MENUBAR_ID).build(); + testedMenuBar = new MenuBar(); + testedMenuBar.setId(TESTED_MENUBAR_ID); PropertiesTable tb = new PropertiesTable(testedMenuBar); PropertyTablesFactory.explorePropertiesList(testedMenuBar, tb); @@ -97,7 +98,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { @@ -136,10 +138,15 @@ private HBox getAddTextFieldHbox() { HBox hb = new HBox(); Label lb = new Label("Add Menu at pos"); - final TextField tf = TextFieldBuilder.create().id(MENUBAR_ADD_INDEX_TEXT_FIELD_ID).text("0").prefWidth(40).build(); - final TextField nameTF = TextFieldBuilder.create().id(MENUBAR_ADD_NAME_TEXT_FIELD_ID).text("Menu").prefWidth(40).build(); + final TextField tf = new TextField("0"); + tf.setId(MENUBAR_ADD_INDEX_TEXT_FIELD_ID); + tf.setPrefWidth(40); + final TextField nameTF = new TextField("Menu"); + nameTF.setId(MENUBAR_ADD_NAME_TEXT_FIELD_ID); + nameTF.setPrefWidth(40); - Button bt = ButtonBuilder.create().text("Add!").id(ADD_MENU_BUTTON_ID).build(); + Button bt = new Button("Add!"); + bt.setId(ADD_MENU_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { --- old/functional/ControlsTests/src/javafx/scene/control/test/pagination/PaginationApp.java 2017-02-15 15:57:42.343318877 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/pagination/PaginationApp.java 2017-02-15 15:57:42.279318280 +0300 @@ -29,7 +29,6 @@ import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.Label; import javafx.scene.control.Pagination; import javafx.scene.control.test.utils.*; @@ -110,7 +109,8 @@ tb.addDoublePropertyLine(testedPagination.minHeightProperty(), -100, 300, 50, testedPagination); tb.addDoublePropertyLine(testedPagination.minWidthProperty(), -100, 300, 50, testedPagination); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -120,7 +120,8 @@ } }); - Button setBulletPageIndicatorButton = ButtonBuilder.create().id(SET_BULLET_PAGE_INDICATOR_BUTTON_ID).text("Set bullet").build(); + Button setBulletPageIndicatorButton = new Button("Set bullet"); + setBulletPageIndicatorButton.setId(SET_BULLET_PAGE_INDICATOR_BUTTON_ID); setBulletPageIndicatorButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { //testedPagination.setStyle(Pagination.STYLE_CLASS_BULLET); @@ -128,14 +129,16 @@ } }); - Button setPageCountToIndeterminateButton = ButtonBuilder.create().id(SET_PAGE_COUNT_TO_INDETERMINATE_BUTTON_ID).text("Set indeterminate\n page count").build(); + Button setPageCountToIndeterminateButton = new Button("Set indeterminate\n page count"); + setPageCountToIndeterminateButton.setId(SET_PAGE_COUNT_TO_INDETERMINATE_BUTTON_ID); setPageCountToIndeterminateButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedPagination.setPageCount(Pagination.INDETERMINATE); } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { @Override public void handle(ActionEvent t) { @@ -148,7 +151,8 @@ } }); - Button setNewPageFactory = ButtonBuilder.create().id(SET_NEW_PAGE_FACTORY_BUTTON_ID).text("Set new page factory").build(); + Button setNewPageFactory = new Button("Set new page factory"); + setNewPageFactory.setId(SET_NEW_PAGE_FACTORY_BUTTON_ID); setNewPageFactory.setOnAction(new EventHandler() { @Override public void handle(ActionEvent t) { @@ -170,7 +174,8 @@ } }); - Button setOldPageFactory = ButtonBuilder.create().id(SET_OLD_PAGE_FACTORY_BUTTON_ID).text("Set old page factory").build(); + Button setOldPageFactory = new Button("Set old page factory"); + setOldPageFactory.setId(SET_OLD_PAGE_FACTORY_BUTTON_ID); setOldPageFactory.setOnAction(new EventHandler() { @Override public void handle(ActionEvent t) { --- old/functional/ControlsTests/src/javafx/scene/control/test/scrollbar/ScrollBarApp.java 2017-02-15 15:57:42.551320814 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/scrollbar/ScrollBarApp.java 2017-02-15 15:57:42.495320292 +0300 @@ -66,13 +66,16 @@ @Override final protected void prepareScene() { - testedScrollBar = ScrollBarBuilder.create().id(TESTED_SCROLLBAR_ID).build(); + testedScrollBar = new ScrollBar(); + testedScrollBar.setFocusTraversable(true); + testedScrollBar.setId(TESTED_SCROLLBAR_ID); tb = new PropertiesTable(testedScrollBar); PropertyTablesFactory.explorePropertiesList(testedScrollBar, tb); SpecialTablePropertiesProvider.provideForControl(testedScrollBar, tb); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); --- old/functional/ControlsTests/src/javafx/scene/control/test/separator/SeparatorApp.java 2017-02-15 15:57:42.787323013 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/separator/SeparatorApp.java 2017-02-15 15:57:42.731322491 +0300 @@ -73,7 +73,8 @@ @Override final protected void prepareScene() { pane = new Pane(); - testedSeparator = SeparatorBuilder.create().id(TESTED_SEPARATOR_ID).build(); + testedSeparator = new Separator(); + testedSeparator.setId(TESTED_SEPARATOR_ID); tb = new PropertiesTable(testedSeparator); PropertyTablesFactory.explorePropertiesList(testedSeparator, tb); @@ -90,7 +91,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); --- old/functional/ControlsTests/src/javafx/scene/control/test/slider/SliderNewApp.java 2017-02-15 15:57:43.039325361 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/slider/SliderNewApp.java 2017-02-15 15:57:42.979324802 +0300 @@ -28,9 +28,7 @@ import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.Slider; -import javafx.scene.control.SliderBuilder; import javafx.scene.control.test.utils.CommonPropertiesScene; import javafx.scene.control.test.utils.ptables.PropertiesTable; import javafx.scene.control.test.utils.ptables.PropertyTablesFactory; @@ -76,13 +74,15 @@ @Override final protected void prepareScene() { - testedSlider = SliderBuilder.create().id(TESTED_SLIDER_ID).build(); + testedSlider = new Slider(); + testedSlider.setId(TESTED_SLIDER_ID); tb = new PropertiesTable(testedSlider); PropertyTablesFactory.explorePropertiesList(testedSlider, tb); SpecialTablePropertiesProvider.provideForControl(testedSlider, tb); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -92,7 +92,8 @@ } }); - Button setCustomConverter = ButtonBuilder.create().id(APPLY_CUSTOM_LABEL_FORMATTER).text("ApplyCsustomConverter").build(); + Button setCustomConverter = new Button("ApplyCsustomConverter"); + setCustomConverter.setId(APPLY_CUSTOM_LABEL_FORMATTER); setCustomConverter.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedSlider.setLabelFormatter(new CustomConverter()); --- old/functional/ControlsTests/src/javafx/scene/control/test/splitpane/SplitPaneApp.java 2017-02-15 15:57:43.283327634 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/splitpane/SplitPaneApp.java 2017-02-15 15:57:43.227327112 +0300 @@ -76,14 +76,17 @@ private void prepareScene() { pane = new Pane(); - testedSplitPane = SplitPaneBuilder.create().id(TESTED_SPLIPANE_ID).build(); + testedSplitPane = new SplitPane(); + testedSplitPane.setId(TESTED_SPLIPANE_ID); PropertiesTable tb = new PropertiesTable(testedSplitPane); PropertyTablesFactory.explorePropertiesList(testedSplitPane, tb); final TabPaneWithControl tabPane = new TabPaneWithControl("Accordion", tb); - final TextField tf = TextFieldBuilder.create().id(SPLITPANE_ADD_INDEX_TEXT_FIELD_ID).text("0").prefWidth(40).build(); + final TextField tf = new TextField("0"); + tf.setId(SPLITPANE_ADD_INDEX_TEXT_FIELD_ID); + tf.setPrefWidth(40); HBox nodeshb = new NodesChoserFactory("Add!", new NodesChoserFactory.NodeAction() { @@ -106,7 +109,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { --- old/functional/ControlsTests/src/javafx/scene/control/test/tableview/NewTableViewApp.java 2017-02-15 15:57:43.531329944 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/tableview/NewTableViewApp.java 2017-02-15 15:57:43.479329460 +0300 @@ -24,10 +24,10 @@ */ package javafx.scene.control.test.tableview; -import com.sun.javafx.scene.control.skin.NestedTableColumnHeader; -import com.sun.javafx.scene.control.skin.TableColumnHeader; -import com.sun.javafx.scene.control.skin.TableHeaderRow; -import com.sun.javafx.scene.control.skin.TableViewSkin; +import javafx.scene.control.skin.NestedTableColumnHeader; +import javafx.scene.control.skin.TableColumnHeader; +import javafx.scene.control.skin.TableHeaderRow; +import javafx.scene.control.skin.TableViewSkin; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; @@ -66,6 +66,8 @@ import static javafx.commons.Consts.*; import static javafx.commons.Consts.Cell.*; import javafx.scene.Node; +import static javafx.scene.control.test.treetable.ResetButtonNames.HARD_RESET_BUTTON_ID; +import static javafx.scene.control.test.treetable.ResetButtonNames.SOFT_RESET_BUTTON_ID; import javafx.scene.control.test.utils.ComponentsFactory.MultipleIndexFormComponent.MultipleIndicesAction; import static org.junit.Assert.assertTrue; @@ -129,7 +131,8 @@ tabPane = new TabPaneWithControl("TableView", tb); tabPane.setMinSize(1000, 1000); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -139,7 +142,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { TableView newOne = new TableView(); @@ -327,7 +331,7 @@ public String toString() { return "CUSTOM " + super.toString(); } - +/* @Override protected TableHeaderRow createTableHeaderRow() { return new TableHeaderRow(this) { @@ -350,6 +354,7 @@ } }; } + */ }); } }); @@ -456,10 +461,8 @@ hb.getChildren().addAll(cmbEditors, chbCustom, btnSetEditor); - Button btn = ButtonBuilder.create() - .text("Set onEdit event hadlers") - .id(BTN_SET_ON_EDIT_EVENT_HANDLERS) - .build(); + Button btn = new Button("Set onEdit event hadlers"); + btn.setId(BTN_SET_ON_EDIT_EVENT_HANDLERS); btn.setOnAction(new EventHandler() { public void handle(ActionEvent t) { @@ -896,4 +899,5 @@ } return testData; } -} \ No newline at end of file +} + --- old/functional/ControlsTests/src/javafx/scene/control/test/tabpane/NewTabPaneApp.java 2017-02-15 15:57:43.803332479 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/tabpane/NewTabPaneApp.java 2017-02-15 15:57:43.727331770 +0300 @@ -91,13 +91,15 @@ pane.setPrefSize(220, 220); pane.setStyle("-fx-border-color : red;"); - testedTabPane = TabPaneBuilder.create().id(TESTED_TABPANE_ID).build(); + testedTabPane = new TabPane(); + testedTabPane.setId(TESTED_TABPANE_ID); pane.getChildren().add(testedTabPane); tb = new PropertiesTable(testedTabPane); PropertyTablesFactory.explorePropertiesList(testedTabPane, tb); - Button btnResetHardly = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button btnResetHardly = new Button("Reset"); + btnResetHardly.setId(RESET_BUTTON_ID); btnResetHardly.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -107,7 +109,8 @@ } }); - Button btnResetSoftly = ButtonBuilder.create().id(RESET_SOFTLY_BUTTON_ID).text("Reset softly").build(); + Button btnResetSoftly = new Button("Reset softly"); + btnResetSoftly.setId(RESET_SOFTLY_BUTTON_ID); btnResetSoftly.setOnAction(new EventHandler() { public void handle(ActionEvent t) { @@ -176,20 +179,16 @@ grid.getColumnConstraints().addAll(column1, column2); //row #1 grid.add(new Label("Tab ID"), 0, 0); - final TextField newTabId = TextFieldBuilder.create() - .id(NEW_TAB_ID_TEXT_FIELD_ID) - .text("ID") - .prefWidth(40d) - .build(); + final TextField newTabId = new TextField("ID"); + newTabId.setPrefWidth(40d); + newTabId.setId(NEW_TAB_ID_TEXT_FIELD_ID); grid.add(newTabId, 1, 0); //row #2 grid.add(new Label("Index"), 0, 1); - final TextField newTabIndex = TextFieldBuilder.create() - .id(TABPANE_ADD_INDEX_TEXT_FIELD_ID) - .text("0") - .prefWidth(40) - .build(); + final TextField newTabIndex = new TextField("0"); + newTabIndex.setId(TABPANE_ADD_INDEX_TEXT_FIELD_ID); + newTabIndex.setPrefWidth(40); grid.add(newTabIndex, 1, 1); //row #3 @@ -206,10 +205,7 @@ * If true then there will be created a properties pane * for tab content each time a tab is added */ - final CheckBox createPropsTab = CheckBoxBuilder - .create() - .text("Create additional panes\n with content properties") - .build(); + final CheckBox createPropsTab = new CheckBox("Create additional panes\n with content properties"); grid.add(createPropsTab, 0, 3, 2, 1); //row #5 @@ -217,11 +213,8 @@ * If true then there will be created a properties pane * for tab content each time a tab is added */ - final CheckBox vetoOnClose = CheckBoxBuilder - .create() - .text("Veto tab request on close.") - .id(VETO_CHECKBOX_ID) - .build(); + final CheckBox vetoOnClose = new CheckBox("Veto tab request on close."); + vetoOnClose.setId(VETO_CHECKBOX_ID); grid.add(vetoOnClose, 0, 4, 2, 1); //row #6 --- old/functional/ControlsTests/src/javafx/scene/control/test/tabpane/TabPaneApp2.java 2017-02-15 15:57:44.047334752 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/tabpane/TabPaneApp2.java 2017-02-15 15:57:43.991334230 +0300 @@ -32,7 +32,7 @@ import javafx.event.EventHandler; import javafx.geometry.Side; import javafx.scene.Scene; -import javafx.scene.control.ButtonBuilder; +import javafx.scene.control.Button; import javafx.scene.control.ChoiceBox; import javafx.scene.control.ContextMenu; import javafx.scene.control.Label; @@ -113,34 +113,34 @@ error = new Label(); error.setId(ERROR_ID); - controls.getChildren().add( - ButtonBuilder.create() - .text(CLEAR_BTN_ID).id(CLEAR_BTN_ID) - .onAction(new EventHandler() { - public void handle(ActionEvent t) { - tabPane.getTabs().clear(); - } - }).build()); - - controls.getChildren().add( - ButtonBuilder.create() - .text(RESET_BTN_ID).id(RESET_BTN_ID) - .onAction(new EventHandler() { - - public void handle(ActionEvent t) { - reset(); - } - }).build()); - - controls.getChildren().add( - ButtonBuilder.create() - .text(ADD_SINGLE_BTN_ID).id(ADD_SINGLE_BTN_ID) - .onAction(new EventHandler() { - - public void handle(ActionEvent t) { - tabPane.getTabs().add(new NamedTab(TAB_ITEM + tabPane.getTabs().size())); - } - }).build()); + Button temp; + + temp = new Button(CLEAR_BTN_ID); + temp.setId(CLEAR_BTN_ID); + temp.setOnAction(new EventHandler() { + public void handle(ActionEvent t) { + tabPane.getTabs().clear(); + } + }); + controls.getChildren().add(temp); + + temp = new Button(RESET_BTN_ID); + temp.setId(RESET_BTN_ID); + temp.setOnAction(new EventHandler() { + public void handle(ActionEvent t) { + reset(); + } + }); + controls.getChildren().add(temp); + + temp = new Button(ADD_SINGLE_BTN_ID); + temp.setId(ADD_SINGLE_BTN_ID); + temp.setOnAction(new EventHandler() { + public void handle(ActionEvent t) { + tabPane.getTabs().add(new NamedTab(TAB_ITEM + tabPane.getTabs().size())); + } + }); + controls.getChildren().add(temp); HBox add_position_box = new HBox(5); controls.getChildren().add(add_position_box); @@ -148,15 +148,14 @@ final TextField add_position = new TextField("0"); add_position.setId(ADD_POS_EDIT_ID); - add_position_box.getChildren().add( - ButtonBuilder.create() - .text(ADD_SINGLE_AT_POS_BTN_ID).id(ADD_SINGLE_AT_POS_BTN_ID) - .onAction(new EventHandler() { - - public void handle(ActionEvent t) { - tabPane.getTabs().add(new NamedTab("Tab " + tabPane.getTabs().size())); - } - }).build()); + temp = new Button(ADD_SINGLE_AT_POS_BTN_ID); + temp.setId(ADD_SINGLE_AT_POS_BTN_ID); + temp.setOnAction(new EventHandler() { + public void handle(ActionEvent t) { + tabPane.getTabs().add(new NamedTab("Tab " + tabPane.getTabs().size())); + } + }); + add_position_box.getChildren().add(temp); final Label add_label = new Label("at"); add_position_box.getChildren().add(add_label); @@ -170,17 +169,16 @@ final TextField disable_position = new TextField("0"); disable_position.setId(DISABLE_POS_EDIT_ID); - disable_position_box.getChildren().add( - ButtonBuilder.create() - .text(DISABLE_SINGLE_AT_POS_BTN_ID).id(DISABLE_SINGLE_AT_POS_BTN_ID) - .onAction(new EventHandler() { - - public void handle(ActionEvent t) { - Integer pos = Integer.valueOf(disable_position.getText()); - Tab tab = tabPane.getTabs().get(pos.intValue()); - tab.setDisable(!tab.isDisable()); - } - }).build()); + temp = new Button(DISABLE_SINGLE_AT_POS_BTN_ID); + temp.setId(DISABLE_SINGLE_AT_POS_BTN_ID); + temp.setOnAction(new EventHandler() { + public void handle(ActionEvent t) { + Integer pos = Integer.valueOf(disable_position.getText()); + Tab tab = tabPane.getTabs().get(pos.intValue()); + tab.setDisable(!tab.isDisable()); + } + }); + disable_position_box.getChildren().add(temp); final Label disable_label = new Label("at"); disable_position_box.getChildren().add(disable_label); @@ -194,15 +192,14 @@ final TextField remove_position = new TextField("0"); remove_position.setId(REMOVE_POS_EDIT_ID); - remove_position_box.getChildren().add( - ButtonBuilder.create() - .text(REMOVE_SINGLE_AT_POS_BTN_ID).id(REMOVE_SINGLE_AT_POS_BTN_ID) - .onAction(new EventHandler() { - - public void handle(ActionEvent t) { - tabPane.getTabs().remove(Integer.valueOf(remove_position.getText()).intValue()); - } - }).build()); + temp = new Button(REMOVE_SINGLE_AT_POS_BTN_ID); + temp.setId(REMOVE_SINGLE_AT_POS_BTN_ID); + temp.setOnAction(new EventHandler() { + public void handle(ActionEvent t) { + tabPane.getTabs().remove(Integer.valueOf(remove_position.getText()).intValue()); + } + }); + remove_position_box.getChildren().add(temp); final Label remove_label = new Label("at"); remove_position_box.getChildren().add(remove_label); --- old/functional/ControlsTests/src/javafx/scene/control/test/textinput/TextAreaPropertiesApp.java 2017-02-15 15:57:44.287336988 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/textinput/TextAreaPropertiesApp.java 2017-02-15 15:57:44.235336503 +0300 @@ -28,9 +28,7 @@ import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.TextArea; -import javafx.scene.control.TextField; import javafx.scene.layout.Pane; import test.javaclient.shared.Utils; @@ -72,7 +70,8 @@ @Override public void addControlSpecificButtons(Pane pane) { - Button button = ButtonBuilder.create().id(ADD_TEXT_BUTTON_ID).text("Add much text").build(); + Button button = new Button("Add much text"); + button.setId(ADD_TEXT_BUTTON_ID); button.setOnAction(new EventHandler() { public void handle(Event t) { --- old/functional/ControlsTests/src/javafx/scene/control/test/textinput/TextControlApp.java 2017-02-15 15:57:44.527339224 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/textinput/TextControlApp.java 2017-02-15 15:57:44.471338702 +0300 @@ -81,7 +81,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("RESET").build(); + Button resetButton = new Button("RESET"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { tb.refresh(); --- old/functional/ControlsTests/src/javafx/scene/control/test/textinput/TextFieldPropertiesApp.java 2017-02-15 15:57:44.775341534 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/textinput/TextFieldPropertiesApp.java 2017-02-15 15:57:44.719341012 +0300 @@ -29,8 +29,8 @@ import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.TextField; +import static javafx.scene.control.test.textinput.TextControlApp.ADD_TEXT_BUTTON_ID; import javafx.scene.layout.Pane; import test.javaclient.shared.Utils; @@ -79,7 +79,8 @@ @Override public void addControlSpecificButtons(Pane pane) { - Button setOnActionListenerButton = ButtonBuilder.create().id(SET_ON_ACTION_BUTTON_ID).text("Set on action listener").build(); + Button setOnActionListenerButton = new Button("Set on action listener"); + setOnActionListenerButton.setId(SET_ON_ACTION_BUTTON_ID); setOnActionListenerButton.setOnAction(new EventHandler() { public void handle(Event t) { @@ -92,7 +93,8 @@ } }); - Button addTextButton = ButtonBuilder.create().id(ADD_TEXT_BUTTON_ID).text("Add \"sometext\"").build(); + Button addTextButton = new Button("Add \"sometext\""); + addTextButton.setId(ADD_TEXT_BUTTON_ID); addTextButton.setOnAction(new EventHandler() { public void handle(Event t) { --- old/functional/ControlsTests/src/javafx/scene/control/test/textinput/TextInputExternalWrap.java 2017-02-15 15:57:45.019343807 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/textinput/TextInputExternalWrap.java 2017-02-15 15:57:44.963343286 +0300 @@ -25,7 +25,6 @@ package javafx.scene.control.test.textinput; -import com.sun.javafx.scene.text.HitInfo; import javafx.scene.Node; import javafx.scene.control.TextInputControl; import javafx.scene.control.test.textinput.TextInputChanger.TextInputControlWrapInterface; --- old/functional/ControlsTests/src/javafx/scene/control/test/toolbar/NewToolbarApp.java 2017-02-15 15:57:45.255346006 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/toolbar/NewToolbarApp.java 2017-02-15 15:57:45.199345484 +0300 @@ -79,14 +79,17 @@ private void prepareScene() { pane = new Pane(); - testedToolbar = ToolBarBuilder.create().id(TESTED_TOOLBAR_ID).build(); + testedToolbar = new ToolBar(); + testedToolbar.setId(TESTED_TOOLBAR_ID); PropertiesTable tb = new PropertiesTable(testedToolbar); PropertyTablesFactory.explorePropertiesList(testedToolbar, tb); final TabPaneWithControl tabPane = new TabPaneWithControl("ToolBar", tb); - final TextField tf = TextFieldBuilder.create().id(TOOLBAR_ADD_INDEX_TEXT_FIELD_ID).text("0").prefWidth(40).build(); + final TextField tf = new TextField("0"); + tf.setId(TOOLBAR_ADD_INDEX_TEXT_FIELD_ID); + tf.setPrefWidth(40); HBox nodeshb = new NodesChoserFactory("Add!", new NodesChoserFactory.NodeAction() { @@ -109,7 +112,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { --- old/functional/ControlsTests/src/javafx/scene/control/test/tooltip/NewTooltipApp.java 2017-02-15 15:57:45.487348168 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/tooltip/NewTooltipApp.java 2017-02-15 15:57:45.431347646 +0300 @@ -73,7 +73,8 @@ @Override final protected void prepareScene() { pane = new Pane(); - testedTooltip = TooltipBuilder.create().id(TESTED_TOOLTIP_ID).build(); + testedTooltip = new Tooltip(); + testedTooltip.setId(TESTED_TOOLTIP_ID); tb = new PropertiesTable(testedTooltip); PropertyTablesFactory.explorePropertiesList(testedTooltip, tb); @@ -93,7 +94,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button resetButton = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); --- old/functional/ControlsTests/src/javafx/scene/control/test/treetable/TreeTableNewApp.java 2017-02-15 15:57:45.743350553 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/treetable/TreeTableNewApp.java 2017-02-15 15:57:45.687350031 +0300 @@ -24,10 +24,10 @@ */ package javafx.scene.control.test.treetable; -import com.sun.javafx.scene.control.skin.NestedTableColumnHeader; -import com.sun.javafx.scene.control.skin.TableColumnHeader; -import com.sun.javafx.scene.control.skin.TableHeaderRow; -import com.sun.javafx.scene.control.skin.TreeTableViewSkin; +import javafx.scene.control.skin.NestedTableColumnHeader; +import javafx.scene.control.skin.TableColumnHeader; +import javafx.scene.control.skin.TableHeaderRow; +import javafx.scene.control.skin.TreeTableViewSkin; import java.util.ArrayList; import java.util.Comparator; import java.util.HashMap; @@ -54,6 +54,7 @@ import javafx.scene.control.cell.ComboBoxTreeTableCell; import javafx.scene.control.cell.TextFieldTreeTableCell; import javafx.scene.control.test.tableview.NewTableViewApp; +import static javafx.scene.control.test.treetable.ResetButtonNames.HARD_RESET_BUTTON_ID; import javafx.scene.control.test.treeview.TreeViewConstants; import javafx.scene.control.test.utils.CommonPropertiesScene; import javafx.scene.control.test.utils.ComponentsFactory.MultipleIndexFormComponent; @@ -193,7 +194,8 @@ hb.setPadding(new Insets(5, 5, 5, 5)); hb.setStyle("-fx-border-color : green;"); - Button resetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Reset").build(); + Button resetButton = new Button("Reset"); + resetButton.setId(HARD_RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -628,7 +630,7 @@ public String toString() { return "CUSTOM " + super.toString(); } - +/* @Override protected TableHeaderRow createTableHeaderRow() { return new TableHeaderRow(this) { @@ -651,6 +653,7 @@ } }; } +*/ }); } }); @@ -707,8 +710,11 @@ private HBox getScrollToHBox() { HBox hb = new HBox(); - Button button = ButtonBuilder.create().text("ScrollTo").id(SCROLL_TO_BUTTON_ID).build(); - final TextField tf = TextFieldBuilder.create().text("0").id(SCROLL_TO_TEXT_FIELD_ID).prefWidth(50).build(); + Button button = new Button("ScrollTo"); + button.setId(SCROLL_TO_BUTTON_ID); + final TextField tf = new TextField("0"); + tf.setId(SCROLL_TO_TEXT_FIELD_ID); + tf.setPrefWidth(50); button.setOnAction(new EventHandler() { public void handle(ActionEvent t) { @@ -722,8 +728,12 @@ private HBox getEditHBox() { HBox hb = new HBox(); - Button button = ButtonBuilder.create().text("Edit").id(EDIT_BUTTON_ID).build(); - final TextField tf = TextFieldBuilder.create().promptText("name").id(EDIT_TEXT_FIELD_ID).prefWidth(50).build(); + Button button = new Button("Edit"); + button.setId(EDIT_BUTTON_ID); + final TextField tf = new TextField(); + tf.setPromptText("name"); + tf.setId(EDIT_TEXT_FIELD_ID); + tf.setPrefWidth(50); button.setOnAction(new EventHandler() { public void handle(ActionEvent t) { @@ -739,11 +749,8 @@ private VBox setEventHandlersHBox() { VBox vb = new VBox(); - Button btn = ButtonBuilder.create() - .text("Set onEdit event hadlers") - .id(BTN_SET_ON_EDIT_EVENT_HANDLERS) - .build(); - + Button btn = new Button("Set onEdit event hadlers"); + btn.setId(BTN_SET_ON_EDIT_EVENT_HANDLERS); btn.setOnAction(new EventHandler() { final EventHandler eventHandlerOnEditStart = new EventHandler() { public void handle(Event t) { @@ -780,11 +787,8 @@ } }); - Button btnAddFactory = ButtonBuilder.create() - .text("Set cell factory for editing") - .id(SET_CELL_FACTORY_FOR_EDITING) - .build(); - + Button btnAddFactory = new Button("Set cell factory for editing"); + btnAddFactory.setId(SET_CELL_FACTORY_FOR_EDITING); btnAddFactory.setOnAction(new EventHandler() { public void handle(ActionEvent t) { for (Object obj : testedControl.getColumns()) { --- old/functional/ControlsTests/src/javafx/scene/control/test/treeview/TreeViewNewApp.java 2017-02-15 15:57:45.991352863 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/treeview/TreeViewNewApp.java 2017-02-15 15:57:45.939352378 +0300 @@ -33,6 +33,8 @@ import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.control.test.treetable.ResetButtonNames; +import static javafx.scene.control.test.treetable.ResetButtonNames.HARD_RESET_BUTTON_ID; +import static javafx.scene.control.test.treetable.ResetButtonNames.SOFT_RESET_BUTTON_ID; import static javafx.scene.control.test.treeview.TreeViewConstants.ROOT_NAME; import javafx.scene.control.test.utils.CommonPropertiesScene; import javafx.scene.control.test.utils.ptables.NodeControllerFactory; @@ -131,7 +133,8 @@ tabPane = new TabPaneWithControl("TreeView", tb); getControlOverItem(ROOT_NAME); - Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); + Button hardResetButton = new Button("Hard reset"); + hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); @@ -141,7 +144,8 @@ } }); - Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); + Button softResetButton = new Button("Soft reset"); + softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler() { public void handle(ActionEvent t) { refreshProcedure(2); @@ -403,8 +407,11 @@ private HBox getScrollToHBox() { HBox hb = new HBox(); - Button button = ButtonBuilder.create().text("ScrollTo").id(SCROLL_TO_BUTTON_ID).build(); - final TextField tf = TextFieldBuilder.create().text("0").id(SCROLL_TO_TEXT_FIELD_ID).prefWidth(50).build(); + Button button = new Button("ScrollTo"); + button.setId(SCROLL_TO_BUTTON_ID); + final TextField tf = new TextField("0"); + tf.setId(SCROLL_TO_TEXT_FIELD_ID); + tf.setPrefWidth(50); button.setOnAction(new EventHandler() { public void handle(ActionEvent t) { @@ -418,8 +425,12 @@ private HBox getEditHBox() { HBox hb = new HBox(); - Button button = ButtonBuilder.create().text("Edit").id(EDIT_BUTTON_ID).build(); - final TextField tf = TextFieldBuilder.create().promptText("name").id(EDIT_TEXT_FIELD_ID).prefWidth(50).build(); + Button button = new Button("Edit"); + button.setId(EDIT_BUTTON_ID); + final TextField tf = new TextField(); + tf.setPromptText("name"); + tf.setId(EDIT_TEXT_FIELD_ID); + tf.setPrefWidth(50); button.setOnAction(new EventHandler() { public void handle(ActionEvent t) { @@ -434,11 +445,8 @@ private VBox setEventHandlersHBox() { VBox vb = new VBox(); - Button btn = ButtonBuilder.create() - .text("Set onEdit event hadlers") - .id(BTN_SET_ON_EDIT_EVENT_HANDLERS) - .build(); - + Button btn = new Button("Set onEdit event hadlers"); + btn.setId(BTN_SET_ON_EDIT_EVENT_HANDLERS); btn.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedControl.setOnEditStart(new EventHandler() { @@ -461,11 +469,8 @@ } }); - Button btnAddFactory = ButtonBuilder.create() - .text("Set cell factory for editing") - .id(SET_CELL_FACTORY_FOR_EDITING) - .build(); - + Button btnAddFactory = new Button("Set cell factory for editing"); + btnAddFactory.setId(SET_CELL_FACTORY_FOR_EDITING); btnAddFactory.setOnAction(new EventHandler() { public void handle(ActionEvent t) { testedControl.setCellFactory(new Callback, TreeCell>() { --- old/functional/ControlsTests/src/javafx/scene/control/test/utils/ColorHelper.java 2017-02-15 15:57:46.231355099 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/utils/ColorHelper.java 2017-02-15 15:57:46.179354614 +0300 @@ -30,9 +30,7 @@ import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.TextArea; -import javafx.scene.control.TextAreaBuilder; import javafx.scene.control.TextField; -import javafx.scene.control.TextFieldBuilder; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.stage.Stage; @@ -55,11 +53,15 @@ @Override public void start(final Stage stage) throws Exception { - final TextField xField = TextFieldBuilder.create().promptText("x").build(); - final TextField yField = TextFieldBuilder.create().promptText("y").build(); + final TextField xField = new TextField(); + xField.setPromptText("x"); + final TextField yField = new TextField(); + yField.setPromptText("y"); - final TextArea awtField = TextAreaBuilder.create().promptText("awt").build(); - final TextArea glassField = TextAreaBuilder.create().promptText("glass").build(); + final TextArea awtField = new TextArea(); + awtField.setPromptText("awt"); + final TextArea glassField = new TextArea(); + glassField.setPromptText("glass"); Button act = new Button("Get colors"); act.setOnAction(new EventHandler() { --- old/functional/ControlsTests/src/javafx/scene/control/test/utils/ComponentsFactory.java 2017-02-15 15:57:46.463357260 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/utils/ComponentsFactory.java 2017-02-15 15:57:46.411356776 +0300 @@ -65,8 +65,11 @@ VBox vb = new VBox(); HBox hb1 = new HBox(); - Button button = ButtonBuilder.create().id(FORM_BUTTON_ID).text("Press me").build(); - final TextField tf1 = TextFieldBuilder.create().id(FORM_CLICK_TEXT_FIELD_ID).prefWidth(50).text("0").build(); + Button button = new Button("Press me"); + button.setId(FORM_BUTTON_ID); + final TextField tf1 = new TextField("0"); + tf1.setId(FORM_CLICK_TEXT_FIELD_ID); + tf1.setPrefWidth(50); button.setOnAction((ActionEvent t) -> { tf1.setText(String.valueOf(Integer.parseInt(tf1.getText()) + 1)); }); @@ -76,13 +79,19 @@ ScrollBar sb = new ScrollBar(); sb.setMax(10); sb.setId(FORM_SCROLLBAR_ID); - final TextField tf2 = TextFieldBuilder.create().id(FORM_SCROLL_TEXT_FIELD_ID).prefWidth(50).text("0").build(); + final TextField tf2 = new TextField("0"); + tf2.setId(FORM_SCROLL_TEXT_FIELD_ID); + tf2.setPrefWidth(50); sb.addEventHandler(ScrollEvent.ANY, (ScrollEvent t) -> { tf2.setText(String.valueOf(Integer.parseInt(tf2.getText()) + 1)); }); hb2.getChildren().addAll(sb, tf2); - TextArea ta = TextAreaBuilder.create().minHeight(50).prefHeight(100).prefWidth(50).id(FORM_TEXT_AREA_ID).build(); + TextArea ta = new TextArea(); + ta.setMinHeight(50); + ta.setPrefHeight(100); + ta.setPrefWidth(50); + ta.setId(FORM_TEXT_AREA_ID); for (int i = 0; i < 15; i++) { ta.appendText("text" + i + "\n"); } --- old/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/AbstractPropertyValueSetter.java 2017-02-15 15:57:46.731359757 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/AbstractPropertyValueSetter.java 2017-02-15 15:57:46.643358937 +0300 @@ -29,7 +29,6 @@ import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.Control; import javafx.scene.control.Label; import static javafx.scene.control.test.utils.ptables.StaticLogger.*; @@ -72,7 +71,9 @@ getChildren().addAll(new Label(labelDescription.toUpperCase().substring(0, Math.min(15, labelDescription.length()) - 1)), leadingControl, binding.getVisualRepresentation()); if (btype == BindingType.UNIDIRECTIONAL) { - Button setButton = ButtonBuilder.create().text("set").minWidth(38).id(SET_PREFIX + listeningProperty.getName().toUpperCase()).build(); + Button setButton = new Button("set"); + setButton.setMinWidth(38); + setButton.setId(SET_PREFIX + listeningProperty.getName().toUpperCase()); setAction = new EventHandler() { public void handle(ActionEvent t) { //bindingTB.setSelected(false);I think, that is not obligative. --- old/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/BooleanPropertyValueSetter.java 2017-02-15 15:57:46.959361881 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/BooleanPropertyValueSetter.java 2017-02-15 15:57:46.907361397 +0300 @@ -27,7 +27,6 @@ import javafx.beans.property.Property; import javafx.scene.Node; import javafx.scene.control.ToggleButton; -import javafx.scene.control.ToggleButtonBuilder; import static javafx.scene.control.test.utils.ptables.StaticLogger.*; /** @@ -37,7 +36,7 @@ */ public class BooleanPropertyValueSetter extends AbstractPropertyValueSetter { - private ToggleButton tb = ToggleButtonBuilder.create().text("false").build(); + private ToggleButton tb = new ToggleButton("false"); public BooleanPropertyValueSetter(Property listeningProperty, BindingType btype, Object testedControl) { try { --- old/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/NodeControllerFactory.java 2017-02-15 15:57:47.199364117 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/NodeControllerFactory.java 2017-02-15 15:57:47.139363558 +0300 @@ -89,7 +89,9 @@ @Override public Node getForNode(final ToolBar toolBar, final TabPaneWithControl tabPane) { - final TextField tf = TextFieldBuilder.create().id(TOOLBAR_ADD_INDEX_TEXT_FIELD_ID).text("0").prefWidth(40).build(); + final TextField tf = new TextField("0"); + tf.setId(TOOLBAR_ADD_INDEX_TEXT_FIELD_ID); + tf.setPrefWidth(40); this.getChildren().addAll(new NodesChoserFactory("Add!", new NodesChoserFactory.NodeAction() { @Override @@ -114,8 +116,12 @@ @Override public Node getForNode(final Menu menu, final TabPaneWithControl tabPane) { - final TextField tf = TextFieldBuilder.create().id(MENU_ADD_INDEX_TEXT_FIELD_ID).text("0").prefWidth(40).build(); - final TextField nameTF = TextFieldBuilder.create().id(MENU_ADD_NAME_TEXT_FIELD_ID).text("Menu").prefWidth(40).build(); + final TextField tf = new TextField("0"); + tf.setId(MENU_ADD_INDEX_TEXT_FIELD_ID); + tf.setPrefWidth(40); + final TextField nameTF = new TextField("Menu"); + nameTF.setId(MENU_ADD_NAME_TEXT_FIELD_ID); + nameTF.setPrefWidth(40); this.getChildren().addAll(new NodesChoserFactory("Add!", new NodesChoserFactory.NodeAction() { @Override public void execute(MenuItem node) { @@ -155,8 +161,12 @@ private HBox getPreviousSiblingHBox(final TreeItem item) { HBox hb = new HBox(); - Button button = ButtonBuilder.create().text("Get previous sibling").id(GET_PREVIOUS_SIBLING_TREEITEM_BUTTON_ID).build(); - final TextField tf = TextFieldBuilder.create().text("").promptText("Next sibling").id(GET_PREVIOUS_SIBLING_TREEITEM_TEXTFIELD_ID).prefWidth(100).build(); + Button button = new Button("Get previous sibling"); + button.setId(GET_PREVIOUS_SIBLING_TREEITEM_BUTTON_ID); + final TextField tf = new TextField(""); + tf.setPromptText("Next sibling"); + tf.setId(GET_PREVIOUS_SIBLING_TREEITEM_TEXTFIELD_ID); + tf.setPrefWidth(100); button.setOnAction(new EventHandler() { public void handle(ActionEvent t) { @@ -184,8 +194,12 @@ private HBox getNextSiblingHBox(final TreeItem item) { HBox hb = new HBox(); - Button button = ButtonBuilder.create().text("Get next sibling").id(GET_NEXT_SIBLING_TREEITEM_BUTTON_ID).build(); - final TextField tf = TextFieldBuilder.create().text("").promptText("Next sibling").id(GET_NEXT_SIBLING_TREEITEM_TEXTFIELD_ID).prefWidth(100).build(); + Button button = new Button("Get next sibling"); + button.setId(GET_NEXT_SIBLING_TREEITEM_BUTTON_ID); + final TextField tf = new TextField(""); + tf.setPromptText("Next sibling"); + tf.setId(GET_NEXT_SIBLING_TREEITEM_TEXTFIELD_ID); + tf.setPrefWidth(100); button.setOnAction(new EventHandler() { public void handle(ActionEvent t) { @@ -203,8 +217,12 @@ } private HBox getChangeValueHBox(final TreeItem item) { - Button button = ButtonBuilder.create().text("change value to").id(CHANGE_VALUE_BUTTON_ID).build(); - final TextField tfNew = TextFieldBuilder.create().promptText("new value").id(NEW_VALUE_TEXT_FIELD_ID).prefWidth(50).build(); + Button button = new Button("change value to"); + button.setId(CHANGE_VALUE_BUTTON_ID); + final TextField tfNew = new TextField(); + tfNew.setPromptText("new value"); + tfNew.setId(NEW_VALUE_TEXT_FIELD_ID); + tfNew.setPrefWidth(50); button.setOnAction(new EventHandler() { public void handle(ActionEvent t) { --- old/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/NumberPropertyValueSetter.java 2017-02-15 15:57:47.439366353 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/NumberPropertyValueSetter.java 2017-02-15 15:57:47.391365906 +0300 @@ -33,7 +33,6 @@ import javafx.scene.Node; import javafx.scene.control.Label; import javafx.scene.control.Slider; -import javafx.scene.control.SliderBuilder; import static javafx.scene.control.test.utils.ptables.StaticLogger.*; import javafx.scene.input.MouseEvent; import javafx.scene.layout.VBox; @@ -87,8 +86,22 @@ private void applyRangesChangers(final Slider slider) { final Popup popupWithControllers = new Popup(); - Slider minValue = SliderBuilder.create().prefWidth(300).min(1).max(9).minorTickCount(4).majorTickUnit(2).showTickLabels(true).showTickMarks(true).build(); - Slider maxValue = SliderBuilder.create().prefWidth(300).min(1).max(9).minorTickCount(4).majorTickUnit(2).showTickLabels(true).showTickMarks(true).build(); + Slider minValue = new Slider(); + minValue.setPrefWidth(300); + minValue.setMin(1); + minValue.setMax(9); + minValue.setMinorTickCount(4); + minValue.setMajorTickUnit(2); + minValue.setShowTickLabels(true); + minValue.setShowTickMarks(true); + Slider maxValue = new Slider(); + maxValue.setPrefWidth(300); + maxValue.setMin(1); + maxValue.setMax(9); + maxValue.setMinorTickCount(4); + maxValue.setMajorTickUnit(2); + maxValue.setShowTickLabels(true); + maxValue.setShowTickMarks(true); maxValue.valueProperty().addListener(new ChangeListener() { public void changed(ObservableValue ov, Object t, Object t1) { @@ -143,7 +156,17 @@ private Slider createSlider(double minValue, double maxValue, double defaultValue, String sliderId) { try { - return SliderBuilder.create().prefWidth(100).id(sliderId).min(minValue).max(maxValue).value(defaultValue).minorTickCount(4).majorTickUnit((maxValue - minValue) / 4).showTickLabels(true).showTickMarks(true).build(); + Slider temp = new Slider(); + temp.setPrefWidth(100); + temp.setId(sliderId); + temp.setMin(minValue); + temp.setMax(maxValue); + temp.setValue(defaultValue); + temp.setMinorTickCount(4); + temp.setMajorTickUnit((maxValue - minValue) / 4); + temp.setShowTickLabels(true); + temp.setShowTickMarks(true); + return temp; } catch (Throwable ex) { log(ex); } --- old/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertiesTable.java 2017-02-15 15:57:47.675368552 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertiesTable.java 2017-02-15 15:57:47.619368030 +0300 @@ -36,7 +36,6 @@ import javafx.beans.property.ReadOnlyProperty; import javafx.scene.Node; import javafx.scene.layout.FlowPane; -import javafx.scene.layout.FlowPaneBuilder; import javafx.scene.layout.VBox; import static javafx.scene.control.test.utils.ptables.AbstractApplicationPropertiesRegystry.DEFAULT_DOMAIN_NAME; @@ -78,8 +77,8 @@ public final static String PROPERTIES_TABLE_SUFFIX_ID = "_PROPERTY_TABLE_ID"; private final VBox linesVBox = new VBox(5); - private final FlowPane countersFlowPane = FlowPaneBuilder.create().vgap(5).hgap(5).build(); - private final FlowPane listenersFlowPane = FlowPaneBuilder.create().vgap(5).hgap(5).build(); + private final FlowPane countersFlowPane; + private final FlowPane listenersFlowPane; private final Object testedControl; private String domainName; /** @@ -97,6 +96,12 @@ public PropertiesTable(Object testedControl) { super(5); + countersFlowPane = new FlowPane(); + countersFlowPane.setVgap(5); + countersFlowPane.setHgap(5); + listenersFlowPane = new FlowPane(); + listenersFlowPane.setVgap(5); + listenersFlowPane.setHgap(5); this.domainName = DEFAULT_DOMAIN_NAME; this.setId(DEFAULT_DOMAIN_NAME + PROPERTIES_TABLE_SUFFIX_ID); getChildren().add(0, countersFlowPane); @@ -151,7 +156,10 @@ @Override public void addDoublePropertyLine(final DoubleProperty bindableProperty, double min, double max, double initial, Object owningObject) { AbstractPropertyController controller = new PropertyValueController(bindableProperty, testedControl, min, initial, max); - propertyControllers.put(bindableProperty.getName().toUpperCase(), controller); + AbstractPropertyController old_controller = propertyControllers.put(bindableProperty.getName().toUpperCase(), controller); + if (old_controller != null) { + linesVBox.getChildren().remove(old_controller.getVisualRepresentation()); + } linesVBox.getChildren().add(controller.getVisualRepresentation()); } --- old/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyTablesFactory.java 2017-02-15 15:57:47.931370937 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyTablesFactory.java 2017-02-15 15:57:47.871370378 +0300 @@ -44,11 +44,11 @@ import javafx.scene.image.Image; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; -import javafx.scene.shape.PolygonBuilder; import javafx.scene.shape.Rectangle; import javafx.scene.text.Font; import javafx.scene.text.Text; import java.time.chrono.Chronology; +import javafx.scene.shape.Polygon; /** * @author Alexander Kirov @@ -192,12 +192,14 @@ possibleNodes.add(new Rectangle(0, 0, 10, 10)); possibleNodes.add(ComponentsFactory.createCustomContent(25, 25)); possibleNodes.add(new Circle(6.75, Color.RED)); - possibleNodes.add(PolygonBuilder.create().fill(Color.GREEN).points(new Double[]{ - 0.0, 7.0, - 5.0, 20.0, - 15.0, 20.0, - 20.0, 7.0, - 10.0, 0.0,}).build()); + Polygon temp = new Polygon(new double[]{ + 0.0, 7.0, + 5.0, 20.0, + 15.0, 20.0, + 20.0, 7.0, + 10.0, 0.0,}); + temp.setFill(Color.GREEN); + possibleNodes.add(temp); tb.addObjectEnumPropertyLine(property, possibleNodes, owningObject); } --- old/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyValueListener.java 2017-02-15 15:57:48.171373173 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyValueListener.java 2017-02-15 15:57:48.115372651 +0300 @@ -28,13 +28,11 @@ import javafx.beans.property.ReadOnlyProperty; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; -import javafx.scene.control.LabelBuilder; +import javafx.scene.control.Label; import javafx.scene.control.TextField; -import javafx.scene.control.TextFieldBuilder; import javafx.scene.control.Tooltip; -import javafx.scene.control.TreeTableColumn; -import javafx.scene.layout.HBox; import static javafx.scene.control.test.utils.ptables.StaticLogger.*; +import javafx.scene.layout.HBox; /** * @author Alexander Kirov @@ -57,7 +55,7 @@ public final static String LISTENER_SUFFIX = "_LISTENER_ID"; private ReadOnlyProperty listenedProperty; private Object owningObject; - private TextField receivedValueTF = TextFieldBuilder.create().minWidth(50).maxWidth(110).build(); + private TextField receivedValueTF = new TextField(); private boolean someStateWasRemembered = false; private ValueType rememberedState = null; private int rememberedChangeCountValue = -1; @@ -77,6 +75,8 @@ public PropertyValueListener(String labelDescription, ReadOnlyProperty listenedProperty, String textFieldId, Object owningObject, Boolean showCounters) { this.owningObject = owningObject; + receivedValueTF.setMinWidth(50); + receivedValueTF.setMaxWidth(110); receivedValueTF.setId(textFieldId); receivedValueTF.setTooltip(new Tooltip()); if (listenedProperty.getName().contains("BOUNDS")) { @@ -85,7 +85,9 @@ } this.listenedProperty = listenedProperty; counter = new PropertyValueCounter(listenedProperty); - getChildren().add(LabelBuilder.create().text(labelDescription).prefWidth(100).build()); + Label temp = new Label(labelDescription); + temp.setPrefWidth(100); + getChildren().add(temp); if (showCounters) { getChildren().add(counter.getVisualRepresentation()); } --- old/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/StringPropertyValueSetter.java 2017-02-15 15:57:48.403375334 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/StringPropertyValueSetter.java 2017-02-15 15:57:48.351374850 +0300 @@ -27,7 +27,6 @@ import javafx.beans.property.Property; import javafx.scene.Node; import javafx.scene.control.TextField; -import javafx.scene.control.TextFieldBuilder; import static javafx.scene.control.test.utils.ptables.StaticLogger.*; /** @@ -39,7 +38,8 @@ public StringPropertyValueSetter(Property listeningProperty, BindingType btype, Object testedControl, String initialString) { try { - final TextField tf = TextFieldBuilder.create().text(initialString).id(createId(listeningProperty, btype)).build(); + final TextField tf = new TextField(initialString); + tf.setId(createId(listeningProperty, btype)); this.leadingControl = tf; this.leadingProperty = (Property) tf.textProperty(); this.listeningProperty = listeningProperty; --- old/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/TextFieldEventsCounter.java 2017-02-15 15:57:48.643377570 +0300 +++ new/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/TextFieldEventsCounter.java 2017-02-15 15:57:48.583377011 +0300 @@ -30,9 +30,7 @@ import javafx.beans.value.ObservableValue; import javafx.scene.Node; import javafx.scene.control.Label; -import javafx.scene.control.LabelBuilder; import javafx.scene.control.TextField; -import javafx.scene.control.TextFieldBuilder; import static javafx.scene.control.test.utils.ptables.StaticLogger.*; import javafx.scene.control.test.utils.ptables.TextFieldEventsCounter.Count; import javafx.scene.layout.HBox; @@ -54,8 +52,11 @@ } try { this.counterName = counterName; - Label label = LabelBuilder.create().text(counterName + " : ").prefWidth((new Text(counterName + " : ")).getBoundsInParent().getWidth() + 30).build(); - final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(counterName.toUpperCase() + COUNTER_SUFFIX).build(); + Label label = new Label(counterName + " : "); + label.setPrefWidth((new Text(counterName + " : ")).getBoundsInParent().getWidth() + 30); + final TextField tf = new TextField("0"); + tf.setPrefWidth(50); + tf.setId(counterName.toUpperCase() + COUNTER_SUFFIX); counter.addListener(new ChangeListener() { public void changed(ObservableValue ov, Number t, Number t1) { log("Counter " + counterName + ": new value : <" + t1 + ">."); --- old/functional/ControlsTests/src/javafx/scrollEvent/ScrollEventApp.java 2017-02-15 15:57:48.911380067 +0300 +++ new/functional/ControlsTests/src/javafx/scrollEvent/ScrollEventApp.java 2017-02-15 15:57:48.843379434 +0300 @@ -38,14 +38,15 @@ import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.CheckBox; import javafx.scene.control.ChoiceBox; +import javafx.scene.control.ComboBox; import javafx.scene.control.ContextMenu; +import javafx.scene.control.Control; +import javafx.scene.control.DatePicker; import javafx.scene.control.Label; import javafx.scene.control.MenuItem; import javafx.scene.control.TextField; -import javafx.scene.control.TextFieldBuilder; import javafx.scene.input.ContextMenuEvent; import javafx.scene.input.ScrollEvent; import javafx.scene.layout.FlowPane; @@ -96,13 +97,14 @@ private Node createNodeChooser() { VBox vb = new VBox(5); Label scrollEventCame = new Label("Scroll event came : "); - final TextField eventComeIndicator = TextFieldBuilder.create().text("None").id(EVENT_COME_INDICATOR_TEXT_FIELD_ID).build(); + final TextField eventComeIndicator = new TextField("None"); + eventComeIndicator.setId(EVENT_COME_INDICATOR_TEXT_FIELD_ID); HBox hb = new HBox(); hb.getChildren().addAll(scrollEventCame, eventComeIndicator); - Button resetButton = ButtonBuilder.create().text("Reset").id(RESET_BUTTON_ID).build(); + Button resetButton = new Button("Reset"); + resetButton.setId(RESET_BUTTON_ID); resetButton.setOnAction(new EventHandler() { - public void handle(ActionEvent t) { eventComeIndicator.setText("None"); clearListenersState(); @@ -140,7 +142,7 @@ } }); } else { - node.setOnContextMenuRequested(new EventHandler() { + EventHandler handler = new EventHandler() { public void handle(ContextMenuEvent t) { renewListenerValue("eventType", t.getEventType()); renewListenerValue("consumed", t.isConsumed()); @@ -149,13 +151,30 @@ getContextMenu().show(node, t.getScreenX(), t.getScreenY()); t.consume(); } - }); + }; + node.setOnContextMenuRequested(handler); + TextField editor = null; + if (node instanceof DatePicker) { + editor = ((DatePicker)node).getEditor(); + } + if (node instanceof ComboBox) { + editor = ((ComboBox)node).getEditor(); + } + if (editor != null) { + editor.setOnContextMenuRequested(handler); + } } node.setId(ID_TARGET_NODE); spaceForNode.getChildren().clear(); spaceForNode.getChildren().add(node); - + node.setPickOnBounds(true); + if (node instanceof Control) { + ((Control)node).setPrefWidth(200); + ((Control)node).setPrefHeight(200); + ((Control)node).setMinWidth(200); + ((Control)node).setMinHeight(200); + } clearListenersState(); } }); @@ -196,7 +215,8 @@ private HBox getListener(String name) { HBox hb = new HBox(); Label label = new Label(name + " : "); - TextField tf = TextFieldBuilder.create().id(getListenerTextFieldID(name)).build(); + TextField tf = new TextField(); + tf.setId(getListenerTextFieldID(name)); hm.put(name, tf); hb.getChildren().addAll(label, tf); --- old/functional/ControlsTests/test/javafx/scene/control/test/ListView/NewListViewTest.java 2017-02-15 15:57:49.175382527 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/ListView/NewListViewTest.java 2017-02-15 15:57:49.119382005 +0300 @@ -239,8 +239,6 @@ requestFocusOnControl(testedControl); - testedControl.keyboard().pushKey(KeyboardButtons.DOWN); - testedControl.keyboard().pressKey(KeyboardButtons.SHIFT); try { for (int i = 1; i < 5; i++) { @@ -314,10 +312,10 @@ } private void checkScrollingState(final double scrollValue, boolean beginVisible, boolean endVisible, int size, final Orientation orientation) { - //assertEquals(findScrollBar(testedControl.as(Parent.class, Node.class), orientation, true).getControl().getValue(), scrollValue, 0.01); + //assertEquals(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), orientation, true).getControl().getValue(), scrollValue, 0.01); testedControl.waitState(new State() { public Object reached() { - Wrap sb = findScrollBar(testedControl.as(Parent.class, Node.class), orientation, true); + Wrap sb = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), orientation, true); if (Math.abs(sb.getControl().getValue() - scrollValue) < 0.01) { return true; } else { @@ -370,16 +368,16 @@ @Test(timeout = 300000) public void verticalScrollBarBehaviorOnAddingDeletingTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 50); - assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null); + assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null); addElements(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); - assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null); + assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 500); - assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null); + assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 50); for (int i = 0; i < 10; i++) { removeFromPos(0); } - assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null); + assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null); } //Test//RT-17538//Test removed, as non actual (bug - is not a bug). @@ -390,11 +388,11 @@ addTextFieldAtPos(1); addRectangleAtPos(2); - Wrap sb = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); + Wrap sb = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); ScrollingChecker sc = new ScrollingChecker(sb.getControl().valueProperty()); testedControl.mouse().move(); for (int i = 0; i < 8; i++) { - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1); sc.checkChanging(+1); } } @@ -460,8 +458,8 @@ setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, Orientation.HORIZONTAL, Properties.orientation); - checkScreenshot("ListView_scrollBarSize1Test_HorizontalScroll_1", findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true)); - checkScreenshot("ListView_scrollBarSize1Test_VerticalScroll_1", findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true)); + checkScreenshot("ListView_scrollBarSize1Test_HorizontalScroll_1", findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true)); + checkScreenshot("ListView_scrollBarSize1Test_VerticalScroll_1", findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true)); throwScreenshotError(); } @@ -473,7 +471,7 @@ addRectangleAtPos(0); addRectangleAtPos(0); - checkScreenshot("ListView_HorizontalScroll_2", findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true)); + checkScreenshot("ListView_HorizontalScroll_2", findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true)); throwScreenshotError(); } @@ -487,10 +485,10 @@ addRectangleAtPos(0); for (int i = 0; i < 100; i++) { - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1); } - assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null); + assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null); } @ScreenshotCheck @@ -517,9 +515,10 @@ setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, Orientation.HORIZONTAL, Properties.orientation); setSize(150, 150); addRectangleAtPos(0); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+20); + int scroll_value = Utils.isMacOS() ? -20 : +20; + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(scroll_value); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+20); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(scroll_value); checkScreenshot("ListView_ScrollingIssue_1", testedControl); throwScreenshotError(); @@ -534,15 +533,15 @@ Thread.sleep(500); for (int i = 0; i < 20; i++) { - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1); } for (int i = 0; i < 20; i++) { - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1); } setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, Orientation.HORIZONTAL, Properties.orientation); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+20); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+20); checkScreenshot("ListView_ScrollingIssue_2", testedControl); throwScreenshotError(); } @@ -554,8 +553,8 @@ setSize(150, 150); addRectangleAtPos(0); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+20); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+20); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+20); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+20); checkScreenshot("ListView_ScrollingIssue_3", testedControl); throwScreenshotError(); } @@ -569,13 +568,13 @@ testedControl.keyboard().pushKey(KeyboardButtons.DOWN); testedControl.keyboard().pushKey(KeyboardButtons.DOWN); - checkListener(Listeners.focusedIndex, 1); - addElement("0", 0); checkListener(Listeners.focusedIndex, 2); - addElement("0", 2); + addElement("0", 0); checkListener(Listeners.focusedIndex, 3); + addElement("0", 2); + checkListener(Listeners.focusedIndex, 4); addElement("0", 4); - checkListener(Listeners.focusedIndex, 3); + checkListener(Listeners.focusedIndex, 5); } //Test//RT-17539//Test removed because developers don't count size of content. @@ -589,12 +588,12 @@ checkScreenshot("ListView_ScrollBarKnobSizeIssue_1", testedControl); for (int i = 0; i < 20; i++) { - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1); } checkScreenshot("ListView_ScrollBarKnobSizeIssue_2", testedControl); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+10); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+10); checkScreenshot("ListView_ScrollBarKnobSizeIssue_3", testedControl); throwScreenshotError(); @@ -614,12 +613,6 @@ requestFocusOnControl(testedControl); - Thread.sleep(SLEEP); - - testedControl.keyboard().pushKey(KeyboardButtons.DOWN); - - Thread.sleep(SLEEP); - //Testing section try { for (int i = 0; i < 5; i++) { @@ -652,18 +645,12 @@ setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, SelectionMode.MULTIPLE, Properties.selectionMode); setSize(130, 130); - selectionHelper = new MultipleSelectionHelper(1, DATA_ITEMS_NUM); + selectionHelper = new MultipleSelectionHelper(1, 10); selectionHelper.setSingleCell(false); selectionHelper.setMultiple(true); requestFocusOnControl(testedControl); - Thread.sleep(SLEEP); - - testedControl.keyboard().pushKey(KeyboardButtons.DOWN); - - Thread.sleep(SLEEP); - //Testing section try { for (int i = 0; i < 2; i++) { @@ -733,12 +720,6 @@ requestFocusOnControl(testedControl); - Thread.sleep(SLEEP); - - testedControl.keyboard().pushKey(KeyboardButtons.DOWN); - - Thread.sleep(SLEEP); - //Testing section try { for (int i = 0; i < 2; i++) { @@ -786,12 +767,6 @@ requestFocusOnControl(testedControl); - Thread.sleep(SLEEP); - - testedControl.keyboard().pushKey(KeyboardButtons.DOWN); - - Thread.sleep(SLEEP); - //Testing section try { for (int i = 0; i < 2; i++) { @@ -899,6 +874,7 @@ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 200); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 200); setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, SelectionMode.MULTIPLE, Properties.selectionMode); + selectionHelper.setMultiple(true); setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, Orientation.HORIZONTAL, Properties.orientation); final int elementsCount = 50; @@ -910,6 +886,8 @@ Wrap cellWrap = getCellWrap((Integer) (0)); //mouse will be over the second item. cellWrap.as(Showable.class).shower().show(); cellWrap.mouse().click(1, cellWrap.getClickPoint(), Mouse.MouseButtons.BUTTON1, CTRL_DOWN_MASK_OS); + selectionHelper.click(0, 0, KeyboardButtons.CONTROL); + checkSelection(); KeyboardButtons lessKey = (orientation == Orientation.HORIZONTAL ? KeyboardButtons.LEFT : KeyboardButtons.UP); KeyboardButtons moreKey = (orientation == Orientation.HORIZONTAL ? KeyboardButtons.RIGHT : KeyboardButtons.DOWN); --- old/functional/ControlsTests/test/javafx/scene/control/test/ListView/TestBase.java 2017-02-15 15:57:49.419384800 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/ListView/TestBase.java 2017-02-15 15:57:49.363384278 +0300 @@ -49,6 +49,7 @@ import org.jemmy.fx.control.ListItemWrap.ListItemByObjectLookup; import org.jemmy.interfaces.Keyboard.KeyboardButtons; import org.jemmy.interfaces.Keyboard.KeyboardModifiers; +import static org.jemmy.interfaces.Keyboard.KeyboardModifiers.META_DOWN_MASK; import org.jemmy.interfaces.Mouse; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Selectable; @@ -235,8 +236,8 @@ * Checks visibility states of horizontal and vertical scrollBars. */ protected void checkScrollbarsStates(boolean horizontalVisibility, boolean verticalVisibility) { - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, horizontalVisibility) == null); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, verticalVisibility) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, horizontalVisibility) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, verticalVisibility) == null); } /** @@ -261,9 +262,13 @@ @Override public void run(Object... os) throws Exception { ListView lv = (ListView) os[0]; + selectionHelper.setRowsNum(elemCount); for (int i = 0; i < elemCount; i++) { if (Integer.valueOf((String) lv.getItems().get(i)) % 2 == 0) { lv.getSelectionModel().select(i); + selectionHelper.push(KeyboardButtons.SPACE, KeyboardModifiers.CTRL_DOWN_MASK); + selectionHelper.push(KeyboardButtons.DOWN, KeyboardModifiers.CTRL_DOWN_MASK); + selectionHelper.push(KeyboardButtons.DOWN, KeyboardModifiers.CTRL_DOWN_MASK); } } } @@ -273,10 +278,10 @@ protected void checkScreenshotsWithStep(String name, final int elementsCount, final int step) throws Throwable { Wrap cellWrap = getCellWrap((Integer) (0)); //mouse will be over the second item. cellWrap.as(Showable.class).shower().show(); - cellWrap.mouse().click(1, cellWrap.getClickPoint(), Mouse.MouseButtons.BUTTON1, CTRL_DOWN_MASK_OS); + cellWrap.mouse().click(1, cellWrap.getClickPoint(), Mouse.MouseButtons.BUTTON1, Utils.isMacOS() ? META_DOWN_MASK : CTRL_DOWN_MASK_OS); for (int i = 0; i < elementsCount / step; i++) { for (int j = 0; j < step; j++) { - testedControl.keyboard().pushKey(KeyboardButtons.RIGHT, CTRL_DOWN_MASK_OS); + testedControl.keyboard().pushKey(KeyboardButtons.RIGHT, Utils.isMacOS() ? META_DOWN_MASK : CTRL_DOWN_MASK_OS); } checkScreenshot("ListView_" + name + "_" + i, testedControl); } @@ -296,6 +301,7 @@ System.out.println(SelectionFormatter.format("Helper selection: ", helper_selected, "Selection: ", selected)); System.out.println("Helper focus : " + helper_selection); System.out.println("Focus : " + selection); + System.out.println("Helper anchor : " + selectionHelper.anchor + "\n\n"); System.out.println("Anchor : " + selectionHelper.anchor + "\n\n"); if (((helper_selected.size() == selected.size()) --- old/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/LabelsMnemonicsTest.java 2017-02-15 15:57:49.663387073 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/LabelsMnemonicsTest.java 2017-02-15 15:57:49.603386514 +0300 @@ -46,7 +46,7 @@ /** * Class provides tests for mnemonics behavior. - * According to the Mnemonics spec + * According to the mnemonics spec, * mnemonics are platform specific. Therefore tests design is aimed to * consider the difference between platforms and to avoid boilerplate. * @@ -227,4 +227,4 @@ scene.keyboard().pushKey(KeyboardButtons.ALT); } } -} \ No newline at end of file +} --- old/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/MnemonicsTestBase.java 2017-02-15 15:57:49.995390167 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/MnemonicsTestBase.java 2017-02-15 15:57:49.871389011 +0300 @@ -123,9 +123,8 @@ for (int x = 0; x < text_bounds.width; x++) { final Text control = text_wrap.getControl(); final int charIndex = new GetAction() { - @Override public void run(Object... os) throws Exception { - setResult(control.impl_hitTestChar(new Point2D((Integer)os[0], (Integer)os[1] - control.getBaselineOffset())).getCharIndex()); + setResult(control.hitTest(new Point2D((Integer)os[0], (Integer)os[1] - control.getBaselineOffset())).getCharIndex()); } }.dispatch(wrap.getEnvironment(), x, y); if (bounds_array.get(charIndex) == null) { --- old/functional/ControlsTests/test/javafx/scene/control/test/ScrollPane/ScrollPaneTest.java 2017-02-15 15:57:50.263392663 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/ScrollPane/ScrollPaneTest.java 2017-02-15 15:57:50.199392067 +0300 @@ -77,6 +77,9 @@ @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ScrollPane.vmax.DEFAULT", "javafx.scene.control.ScrollPane.vmax.GET"}, level = Level.FULL) public void checkVMaxOptionTest() throws InterruptedException { + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100); + Assert.assertEquals((new ScrollPane()).vmaxProperty().getValue(), 1, commonComparePrecision); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vmax, 200); @@ -85,17 +88,17 @@ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vvalue, 200); checkTextFieldValue(Properties.vvalue, 200); - Wrap sb1 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); + Wrap sb1 = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); sb1.as(AbstractScroll.class).to(0); checkTextFieldValue(Properties.vvalue, 0); - Wrap sb2 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); + Wrap sb2 = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); sb2.as(AbstractScroll.class).to(200); checkTextFieldValue(Properties.vvalue, 200); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(-1 * (Utils.isMacOS() ? -1 : 1)); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(-1 * (Utils.isMacOS() ? -1 : 1)); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1 * (Utils.isMacOS() ? -1 : 1)); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1 * (Utils.isMacOS() ? -1 : 1)); checkTextFieldValue(Properties.vvalue, 200); setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.vmax, 150); @@ -109,6 +112,9 @@ @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ScrollPane.vmin.DEFAULT", "javafx.scene.control.ScrollPane.vmin.GET"}, level = Level.FULL) public void checkVMinOptionTest() throws InterruptedException { + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100); + Assert.assertEquals((new ScrollPane()).vminProperty().getValue(), 0, commonComparePrecision); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vmin, -100); @@ -117,17 +123,17 @@ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vvalue, -100); checkTextFieldValue(Properties.vvalue, -100); - Wrap sb1 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); + Wrap sb1 = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); sb1.as(AbstractScroll.class).to(1); checkTextFieldValue(Properties.vvalue, 1); - Wrap sb2 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); + Wrap sb2 = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); sb2.as(AbstractScroll.class).to(-100); checkTextFieldValue(Properties.vvalue, -100); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1 * (Utils.isMacOS() ? -1 : 1)); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1 * (Utils.isMacOS() ? -1 : 1)); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(-1 * (Utils.isMacOS() ? -1 : 1)); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(-1 * (Utils.isMacOS() ? -1 : 1)); checkTextFieldValue(Properties.vvalue, -100); setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.vmin, -50); @@ -141,6 +147,9 @@ @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ScrollPane.hmax.DEFAULT", "javafx.scene.control.ScrollPane.hmax.GET"}, level = Level.FULL) public void checkHMaxOptionTest() throws InterruptedException { + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100); + Assert.assertEquals((new ScrollPane()).hmaxProperty().getValue(), 1, commonComparePrecision); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmax, 200); @@ -149,17 +158,17 @@ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hvalue, 200); checkTextFieldValue(Properties.hvalue, 200); - Wrap sb1 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); + Wrap sb1 = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); sb1.as(AbstractScroll.class).to(0); checkTextFieldValue(Properties.hvalue, 0); - Wrap sb2 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); + Wrap sb2 = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); sb2.as(AbstractScroll.class).to(200); checkTextFieldValue(Properties.hvalue, 200); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(-1); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(-1); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1); checkTextFieldValue(Properties.hvalue, 200); setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.hmax, 150); @@ -173,6 +182,9 @@ @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ScrollPane.hmin.DEFAULT", "javafx.scene.control.ScrollPane.hmin.GET"}, level = Level.FULL) public void checkHMinOptionTest() throws InterruptedException { + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100); + Assert.assertEquals((new ScrollPane()).vminProperty().getValue(), 0, commonComparePrecision); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmin, -100); @@ -181,17 +193,17 @@ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hvalue, -100); checkTextFieldValue(Properties.hvalue, -100); - Wrap sb1 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); + Wrap sb1 = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); sb1.as(AbstractScroll.class).to(1); checkTextFieldValue(Properties.hvalue, 1); - Wrap sb2 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); + Wrap sb2 = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); sb2.as(AbstractScroll.class).to(-100); checkTextFieldValue(Properties.hvalue, -100); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1); - findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(-1); + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(-1); checkTextFieldValue(Properties.hvalue, -100); setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.hmin, -50); @@ -207,6 +219,9 @@ Assert.assertEquals((new ScrollPane()).hvalueProperty().getValue(), 0, commonComparePrecision); Assert.assertEquals((new ScrollPane()).vvalueProperty().getValue(), 0, commonComparePrecision); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hvalue, 200); checkTextFieldValue(Properties.hvalue, 1); @@ -228,11 +243,11 @@ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 150); checkTextFieldValue(Properties.prefViewportHeight, 150); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null); setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.prefViewportHeight, 230); checkTextFieldValue(Properties.prefViewportHeight, 230); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null); } /** @@ -246,11 +261,11 @@ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 150); checkTextFieldValue(Properties.prefViewportWidth, 150); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null); setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.prefViewportWidth, 230); checkTextFieldValue(Properties.prefViewportWidth, 230); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null); } @Test(timeout = 300000) @@ -321,8 +336,8 @@ }; private void checkScrollbarsVisibility(boolean horizontalVisible, boolean verticalVisible) { - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, horizontalVisible) == null); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, verticalVisible) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, horizontalVisible) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, verticalVisible) == null); } @Smoke @@ -372,7 +387,7 @@ checkScrollbarsVisibility(true, true); break; case AS_NEEDED: - checkScrollbarsVisibility(true, true); + checkScrollbarsVisibility(false, false); break; case NEVER: checkScrollbarsVisibility(false, false); @@ -402,6 +417,9 @@ @ScreenshotCheck @Test(timeout = 300000) public void dynamicContentChangingTest() throws Throwable { + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100); + changeContent(); //If content has really changed, button will be searchable. //If content didn't change, button won't be on scene. @@ -443,8 +461,8 @@ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, size * 2); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, size * 2); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null); Point controlSize = new GetAction() { @Override @@ -460,8 +478,8 @@ } }.dispatch(Root.ROOT.getEnvironment(), testedControl.getControl()); - double verticalScrollBarWidth = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).getScreenBounds().width; - double horizontalScrollBarHeight = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).getScreenBounds().height; + double verticalScrollBarWidth = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).getScreenBounds().width; + double horizontalScrollBarHeight = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).getScreenBounds().height; Assert.assertEquals(viewPortSize.x + verticalScrollBarWidth, controlSize.x, commonComparePrecision); Assert.assertEquals(viewPortSize.y + horizontalScrollBarHeight, controlSize.y, commonComparePrecision); @@ -471,6 +489,9 @@ @ScreenshotCheck @Test(timeout = 300000) public void whiteGapTest() throws InterruptedException, Throwable { + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmax, 200); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmin, 50); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hvalue, 200); @@ -489,6 +510,9 @@ @ScreenshotCheck @Test(timeout = 300000)//RT-17350 public void immediateHVBarPoliticApplyingTest() throws Throwable { + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100); + setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, ScrollPane.ScrollBarPolicy.ALWAYS, Properties.hbarPolicy); setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, ScrollPane.ScrollBarPolicy.NEVER, Properties.hbarPolicy); @@ -531,6 +555,9 @@ @ScreenshotCheck @Test(timeout = 300000) public void insideTraversalCheckTest() throws Throwable { + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100); + setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100); + changeContent(); clickContentButton(); @@ -562,14 +589,14 @@ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 201); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 201); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 200); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 200); - Assert.assertTrue(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) != null); - Assert.assertTrue(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) != null); + Assert.assertTrue(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) != null); + Assert.assertTrue(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) != null); currentSettingOption = temp; } @@ -721,8 +748,8 @@ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 100); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 100); - Wrap vertical = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); - Wrap horizontal = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); + Wrap vertical = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); + Wrap horizontal = findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); ScrollingChecker scV = new ScrollingChecker(vertical.getControl().valueProperty()); ScrollingChecker scH = new ScrollingChecker(horizontal.getControl().valueProperty()); @@ -765,8 +792,8 @@ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, size * 2); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, size * 2); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null); - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null); + Assert.assertFalse(findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null); Bounds bounds = new GetAction() { @Override @@ -782,8 +809,8 @@ } }.dispatch(Root.ROOT.getEnvironment(), testedControl.getControl()); - Assert.assertEquals(viewPortSize.x, bounds.getWidth() + findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).getScreenBounds().getWidth(), commonComparePrecision); - Assert.assertEquals(viewPortSize.y, bounds.getHeight() + findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).getScreenBounds().getHeight(), commonComparePrecision); + Assert.assertEquals(viewPortSize.x, bounds.getWidth() + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).getScreenBounds().getWidth(), commonComparePrecision); + Assert.assertEquals(viewPortSize.y, bounds.getHeight() + findScrollBar((Parent) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).getScreenBounds().getHeight(), commonComparePrecision); } } --- old/functional/ControlsTests/test/javafx/scene/control/test/cell/CellsTestBase.java 2017-02-15 15:57:50.511394974 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/cell/CellsTestBase.java 2017-02-15 15:57:50.459394489 +0300 @@ -26,11 +26,9 @@ import client.test.Smoke; import com.sun.glass.ui.Application; -import com.sun.javafx.scene.control.skin.LabeledText; +import com.sun.javafx.scene.control.LabeledText; import java.util.ArrayList; import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; import javafx.collections.ObservableList; import javafx.scene.Node; import javafx.scene.Scene; --- old/functional/ControlsTests/test/javafx/scene/control/test/cell/TableCellsTest.java 2017-02-15 15:57:50.751397210 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/cell/TableCellsTest.java 2017-02-15 15:57:50.695396688 +0300 @@ -25,7 +25,7 @@ package javafx.scene.control.test.cell; import client.test.Smoke; -import com.sun.javafx.scene.control.skin.LabeledText; +import com.sun.javafx.scene.control.LabeledText; import java.util.Map; import javafx.collections.FXCollections; import javafx.collections.ObservableList; @@ -155,4 +155,4 @@ } }.dispatch(testedControl.getEnvironment()); } -} \ No newline at end of file +} --- old/functional/ControlsTests/test/javafx/scene/control/test/choicebox/ChoiceTest.java 2017-02-15 15:57:50.979399334 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/choicebox/ChoiceTest.java 2017-02-15 15:57:50.927398849 +0300 @@ -26,7 +26,7 @@ import client.test.ScreenshotCheck; import client.test.Smoke; -import com.sun.javafx.scene.control.skin.LabeledText; +import com.sun.javafx.scene.control.LabeledText; import javafx.collections.ObservableList; import javafx.commons.SortValidator; import javafx.scene.Node; @@ -358,4 +358,4 @@ checkScreenshot("ChoiceBox-selection" + (i + 1), testPane); } } -} \ No newline at end of file +} --- old/functional/ControlsTests/test/javafx/scene/control/test/combobox/ComboBoxTest.java 2017-02-15 15:57:51.227401645 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/combobox/ComboBoxTest.java 2017-02-15 15:57:51.155400974 +0300 @@ -33,6 +33,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import javafx.beans.value.ObservableValue; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.commons.SortValidator; @@ -61,6 +62,7 @@ import javafx.util.Callback; import javafx.util.StringConverter; import javafx.util.converter.FormatStringConverter; +import org.jemmy.Point; import org.jemmy.action.GetAction; import org.jemmy.control.Wrap; import org.jemmy.fx.ByStyleClass; @@ -88,8 +90,6 @@ /** * @author Alexander Kirov * - * Specification: - * http://xdesign.us.oracle.com/projects/javaFX/fxcontrols-ue/specifications/combobox/combobox.html */ @RunWith(FilteredTestRunner.class) public class ComboBoxTest extends TestBase { @@ -163,13 +163,19 @@ testedControl.mouse().press(); - checkTextFieldText(Properties.armed, "false"); + checkTextFieldText(Properties.armed, "true"); checkTextFieldText(Properties.showing, "false"); testedControl.mouse().release(); checkTextFieldText(Properties.armed, "false"); checkTextFieldText(Properties.showing, "false"); + + testedControl.mouse().press(); + org.jemmy.Rectangle bounds = testedControl.getScreenBounds(); + testedControl.mouse().move(new Point(bounds.getWidth() + 5, testedControl.getScreenBounds().getHeight() + 5)); + + checkTextFieldText(Properties.armed, "false"); } @Smoke @@ -219,7 +225,7 @@ @ScreenshotCheck @Test(timeout = 300000)//RT-19225 public void promptPropertyTest() throws Throwable { - assertEquals((new ComboBox()).promptTextProperty().getValue(), ""); + assertEquals((new ComboBox()).promptTextProperty().getValue(), null); //move focus from control. otherwise, we will not see prompt. requestFocusOnControl(testedControl); @@ -335,7 +341,7 @@ addElement(element3, 2); testedControl.as(Selectable.class).selector().select(element3); checkSimpleListenerValue(Properties.selectedItem, element3); - assertEquals(getTextFieldText(), TO_STRING_PREFIX + "1"); + assertEquals(getTextFieldText(), TO_STRING_PREFIX + "3"); setPropertyByToggleClick(SettingType.BIDIRECTIONAL, Properties.editable); testedControl.as(Selectable.class).selector().select(element2); @@ -423,13 +429,13 @@ testedControl.mouse().click(); testedControl.keyboard().pushKey(KeyboardButtons.A); - checkCounterValue(ON_ACTION_EVENT_COUNTER_ID, 4); + checkCounterValue(ON_ACTION_EVENT_COUNTER_ID, 3); testedControl.keyboard().pushKey(KeyboardButtons.ENTER); - checkCounterValue(ON_ACTION_EVENT_COUNTER_ID, 5); + checkCounterValue(ON_ACTION_EVENT_COUNTER_ID, 4); setPropertyByTextField(SettingType.BIDIRECTIONAL, Properties.value, NEW_VALUE_1); - checkCounterValue(ON_ACTION_EVENT_COUNTER_ID, 7); + checkCounterValue(ON_ACTION_EVENT_COUNTER_ID, 6); setPropertyByTextField(SettingType.UNIDIRECTIONAL, Properties.value, NEW_VALUE_2); - checkCounterValue(ON_ACTION_EVENT_COUNTER_ID, 9); + checkCounterValue(ON_ACTION_EVENT_COUNTER_ID, 8); } @Smoke @@ -641,7 +647,9 @@ addElements(1, 2, 3, 4, 5, 6); setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.visibleRowCount, 5); clickDropDownButton(); - Wrap sb = findScrollBar(((Wrap) getPopupWrap().as(Parent.class, Node.class).lookup(ListView.class).wrap()).as(Parent.class, Node.class), Orientation.VERTICAL, true); + Wrap sb = findScrollBar( + ((Parent) ((Wrap) ((Parent) getPopupWrap().as(Parent.class, Node.class)) + .lookup(ListView.class).wrap()).as(Parent.class, Node.class)), Orientation.VERTICAL, true); sb.as(AbstractScroll.class).caret().to(1); checkTextFieldText(Properties.showing, "true"); testedControl.as(Selectable.class).selector().select("6"); @@ -699,12 +707,12 @@ checkSelectionState(5, 6); assertEquals(getTextFieldText(), "6"); checkTextFieldText(Properties.value, "6"); + checkSimpleListenerValue(Properties.selectedIndex, 5); testedControl.mouse().click(); testedControl.as(Text.class).type("abc"); testedControl.keyboard().pushKey(KeyboardButtons.ENTER); - checkSimpleListenerValue(Properties.selectedIndex, 5); checkSimpleListenerValue(Properties.selectedItem, "6abc"); checkTextFieldText(Properties.value, "6abc"); @@ -1273,8 +1281,6 @@ setPropertyByToggleClick(SettingType.UNIDIRECTIONAL, Properties.editable); } - Wrap textFieldWrap = testedControl.as(Parent.class, Node.class) - .lookup(javafx.scene.text.Text.class).wrap(); final double initialButtonHeight = testedControl.getScreenBounds().getHeight(); double prevCellTextHeight = 0f; @@ -1287,6 +1293,8 @@ assertEquals(initialButtonHeight, testedControl.getScreenBounds().getHeight(), 0.001); /* text node should be alwas rendered inside ComboBox button */ + Wrap textFieldWrap = testedControl.as(Parent.class, Node.class) + .lookup(javafx.scene.text.Text.class).wrap(); assertTrue(textFieldWrap.getScreenBounds().getY() >= testedControl.getScreenBounds().getY()); assertTrue(textFieldWrap.getScreenBounds().getY() + textFieldWrap.getScreenBounds().getHeight() <= testedControl.getScreenBounds().getY() + testedControl.getScreenBounds().getHeight()); @@ -1422,7 +1430,7 @@ testedControl.keyboard().pushKey(KeyboardButtons.ENTER); - checkTextFieldText(Properties.value, FROM_STRING_PREFIX + "1"); + checkTextFieldText(Properties.value, FROM_STRING_PREFIX); } /** @@ -1647,4 +1655,4 @@ clickDropDownButton(); } } -} \ No newline at end of file +} --- old/functional/ControlsTests/test/javafx/scene/control/test/combobox/TestBase.java 2017-02-15 15:57:51.471403918 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/combobox/TestBase.java 2017-02-15 15:57:51.419403433 +0300 @@ -245,7 +245,8 @@ protected void checkScrollBarVisibility(boolean visible) throws InterruptedException { Wrap popup = getPopupWrap(); if (popup != null) { - Assert.assertTrue(findScrollBar(((Wrap) popup.as(Parent.class, Node.class).lookup(ListView.class).wrap()).as(Parent.class, Node.class), Orientation.VERTICAL, visible) != null); + Assert.assertTrue(findScrollBar(((Parent) ((Wrap) ((Parent) popup.as(Parent.class, Node.class)) + .lookup(ListView.class).wrap()).as(Parent.class, Node.class)), Orientation.VERTICAL, visible) != null); } } --- old/functional/ControlsTests/test/javafx/scene/control/test/datepicker/TestBase.java 2017-02-15 15:57:51.703406079 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/datepicker/TestBase.java 2017-02-15 15:57:51.647405557 +0300 @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.datepicker; -import com.sun.javafx.scene.control.skin.LabeledText; +import com.sun.javafx.scene.control.LabeledText; import java.time.LocalDate; import java.time.Month; import java.time.YearMonth; --- old/functional/ControlsTests/test/javafx/scene/control/test/labeled/LabeledsBase.java 2017-02-15 15:57:51.975408613 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/labeled/LabeledsBase.java 2017-02-15 15:57:51.911408017 +0300 @@ -26,7 +26,7 @@ import client.test.ScreenshotCheck; import client.test.Smoke; -import com.sun.javafx.scene.control.skin.LabeledText; +import com.sun.javafx.scene.control.LabeledText; import javafx.collections.ObservableList; import javafx.geometry.Bounds; import javafx.scene.Node; --- old/functional/ControlsTests/test/javafx/scene/control/test/nchart/AxisDescriptionProvider.java 2017-02-15 15:57:52.255411222 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/nchart/AxisDescriptionProvider.java 2017-02-15 15:57:52.171410439 +0300 @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.nchart; -import com.sun.javafx.scene.control.skin.LabeledText; +import com.sun.javafx.scene.control.LabeledText; import java.util.ArrayList; import java.util.List; import javafx.geometry.Side; @@ -188,4 +188,4 @@ } }.dispatch(Root.ROOT.getEnvironment()); } -} \ No newline at end of file +} --- old/functional/ControlsTests/test/javafx/scene/control/test/pagination/TestBase.java 2017-02-15 15:57:52.535413831 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/pagination/TestBase.java 2017-02-15 15:57:52.455413085 +0300 @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.pagination; -import com.sun.javafx.scene.control.skin.LabeledText; +import com.sun.javafx.scene.control.LabeledText; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; @@ -147,7 +147,7 @@ } protected void checkScrollingOfFormComponentScrollBar() { - Wrap scrollBar = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); + Wrap scrollBar = findScrollBar((Parent)testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true); scrollBar.mouse().turnWheel(-1); testedControl.waitState(new State() { public Integer reached() { @@ -273,7 +273,7 @@ } protected Wrap getScrollbarWrap(boolean visible) { - return findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, visible); + return findScrollBar((Parent)testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, visible); } protected void checkNumberOfVisiblePageIndeces(int expectedIndeces) { --- old/functional/ControlsTests/test/javafx/scene/control/test/tableview/ApplicationInteractionFunctions.java 2017-02-15 15:57:52.791416216 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/tableview/ApplicationInteractionFunctions.java 2017-02-15 15:57:52.731415657 +0300 @@ -24,8 +24,8 @@ */ package javafx.scene.control.test.tableview; -import com.sun.javafx.scene.control.skin.NestedTableColumnHeader; -import com.sun.javafx.scene.control.skin.TableColumnHeader; +import javafx.scene.control.skin.NestedTableColumnHeader; +import javafx.scene.control.skin.TableColumnHeader; import java.util.Collection; import java.util.Comparator; import java.util.concurrent.TimeUnit; @@ -397,4 +397,4 @@ } catch (Exception e) { } } -} \ No newline at end of file +} --- old/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewNewTest.java 2017-02-15 15:57:53.031418452 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewNewTest.java 2017-02-15 15:57:52.975417930 +0300 @@ -26,9 +26,9 @@ package javafx.scene.control.test.tableview; import client.test.Smoke; -import com.sun.javafx.scene.control.skin.NestedTableColumnHeader; -import com.sun.javafx.scene.control.skin.TableColumnHeader; -import com.sun.javafx.scene.control.skin.TableHeaderRow; +import javafx.scene.control.skin.NestedTableColumnHeader; +import javafx.scene.control.skin.TableColumnHeader; +import javafx.scene.control.skin.TableHeaderRow; import java.awt.Robot; import java.awt.event.InputEvent; import java.util.ArrayList; @@ -210,14 +210,14 @@ private void checkSortNotScrollingFor(String name, int index) { scrollTo(index, 0); - final double initialScrollPos = getScrollBarValue(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true)); + final double initialScrollPos = getScrollBarValue(findScrollBar((Parent)testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true)); getTableColumnHeaderWrap(name).mouse().click(); getTableColumnHeaderWrap(name).mouse().click(); getTableColumnHeaderWrap(name).mouse().click(); getTableColumnHeaderWrap(name).mouse().click(); new Waiter(new Timeout("", 500)).ensureState(new State() { public Object reached() { - if (Math.abs(initialScrollPos - getScrollBarValue(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true))) < 0.001) { + if (Math.abs(initialScrollPos - getScrollBarValue(findScrollBar((Parent)testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true))) < 0.001) { return true; } else { return null; --- old/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewTest.java 2017-02-15 15:57:53.283420800 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewTest.java 2017-02-15 15:57:53.231420315 +0300 @@ -143,7 +143,6 @@ * Checks that sort works for the column. According to the spec there are * three states of sorting and all of them are checked * - * http://xdesign.us.oracle.com/projects/javaFX/fxcontrols-ue/specifications/treetable/treetable.html#sorting */ @Smoke @Test(timeout = 300000) @@ -459,4 +458,4 @@ txtColumnRemoveIndex.type(String.valueOf(pos)); btnRemoveColumn.mouse().click(); } -} \ No newline at end of file +} --- old/functional/ControlsTests/test/javafx/scene/control/test/tableview/TestBase.java 2017-02-15 15:57:53.519422998 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/tableview/TestBase.java 2017-02-15 15:57:53.463422476 +0300 @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.tableview; -import com.sun.javafx.scene.control.skin.TableColumnHeader; +import javafx.scene.control.skin.TableColumnHeader; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; --- old/functional/ControlsTests/test/javafx/scene/control/test/tableview/TestBaseCommon.java 2017-02-15 15:57:53.755425197 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/tableview/TestBaseCommon.java 2017-02-15 15:57:53.695424638 +0300 @@ -198,11 +198,11 @@ * @return wrap of parent container that contains Cells */ static Wrap getContainerWrap(Wrap parent) { - return getParentWrap(parent.as(Parent.class, Node.class), VIRTIAL_FLOW_CLASS_NAME); + return getParentWrap((Parent)parent.as(Parent.class, Node.class), VIRTIAL_FLOW_CLASS_NAME); } static Wrap getClippedContainerWrap(Wrap parent) { - return getParentWrap(parent.as(Parent.class, Node.class), CLIPPED_CONTAINER_CLASS_NAME); + return getParentWrap((Parent)parent.as(Parent.class, Node.class), CLIPPED_CONTAINER_CLASS_NAME); } static private Wrap getParentWrap(Parent parent, final String className) { @@ -466,4 +466,4 @@ } private static final String VIRTIAL_FLOW_CLASS_NAME = "VirtualFlow"; private static final String CLIPPED_CONTAINER_CLASS_NAME = "VirtualFlow$ClippedContainer"; -} \ No newline at end of file +} --- old/functional/ControlsTests/test/javafx/scene/control/test/tabpane/NewTabPaneTest.java 2017-02-15 15:57:53.971427209 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/tabpane/NewTabPaneTest.java 2017-02-15 15:57:53.911426650 +0300 @@ -36,7 +36,6 @@ import javafx.scene.Node; import javafx.scene.control.Label; import javafx.scene.control.Tab; -import javafx.scene.control.TabBuilder; import static javafx.scene.control.test.tabpane.NewTabPaneApp.*; import javafx.scene.control.test.utils.ptables.AbstractPropertyController.SettingType; import javafx.util.StringConverter; @@ -333,7 +332,9 @@ @Override public String toString(Tab t) { return t.getText(); } @Override public Tab fromString(String s) { - return TabBuilder.create().text(s).content(new Label("CONTENT!")).build(); + Tab t = new Tab(s); + t.setContent(new Label("CONTENT!")); + return t; } }; --- old/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaPropertiesTest.java 2017-02-15 15:57:54.215429482 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaPropertiesTest.java 2017-02-15 15:57:54.159428961 +0300 @@ -77,18 +77,18 @@ addText(); //There are both scrollBars must exist - assertEquals(getScrollBarValue(findScrollBar(testedControl.as(Parent.class, Node.class), orientation, true)), 0, 0); + assertEquals(getScrollBarValue(findScrollBar((Parent)testedControl.as(Parent.class, Node.class), orientation, true)), 0, 0); double[] values = {10, 0, 50, 0, 100}; setPropertyBySlider(SettingType.BIDIRECTIONAL, property, 10); - double item = getScrollBarValue(findScrollBar(testedControl.as(Parent.class, Node.class), orientation, true)) / 10; + double item = getScrollBarValue(findScrollBar((Parent)testedControl.as(Parent.class, Node.class), orientation, true)) / 10; for (SettingType type : EnumSet.of(SettingType.BIDIRECTIONAL, SettingType.SETTER, SettingType.UNIDIRECTIONAL)) { for (double value : values) { setPropertyBySlider(type, property, value); checkTextFieldValue(property, value); - assertEquals(getScrollBarValue(findScrollBar(testedControl.as(Parent.class, Node.class), orientation, true)), value * item, 0.1 * item); + assertEquals(getScrollBarValue(findScrollBar((Parent)testedControl.as(Parent.class, Node.class), orientation, true)), value * item, 0.1 * item); } } @@ -133,13 +133,13 @@ for (SettingType type : EnumSet.of(SettingType.BIDIRECTIONAL, SettingType.SETTER, SettingType.UNIDIRECTIONAL)) { setPropertyByToggleClick(type, Properties.wraptext);//true//bind checkTextFieldText(Properties.wraptext, "true");//getter - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null);//behavior - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null);//behavior + Assert.assertFalse(findScrollBar((Parent)testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null);//behavior + Assert.assertFalse(findScrollBar((Parent)testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null);//behavior setPropertyByToggleClick(type, Properties.wraptext);//false//bind checkTextFieldText(Properties.wraptext, "false");//getter - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null);//behavior - Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null);//behavior + Assert.assertFalse(findScrollBar((Parent)testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null);//behavior + Assert.assertFalse(findScrollBar((Parent)testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null);//behavior } } --- old/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextInputBase.java 2017-02-15 15:57:54.451431681 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextInputBase.java 2017-02-15 15:57:54.395431160 +0300 @@ -25,7 +25,7 @@ package javafx.scene.control.test.textinput; import client.test.ScreenshotCheck; -import com.sun.javafx.scene.control.skin.TextInputControlSkin; +import javafx.scene.control.skin.TextInputControlSkin; import java.lang.reflect.Field; import java.util.HashMap; import java.util.HashSet; @@ -82,7 +82,7 @@ } private Wrap taTesting = null; - static final KeyboardModifiers CTRL = Utils.isMacOS() ? KeyboardModifiers.META_DOWN_MASK : KeyboardModifiers.CTRL_DOWN_MASK; + static final KeyboardModifiers CTRL = Utils.isMacOS() ? KeyboardModifiers.ALT_DOWN_MASK : KeyboardModifiers.CTRL_DOWN_MASK; // /** // * Test for TextInput setMaximumLength API // */ @@ -523,6 +523,7 @@ } else { checkState("Copy", true); checkState("Cut", true); + getScene().keyboard().pushKey(KeyboardButtons.ESCAPE); } initContext(); @@ -611,12 +612,17 @@ String text = getTextFromControl(); final String initialText = text; - while (!"".equals(text)) { - text = deleteLastWord(text); + if (isPasswordField()) { taTesting.keyboard().pushKey(Keyboard.KeyboardButtons.BACK_SPACE, CTRL); - if (isPasswordField()) { - Assert.assertEquals(initialText, getTextFromControl()); + if (Utils.isMacOS()) { + Assert.assertEquals("", getTextFromControl()); } else { + Assert.assertEquals(initialText, getTextFromControl()); + } + } else { + while (!text.isEmpty()) { + text = deleteLastWord(text); + taTesting.keyboard().pushKey(Keyboard.KeyboardButtons.BACK_SPACE, CTRL); if (!text.equals(getTextFromControl())) { out(initialText, text); } @@ -633,7 +639,7 @@ String text = getTextFromControl(); final String initialText = text; while (!"".equals(text)) { - text = deleteFirstWord(text, true); + text = deleteFirstWord(text, Utils.isMacOS() ? false : true); taTesting.keyboard().pushKey(Keyboard.KeyboardButtons.DELETE, CTRL); if (isPasswordField()) { Assert.assertEquals(initialText, getTextFromControl()); @@ -674,14 +680,15 @@ * @return string without first word. */ private String deleteFirstWord(String text, boolean deleteFromBeginning) { - final String[] punctuation = new String[]{" ", "\n", "\t", "/", ",", ";", "!", "@", "#", "$", "%", "^", "*", "(", ")", "&", "."}; + final String[] punctuation = new String[] {" ", "\n", "\t", "/", ",", ";", "!", "@", "#", "$", "%", "^", "*", "(", ")", "&", "."}; + if (!deleteFromBeginning) { while (startsWithAnyOf(text, punctuation)) { text = text.substring(1); } text = removeLeadingChars(text, punctuation); } else { - if (!Utils.isWindows()) { + if (Utils.isLinux()) { if (' ' == text.charAt(0)) { int pos = 0; while(' ' == text.charAt(pos)) ++pos; @@ -691,12 +698,20 @@ } } + if ('\n' == text.charAt(0)) { + text = text.substring(1); + return text; + } + text = removeLeadingChars(text, punctuation); + if ('\n' == text.charAt(0)) { + return text; + } + if (Utils.isLinux()) { + return text; + } while (startsWithAnyOf(text, punctuation)) { - if (!Utils.isWindows()) { - break; - } text = text.substring(1); } } @@ -737,7 +752,7 @@ final Wrap wrap = getScene().as(Parent.class, Node.class).lookup(TextInputControl.class).wrap(); wrap.as(Text.class).clear(); wrap.as(Text.class).type(SAMPLE_STRING); - wrap.keyboard().pushKey(KeyboardButtons.A, Utils.isMacOS() ? KeyboardModifiers.META_DOWN_MASK : CTRL); + wrap.keyboard().pushKey(KeyboardButtons.A, Utils.isMacOS() ? KeyboardModifiers.META_DOWN_MASK : KeyboardModifiers.CTRL_DOWN_MASK); new GetAction() { @Override public void run(Object... os) throws Exception { --- old/functional/ControlsTests/test/javafx/scene/control/test/treeview/TestBase.java 2017-02-15 15:57:54.699433992 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/treeview/TestBase.java 2017-02-15 15:57:54.643433470 +0300 @@ -321,7 +321,7 @@ protected void checkScrollingState(final double scrollValue, boolean beginVisible, boolean endVisible, int size) { testedControl.waitState(new State() { public Object reached() { - Wrap sb = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); + Wrap sb = findScrollBar((Parent)testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true); if (Math.abs(sb.getControl().getValue() - scrollValue) < 0.01) { return true; } else { @@ -773,4 +773,4 @@ }.dispatch(testedControl.getEnvironment(), handler); } -} \ No newline at end of file +} --- old/functional/ControlsTests/test/javafx/scene/control/test/treeview/TreeViewTest.java 2017-02-15 15:57:54.915436005 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/treeview/TreeViewTest.java 2017-02-15 15:57:54.859435483 +0300 @@ -27,7 +27,7 @@ import client.test.Smoke; import com.oracle.jdk.sqe.cc.markup.Covers; import com.oracle.jdk.sqe.cc.markup.Covers.Level; -import com.sun.javafx.scene.control.skin.TableHeaderRow; +import javafx.scene.control.skin.TableHeaderRow; import java.util.Comparator; import java.util.HashMap; import java.util.Map; --- old/functional/ControlsTests/test/javafx/scene/control/test/util/MultipleSelectionHelper.java 2017-02-15 15:57:55.147438166 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/util/MultipleSelectionHelper.java 2017-02-15 15:57:55.095437681 +0300 @@ -60,6 +60,14 @@ this.columns = columns; } + public void setColumnsNum(int columns) { + this.columns = columns; + } + + public void setRowsNum(int rows) { + this.rows = rows; + } + /** * ALARM: must be called before pushing key combination, from code, which * knows, how to understand, which area is visible now. And this visible --- old/functional/ControlsTests/test/javafx/scene/control/test/util/UtilTestFunctions.java 2017-02-15 15:57:55.387440402 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/util/UtilTestFunctions.java 2017-02-15 15:57:55.331439880 +0300 @@ -88,6 +88,8 @@ import test.javaclient.shared.TestUtil; import test.javaclient.shared.Utils; +import com.sun.javafx.scene.NodeHelper; + /** * @author Alexander Kirov * @@ -815,10 +817,16 @@ setResult(((Node) os[0]).localToScene((Double) os[1], (Double) os[2])); } }.dispatch(Root.ROOT.getEnvironment(), wrap.getControl(), Double.valueOf(wrap.getScreenBounds().width / 4), Double.valueOf(wrap.getScreenBounds().height / 4)); + + // The following line requires --add-exports javafx.graphics/com.sun.javafx.scene.input=ALL-UNNAMED final PickResultChooser result = new PickResultChooser(); + // The following line requires --add-exports javafx.graphics/com.sun.javafx.geom=ALL-UNNAMED //public PickRay(Vec3d origin, Vec3d direction, double nearClip, double farClip) { - (((Wrap) os[0]).getControl()).getRoot().impl_pickNode(new PickRay(new Vec3d(pointOnScene.getX(), pointOnScene.getY(), -10), new Vec3d(0, 0, 1), 1.0, 100), result); + NodeHelper.pickNode( + (((Wrap) os[0]).getControl()).getRoot(), + new PickRay(new Vec3d(pointOnScene.getX(), pointOnScene.getY(), -10), new Vec3d(0, 0, 1), 1.0, 100), + result); Node node = result.getIntersectedNode(); node.fireEvent(scrollEvent); } --- old/functional/FXCssTests/src/test/css/controls/ComplexButtonCssTests.java 2017-02-15 15:57:55.675443085 +0300 +++ new/functional/FXCssTests/src/test/css/controls/ComplexButtonCssTests.java 2017-02-15 15:57:55.603442414 +0300 @@ -24,8 +24,8 @@ */ package test.css.controls; -import javafx.scene.control.ButtonBuilder; -import javafx.scene.control.ToolBarBuilder; +import javafx.scene.control.Button; +import javafx.scene.control.ToolBar; import javafx.scene.layout.Pane; import test.javaclient.shared.BasicButtonChooserApp; import test.javaclient.shared.PageWithSlots; @@ -69,17 +69,16 @@ Pane slot = new Pane(); slot.setPrefSize(200, 200); if (page == Pages.IPHONE_TOOLBAR) { - slot.getChildren().add(ToolBarBuilder.create() - .id(page.name().toLowerCase()) - .items( - ButtonBuilder.create().text("iPhone").id("iphone").build()) - .build()); + Button b = new Button("iPhone"); + b.setId("iphone"); + ToolBar temp = new ToolBar(b); + temp.setId(page.name().toLowerCase()); + slot.getChildren().add(temp); } else { - slot.getChildren().add(ButtonBuilder.create() - .text("Button") - .id(page.name().toLowerCase()) - .minWidth(100) - .build()); + Button temp = new Button("Button"); + temp.setId(page.name().toLowerCase()); + temp.setMinWidth(100); + slot.getChildren().add(temp); } pageWithSlot.add(new TestNodeLeaf(page.name(), slot)); return pageWithSlot; --- old/functional/FXCssTests/src/test/css/controls/ControlPage.java 2017-02-15 15:57:55.923445396 +0300 +++ new/functional/FXCssTests/src/test/css/controls/ControlPage.java 2017-02-15 15:57:55.867444874 +0300 @@ -25,18 +25,19 @@ package test.css.controls; import com.sun.javafx.collections.ObservableListWrapper; -import javafx.css.CssMetaData; -import com.sun.javafx.scene.control.skin.CellSkinBase; -import com.sun.javafx.scene.control.skin.ColorPickerSkin; -import com.sun.javafx.scene.control.skin.PaginationSkin; -import com.sun.javafx.scene.control.skin.ProgressIndicatorSkin; -import com.sun.javafx.scene.control.skin.TableColumnHeader; -import com.sun.javafx.scene.control.skin.TextInputControlSkin; -import com.sun.javafx.scene.control.skin.TreeCellSkin; +import javafx.scene.control.skin.CellSkinBase; +import javafx.scene.control.skin.ColorPickerSkin; +import javafx.scene.control.skin.PaginationSkin; +import javafx.scene.control.skin.ProgressIndicatorSkin; +import javafx.scene.control.skin.TableColumnHeader; +import javafx.scene.control.skin.TextInputControlSkin; +import javafx.scene.control.skin.TreeCellSkin; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.time.LocalDate; import java.time.Month; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; import java.util.*; import javafx.application.ConditionalFeature; import javafx.application.Platform; @@ -44,6 +45,7 @@ import javafx.beans.value.ObservableValue; import javafx.collections.FXCollections; import javafx.collections.ObservableList; +import javafx.css.CssMetaData; import javafx.css.Styleable; import javafx.geometry.HPos; import javafx.geometry.Pos; @@ -56,52 +58,37 @@ import javafx.scene.chart.XYChart; import javafx.scene.control.Accordion; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.CheckBox; -import javafx.scene.control.CheckBoxBuilder; import javafx.scene.control.ChoiceBox; import javafx.scene.control.ColorPicker; import javafx.scene.control.ComboBox; import javafx.scene.control.Control; import javafx.scene.control.DatePicker; import javafx.scene.control.Hyperlink; -import javafx.scene.control.HyperlinkBuilder; import javafx.scene.control.Label; -import javafx.scene.control.LabelBuilder; import javafx.scene.control.ListView; import javafx.scene.control.Menu; import javafx.scene.control.MenuBar; import javafx.scene.control.MenuItem; import javafx.scene.control.Pagination; import javafx.scene.control.PasswordField; -import javafx.scene.control.PasswordFieldBuilder; import javafx.scene.control.ProgressBar; -import javafx.scene.control.ProgressBarBuilder; import javafx.scene.control.ProgressIndicator; -import javafx.scene.control.ProgressIndicatorBuilder; import javafx.scene.control.RadioButton; -import javafx.scene.control.RadioButtonBuilder; import javafx.scene.control.ScrollBar; -import javafx.scene.control.ScrollBarBuilder; import javafx.scene.control.ScrollPane; import javafx.scene.control.Separator; -import javafx.scene.control.SeparatorBuilder; import javafx.scene.control.Slider; -import javafx.scene.control.SliderBuilder; import javafx.scene.control.SplitMenuButton; -import javafx.scene.control.SplitMenuButtonBuilder; import javafx.scene.control.SplitPane; -import javafx.scene.control.SplitPaneBuilder; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.scene.control.TableColumn; import javafx.scene.control.TableColumn.CellDataFeatures; import javafx.scene.control.TableView; import javafx.scene.control.TextField; -import javafx.scene.control.TextFieldBuilder; import javafx.scene.control.TitledPane; import javafx.scene.control.ToggleButton; -import javafx.scene.control.ToggleButtonBuilder; import javafx.scene.control.ToolBar; import javafx.scene.control.TreeItem; import javafx.scene.control.TreeView; @@ -109,7 +96,7 @@ import javafx.scene.image.ImageView; import javafx.scene.layout.FlowPane; import javafx.scene.layout.HBox; -import javafx.scene.layout.StackPaneBuilder; +import javafx.scene.layout.StackPane; import javafx.scene.layout.TilePane; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; @@ -118,8 +105,6 @@ import javafx.scene.text.Text; import javafx.util.Callback; import javafx.util.StringConverter; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeFormatterBuilder; /** * @@ -145,7 +130,10 @@ } }, 200), Buttons(Button.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Control createControl() { - return ButtonBuilder.create().text("Button the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).graphic(new Rectangle(10, 10, Color.RED)).build(); + Button temp = new Button("Button the first line" + "\nthe sec long line" + "\nthe third line"); + temp.setFocusTraversable(false); + temp.setGraphic(new Rectangle(10, 10, Color.RED)); + return temp; } }, 200, 100), ChoiceBoxes(ChoiceBox.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Control createControl() { @@ -159,7 +147,10 @@ } }), CheckBoxes(CheckBox.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Control createControl() { - return CheckBoxBuilder.create().text("Check box the first line" + "\nthe sec long line" + "\nthe third line").graphic(new Rectangle(20, 20, Color.web("lightblue"))).focusTraversable(false).build(); + CheckBox temp = new CheckBox("Check box the first line" + "\nthe sec long line" + "\nthe third line"); + temp.setFocusTraversable(false); + temp.setGraphic(new Rectangle(20, 20, Color.web("lightblue"))); + return temp; } }, 200, 100), ComboBoxes(ComboBox.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { @Override @@ -174,7 +165,10 @@ } }), Hyperlinks(Hyperlink.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Control createControl() { - return HyperlinkBuilder.create().text("Hyperlink the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).graphic(new Circle(10, Color.BLUE)).build(); + Hyperlink temp = new Hyperlink("Hyperlink the first line" + "\nthe sec long line" + "\nthe third line"); + temp.setFocusTraversable(false); + temp.setGraphic(new Circle(10, Color.BLUE)); + return temp; } }, 200, 100), Labels(new ArrayList>(Label.getClassCssMetaData()) { { @@ -182,7 +176,10 @@ } }, new ControlsCSSApp.ControlFactory() { public Control createControl() { - return LabelBuilder.create().text("Label the first line" + "\nthe sec longlong line" + "\nthe third line").focusTraversable(false).graphic(new Rectangle(20, 20, Color.web("lightblue"))).build(); + Label temp = new Label("Label the first line" + "\nthe sec longlong line" + "\nthe third line"); + temp.setFocusTraversable(false); + temp.setGraphic(new Rectangle(20, 20, Color.web("lightblue"))); + return temp; } }, 200), ListViews(ListView.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Node createControl() { @@ -196,11 +193,18 @@ } }, 150), PasswordFields(PasswordField.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Control createControl() { - return PasswordFieldBuilder.create().promptText("Password box the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).build(); + PasswordField temp = new PasswordField(); + temp.setPromptText("Password box the first line" + "\nthe sec long line" + "\nthe third line"); + temp.setFocusTraversable(false); + return temp; } }), PressedToggleButtons(ToggleButton.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Control createControl() { - return ToggleButtonBuilder.create().selected(true).text("Button the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).graphic(new Rectangle(10, 10, Color.RED)).build(); + ToggleButton temp = new ToggleButton("Button the first line" + "\nthe sec long line" + "\nthe third line"); + temp.setSelected(true); + temp.setFocusTraversable(false); + temp.setGraphic(new Rectangle(10, 10, Color.RED)); + return temp; } }, 200, 120), ProgressIndicators(new ArrayList>(ProgressIndicator.getClassCssMetaData()) { { @@ -208,15 +212,23 @@ } }, new ControlsCSSApp.ControlFactory() { public Node createControl() { - return ProgressIndicatorBuilder.create().progress(0.85).prefHeight(100).prefWidth(100).focusTraversable(false).build(); + ProgressIndicator temp = new ProgressIndicator(0.85); + temp.setPrefSize(100, 100); + temp.setFocusTraversable(false); + return temp; } }), ProgressBars(ProgressBar.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Node createControl() { - return ProgressBarBuilder.create().progress(0.25).focusTraversable(false).build(); + ProgressBar temp = new ProgressBar(0.25); + temp.setFocusTraversable(false); + return temp; } }, 200, 100), RadioButtons(RadioButton.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Control createControl() { - return RadioButtonBuilder.create().text("Radio the first line" + "\nthe sec long line" + "\nthe third line").graphic(new Rectangle(20, 20, Color.web("lightblue"))).focusTraversable(false).build(); + RadioButton temp = new RadioButton("Radio the first line" + "\nthe sec long line" + "\nthe third line"); + temp.setFocusTraversable(false); + temp.setGraphic(new Rectangle(20, 20, Color.web("lightblue"))); + return temp; } }, 200, 100), TextFields(new ArrayList>(TextField.getClassCssMetaData()) { { @@ -224,21 +236,34 @@ } }, new ControlsCSSApp.ControlFactory() { public Control createControl() { - return TextFieldBuilder.create().text("Text box the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).build(); + TextField temp = new TextField("Text box the first line" + "\nthe sec long line" + "\nthe third line"); + temp.setFocusTraversable(false); + return temp; } }), Sliders(Slider.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Control createControl() { - return SliderBuilder.create().min(0).max(100).value(20).focusTraversable(false).build(); + Slider temp = new Slider(); + temp.setMin(0); + temp.setMax(100); + temp.setValue(20); + temp.setFocusTraversable(false); + return temp; } }, 200), Separators(Separator.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Control createControl() { - Separator sep = SeparatorBuilder.create().halignment(HPos.CENTER).build(); + Separator sep = new Separator(); + sep.setHalignment(HPos.CENTER); sep.setPrefWidth(80); return sep; } }, 150), ScrollBars(ScrollBar.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Control createControl() { - return ScrollBarBuilder.create().value(45).min(0).max(100).focusTraversable(false).build(); + ScrollBar temp = new ScrollBar(); + temp.setValue(45); + temp.setMin(0); + temp.setMax(100); + temp.setFocusTraversable(false); + return temp; } }, 150), ScrollPanes(ScrollPane.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Node createControl() { @@ -255,12 +280,18 @@ } }, 150), UnPressedToggleButtons(ToggleButton.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Control createControl() { - return ToggleButtonBuilder.create().selected(false).text("Button the first line" + "\nthe sec long line" + "\nthe third line").focusTraversable(false).graphic(new Rectangle(10, 10, Color.RED)).build(); + ToggleButton temp = new ToggleButton("Button the first line" + "\nthe sec long line" + "\nthe third line"); + temp.setGraphic(new Rectangle(10, 10, Color.RED)); + temp.setSelected(false); + temp.setFocusTraversable(false); + return temp; } }, 200, 120), Toolbars(ToolBar.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Node createControl() { ToolBar toolbar = new ToolBar(); - toolbar.getItems().addAll(new Button("One"), new Button("Two"), new Separator(), SplitMenuButtonBuilder.create().text("three").build()); + SplitMenuButton temp = new SplitMenuButton(); + temp.setText("three"); + toolbar.getItems().addAll(new Button("One"), new Button("Two"), new Separator(), temp); toolbar.setFocusTraversable(false); return toolbar; } @@ -287,7 +318,9 @@ } }, 250, 150), SplitMenuButtons(SplitMenuButton.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Node createControl() { - SplitMenuButton smb = SplitMenuButtonBuilder.create().text("Split box the first line" + "\nthe sec long line" + "\nthe third line").items(new MenuItem("Split box the first line" + "\nthe sec long line" + "\nthe third line", new Rectangle(10, 10, Color.BLUE))).graphic(new Rectangle(10, 10, Color.RED)).build(); + SplitMenuButton smb = new SplitMenuButton(new MenuItem("Split box the first line" + "\nthe sec long line" + "\nthe third line", new Rectangle(10, 10, Color.BLUE))); + smb.setText("Split box the first line" + "\nthe sec long line" + "\nthe third line"); + smb.setGraphic(new Rectangle(10, 10, Color.RED)); smb.setFocusTraversable(false); return smb; } @@ -375,7 +408,11 @@ } }, 200, 300), SplitPanes(SplitPane.getClassCssMetaData(), new ControlsCSSApp.ControlFactory() { public Node createControl() { - SplitPane pane = SplitPaneBuilder.create().items(StackPaneBuilder.create().children(new Rectangle(40, 40, Color.WHITESMOKE)).build(), StackPaneBuilder.create().children(new Rectangle(40, 40, Color.BLUE)).build(), StackPaneBuilder.create().children(new Rectangle(40, 40, Color.RED)).build()).prefWidth(150).prefHeight(150).build(); + StackPane sp1 = new StackPane(new Rectangle(40, 40, Color.WHITESMOKE)); + StackPane sp2 = new StackPane(new Rectangle(40, 40, Color.BLUE)); + StackPane sp3 = new StackPane(new Rectangle(40, 40, Color.RED)); + SplitPane pane = new SplitPane(sp1, sp2, sp3); + pane.setPrefSize(150, 150); pane.setDividerPositions(0.33, 0.67); pane.setFocusTraversable(false); return pane; --- old/functional/FXCssTests/src/test/css/controls/ControlsCSSApp.java 2017-02-15 15:57:56.191447893 +0300 +++ new/functional/FXCssTests/src/test/css/controls/ControlsCSSApp.java 2017-02-15 15:57:56.123447259 +0300 @@ -102,9 +102,6 @@ if (control instanceof Text) { control.relocate(0, 0); // workaround RT-24670 } - if (showButtons) { - style.setStyle(control); - } pageWithSlot.add(new StyleTestNode(style, control, innerPane)); } --- old/functional/FXCssTests/src/test/css/controls/ControlsCssStylesFactory.java 2017-02-15 15:57:56.431450129 +0300 +++ new/functional/FXCssTests/src/test/css/controls/ControlsCssStylesFactory.java 2017-02-15 15:57:56.375449607 +0300 @@ -56,7 +56,6 @@ import javafx.scene.effect.InnerShadow; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; -import javafx.scene.layout.PaneBuilder; import javafx.scene.layout.Region; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; @@ -842,7 +841,9 @@ VBox box = (VBox) control; box.getChildren().clear(); box.setStyle(box.getStyle() + "-fx-border-color:blue;"); - box.getChildren().add(PaneBuilder.create().children(new Rectangle(20, 20, Color.TRANSPARENT)).style("-fx-border-color:red;").build()); + Pane temp = new Pane(new Rectangle(20, 20, Color.TRANSPARENT)); + temp.setStyle("-fx-border-color:red;"); + box.getChildren().add(temp); } } }}); @@ -1025,7 +1026,9 @@ HBox box = (HBox) control; box.getChildren().clear(); box.setStyle(box.getStyle() + "-fx-border-color:blue;"); - box.getChildren().add(PaneBuilder.create().children(new Rectangle(20, 20, Color.TRANSPARENT)).style("-fx-border-color:red;").build()); + Pane temp = new Pane(new Rectangle(20, 20, Color.TRANSPARENT)); + temp.setStyle("-fx-border-color:red;"); + box.getChildren().add(temp); } } } --- old/functional/FXCssTests/src/test/css/controls/api/APIStylesApp.java 2017-02-15 15:57:56.691452551 +0300 +++ new/functional/FXCssTests/src/test/css/controls/api/APIStylesApp.java 2017-02-15 15:57:56.635452029 +0300 @@ -85,9 +85,6 @@ innerPane.setPrefSize(page.slotWidth - page.INNER_PANE_SHIFT, page.slotHeight - ControlPage.INNER_PANE_SHIFT); innerPane.setMaxSize(page.slotWidth - page.INNER_PANE_SHIFT, page.slotHeight - page.INNER_PANE_SHIFT); innerPane.getChildren().add(control); - if (showButtons) { - stylePage.setStyle(control); - } rootNode.add(new TestNodeLeaf(stylePage.name().replace("_", "-"), innerPane)); } } @@ -104,4 +101,4 @@ public static void main(String[] args) { Utils.launch(APIStylesApp.class, args); } -} \ No newline at end of file +} --- old/functional/FXCssTests/src/test/css/stylesheets/StylesheetApp.java 2017-02-15 15:57:56.967455122 +0300 +++ new/functional/FXCssTests/src/test/css/stylesheets/StylesheetApp.java 2017-02-15 15:57:56.887454377 +0300 @@ -32,7 +32,7 @@ import javafx.scene.input.MouseEvent; import javafx.scene.layout.Pane; import javafx.scene.layout.StackPane; -import javafx.scene.layout.VBoxBuilder; +import javafx.scene.layout.VBox; import javafx.scene.text.Text; import javafx.stage.Stage; import test.javaclient.shared.Utils; @@ -71,7 +71,10 @@ } }); scene.getStylesheets().add(styles[styleIndex]); - pane.getChildren().add(VBoxBuilder.create().alignment(Pos.CENTER).spacing(50).children(golden, button).build()); + VBox temp = new VBox(golden, button); + temp.setAlignment(Pos.CENTER); + temp.setSpacing(50); + pane.getChildren().add(temp); stage.setScene(scene); stage.setTitle("Test for RT-17348." + VersionInfo.getRuntimeVersion()); stage.show(); --- old/functional/FXCssTests/src/test/css/utils/StyleGenerator.java 2017-02-15 15:57:57.187457172 +0300 +++ new/functional/FXCssTests/src/test/css/utils/StyleGenerator.java 2017-02-15 15:57:57.131456650 +0300 @@ -26,7 +26,7 @@ import javafx.css.StyleConverter; import javafx.css.CssMetaData; -import com.sun.javafx.css.converters.*; +import javafx.css.converter.*; import com.sun.javafx.scene.layout.region.*; import java.util.HashSet; import java.util.Set; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesAccordionTest.java 2017-02-15 15:57:57.427459408 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesAccordionTest.java 2017-02-15 15:57:57.363458812 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesButtonTest.java 2017-02-15 15:57:57.663461607 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesButtonTest.java 2017-02-15 15:57:57.611461123 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesCheckBoxTest.java 2017-02-15 15:57:57.899463806 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesCheckBoxTest.java 2017-02-15 15:57:57.847463321 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesChoiceBoxTest.java 2017-02-15 15:57:58.143466079 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesChoiceBoxTest.java 2017-02-15 15:57:58.091465595 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesColorPickerTest.java 2017-02-15 15:57:58.387468353 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesColorPickerTest.java 2017-02-15 15:57:58.335467868 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesHyperlinkTest.java 2017-02-15 15:57:58.611470439 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesHyperlinkTest.java 2017-02-15 15:57:58.563469992 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesLabelTest.java 2017-02-15 15:57:58.843472601 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesLabelTest.java 2017-02-15 15:57:58.791472116 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesListCellTest.java 2017-02-15 15:57:59.091474911 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesListCellTest.java 2017-02-15 15:57:59.027474316 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; @@ -96,7 +96,7 @@ Assert.assertTrue(styleNames.contains("-fx-cell-size")); Map styles = getStyles(); CssMetaData data = styles.get("-fx-cell-size"); - Assert.assertEquals(24.0, data.getInitialValue(getControl())); + Assert.assertEquals(data.getInitialValue(getControl()), "15"); } @Test --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesListViewTest.java 2017-02-15 15:57:59.355477371 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesListViewTest.java 2017-02-15 15:57:59.291476775 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesMenuButtonTest.java 2017-02-15 15:57:59.599479644 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesMenuButtonTest.java 2017-02-15 15:57:59.535479048 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesPaginationTest.java 2017-02-15 15:57:59.859482067 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesPaginationTest.java 2017-02-15 15:57:59.799481508 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesPasswordFieldTest.java 2017-02-15 15:58:00.123484527 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesPasswordFieldTest.java 2017-02-15 15:58:00.059483930 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesProgressBarTest.java 2017-02-15 15:58:00.363486763 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesProgressBarTest.java 2017-02-15 15:58:00.307486241 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesProgressIndicatorTest.java 2017-02-15 15:58:00.607489036 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesProgressIndicatorTest.java 2017-02-15 15:58:00.551488514 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesRadioButtonTest.java 2017-02-15 15:58:00.843491235 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesRadioButtonTest.java 2017-02-15 15:58:00.791490750 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesScrollBarTest.java 2017-02-15 15:58:01.079493433 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesScrollBarTest.java 2017-02-15 15:58:01.019492874 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesScrollPaneTest.java 2017-02-15 15:58:01.323495707 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesScrollPaneTest.java 2017-02-15 15:58:01.267495186 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesSeparatorTest.java 2017-02-15 15:58:01.555497869 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesSeparatorTest.java 2017-02-15 15:58:01.499497347 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesSliderTest.java 2017-02-15 15:58:01.791500067 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesSliderTest.java 2017-02-15 15:58:01.731499508 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesSplitMenuButtonTest.java 2017-02-15 15:58:02.031502303 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesSplitMenuButtonTest.java 2017-02-15 15:58:01.975501782 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesSplitPaneTest.java 2017-02-15 15:58:02.271504539 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesSplitPaneTest.java 2017-02-15 15:58:02.215504017 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesTabPaneTest.java 2017-02-15 15:58:02.507506738 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesTabPaneTest.java 2017-02-15 15:58:02.451506216 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesTableViewTest.java 2017-02-15 15:58:02.739508899 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesTableViewTest.java 2017-02-15 15:58:02.687508416 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesTextAreaTest.java 2017-02-15 15:58:02.979511136 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesTextAreaTest.java 2017-02-15 15:58:02.923510614 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesTextFieldTest.java 2017-02-15 15:58:03.219513372 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesTextFieldTest.java 2017-02-15 15:58:03.167512887 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesTitledPaneTest.java 2017-02-15 15:58:03.459515608 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesTitledPaneTest.java 2017-02-15 15:58:03.407515123 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesToggleButtonTest.java 2017-02-15 15:58:03.695517807 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesToggleButtonTest.java 2017-02-15 15:58:03.639517285 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesToolBarTest.java 2017-02-15 15:58:03.931520005 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesToolBarTest.java 2017-02-15 15:58:03.875519484 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesTreeCellTest.java 2017-02-15 15:58:04.163522168 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesTreeCellTest.java 2017-02-15 15:58:04.107521646 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; @@ -98,7 +98,7 @@ Assert.assertTrue(styleNames.contains("-fx-cell-size")); Map styles = getStyles(); CssMetaData data = styles.get("-fx-cell-size"); - Assert.assertEquals(24.0, data.getInitialValue(getControl())); + Assert.assertEquals(data.getInitialValue(getControl()), "15"); } @Test --- old/functional/FXCssTests/test/test/css/controls/api/styles/StylesTreeViewTest.java 2017-02-15 15:58:04.383524217 +0300 +++ new/functional/FXCssTests/test/test/css/controls/api/styles/StylesTreeViewTest.java 2017-02-15 15:58:04.327523695 +0300 @@ -42,7 +42,7 @@ import org.jemmy.fx.Root; import org.jemmy.action.GetAction; import client.test.Keywords; -import com.sun.javafx.scene.control.skin.*; +import javafx.scene.control.skin.*; import javafx.scene.paint.Paint; import javafx.geometry.Insets; import com.sun.javafx.scene.layout.region.RepeatStruct; --- old/functional/SceneGraphTests/src/test/embedded/helpers/ControlsCheckBoxBuilder.java 2017-02-15 15:58:04.647526677 +0300 +++ new/functional/SceneGraphTests/src/test/embedded/helpers/ControlsCheckBoxBuilder.java 2017-02-15 15:58:04.571525968 +0300 @@ -27,6 +27,7 @@ import javafx.event.ActionEvent; import javafx.event.EventHandler; +import javafx.scene.control.CheckBox; /** * @@ -34,27 +35,23 @@ */ class ControlsCheckBoxBuilder implements CheckBoxBuilder { - private javafx.scene.control.CheckBoxBuilder builder; - - public ControlsCheckBoxBuilder() { - builder = javafx.scene.control.CheckBoxBuilder.create(); - } + private javafx.scene.control.CheckBox cb = new CheckBox(); @Override public CheckBoxBuilder text(String text) { - builder.text(text); + cb.setText(text); return this; } @Override public CheckBoxBuilder id(String id) { - builder.id(id); + cb.setId(id); return this; } @Override public CheckBoxBuilder setOnClickHandler(OnClickHandler handler) { - builder.onAction(new EventHandler() { + cb.setOnAction(new EventHandler() { @Override public void handle(ActionEvent t) { @@ -67,13 +64,13 @@ @Override public CheckBoxBuilder setChecked(boolean checked) { - builder.selected(checked); + cb.setSelected(checked); return this; } @Override public AbstractCheckBox build() { - return new ControlsCheckbox(builder.build()); + return new ControlsCheckbox(cb); } } --- old/functional/SceneGraphTests/src/test/fxapp/LifecycleApp.java 2017-02-15 15:58:04.883528875 +0300 +++ new/functional/SceneGraphTests/src/test/fxapp/LifecycleApp.java 2017-02-15 15:58:04.819528279 +0300 @@ -30,7 +30,7 @@ import javafx.event.EventHandler; import javafx.scene.Group; import javafx.scene.Scene; -import javafx.scene.control.ButtonBuilder; +import javafx.scene.control.Button; import javafx.stage.Stage; /** @@ -74,13 +74,14 @@ for (String string : status.raw = getParameters().getRaw()) { System.out.println(string); } - stage.setScene(new Scene(new Group(ButtonBuilder.create().text("close").onAction(new EventHandler() { - + Button temp = new Button(); + temp.setText("close"); + temp.setOnAction(new EventHandler() { public void handle(ActionEvent t) { stage.close(); } - - }).build()))); + }); + stage.setScene(new Scene(new Group(temp))); stage.show(); } --- old/functional/SceneGraphTests/src/test/scenegraph/app/DepthTestScene.java 2017-02-15 15:58:05.119531074 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/app/DepthTestScene.java 2017-02-15 15:58:05.063530553 +0300 @@ -79,8 +79,7 @@ VBox switchesAndRadios = new VBox(1); switchesAndRadios.getChildren().addAll(tuneGrid, backFrontRadio, - HBoxBuilder.create().children(indicator, referenceGreen, referenceRed).spacing(10). - build(), details); + new HBox(10, indicator, referenceGreen, referenceRed), details); root.setLeft(depthTestGroup); root.setRight(switchesAndRadios); --- old/functional/SceneGraphTests/src/test/scenegraph/app/Effects2App.java 2017-02-15 15:58:05.363533348 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/app/Effects2App.java 2017-02-15 15:58:05.307532826 +0300 @@ -23,14 +23,24 @@ */ package test.scenegraph.app; +import java.io.IOException; +import java.net.URL; import java.util.ArrayList; +import java.util.Enumeration; import java.util.List; +import java.util.Timer; +import java.util.TimerTask; +import java.util.logging.Level; +import java.util.logging.Logger; +import javafx.animation.RotateTransition; +import javafx.geometry.Bounds; import javafx.scene.Group; import javafx.scene.Node; import javafx.scene.effect.*; import javafx.scene.effect.Light.Distant; import javafx.scene.effect.Light.Point; import javafx.scene.effect.Light.Spot; +import javafx.scene.image.Image; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; @@ -41,6 +51,7 @@ import javafx.scene.text.Font; import javafx.scene.text.FontWeight; import javafx.scene.text.Text; +import javafx.util.Duration; import test.javaclient.shared.BasicButtonChooserApp; import test.javaclient.shared.PageWithSlots; import test.javaclient.shared.TestNode; @@ -89,6 +100,36 @@ private Factory textFactory; // Blend page ------------------------------------------------------------- + private class slotTexturedBlendRectangle extends TestNode { + private Image image = new Image( + getClass().getResourceAsStream(ImagesApp.IMAGE_BASE + "blend_texture.png")); + + @Override + public Node drawNode() { + Blend blend = new Blend(); + blend.setTopInput(new ImageInput(image)); + blend.setMode(BlendMode.SRC_ATOP); + + Polygon p = new Polygon(0, 200, 100, 0, 200, 200); + p.setLayoutX(100); + p.setLayoutY(100); + p.setFill(Color.RED); + p.setStroke(Color.ORANGE); + p.setStrokeWidth(4.0); + p.setStrokeType(StrokeType.OUTSIDE); + + + //Just need to add effect somewhere in the future, when the polygon is already drawn + new Timer().schedule(new TimerTask() { + @Override + public void run() { + p.setEffect(blend); + } + }, 500); + return p; + } + } + private class slotBlendRectangleCircle extends TestNode { Group group; @@ -162,8 +203,9 @@ public Node drawNode() { Group group = new Group(); group.setEffect(new Bloom(threshold)); - group.getChildren().add(RectangleBuilder.create().x(0).y(0).width(160).height(80). - fill(Color.DARKBLUE).build()); + Rectangle temp = new Rectangle(0, 0, 160, 80); + temp.setFill(Color.DARKBLUE); + group.getChildren().add(temp); Text text = new Text("Bloom!"); group.getChildren().add(text); text.setX(10); @@ -246,8 +288,11 @@ nes.add(new NamedEffect("defaults", new DisplacementMap(mapWaves))); nes.add(new NamedEffect("scale", new DisplacementMap(mapWaves, 0, 0, 1.2f, 2.0f))); nes.add(new NamedEffect("offset", new DisplacementMap(mapWaves, 0.2f, 0.1f, 1.0, 1.0))); - nes.add(new NamedEffect("wrap", DisplacementMapBuilder.create().mapData(mapWaves). - wrap(true).offsetX(0.5f).offsetY(0.3f).build())); + DisplacementMap temp = new DisplacementMap(mapWaves); + temp.setWrap(true); + temp.setOffsetX(0.5f); + temp.setOffsetY(0.3f); + nes.add(new NamedEffect("wrap", temp)); return nes; } @Override @@ -255,8 +300,9 @@ group = new Group(); group.setEffect(namedeffect.effect); group.getChildren().add(new Rectangle(10,10, 100, 50)); - group.getChildren().add(RectangleBuilder.create().x(0).y(0).width(120).height(120). - fill(Color.TRANSPARENT).build()); // widener + Rectangle temp = new Rectangle(0, 0, 120, 120); + temp.setFill(Color.TRANSPARENT); + group.getChildren().add(temp); // widener Text text = new Text("Waves"); text.setX(11); text.setY(50); @@ -280,8 +326,9 @@ VBox vb = new VBox(); group = new Group(); group.setEffect(e); - group.getChildren().add(RectangleBuilder.create().x(10).y(10).width(100).height(50). - fill(Color.YELLOW).build()); + Rectangle temp = new Rectangle(10, 10, 100, 50); + temp.setFill(Color.YELLOW); + group.getChildren().add(temp); Text text = new Text("Text"); text.setFill(Color.RED); // text.setFont(Font.font("Verdana", 28)); @@ -307,7 +354,9 @@ nes.add(new NamedEffect("width: 40", new DropShadow(10., 0., 0., Color.BLACK) {{ setWidth(40);}})); nes.add(new NamedEffect("spread: 0.7", new DropShadow(BlurType.THREE_PASS_BOX, Color.BLACK, 10., 0.7, 0., 0.))); for (final BlurType bt : BlurType.values()) { - nes.add(new NamedEffect("bt:" + bt.name(), DropShadowBuilder.create().blurType(bt).build())); + DropShadow temp = new DropShadow(); + temp.setBlurType(bt); + nes.add(new NamedEffect("bt:" + bt.name(), temp)); } nes.add(new NamedEffect("offset: 10, 20", new DropShadow(10., 10, 20, Color.BLACK))); return nes; @@ -353,8 +402,9 @@ Text tmpTxt = new Text("Background"); tmpTxt.setFill(Color.RED); st.getChildren().add(tmpTxt); - st.getChildren().add(RectangleBuilder.create().x(0).y(0).width(40).height(40). - effect(new ColorInput(5, 5, 70, 70, Color.rgb(0, 255, 0, 0.5f))).build()); + Rectangle temp = new Rectangle(0, 0, 40, 40); + temp.setEffect(new ColorInput(5, 5, 70, 70, Color.rgb(0, 255, 0, 0.5f))); + st.getChildren().add(temp); return st; } @@ -403,8 +453,9 @@ text.setFill(Color.YELLOW); group.getChildren().add(text); - group.getChildren().add(RectangleBuilder.create().x(10).y(10).width(100).height(40). - fill(Color.LIGHTBLUE).build()); + Rectangle temp = new Rectangle(10, 10, 100, 40); + temp.setFill(Color.LIGHTBLUE); + group.getChildren().add(temp); vb.getChildren().add(group); return vb; @@ -420,15 +471,31 @@ } List getNamedEffectList() { List nes = new ArrayList(); - nes.add(new NamedEffect("colored", InnerShadowBuilder.create().color(Color.GREEN).build())); - nes.add(new NamedEffect("height: 40", InnerShadowBuilder.create().height(40).build())); - nes.add(new NamedEffect("width: 40", InnerShadowBuilder.create().width(40).build())); - nes.add(new NamedEffect("radius: 40", InnerShadowBuilder.create().radius(40).build())); + InnerShadow temp; + temp = new InnerShadow(); + temp.setColor(Color.GREEN); + nes.add(new NamedEffect("colored", temp)); + temp = new InnerShadow(); + temp.setHeight(40); + nes.add(new NamedEffect("height: 40", temp)); + temp = new InnerShadow(); + temp.setWidth(40); + nes.add(new NamedEffect("width: 40", temp)); + temp = new InnerShadow(); + temp.setRadius(40); + nes.add(new NamedEffect("radius: 40", temp)); for (final BlurType bt : BlurType.values()) { - nes.add(new NamedEffect("bt:" + bt.name(), InnerShadowBuilder.create().blurType(bt).build())); + temp = new InnerShadow(); + temp.setBlurType(bt); + nes.add(new NamedEffect("bt:" + bt.name(), temp)); } - nes.add(new NamedEffect("choke: 0.7", InnerShadowBuilder.create().choke(0.7f).build())); - nes.add(new NamedEffect("offset: 10, 20", InnerShadowBuilder.create().offsetX(10).offsetY(20).build())); + temp = new InnerShadow(); + temp.setChoke(0.7f); + nes.add(new NamedEffect("choke: 0.7", temp)); + temp = new InnerShadow(); + temp.setOffsetX(10); + temp.setOffsetY(20); + nes.add(new NamedEffect("offset: 10, 20", temp)); return nes; } @@ -442,22 +509,47 @@ } List getNamedEffectList() { List nes = new ArrayList(); - nes.add(new NamedEffect("default", new Lighting())); - nes.add(new NamedEffect("distant light", LightingBuilder.create().light(new Distant() - {{ setAzimuth(90f); setElevation(50);}}).build())); - nes.add(new NamedEffect("point light", LightingBuilder.create().light(new Point( - 70, 120, 10, Color.WHITE)).build())); - nes.add(new NamedEffect("spot light", LightingBuilder.create().light(new Spot() {{ - setX(70);setY(120);setZ(50); - setPointsAtX(150);setPointsAtY(0);setPointsAtZ(0); - }}).build())); - - nes.add(new NamedEffect("diffuse: 0.5", LightingBuilder.create().diffuseConstant(0.5f).build())); - nes.add(new NamedEffect("specularC: 1.5", LightingBuilder.create().specularConstant(1.5f).build())); - nes.add(new NamedEffect("specularExp: 35", LightingBuilder.create().specularExponent(35f).build())); - nes.add(new NamedEffect("scale: 7", LightingBuilder.create().surfaceScale(7f).build())); - nes.add(new NamedEffect("bump input", LightingBuilder.create().bumpInput(new DropShadow()).build())); - nes.add(new NamedEffect("content input", LightingBuilder.create().contentInput(new DropShadow()).build())); + Lighting temp = new Lighting(); + nes.add(new NamedEffect("default", temp)); + temp = new Lighting(); + Light.Distant td = new Light.Distant(); + td.setAzimuth(90f); + td.setElevation(50); + temp.setLight(td); + nes.add(new NamedEffect("distant light", temp)); + temp = new Lighting(); + Light.Point tp = new Light.Point(70, 120, 10, Color.WHITE); + temp.setLight(tp); + nes.add(new NamedEffect("point light", temp)); + temp = new Lighting(); + Light.Spot ts = new Light.Spot(); + ts.setX(70); + ts.setY(120); + ts.setZ(50); + ts.setPointsAtX(150); + ts.setPointsAtY(0); + ts.setPointsAtZ(0); + temp.setLight(ts); + nes.add(new NamedEffect("spot light", temp)); + + temp = new Lighting(); + temp.setDiffuseConstant(0.5f); + nes.add(new NamedEffect("diffuse: 0.5", temp)); + temp = new Lighting(); + temp.setSpecularConstant(1.5f); + nes.add(new NamedEffect("specularC: 1.5", temp)); + temp = new Lighting(); + temp.setSpecularExponent(35f); + nes.add(new NamedEffect("specularExp: 35", temp)); + temp = new Lighting(); + temp.setSurfaceScale(7f); + nes.add(new NamedEffect("scale: 7", temp)); + temp = new Lighting(); + temp.setBumpInput(new DropShadow()); + nes.add(new NamedEffect("bump input", temp)); + temp = new Lighting(); + temp.setContentInput(new DropShadow()); + nes.add(new NamedEffect("content input", temp)); return nes; } @@ -497,11 +589,20 @@ } List getNamedEffectList() { List nes = new ArrayList(); - nes.add(new NamedEffect("default", new Reflection() )); - nes.add(new NamedEffect("bottom opacity 0.7", ReflectionBuilder.create().bottomOpacity(.7f).build())); - nes.add(new NamedEffect("fraction: 0.5", ReflectionBuilder.create().fraction(0.5f).build())); - nes.add(new NamedEffect("top offset: 15", ReflectionBuilder.create().topOffset(15).build())); - nes.add(new NamedEffect("top opacity: 0.9", ReflectionBuilder.create().topOpacity(.9f).build())); + Reflection temp = new Reflection(); + nes.add(new NamedEffect("default", temp)); + temp = new Reflection(); + temp.setBottomOpacity(.7f); + nes.add(new NamedEffect("bottom opacity 0.7", temp)); + temp = new Reflection(); + temp.setFraction(0.5f); + nes.add(new NamedEffect("fraction: 0.5", temp)); + temp = new Reflection(); + temp.setTopOffset(15); + nes.add(new NamedEffect("top offset: 15", temp)); + temp = new Reflection(); + temp.setTopOpacity(.9f); + nes.add(new NamedEffect("top opacity: 0.9", temp)); return nes; } @@ -516,12 +617,22 @@ } List getNamedEffectList() { List nes = new ArrayList(); - nes.add(new NamedEffect("colored", ShadowBuilder.create().color(Color.GREEN).build())); - nes.add(new NamedEffect("height: 40", ShadowBuilder.create().height(40).build())); - nes.add(new NamedEffect("width: 40", ShadowBuilder.create().width(40).build())); - nes.add(new NamedEffect("radius: 40", ShadowBuilder.create().radius(40).build())); + Shadow temp = new Shadow(); + temp.setColor(Color.GREEN); + nes.add(new NamedEffect("colored", temp)); + temp = new Shadow(); + temp.setHeight(40); + nes.add(new NamedEffect("height: 40", temp)); + temp = new Shadow(); + temp.setWidth(40); + nes.add(new NamedEffect("width: 40", temp)); + temp = new Shadow(); + temp.setRadius(40); + nes.add(new NamedEffect("radius: 40", temp)); for (final BlurType bt : BlurType.values()) { - nes.add(new NamedEffect("bt:" + bt.name(), ShadowBuilder.create().blurType(bt).build())); + temp = new Shadow(); + temp.setBlurType(bt); + nes.add(new NamedEffect("bt:" + bt.name(), temp)); } return nes; @@ -547,7 +658,7 @@ blendPage.add(new slotBlendRectangleCircle(blendMode), blendMode.name()); } blendPage.add(new slotBlend2(),"Grad_SrcOut"); - + blendPage.add(new slotTexturedBlendRectangle(), "Textured"); // ======== BLOOM ================= final PageWithSlots bloomPage = new PageWithSlots(Pages.Bloom.name(), heightPageContentPane, widthPageContentPane); bloomPage.setSlotSize(160, 160); @@ -562,8 +673,7 @@ for (final int iterations : new int[]{1, 3}) { for (final int _width : new int[]{1, 10, 20}) { for (final int _height : new int[]{1, 10, 20}) { - final Node node = textFactory.create(BoxBlurBuilder.create().width(_width). - height(_height).iterations(iterations).build()); + final Node node = textFactory.create(new BoxBlur(_width, _height, iterations)); blurPage.add(new slotBlur(node),"W:" + _width + " H:" + _height + " I:" + iterations); } } @@ -608,7 +718,7 @@ final PageWithSlots glowPage = new PageWithSlots(Pages.Glow.name(), heightPageContentPane, widthPageContentPane); glowPage.setSlotSize(160, 160); for (final Float level : new Float[] {0f, 0.3f, 0.7f, 1f}) { - Glow gl = GlowBuilder.create().level(level).build(); + Glow gl = new Glow(level); glowPage.add(new slotWithTextNode(gl),"Level_" + level); } @@ -631,8 +741,7 @@ motionBlurPage.setSlotSize(120, 120); for (final int radius : new int[] {0, 10, 20}) { for (final int angle : new int[] {0, 45, 160, 315}) { - motionBlurPage.add(new slotWithTextNode(MotionBlurBuilder.create().angle(angle). - radius(radius).build()), "Angle_" + angle + "_Radius_" + radius); + motionBlurPage.add(new slotWithTextNode(new MotionBlur(angle, radius)), "Angle_" + angle + "_Radius_" + radius); } } --- old/functional/SceneGraphTests/src/test/scenegraph/app/LocalTo_TransformsApp.java 2017-02-15 15:58:05.635535882 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/app/LocalTo_TransformsApp.java 2017-02-15 15:58:05.571535286 +0300 @@ -34,7 +34,6 @@ import javafx.scene.layout.HBox; import javafx.scene.layout.StackPane; import javafx.scene.shape.Circle; -import javafx.scene.shape.CircleBuilder; import javafx.stage.Stage; import test.javaclient.shared.InteroperabilityApp; import test.javaclient.shared.Utils; @@ -69,10 +68,15 @@ StackPane doubleNestedPane = new StackPane(); StackPane forthPane = new StackPane(); - Circle circle1 = CircleBuilder.create().radius(20).id("circle_one").build(); - Circle circle2 = CircleBuilder.create().radius(20).id("circle_two").build(); - Circle circle3 = CircleBuilder.create().radius(20).id("circle_three").build(); - Circle circle4 = CircleBuilder.create().radius(20).id("circle_four").translateZ(-50).build(); + Circle circle1 = new Circle(20); + circle1.setId("circle_one"); + Circle circle2 = new Circle(20); + circle2.setId("circle_two"); + Circle circle3 = new Circle(20); + circle3.setId("circle_three"); + Circle circle4 = new Circle(20); + circle4.setId("circle_four"); + circle4.setTranslateZ(-50); forthPane.getChildren().add(circle4); doubleNestedPane.getChildren().add(circle3); --- old/functional/SceneGraphTests/src/test/scenegraph/app/SceneEventHandlersApp.java 2017-02-15 15:58:05.879538156 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/app/SceneEventHandlersApp.java 2017-02-15 15:58:05.815537559 +0300 @@ -41,7 +41,7 @@ import javafx.scene.input.*; import javafx.scene.layout.BorderPane; import javafx.scene.layout.FlowPane; -import javafx.scene.layout.VBoxBuilder; +import javafx.scene.layout.VBox; import test.javaclient.shared.InteroperabilityApp; import test.javaclient.shared.Utils; @@ -116,7 +116,9 @@ for(EventTypes t: EventTypes.values()) { - Label lb = LabelBuilder.create().text(t.toString()).id(t.toString()).style(NOT_HANDLED_STYLE).build(); + Label lb = new Label(t.toString()); + lb.setId(t.toString()); + lb.setStyle(NOT_HANDLED_STYLE); controlLabels.add(lb); } @@ -128,7 +130,10 @@ flow.getChildren().addAll(actionButton, dragField, dropField); root.setTop(eventCombo); root.setCenter(flow); - root.setLeft(VBoxBuilder.create().children(controlLabels).padding(new Insets(10, 10, 10, 10)).build()); + VBox temp = new VBox(); + temp.getChildren().addAll(controlLabels); + temp.setPadding(new Insets(10, 10, 10, 10)); + root.setLeft(temp); scene = new Scene(root); scene.addEventHandler(MouseEvent.DRAG_DETECTED, new EventHandler() { --- old/functional/SceneGraphTests/src/test/scenegraph/app/TimelineApp.java 2017-02-15 15:58:06.115540354 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/app/TimelineApp.java 2017-02-15 15:58:06.059539832 +0300 @@ -31,7 +31,6 @@ import javafx.event.EventHandler; import javafx.scene.Node; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.Label; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; @@ -143,11 +142,13 @@ final Timeline timeline = createTimelineAndPlayButton(field, "3"); timeline.setAutoReverse(false); timeline.setCycleCount(Timeline.INDEFINITE); - field.getChildren().add(ButtonBuilder.create().text("stop").onAction(new EventHandler() { + Button temp1 = new Button("stop"); + temp1.setOnAction(new EventHandler() { public void handle(ActionEvent t) { timeline.stop(); } - }).build()); + }); + field.getChildren().add(temp1); addSlot("infinite-stop", field); } @@ -158,11 +159,13 @@ final Timeline timeline = createTimelineAndPlayButton(field, "4"); timeline.setAutoReverse(false); timeline.setCycleCount(Timeline.INDEFINITE); - field.getChildren().add(ButtonBuilder.create().text("pause").onAction(new EventHandler() { + Button temp2 = new Button("pause"); + temp2.setOnAction(new EventHandler() { public void handle(ActionEvent t) { timeline.pause(); } - }).build()); + }); + field.getChildren().add(temp2); addSlot("infinite-pause", field); } --- old/functional/SceneGraphTests/src/test/scenegraph/binding/Factories.java 2017-02-15 15:58:06.347542516 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/binding/Factories.java 2017-02-15 15:58:06.287541956 +0300 @@ -91,7 +91,7 @@ ArcTo(shapes, new DefaultFactory() { public NodeAndBindee create() { - MoveTo moveTo = MoveToBuilder.create().x(50).y(50).build(); + MoveTo moveTo = new MoveTo(50, 50); ArcTo node = new ArcTo(); node.setX(100.0f); @@ -99,7 +99,7 @@ node.setRadiusX(50.0f); node.setRadiusY(50.0f); - Path path = PathBuilder.create().elements(moveTo, node).build(); + Path path = new Path(moveTo, node); addStroke(path); return new BindingApp.NodeAndBindee(path, node); } @@ -137,7 +137,7 @@ CubicCurveTo(shapes, new DefaultFactory() { public NodeAndBindee create() { - MoveTo moveTo = MoveToBuilder.create().x(50).y(50).build(); + MoveTo moveTo = new MoveTo(50, 50); CubicCurveTo node = new CubicCurveTo(); node.setControlX1(80.0f); @@ -146,7 +146,7 @@ node.setControlX2(60.0f); node.setControlY2(-50.0f); - Path path = PathBuilder.create().elements(moveTo, node).build(); + Path path = new Path(moveTo, node); addStroke(path); return new BindingApp.NodeAndBindee(path, node); } @@ -166,9 +166,9 @@ HLineTo(shapes, new DefaultFactory() { public NodeAndBindee create() { - MoveTo moveTo = MoveToBuilder.create().x(50).y(50).build(); + MoveTo moveTo = new MoveTo(50, 50); HLineTo node = new HLineTo(100); - Path path = PathBuilder.create().elements(moveTo, node).build(); + Path path = new Path(moveTo, node); addStroke(path); return new BindingApp.NodeAndBindee(path, node); } @@ -176,7 +176,7 @@ Line(shapes, new DefaultFactory() { public NodeAndBindee create() { - Line node = LineBuilder.create().startX(20).startY(20).endX(100).endY(50).build(); + Line node = new Line(20, 20, 100, 50); addStroke(node); return new BindingApp.NodeAndBindee(node, node); } @@ -184,11 +184,11 @@ LineTo(shapes, new DefaultFactory() { public NodeAndBindee create() { - MoveTo moveTo = MoveToBuilder.create().x(50).y(50).build(); + MoveTo moveTo = new MoveTo(50, 50); LineTo node = new LineTo(100, 80); - Path path = PathBuilder.create().elements(moveTo, node).build(); + Path path = new Path(moveTo, node); addStroke(path); return new BindingApp.NodeAndBindee(path, node); } @@ -196,11 +196,11 @@ MoveTo(shapes, new DefaultFactory() { public NodeAndBindee create() { - MoveTo moveTo = MoveToBuilder.create().x(50).y(50).build(); + MoveTo moveTo = new MoveTo(50, 50); LineTo node = new LineTo(100, 80); - Path path = PathBuilder.create().elements(moveTo, node).build(); + Path path = new Path(moveTo, node); addStroke(path); return new BindingApp.NodeAndBindee(path, moveTo); } @@ -208,12 +208,12 @@ Path(shapes, new DefaultFactory() { public NodeAndBindee create() { - MoveTo moveTo = MoveToBuilder.create().x(50).y(50).build(); + MoveTo moveTo = new MoveTo(50, 50); LineTo node = new LineTo(100, 80); LineTo node2 = new LineTo(200, 180); - Path path = PathBuilder.create().elements(moveTo, node, node2).build(); + Path path = new Path(moveTo, node, node2); addStroke(path); return new BindingApp.NodeAndBindee(path, path); } @@ -264,16 +264,19 @@ QuadCurveTo(shapes, new DefaultFactory() { public NodeAndBindee create() { - MoveTo moveTo = MoveToBuilder.create().x(50).y(50).build(); - QuadCurveTo node = QuadCurveToBuilder.create().controlX(125).controlY(0).build(); - Path path = PathBuilder.create().elements(moveTo, node).build(); + MoveTo moveTo = new MoveTo(50, 50); + QuadCurveTo node = new QuadCurveTo(); + node.setControlX(125); + node.setControlY(0); + Path path = new Path(moveTo, node); addStroke(path); return new BindingApp.NodeAndBindee(path, path); } }), SVGPath(shapes, new DefaultFactory() { public NodeAndBindee create() { - SVGPath node = SVGPathBuilder.create().content("M40,60 C42,148 144,30 25,32").build(); + SVGPath node = new SVGPath(); + node.setContent("M40,60 C42,148 144,30 25,32"); addStroke(node); return new BindingApp.NodeAndBindee(node, node); } @@ -281,9 +284,9 @@ VLineTo(shapes, new DefaultFactory() { public NodeAndBindee create() { - MoveTo moveTo = MoveToBuilder.create().x(50).y(50).build(); + MoveTo moveTo = new MoveTo(50, 50); VLineTo node = new VLineTo(100); - Path path = PathBuilder.create().elements(moveTo, node).build(); + Path path = new Path(moveTo, node); addStroke(path); return new BindingApp.NodeAndBindee(path, node); } @@ -320,7 +323,7 @@ Blend b = new Blend(); b.setOpacity(0.7); b.setMode(BlendMode.ADD); - b.setTopInput(ColorInputBuilder.create().paint(Color.BLUE).x(30).y(30).width(100).height(80).build()); + b.setTopInput(new ColorInput(30, 30, 100, 80, Color.BLUE)); rect.setEffect(b); Group group = new Group(rect0,rect); return new NodeAndBindee(group, b); @@ -332,8 +335,12 @@ Group group = new Group(); Bloom bloom = new Bloom(); group.setEffect(bloom); - group.getChildren().add(RectangleBuilder.create().x(10).y(10).width(160).height(80).fill(Color.DARKBLUE).build()); - group.getChildren().add(RectangleBuilder.create().x(50).y(50).width(50).height(50).fill(Color.YELLOW).build()); + Rectangle r1 = new Rectangle (10, 10, 160, 80); + r1.setFill(Color.DARKBLUE); + Rectangle r2 = new Rectangle (50, 50, 50, 50); + r1.setFill(Color.YELLOW); + group.getChildren().add(r1); + group.getChildren().add(r2); return new NodeAndBindee(group, bloom); } }) @@ -365,10 +372,14 @@ public NodeAndBindee create() { Group group = new Group(); - DisplacementMap dm = DisplacementMapBuilder.create().mapData(Consts.MAP_WAVES).build(); + DisplacementMap dm = new DisplacementMap(Consts.MAP_WAVES); group.setEffect(dm); - group.getChildren().add(RectangleBuilder.create().x(50).y(50).width(200).height(80).fill(Color.DARKBLUE).build()); - group.getChildren().add(RectangleBuilder.create().x(0).y(0).width(250).height(200).fill(Color.TRANSPARENT).build()); + Rectangle r1 = new Rectangle (50, 50, 200, 80); + r1.setFill(Color.DARKBLUE); + Rectangle r2 = new Rectangle (0, 0, 250, 200); + r1.setFill(Color.TRANSPARENT); + group.getChildren().add(r1); + group.getChildren().add(r2); return new NodeAndBindee(group, dm); } }) @@ -376,7 +387,12 @@ ,Flood(effects, new EffectFactory() { @Override public Effect getEffect() { - return ColorInputBuilder.create().x(0).y(0).width(50).height(50).build(); + ColorInput temp = new ColorInput(); + temp.setX(0); + temp.setY(0); + temp.setWidth(50); + temp.setHeight(50); + return temp; } }) @@ -396,9 +412,7 @@ ,Identity(effects, new EffectFactory() { @Override public Effect getEffect() { - return ImageInputBuilder.create(). - source(new Image(Factories.class.getResourceAsStream("/test/scenegraph/resources/car.png"))). - build(); + return new ImageInput(new Image(Factories.class.getResourceAsStream("/test/scenegraph/resources/car.png"))); } }) @@ -578,7 +592,10 @@ ScrollBar(controls, new DefaultFactory() { public NodeAndBindee create() { - ScrollBar node = ScrollBarBuilder.create().min(0).max(100).value(50).build(); + ScrollBar node = new ScrollBar(); + node.setMin(0); + node.setMax(100); + node.setValue(50); prepareControl(node); return new BindingApp.NodeAndBindee(node, node); } @@ -739,8 +756,12 @@ public NodeAndBindee create() { Effect effect = getEffect(); - Rectangle rect = RectangleBuilder.create().x(100).y(100).width(100).height(100).fill(Color.LIGHTGREEN). - stroke(Color.DARKGREEN).arcHeight(20).arcWidth(30).effect(effect).build(); + Rectangle rect = new Rectangle(100, 100, 100, 100); + rect.setFill(Color.LIGHTGREEN); + rect.setStroke(Color.DARKGREEN); + rect.setArcHeight(20); + rect.setArcWidth(30); + rect.setEffect(effect); return new NodeAndBindee(rect, effect); } --- old/functional/SceneGraphTests/src/test/scenegraph/fullscreen/FSTestApp.java 2017-02-15 15:58:06.603544901 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/fullscreen/FSTestApp.java 2017-02-15 15:58:06.555544454 +0300 @@ -44,8 +44,7 @@ import javafx.scene.layout.*; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; -import javafx.scene.shape.CircleBuilder; -import javafx.scene.shape.LineBuilder; +import javafx.scene.shape.Line; import javafx.scene.text.Text; import javafx.stage.Modality; import javafx.stage.Screen; @@ -80,107 +79,83 @@ primaryStage.setTitle("FSTestApp"); primaryStage.setResizable(resizable); - GridPane buttonsPane = GridPaneBuilder.create() - .padding(new Insets(10)) - .alignment(Pos.CENTER) - .columnConstraints(new ColumnConstraints(200), new ColumnConstraints(200)) - .rowConstraints(new RowConstraints(30), new RowConstraints(30), - new RowConstraints(30), new RowConstraints(30), - new RowConstraints(30)) - .build(); - - final TextArea logTextArea = TextAreaBuilder.create() - .editable(false) - .build(); + GridPane buttonsPane = new GridPane(); + buttonsPane.setPadding(new Insets(10)); + buttonsPane.setAlignment(Pos.CENTER); + buttonsPane.getColumnConstraints().add(new ColumnConstraints(200)); + buttonsPane.getColumnConstraints().add(new ColumnConstraints(200)); + buttonsPane.getRowConstraints().add(new RowConstraints(30)); + buttonsPane.getRowConstraints().add(new RowConstraints(30)); + buttonsPane.getRowConstraints().add(new RowConstraints(30)); + buttonsPane.getRowConstraints().add(new RowConstraints(30)); + buttonsPane.getRowConstraints().add(new RowConstraints(30)); - //Timer for update logTextArea - Timeline updateLogTimeline = TimelineBuilder.create() - .keyFrames(new KeyFrame(Duration.seconds(0.1), new EventHandler() { + final TextArea logTextArea = new TextArea(); + logTextArea.setEditable(false); + //Timer for update logTextArea + Timeline updateLogTimeline = new Timeline(new KeyFrame(Duration.seconds(0.1), new EventHandler() { public void handle(ActionEvent t) { logTextArea.insertText(logTextArea.getLength(), log.toString()); log.delete(0, log.length()); } - }, ( KeyValue[])null)) // cast null to suppress compiler warning - .cycleCount(-1) - .build(); + }, ( KeyValue[])null)); // cast null to suppress compiler warning + updateLogTimeline.setCycleCount(-1); // - MenuBar menu = MenuBarBuilder.create() - .menus( - MenuBuilder.create() - .text("_Menu1") - .onShown(new EventHandler() { - - public void handle(Event t) { - log.append("Menu 1 Shown\n"); - } - }) - .onHidden(new EventHandler() { - - public void handle(Event t) { - log.append("Menu 1 Hidden\n"); - } - }) - .mnemonicParsing(true) - .items( - MenuItemBuilder.create() - .mnemonicParsing(true) - .onAction(new EventHandler() { - - public void handle(ActionEvent t) { - log.append("Menu Item 1 Action\n"); - } - }) - .accelerator(KeyCombination.keyCombination("ctrl+m")) - .text("Menu _Item 1") - .build(), - MenuItemBuilder.create() - .mnemonicParsing(true) - .text("Menu I_tem 2") - .build()) - .build(), - MenuBuilder.create() - .mnemonicParsing(true) - .text("M_enu2") - .onShown(new EventHandler() { - - public void handle(Event t) { - log.append("Menu 2 Shown\n"); - } - }) - .onHidden(new EventHandler() { - - public void handle(Event t) { - log.append("Menu 2 Hidden\n"); - } - }) - .items( - MenuItemBuilder.create() - .mnemonicParsing(true) - .text("Menu _Item 1") - .build(), - MenuItemBuilder.create() - .mnemonicParsing(true) - .text("Menu I_tem 2") - .build(), - MenuItemBuilder.create() - .mnemonicParsing(true) - .text("Menu Ite_m 3") - .build()) - .build()) - .useSystemMenuBar(true) - .build(); + Menu menu1 = new Menu("_Menu1"); + menu1.setOnShown(new EventHandler() { + public void handle(Event t) { + log.append("Menu 1 Shown\n"); + } + }); + menu1.setOnHidden(new EventHandler() { + public void handle(Event t) { + log.append("Menu 1 Hidden\n"); + } + }); + menu1.setMnemonicParsing(true); + MenuItem mi11 = new MenuItem("Menu _Item 1"); + mi11.setAccelerator(KeyCombination.keyCombination("ctrl+m")); + mi11.setMnemonicParsing(true); + mi11.setOnAction(new EventHandler() { + public void handle(ActionEvent t) { + log.append("Menu Item 1 Action\n"); + } + }); + MenuItem mi12 = new MenuItem("Menu I_tem 2"); + mi12.setMnemonicParsing(true); + menu1.getItems().addAll(mi11, mi12); + + Menu menu2 = new Menu("M_enu2"); + menu2.setMnemonicParsing(true); + menu2.setOnShown(new EventHandler() { + public void handle(Event t) { + log.append("Menu 2 Shown\n"); + } + }); + menu2.setOnHidden(new EventHandler() { + public void handle(Event t) { + log.append("Menu 2 Hidden\n"); + } + }); + MenuItem mi21 = new MenuItem("Menu _Item 1"); + mi21.setMnemonicParsing(true); + MenuItem mi22 = new MenuItem("Menu I_tem 2"); + mi22.setMnemonicParsing(true); + MenuItem mi23 = new MenuItem("Menu Ite_m 3"); + mi23.setMnemonicParsing(true); + menu1.getItems().addAll(mi21, mi22, mi23); + + MenuBar menu = new MenuBar(menu1, menu2); + menu.setUseSystemMenuBar(true); // // - final Circle fullscreenIndicator = - CircleBuilder.create() - .radius(6) - .fill(Color.RED) - .effect(new InnerShadow()) - .build(); + final Circle fullscreenIndicator = new Circle(6); + fullscreenIndicator.setFill(Color.RED); + fullscreenIndicator.setEffect(new InnerShadow()); primaryStage.fullScreenProperty().addListener(new ChangeListener() { @@ -192,168 +167,122 @@ // // - Button setFSFalseButton = ButtonBuilder.create() - .text("Set fullscreen false") - .alignment(Pos.CENTER) - .prefWidth(180) - .onMouseClicked(new EventHandler() { - - @Override - public void handle(MouseEvent arg0) { - primaryStage.setFullScreen(false); - } - }) - .build(); - + Button setFSFalseButton = new Button("Set fullscreen false"); + setFSFalseButton.setAlignment(Pos.CENTER); + setFSFalseButton.setPrefWidth(180); + setFSFalseButton.setOnMouseClicked(new EventHandler() { + @Override + public void handle(MouseEvent arg0) { + primaryStage.setFullScreen(false); + } + }); buttonsPane.add(setFSFalseButton, 0, 0); // // - Button setFSTrueButton = ButtonBuilder.create() - .text("Set fullscreen true") - .alignment(Pos.CENTER) - .prefWidth(180) - .onMouseClicked(new EventHandler() { - - @Override - public void handle(MouseEvent arg0) { - primaryStage.setFullScreen(true); - } - }) - .build(); - + Button setFSTrueButton = new Button("Set fullscreen true"); + setFSTrueButton.setAlignment(Pos.CENTER); + setFSTrueButton.setPrefWidth(180); + setFSTrueButton.setOnMouseClicked(new EventHandler() { + @Override + public void handle(MouseEvent arg0) { + primaryStage.setFullScreen(true); + } + }); buttonsPane.add(setFSTrueButton, 1, 0); // // - Button centerButton = ButtonBuilder.create() - .text("Center") - .alignment(Pos.CENTER) - .prefWidth(180) - .onMouseClicked(new EventHandler() { - - @Override - public void handle(MouseEvent arg0) { - primaryStage.centerOnScreen(); - } - }) - .build(); - + Button centerButton = new Button("Center"); + centerButton.setAlignment(Pos.CENTER); + centerButton.setPrefWidth(180); + centerButton.setOnMouseClicked(new EventHandler() { + @Override + public void handle(MouseEvent arg0) { + primaryStage.centerOnScreen(); + } + }); buttonsPane.add(centerButton, 0, 1); // // - Button closeButton = ButtonBuilder.create() - .text("Close") - .alignment(Pos.CENTER) - .prefWidth(180) - .onMouseClicked(new EventHandler() { - - @Override - public void handle(MouseEvent arg0) { - primaryStage.close(); - } - }) - .build(); - + Button closeButton = new Button("Close"); + closeButton.setAlignment(Pos.CENTER); + closeButton.setPrefWidth(180); + closeButton.setOnMouseClicked(new EventHandler() { + @Override + public void handle(MouseEvent arg0) { + primaryStage.close(); + } + }); buttonsPane.add(closeButton, 1, 1); // // - Button sizeToSceneButton = ButtonBuilder.create() - .text("Size to scene") - .alignment(Pos.CENTER) - .prefWidth(180) - .onMouseClicked(new EventHandler() { - - @Override - public void handle(MouseEvent arg0) { - primaryStage.sizeToScene(); - } - }) - .build(); - + Button sizeToSceneButton = new Button("Size to scene"); + sizeToSceneButton.setAlignment(Pos.CENTER); + sizeToSceneButton.setPrefWidth(180); + sizeToSceneButton.setOnMouseClicked(new EventHandler() { + @Override + public void handle(MouseEvent arg0) { + primaryStage.sizeToScene(); + } + }); buttonsPane.add(sizeToSceneButton, 0, 2); // // - Button showModalityWindowButton = ButtonBuilder.create() - .text("Show modality window") - .alignment(Pos.CENTER) - .prefWidth(180) - .onMouseClicked(new EventHandler() { - - @Override - public void handle(MouseEvent arg0) { - Stage modalityStage = new Stage(); - modalityStage.initModality(Modality.APPLICATION_MODAL); - modalityStage.setScene(createTestGridScene()); - modalityStage.setResizable(resizable); - modalityStage.show(); - } - }) - .build(); - + Button showModalityWindowButton = new Button("Show modality window"); + showModalityWindowButton.setAlignment(Pos.CENTER); + showModalityWindowButton.setPrefWidth(180); + showModalityWindowButton.setOnMouseClicked(new EventHandler() { + @Override + public void handle(MouseEvent arg0) { + Stage modalityStage = new Stage(); + modalityStage.initModality(Modality.APPLICATION_MODAL); + modalityStage.setScene(createTestGridScene()); + modalityStage.setResizable(resizable); + modalityStage.show(); + } + }); buttonsPane.add(showModalityWindowButton, 1, 2); // // - Button resizableButton = ButtonBuilder.create() - .text(resizable ? "Not resizable" : "Resizable") - .alignment(Pos.CENTER) - .prefWidth(180) - .onMouseClicked(new EventHandler() { - - @Override - public void handle(MouseEvent arg0) { - runJVMProcess(FSTestApp.this.getClass().getName(), String.valueOf(!resizable)); - primaryStage.close(); - } - }).build(); - + Button resizableButton = new Button(); + resizableButton.setText(resizable ? "Not resizable" : "Resizable"); + resizableButton.setAlignment(Pos.CENTER); + resizableButton.setPrefWidth(180); + resizableButton.setOnMouseClicked(new EventHandler() { + @Override + public void handle(MouseEvent arg0) { + runJVMProcess(FSTestApp.this.getClass().getName(), String.valueOf(!resizable)); + primaryStage.close(); + } + }); buttonsPane.add(resizableButton, 0, 3); // // - Slider opacitySlider = SliderBuilder.create() - .maxWidth(180) - .value(1) - .min(0) - .max(1) - .build(); + Slider opacitySlider = new Slider(0, 1, 1); + opacitySlider.setMaxWidth(180); primaryStage.opacityProperty().bindBidirectional(opacitySlider.valueProperty()); - - buttonsPane.add(opacitySlider, 1, 3); // // - ToggleButton useSystemMenuToggleButton = ToggleButtonBuilder.create() - .text("Use system menu") - .alignment(Pos.CENTER) - .prefWidth(180) - .build(); - + ToggleButton useSystemMenuToggleButton = new ToggleButton("Use system menu"); + useSystemMenuToggleButton.setAlignment(Pos.CENTER); + useSystemMenuToggleButton.setPrefWidth(180); menu.useSystemMenuBarProperty().bindBidirectional(useSystemMenuToggleButton.selectedProperty()); buttonsPane.add(useSystemMenuToggleButton, 0, 4); // - VBox root = VBoxBuilder.create() - .children( - menu, - HBoxBuilder.create() - .alignment(Pos.CENTER) - .padding(new Insets(5)) - .children( - fullscreenIndicator, - new Text("Fullscreen")) - .build(), - buttonsPane, - logTextArea) - .build(); - - + HBox temp = new HBox(fullscreenIndicator, new Text("Fullscreen")); + temp.setAlignment(Pos.CENTER); + temp.setPadding(new Insets(5)); + VBox root = new VBox(menu, temp, buttonsPane, logTextArea); primaryStage.setScene(new Scene(root, 400, 400)); primaryStage.setMinHeight(400); primaryStage.setMinWidth(400); @@ -388,29 +317,16 @@ double width = getMaxScreenWidth(); - Pane root = PaneBuilder.create() - .minHeight(height) - .minWidth(width) - .build(); + Pane root = new Pane(); + root.setMinHeight(height); + root.setMinWidth(width); for (int x = 0; x < width; x+=10) { - root.getChildren().add( - LineBuilder.create() - .startX(x) - .endX(x) - .startY(0) - .endY(height) - .build()); + root.getChildren().add(new Line(x, x, 0, height)); } for (int y = 0; y < height; y+=10) { - root.getChildren().add( - LineBuilder.create() - .startX(0) - .endX(width) - .startY(y) - .endY(y) - .build()); + root.getChildren().add(new Line(0, width, y, y)); } return new Scene(root, 200, 200); --- old/functional/SceneGraphTests/src/test/scenegraph/lcd/LCDTextTestApp.java 2017-02-15 15:58:06.855547249 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/lcd/LCDTextTestApp.java 2017-02-15 15:58:06.799546727 +0300 @@ -42,7 +42,6 @@ import javafx.scene.text.FontSmoothingType; import javafx.scene.text.Text; import javafx.scene.text.TextAlignment; -import javafx.scene.text.TextBuilder; import test.javaclient.shared.InteroperabilityApp; import test.javaclient.shared.Utils; @@ -100,12 +99,10 @@ public void changed(ObservableValue ov, TestCollections t, TestCollections newValue) { actionChoice.setItems(FXCollections.observableArrayList(newValue.getActions())); actionChoice.getSelectionModel().selectFirst(); - lcdText = TextBuilder.create().text("Test text") - .textAlignment(TextAlignment.CENTER) - .style("-fx-font-size: 16;-fx-font-smoothing-type: lcd;") - .fontSmoothingType(FontSmoothingType.LCD) - .build(); - + lcdText = new Text("Test text"); + lcdText.setTextAlignment(TextAlignment.CENTER); + lcdText.setStyle("-fx-font-size: 16;-fx-font-smoothing-type: lcd;"); + lcdText.setFontSmoothingType(FontSmoothingType.LCD); leftPane.getChildren().clear(); leftPane.getChildren().add(lcdText); } --- old/functional/SceneGraphTests/src/test/scenegraph/lcd/LcdAPITestApp.java 2017-02-15 15:58:07.099549522 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/lcd/LcdAPITestApp.java 2017-02-15 15:58:07.039548963 +0300 @@ -26,9 +26,8 @@ import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.layout.VBox; -import javafx.scene.layout.VBoxBuilder; import javafx.scene.text.FontSmoothingType; -import javafx.scene.text.TextBuilder; +import javafx.scene.text.Text; import test.javaclient.shared.InteroperabilityApp; import test.javaclient.shared.Utils; @@ -50,37 +49,26 @@ @Override protected Scene getScene() { - VBox root = VBoxBuilder.create() - .padding(new Insets(10)) - .spacing(10) - .children( - TextBuilder.create() - .id("GrayGray") - .text("Text") - .fontSmoothingType(FontSmoothingType.GRAY) - .style("-fx-font-size: 16;-fx-font-smoothing-type: gray; ") - .build(), - TextBuilder.create() - .id("LCDGray") - .text("Text") - .fontSmoothingType(FontSmoothingType.LCD) - .style("-fx-font-size: 16;-fx-font-smoothing-type: gray; ") - .build(), - TextBuilder.create() - .id("GrayLCD") - .text("Text") - .fontSmoothingType(FontSmoothingType.GRAY) - .style("-fx-font-size: 16;-fx-font-smoothing-type: lcd; ") - .build(), - TextBuilder.create() - .id("LCDLCD") - .text("Text") - .fontSmoothingType(FontSmoothingType.LCD) - .style("-fx-font-size: 16;-fx-font-smoothing-type: lcd;") - .build() - ) - .build(); - + VBox root = new VBox(); + root.setPadding(new Insets(10)); + root.setSpacing(10); + Text t1 = new Text("Text"); + t1.setId("GrayGray"); + t1.setFontSmoothingType(FontSmoothingType.GRAY); + t1.setStyle("-fx-font-size: 16;-fx-font-smoothing-type: gray; "); + Text t2 = new Text("Text"); + t2.setId("LCDGray"); + t2.setFontSmoothingType(FontSmoothingType.LCD); + t2.setStyle("-fx-font-size: 16;-fx-font-smoothing-type: gray; "); + Text t3 = new Text("Text"); + t3.setId("GrayLCD"); + t3.setFontSmoothingType(FontSmoothingType.GRAY); + t3.setStyle("-fx-font-size: 16;-fx-font-smoothing-type: lcd; "); + Text t4 = new Text("Text"); + t4.setId("LCDLCD"); + t4.setFontSmoothingType(FontSmoothingType.LCD); + t4.setStyle("-fx-font-size: 16;-fx-font-smoothing-type: lcd;"); + root.getChildren().addAll(t1, t2, t3, t4); return new Scene(root, 200, 200); } } --- old/functional/SceneGraphTests/src/test/scenegraph/lcd/TestCollections.java 2017-02-15 15:58:07.331551684 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/lcd/TestCollections.java 2017-02-15 15:58:07.275551162 +0300 @@ -68,16 +68,7 @@ Lighting(EffectTestAction.generate(new Lighting(), true)), MotionBlur(EffectTestAction.generate(new MotionBlur(), true)), PerspectiveTransform(EffectTestAction.generate( - PerspectiveTransformBuilder.create() - .ulx(10.0) - .uly(10.0) - .urx(100.0) - .ury(40.0) - .lrx(100.0) - .lry(60.0) - .llx(10.0) - .lly(90.0) - .build(), false)), + new PerspectiveTransform(10.0, 10.0, 100.0, 40.0, 100.0, 60.0, 10.0, 90.0), false)), Reflection(EffectTestAction.generate(new Reflection(), true)), SepiaTone(EffectTestAction.generate(new SepiaTone(), true)), Shadow(EffectTestAction.generate(new Shadow(), true)) --- old/functional/SceneGraphTests/src/test/scenegraph/lcd/animation/AnimationLCDTextTestApp.java 2017-02-15 15:58:07.575553957 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/lcd/animation/AnimationLCDTextTestApp.java 2017-02-15 15:58:07.515553398 +0300 @@ -7,25 +7,20 @@ import javafx.animation.Interpolator; import javafx.animation.KeyFrame; import javafx.animation.KeyValue; -import javafx.animation.TimelineBuilder; +import javafx.animation.Timeline; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.ChoiceBox; -import javafx.scene.control.ChoiceBoxBuilder; import javafx.scene.control.TextArea; -import javafx.scene.control.TextAreaBuilder; import javafx.scene.input.MouseEvent; import javafx.scene.layout.Pane; -import javafx.scene.layout.PaneBuilder; -import javafx.scene.layout.VBoxBuilder; +import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; -import javafx.scene.shape.CircleBuilder; import javafx.scene.text.FontSmoothingType; import javafx.scene.text.Text; -import javafx.scene.text.TextBuilder; import javafx.stage.Stage; import javafx.util.Duration; import test.javaclient.shared.Utils; @@ -48,11 +43,9 @@ public void start(Stage primaryStage) { - final TextArea testText = TextAreaBuilder.create() - .text("Test") - .prefHeight(50) - .prefWidth(500) - .build(); + final TextArea testText = new TextArea("Test"); + testText.setPrefHeight(50); + testText.setPrefWidth(500); final ChoiceBox interpolatorChoiceBox = new ChoiceBox(); interpolatorChoiceBox.getItems().addAll(FXCollections.observableArrayList( @@ -68,56 +61,34 @@ interpolatorChoiceBox.getSelectionModel().selectFirst(); - final Text lcdText = TextBuilder.create() - .x(100) - .y(100) - .fontSmoothingType(FontSmoothingType.LCD) - .build(); - + final Text lcdText = new Text(); + lcdText.setX(100); + lcdText.setY(100); + lcdText.setFontSmoothingType(FontSmoothingType.LCD); lcdText.textProperty().bind(testText.textProperty()); - final Circle point = CircleBuilder.create() - .centerX(100) - .centerY(100) - .radius(2) - .fill(Color.RED) - .build(); - - Pane root = VBoxBuilder.create() - .children( - PaneBuilder.create() - .minWidth(500) - .minHeight(500) - .children( - lcdText, - point) - .onMouseClicked(new EventHandler() { - - @Override - public void handle(MouseEvent event) { - point.setCenterX(event.getX()); - point.setCenterY(event.getY()); - - TimelineBuilder.create() - .keyFrames( - new KeyFrame(Duration.seconds(5), - new KeyValue(lcdText.xProperty(), event.getX(), - interpolatorChoiceBox.getSelectionModel().getSelectedItem())), - new KeyFrame(Duration.seconds(5), - new KeyValue(lcdText.yProperty(), event.getY(), - interpolatorChoiceBox.getSelectionModel().getSelectedItem())) - ) - .build() - .play(); - } - }) - .build(), - testText, - interpolatorChoiceBox) - .build(); - - + final Circle point = new Circle(100, 100, 2, Color.RED); + Pane temp = new Pane(lcdText, point); + temp.setMinWidth(500); + temp.setMinHeight(500); + temp.setOnMouseClicked(new EventHandler() { + @Override + public void handle(MouseEvent event) { + point.setCenterX(event.getX()); + point.setCenterY(event.getY()); + + new Timeline( + new KeyFrame(Duration.seconds(5), + new KeyValue(lcdText.xProperty(), event.getX(), + interpolatorChoiceBox.getSelectionModel().getSelectedItem())), + new KeyFrame(Duration.seconds(5), + new KeyValue(lcdText.yProperty(), event.getY(), + interpolatorChoiceBox.getSelectionModel().getSelectedItem())) + ).play(); + } + }); + Pane root = new VBox(temp, testText, interpolatorChoiceBox); Scene scene = new Scene(root, 500, 575); primaryStage.setTitle("Test Animnation LCD Text"); --- old/functional/SceneGraphTests/src/test/scenegraph/lcd/controls/Factories.java 2017-02-15 15:58:07.819556230 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/lcd/controls/Factories.java 2017-02-15 15:58:07.751555597 +0300 @@ -54,11 +54,10 @@ @Override public Parent createControl() { - return TextFieldBuilder.create() - .text("Test") - .maxHeight(25) - .maxWidth(50) - .build(); + TextField temp = new TextField("Test"); + temp.setMaxHeight(25); + temp.setMaxWidth(50); + return temp; } }), Radio(new DefaultFactory() { @@ -91,36 +90,27 @@ @Override public Parent createControl() { - return TitledPaneBuilder.create() - .text("Test") - .maxWidth(200) - .maxHeight(200) - .build(); + TitledPane temp = new TitledPane(); + temp.setText("Test"); + temp.setMaxWidth(200); + temp.setMaxHeight(200); + return temp; } }), ToolBar(new DefaultFactory() { @Override public Parent createControl() { - return new ToolBar(ButtonBuilder.create().text("Test").build()); + return new ToolBar(new Button("Test")); } }), Menu(new DefaultFactory() { @Override public Parent createControl() { - - return MenuBarBuilder.create() - .menus( - MenuBuilder.create() - .text("Text1") - .items( - MenuItemBuilder - .create() - .text("Text2") - .build()) - .build()) - .build(); + Menu m = new Menu("Text1"); + m.getItems().addAll(new MenuItem("Text2")); + return new MenuBar(m); } }), ListView(new DefaultFactory() { @@ -159,31 +149,25 @@ @Override public Parent createControl() { - TitledPane expandedPane = TitledPaneBuilder.create() - .text("Test1") - .content(new Button("Test3")) - .build(); - return AccordionBuilder.create() - .maxHeight(200) - .maxWidth(200) - .panes(expandedPane, - TitledPaneBuilder.create() - .text("Test2") - .build()) - .expandedPane(expandedPane) - .build(); + TitledPane expandedPane = new TitledPane("Test1", new Button("Test3")); + TitledPane otherPane = new TitledPane(); + otherPane.setText("Test2"); + Accordion temp = new Accordion(expandedPane, otherPane); + temp.setMaxHeight(200); + temp.setMaxWidth(200); + temp.setExpandedPane(expandedPane); + return temp; } }), Slider(new DefaultFactory() { @Override public Parent createControl() { - Parent value = SliderBuilder.create() - .showTickLabels(true) - .showTickMarks(true) - .maxWidth(150) - .id("TestSlider") - .build(); + Parent value = new Slider(); + ((Slider)value).setShowTickLabels(true); + ((Slider)value).setShowTickMarks(true); + ((Slider)value).setMaxWidth(150); + value.setId("TestSlider"); return value; } }), @@ -191,11 +175,10 @@ @Override public Parent createControl() { - return ProgressIndicatorBuilder.create() - .maxHeight(50) - .maxWidth(50) - .progress(0.02) - .build(); + ProgressIndicator temp = new ProgressIndicator(0.02); + temp.setMaxHeight(50); + temp.setMaxWidth(50); + return temp; } }) ; --- old/functional/SceneGraphTests/src/test/scenegraph/lcd/transparency/Factories.java 2017-02-15 15:58:08.067558542 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/lcd/transparency/Factories.java 2017-02-15 15:58:08.007557982 +0300 @@ -26,35 +26,28 @@ import javafx.scene.Node; import javafx.scene.layout.StackPane; -import javafx.scene.layout.StackPaneBuilder; import javafx.scene.paint.Color; -import javafx.scene.shape.RectangleBuilder; +import javafx.scene.shape.Rectangle; import javafx.scene.text.FontSmoothingType; -import javafx.scene.text.TextBuilder; +import javafx.scene.text.Text; /** * * @author Alexander Petrov */ -public enum Factories implements Factory{ +public enum Factories implements Factory { TransparentPixel(new EmptyActionFactory() { public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build(), - RectangleBuilder.create() - .opacity(0) - .fill(Color.BLACK) - .height(1) - .width(1) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0); + r.setFill(Color.BLACK); + value.getChildren().addAll(t, r); return value; } @@ -66,18 +59,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build(), - RectangleBuilder.create() - .opacity(0) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0); + r.setFill(Color.BLACK); + value.getChildren().addAll(t, r); return value; } @@ -89,18 +76,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build(), - RectangleBuilder.create() - .opacity(0.5) - .fill(Color.BLACK) - .height(1) - .width(1) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.5); + r.setFill(Color.BLACK); + value.getChildren().addAll(t, r); return value; } @@ -112,18 +93,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build(), - RectangleBuilder.create() - .opacity(0.000001d) - .fill(Color.BLACK) - .height(1) - .width(1) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.000001d); + r.setFill(Color.BLACK); + value.getChildren().addAll(t, r); return value; } @@ -135,18 +110,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build(), - RectangleBuilder.create() - .opacity(0.9999999d) - .fill(Color.BLACK) - .height(1) - .width(1) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.9999999d); + r.setFill(Color.BLACK); + value.getChildren().addAll(t, r); return value; } @@ -158,18 +127,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build(), - RectangleBuilder.create() - .opacity(0) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0); + r.setFill(Color.BLACK); + value.getChildren().addAll(t, r); return value; } @@ -181,18 +144,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build(), - RectangleBuilder.create() - .opacity(0.5) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.5); + r.setFill(Color.BLACK); + value.getChildren().addAll(t, r); return value; } @@ -204,18 +161,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build(), - RectangleBuilder.create() - .opacity(0.000001d) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.000001d); + r.setFill(Color.BLACK); + value.getChildren().addAll(t, r); return value; } @@ -227,18 +178,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build(), - RectangleBuilder.create() - .opacity(0.9999999d) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.9999999d); + r.setFill(Color.BLACK); + value.getChildren().addAll(t, r); return value; } @@ -250,19 +195,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - RectangleBuilder.create() - .opacity(0.5) - .fill(Color.BLACK) - .height(1) - .width(1) - .build(), - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build() - ); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.5); + r.setFill(Color.BLACK); + value.getChildren().addAll(r, t); return value; } @@ -274,18 +212,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - RectangleBuilder.create() - .opacity(0.000001d) - .fill(Color.BLACK) - .height(1) - .width(1) - .build(), - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.000001d); + r.setFill(Color.BLACK); + value.getChildren().addAll(r, t); return value; } @@ -297,18 +229,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - RectangleBuilder.create() - .opacity(0.9999999d) - .fill(Color.BLACK) - .height(1) - .width(1) - .build(), - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.9999999d); + r.setFill(Color.BLACK); + value.getChildren().addAll(r, t); return value; } @@ -320,18 +246,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - RectangleBuilder.create() - .opacity(0) - .fill(Color.BLACK) - .height(100) - .width(100) - .build(), - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0); + r.setFill(Color.BLACK); + value.getChildren().addAll(r, t); return value; } @@ -343,18 +263,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - RectangleBuilder.create() - .opacity(0.5) - .fill(Color.BLACK) - .height(100) - .width(100) - .build(), - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.5); + r.setFill(Color.BLACK); + value.getChildren().addAll(r, t); return value; } @@ -366,18 +280,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - RectangleBuilder.create() - .opacity(0.000001d) - .fill(Color.BLACK) - .height(100) - .width(100) - .build(), - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.000001d); + r.setFill(Color.BLACK); + value.getChildren().addAll(r, t); return value; } @@ -389,18 +297,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - RectangleBuilder.create() - .opacity(0.9999999d) - .fill(Color.BLACK) - .height(100) - .width(100) - .build(), - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.9999999d); + r.setFill(Color.BLACK); + value.getChildren().addAll(r, t); return value; } @@ -412,18 +314,12 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build(), - RectangleBuilder.create() - .opacity(0.5) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.5); + r.setFill(Color.BLACK); + value.getChildren().addAll(t, r); return value; } @@ -434,13 +330,11 @@ TranslucentPane(new EmptyActionFactory() { public Node createNode(boolean lcd) { - return StackPaneBuilder.create() - .opacity(0.5) - .children(TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()) - .build(); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + StackPane temp = new StackPane(t); + temp.setOpacity(0.5); + return temp; } public boolean isLCDWork() { @@ -451,12 +345,9 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -466,12 +357,10 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(RectangleBuilder.create() - .opacity(0.5) - .fill(Color.BLACK) - .height(1) - .width(1) - .build()); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.5); + r.setFill(Color.BLACK); + pane.getChildren().add(r); } }), @@ -479,12 +368,9 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -494,24 +380,19 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(RectangleBuilder.create() - .opacity(0.000001d) - .fill(Color.BLACK) - .height(1) - .width(1) - .build()); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.000001d); + r.setFill(Color.BLACK); + pane.getChildren().add(r); } }), AddTranslucent09Pixel(new Factory() { public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -521,24 +402,19 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(RectangleBuilder.create() - .opacity(0.9999999d) - .fill(Color.BLACK) - .height(1) - .width(1) - .build()); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.9999999d); + r.setFill(Color.BLACK); + pane.getChildren().add(r); } }), AddTransparentRectangle(new Factory() { public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -548,24 +424,19 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(RectangleBuilder.create() - .opacity(0) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0); + r.setFill(Color.BLACK); + pane.getChildren().add(r); } }), AddTranslucentRectangle(new Factory() { public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -575,24 +446,19 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(RectangleBuilder.create() - .opacity(0.5) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.5); + r.setFill(Color.BLACK); + pane.getChildren().add(r); } }), AddTranslucent01Rectangle(new Factory() { public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -602,24 +468,19 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(RectangleBuilder.create() - .opacity(0.000001d) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.000001d); + r.setFill(Color.BLACK); + pane.getChildren().add(r); } }), AddTranslucent09Rectangle(new Factory() { public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -631,12 +492,10 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(RectangleBuilder.create() - .opacity(0.9999999d) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.9999999d); + r.setFill(Color.BLACK); + pane.getChildren().add(r); value = false; } }), @@ -644,12 +503,9 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -659,12 +515,10 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(0, RectangleBuilder.create() - .opacity(0.5) - .fill(Color.BLACK) - .height(1) - .width(1) - .build()); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.5); + r.setFill(Color.BLACK); + pane.getChildren().add(0, r); } }), @@ -672,12 +526,9 @@ public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -687,24 +538,19 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(0, RectangleBuilder.create() - .opacity(0.000001d) - .fill(Color.BLACK) - .height(1) - .width(1) - .build()); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.000001d); + r.setFill(Color.BLACK); + pane.getChildren().add(0, r); } }), AddTranslucent09PixelBeforeText(new Factory() { public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -714,24 +560,19 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(0, RectangleBuilder.create() - .opacity(0.9999999d) - .fill(Color.BLACK) - .height(1) - .width(1) - .build()); + Rectangle r = new Rectangle(1, 1); + r.setOpacity(0.9999999d); + r.setFill(Color.BLACK); + pane.getChildren().add(0, r); } }), AddTransparentRectangleBeforeText(new Factory() { public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -741,24 +582,19 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(0, RectangleBuilder.create() - .opacity(0) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0); + r.setFill(Color.BLACK); + pane.getChildren().add(0, r); } }), AddTranslucentRectangleBeforeText(new Factory() { public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -768,24 +604,19 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(0, RectangleBuilder.create() - .opacity(0.5) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.5); + r.setFill(Color.BLACK); + pane.getChildren().add(0, r); } }), AddTranslucent01RectangleBeforeText(new Factory() { public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -795,24 +626,19 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(0, RectangleBuilder.create() - .opacity(0.000001d) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.000001d); + r.setFill(Color.BLACK); + pane.getChildren().add(0, r); } }), AddTranslucent09RectangleBeforeText(new Factory() { public Node createNode(boolean lcd) { StackPane value = new StackPane(); - - value.getChildren().addAll( - TextBuilder.create() - .text("Test") - .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY) - .build()); + Text t = new Text("Test"); + t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY); + value.getChildren().addAll(t); return value; } @@ -824,12 +650,10 @@ public void action(Node node) { StackPane pane = (StackPane) node; - pane.getChildren().add(0, RectangleBuilder.create() - .opacity(0.9999999d) - .fill(Color.BLACK) - .height(100) - .width(100) - .build()); + Rectangle r = new Rectangle(100, 100); + r.setOpacity(0.9999999d); + r.setFill(Color.BLACK); + pane.getChildren().add(r); value = false; } }); --- old/functional/SceneGraphTests/src/test/scenegraph/lcd/transparency/TransparencyLCDTextTestApp.java 2017-02-15 15:58:08.323560927 +0300 +++ new/functional/SceneGraphTests/src/test/scenegraph/lcd/transparency/TransparencyLCDTextTestApp.java 2017-02-15 15:58:08.267560405 +0300 @@ -32,16 +32,14 @@ import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBuilder; import javafx.scene.control.ChoiceBox; import javafx.scene.input.MouseEvent; -import javafx.scene.layout.HBoxBuilder; +import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; -import javafx.scene.layout.StackPaneBuilder; -import javafx.scene.layout.VBoxBuilder; +import javafx.scene.layout.StackPane; +import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; -import javafx.scene.shape.CircleBuilder; import javafx.scene.text.Text; import test.javaclient.shared.InteroperabilityApp; import test.javaclient.shared.Utils; @@ -89,85 +87,62 @@ } }); - applyIndicator = CircleBuilder.create() - .id(APPLY_INDICATOR_ID) - .radius(5) - .fill(Color.RED) - .build(); - - actionIndicator = CircleBuilder.create() - .id(ACTION_INDICATOR_ID) - .radius(5) - .fill(Color.RED) - .build(); - - Button applyButton = ButtonBuilder.create() - .id(APPLY_BUTTON_ID) - .text("Apply") - .onMouseClicked(new EventHandler() { - public void handle(MouseEvent t) { - if(testingFactory == null){ - factoryChoicer.getSelectionModel().selectNext(); - } else { - factoryChoicer.getSelectionModel().select(TransparencyLCDTextTestApp.testingFactory); - } - applyIndicator.setFill(Color.GREEN); - } - }) - .build(); - - Button actionButton = ButtonBuilder.create() - .id(ACTION_BUTTON_ID) - .text("Action") - .onMouseClicked(new EventHandler() { - public void handle(MouseEvent t) { - Factory currentFactory = TransparencyLCDTextTestApp.this. - factoryChoicer.getSelectionModel().getSelectedItem(); - - currentFactory.action(TransparencyLCDTextTestApp.this.rightPane.getChildren().get(0)); - - actionIndicator.setFill(Color.GREEN); - } - }) - .build(); + applyIndicator = new Circle(5, Color.RED); + applyIndicator.setId(APPLY_INDICATOR_ID); - //Create panes for testing; + actionIndicator = new Circle(5, Color.RED); + actionIndicator.setId(ACTION_INDICATOR_ID); + + Button applyButton = new Button("Apply"); + applyButton.setId(APPLY_BUTTON_ID); + applyButton.setOnMouseClicked(new EventHandler() { + public void handle(MouseEvent t) { + if(testingFactory == null){ + factoryChoicer.getSelectionModel().selectNext(); + } else { + factoryChoicer.getSelectionModel().select(TransparencyLCDTextTestApp.testingFactory); + } + applyIndicator.setFill(Color.GREEN); + } + }); + + Button actionButton = new Button("Action"); + actionButton.setId(ACTION_BUTTON_ID); + actionButton.setOnMouseClicked(new EventHandler() { + public void handle(MouseEvent t) { + Factory currentFactory = TransparencyLCDTextTestApp.this. + factoryChoicer.getSelectionModel().getSelectedItem(); + currentFactory.action(TransparencyLCDTextTestApp.this.rightPane.getChildren().get(0)); - rightPane = StackPaneBuilder.create() - .id(RIGHT_PANE_ID) - .alignment(Pos.CENTER) - .minHeight(450) - .minWidth(300) - .build(); + actionIndicator.setFill(Color.GREEN); + } + }); + + //Create panes for testing; + rightPane = new StackPane(); + rightPane.setId(RIGHT_PANE_ID); + ((StackPane)rightPane).setAlignment(Pos.CENTER); + rightPane.setMinHeight(450); + rightPane.setMinWidth(300); //Create root pane. - return VBoxBuilder.create() - .id("root") - .children( - HBoxBuilder.create() - .padding(new Insets(10)) - .spacing(10) - .id("toolsPane") - .alignment(Pos.CENTER) - .children(factoryChoicer, actionButton, applyButton) - .build(), - HBoxBuilder.create() - .padding(new Insets(10)) - .spacing(10) - .alignment(Pos.CENTER) - .children( - new Text("Apply"), - applyIndicator, - new Text("Action"), - actionIndicator) - .build(), - HBoxBuilder.create() - .id("testPane") - .alignment(Pos.CENTER) - .children(rightPane) - .build()) - .build(); + VBox root = new VBox(); + root.setId("root"); + HBox tools = new HBox(); + tools.setId("toolsPane"); + tools.setPadding(new Insets(10)); + tools.setSpacing(10); + tools.setAlignment(Pos.CENTER); + tools.getChildren().addAll(factoryChoicer, actionButton, applyButton); + HBox secondone = new HBox(new Text("Apply"), applyIndicator, new Text("Action"), actionIndicator); + secondone.setPadding(new Insets(10)); + secondone.setSpacing(10); + HBox testPane = new HBox(rightPane); + testPane.setId("testPane"); + testPane.setAlignment(Pos.CENTER); + root.getChildren().addAll(tools, secondone, testPane); + return root; } private void apply() { --- old/functional/WebNodeAutomated/coverage.fcov 2017-02-15 15:58:08.607563573 +0300 +++ new/functional/WebNodeAutomated/coverage.fcov 2017-02-15 15:58:08.507562641 +0300 @@ -1,7 +1,7 @@ -javafx.scene.web.WebView.minHeight.GET;com.sun.fx.webnode.tests.api.WebView.minHeightPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.minHeightPropertyTest.test3();FULL -javafx.scene.web.WebEngine.document.GET;com.sun.fx.webnode.tests.api.WebEngine.DocumentPropertyTest.test2();FULL -javafx.scene.web.WebView.maxWidth.GET;com.sun.fx.webnode.tests.api.WebView.maxWidthPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.maxWidthPropertyTest.test3();FULL -javafx.scene.web.WebView.prefHeight.GET;com.sun.fx.webnode.tests.api.WebView.prefHeightPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.prefHeightPropertyTest.test3();FULL -javafx.scene.web.WebView.prefWidth.GET;com.sun.fx.webnode.tests.api.WebView.prefWidthPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.prefWidthPropertyTest.test3();FULL -javafx.scene.web.WebView.maxHeight.GET;com.sun.fx.webnode.tests.api.WebView.maxHeightPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.maxHeightPropertyTest.test3();FULL -javafx.scene.web.WebView.minWidth.GET;com.sun.fx.webnode.tests.api.WebView.minWidthPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.minWidthPropertyTest.test3();FULL +javafx.scene.web.WebView.minHeight.GET;com.sun.fx.webnode.tests.api.WebView.minHeightPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.minHeightPropertyTest.test3();FULL +javafx.scene.web.WebEngine.document.GET;com.sun.fx.webnode.tests.api.WebEngine.DocumentPropertyTest.test2();FULL +javafx.scene.web.WebView.maxWidth.GET;com.sun.fx.webnode.tests.api.WebView.maxWidthPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.maxWidthPropertyTest.test3();FULL +javafx.scene.web.WebView.prefHeight.GET;com.sun.fx.webnode.tests.api.WebView.prefHeightPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.prefHeightPropertyTest.test3();FULL +javafx.scene.web.WebView.prefWidth.GET;com.sun.fx.webnode.tests.api.WebView.prefWidthPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.prefWidthPropertyTest.test3();FULL +javafx.scene.web.WebView.maxHeight.GET;com.sun.fx.webnode.tests.api.WebView.maxHeightPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.maxHeightPropertyTest.test3();FULL +javafx.scene.web.WebView.minWidth.GET;com.sun.fx.webnode.tests.api.WebView.minWidthPropertyTest.test1(),com.sun.fx.webnode.tests.api.WebView.minWidthPropertyTest.test3();FULL --- old/tools/FxTestRunner/javatest_base/automated.jti.base 2017-02-15 15:58:08.899566293 +0300 +++ new/tools/FxTestRunner/javatest_base/automated.jti.base 2017-02-15 15:58:08.783565212 +0300 @@ -5,4 +5,6 @@ runmode=desktop browserPath=firefox javawsPath=javaws -vmOptions= \ No newline at end of file +vmOptions=-XX:+IgnoreUnrecognizedVMOptions -Dsun.reflect.debugModuleAccessChecks=true -XX:+TraceAccessControlErrors +addExports=javafx.graphics/com.sun.prism=ALL-UNNAMED,javafx.base/com.sun.javafx.runtime=ALL-UNNAMED,javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED,javafx.graphics/com.sun.glass.ui=ALL-UNNAMED,javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED,javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED,javafx.graphics/com.sun.javafx.scene.input=ALL-UNNAMED,javafx.graphics/com.sun.javafx.scene.layout.region=ALL-UNNAMED,javafx.controls/javafx.scene.control=ALL-UNNAMED,javafx.controls/javafx.scene.control.skin=ALL-UNNAMED,javafx.controls/com.sun.javafx.scene.control.skin=ALL-UNNAMED,javafx.controls/com.sun.javafx.charts=ALL-UNNAMED,javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED,javafx.base/com.sun.javafx.collections=ALL-UNNAMED,javafx.base/javafx.event=ALL-UNNAMED +addExportsEnabled=Yes --- old/tools/FxTestRunner/javatest_base/automated.jti.template 2017-02-15 15:58:09.111568268 +0300 +++ new/tools/FxTestRunner/javatest_base/automated.jti.template 2017-02-15 15:58:09.055567746 +0300 @@ -1,8 +1,8 @@ #JT Harness Configuration Interview #Tagged (@) values here will be set in 3 steps to support inheritance: -# 1. from SUITE/javatest_files/automated.jti.base file -# 2. from ClientTestRunner/javatest_base/automated.jti.base -# 3. by values setup in ClientTestRunner/javatest_utils.xml +# 1. from SUITE/javatest_files/automated.jti file +# 2. from tools/FxTestRunner/javatest_base/automated.jti.base +# 3. by values setup in tools/FxTestRunner/javatest_utils.xml INTERVIEW=@INTERVIEW@ LOCALE=en_US NAME=default @@ -32,5 +32,7 @@ browserPath=@browserPath@ javawsPath=@javawsPath@ vmOptions=@vmOptions@ +addExports=@addExports@ +addExportsEnabled=@addExportsEnabled@ remote=@remote@ @javaPath=@ \ No newline at end of file --- old/tools/FxTestRunner/javatest_base/testsuite.jti.base 2017-02-15 15:58:09.375570728 +0300 +++ new/tools/FxTestRunner/javatest_base/testsuite.jti.base 2017-02-15 15:58:09.319570207 +0300 @@ -1,4 +1,8 @@ #JT Harness Configuration Interview #Thu Oct 21 16:48:38 MSD 2010 INTERVIEW=client.test.runner.BasicFXInterview -dryrun=No \ No newline at end of file +dryrun=No +vmOptions=-XX:+IgnoreUnrecognizedVMOptions -Dsun.reflect.debugModuleAccessChecks=true -XX:+TraceAccessControlErrors +#addExports=javafx.graphics/com.sun.prism=ALL-UNNAMED,javafx.base/com.sun.javafx.runtime=ALL-UNNAMED,javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED,javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED,javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED,javafx.base/javafx.event=ALL-UNNAMED,javafx.controls/javafx.scene.control=ALL-UNNAMED,javafx.base/javafx.event=ALL-UNNAMED,javafx.controls/javafx.scene.control=ALL-UNNAMED,javafx.controls/javafx.scene.control.skin=ALL-UNNAMED,javafx.graphics/com.sun.javafx.scene.layout.region=ALL-UNNAMED,javafx.base/com.sun.javafx.collections=ALL-UNNAMED +addExports=javafx.graphics/com.sun.prism=ALL-UNNAMED,javafx.base/com.sun.javafx.runtime=ALL-UNNAMED,javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED,javafx.graphics/com.sun.glass.ui=ALL-UNNAMED,javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED,javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED,javafx.graphics/com.sun.javafx.scene.input=ALL-UNNAMED,javafx.graphics/com.sun.javafx.scene.layout.region=ALL-UNNAMED,javafx.controls/javafx.scene.control=ALL-UNNAMED,javafx.controls/javafx.scene.control.skin=ALL-UNNAMED,javafx.controls/com.sun.javafx.scene.control.skin=ALL-UNNAMED,javafx.controls/com.sun.javafx.charts=ALL-UNNAMED,javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED,javafx.base/com.sun.javafx.collections=ALL-UNNAMED,javafx.base/javafx.event=ALL-UNNAMED +addExportsEnabled=Yes --- old/tools/FxTestRunner/javatest_base/testsuite.jti.template 2017-02-15 15:58:09.607572890 +0300 +++ new/tools/FxTestRunner/javatest_base/testsuite.jti.template 2017-02-15 15:58:09.551572368 +0300 @@ -30,6 +30,8 @@ runmode=desktop external.output=@external.output@ vmOptions=@vmOptions@ +addExports=@addExports@ +addExportsEnabled=@addExportsEnabled@ remote=@remote@ @javaPath=@ dryrun=@dryrun@ \ No newline at end of file --- old/tools/FxTestRunner/plugin_support.xml 2017-02-15 15:58:09.855575201 +0300 +++ new/tools/FxTestRunner/plugin_support.xml 2017-02-15 15:58:09.791574604 +0300 @@ -35,10 +35,10 @@ - + - - + + @@ -56,11 +56,11 @@ - - - - - + + + + + @@ -179,4 +179,4 @@ - \ No newline at end of file + --- old/tools/FxTestRunner/run_javatest_macro.xml 2017-02-15 15:58:10.107577548 +0300 +++ new/tools/FxTestRunner/run_javatest_macro.xml 2017-02-15 15:58:10.055577064 +0300 @@ -28,9 +28,14 @@ + + + + + @@ -66,6 +71,11 @@ + + + + + @@ -77,17 +87,20 @@ - - - - - + + + + + + + + - + @@ -95,9 +108,20 @@ - - - + + + + + + + + + + + + + + @@ -129,11 +153,14 @@ - + + + + @@ -156,6 +183,9 @@ + + + @@ -172,6 +202,9 @@ + + + @@ -189,13 +222,13 @@ - - + + - - + + tests.testFile=${testlist.path} --- old/tools/FxTestRunner/src/client/test/runner/BasicFXInterview.java 2017-02-15 15:58:10.395580232 +0300 +++ new/tools/FxTestRunner/src/client/test/runner/BasicFXInterview.java 2017-02-15 15:58:10.287579226 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2016, 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 @@ -24,6 +24,7 @@ package client.test.runner; +import static client.test.runner.InterviewUtils.*; import client.test.runner.interview.LookAndFeelQuestion; import client.test.runner.interview.PipelineGroupQuestion; import client.util.CtrUtils; @@ -127,6 +128,21 @@ /** * */ + public final static String ADD_EXPORTS_PARAM_NAME = "addExports"; + + /** + * + */ + public final static String XPATCH_PARAM_NAME = "XPatch"; + + /** + * + */ + public final static String ENABLE_ADD_EXPORTS_PARAM_NAME = "addExportsEnabled"; + + /** + * + */ public final static String VM_OPTIONS_PARAM_NAME = "vmOptions"; /** @@ -209,6 +225,10 @@ return qJavaPath.getValue(); } + public String getXPatch() { + return qXPatch.getValue(); + } + /** * * @return @@ -529,8 +549,8 @@ @Override public void clear() { - setValue(JAVA_DEF); - } + setValue(JAVA_DEF); + } @Override public Question getNext() { @@ -730,7 +750,7 @@ @Override public String getText() { - return "Proxy settings in format: host:port\nE.g. www-proxy.us.oracle.com:80"; + return "Proxy settings in format: host:port\nE.g. proxy.example.com:80"; } @Override @@ -742,7 +762,7 @@ public Question getNext() { String val = getValue(); if (val == null || val.trim().length() == 0 || CtrUtils.getProxyUrl(val) != null) { - return qVmOptions; + return qXPatch; } else { return null; } @@ -763,20 +783,88 @@ private LookAndFeelQuestion qLookAndFeelGroup = new LookAndFeelQuestion (this, qProxy); private ChoiceQuestion qPipelineGroup = new PipelineGroupQuestion (this, getLastQuestion()); + private StringQuestion qXPatch = new StringQuestion(this, XPATCH_PARAM_NAME) { - private static boolean isWindows() { - return System.getProperty("os.name").toLowerCase().contains("windows"); - } - private StringQuestion qVmOptions = new StringQuestion(this, VM_OPTIONS_PARAM_NAME) { + @Override + public String getText() { + return "Set -Xpatch directory for the test run. " + + "\nE.g. build/shim-modules"; + } + + @Override + public String getSummary() { + return "--patch-module"; + } + + @Override + public void clear() { + setValue(""); + } + + @Override + public Question getNext() { + return qEnableAddExports; + } + + @Override + public void export(Map data) { + data.put(XPATCH_PARAM_NAME, value); + } + + @Override + public void load(Map data) { + String newValue = (String) data.get(XPATCH_PARAM_NAME); + setValue(newValue != null ? newValue : ""); + } + }; + + private YesNoQuestion qEnableAddExports = new YesNoQuestion(this, ENABLE_ADD_EXPORTS_PARAM_NAME, YesNoQuestion.YES) { + @Override + public Question getNext() { + if (getValue().equals(YES)) { + return qAddExports; + } + return qVmOptions; + } @Override public String getText() { - return "Set VM Options for test run (desktop mode only).\nE.g. -Dprism.verbose=true"; + return "Do you wish to add -XaddExports JVM argument when running tests? " + + "\nAnswer Yes when running with JDK 9 Jigsaw." + + "\nAnswer No when running with JDK 8 and prior."; } @Override public String getSummary() { - return "VM Options"; + return "Add -XaddExports?"; + } + + @Override + public void export(Map data) { + data.put(ENABLE_ADD_EXPORTS_PARAM_NAME, getValue()); + } + + @Override + public void load(Map data) { + if (data.containsKey(ENABLE_ADD_EXPORTS_PARAM_NAME)) { + setValue((String) data.get(ENABLE_ADD_EXPORTS_PARAM_NAME)); + } + } + }; + + private StringQuestion qAddExports = new StringQuestion(this, ADD_EXPORTS_PARAM_NAME) { + + @Override + public String getText() { + return "Set -XaddExports values for the test run. " + + "Individual tests can use @addExports annotation " + + "to add more specific entries to -XaddExports JVM argument." + + "\nE.g. javafx.graphics/com.sun.prism=ALL-UNNAMED,javafx.base/com.sun.javafx.runtime=ALL-UNNAMED"; + } + + @Override + public String getSummary() { + return "--add-exports"; } @Override @@ -786,39 +874,55 @@ @Override public Question getNext() { - return qPipelineGroup;//getLastQuestion(); + return qVmOptions; } @Override public void export(Map data) { - data.put(VM_OPTIONS_PARAM_NAME, value); + data.put(ADD_EXPORTS_PARAM_NAME, value); } @Override public void load(Map data) { - String newValue = (String) data.get(VM_OPTIONS_PARAM_NAME); + String newValue = (String) data.get(ADD_EXPORTS_PARAM_NAME); setValue(newValue != null ? newValue : ""); } }; + private StringQuestion qVmOptions = new StringQuestion(this, VM_OPTIONS_PARAM_NAME) { + @Override + public String getText() { + return "Set VM Options for test run (desktop mode only).\nE.g. -Dprism.verbose=true"; + } - private static class ExecutablesFileFilter implements FileFilter { @Override - public boolean accept(File file) { - return file.exists() && file.canExecute(); + public String getSummary() { + return "VM Options"; } @Override - public boolean acceptsDirectories() { - return false; + public void clear() { + setValue(""); } @Override - public String getDescription() { - return "Executable files"; + public Question getNext() { + return qPipelineGroup;//getLastQuestion(); } - } + + @Override + public void export(Map data) { + data.put(VM_OPTIONS_PARAM_NAME, value); + } + + @Override + public void load(Map data) { + String newValue = (String) data.get(VM_OPTIONS_PARAM_NAME); + setValue(newValue != null ? newValue : ""); + } + }; + private static Runnable ieFix = new Runnable() { @Override public void run() { --- old/tools/FxTestRunner/src/client/test/runner/DrtInterview.java 2017-02-15 15:58:10.643582542 +0300 +++ new/tools/FxTestRunner/src/client/test/runner/DrtInterview.java 2017-02-15 15:58:10.591582058 +0300 @@ -242,7 +242,7 @@ @Override public String getText() { - return "Proxy settings in format: host:port\nE.g. www-proxy.us.oracle.com:80"; + return "Proxy settings in format: host:port\nE.g. someproxy.example.com:80"; } @Override --- old/tools/FxTestRunner/src/client/test/runner/RunUITestFinder.java 2017-02-15 15:58:10.879584742 +0300 +++ new/tools/FxTestRunner/src/client/test/runner/RunUITestFinder.java 2017-02-15 15:58:10.823584220 +0300 @@ -24,6 +24,7 @@ package client.test.runner; +import client.test.AddExports; import client.test.CheckUI; import client.test.Keywords; import client.test.RunUI; @@ -36,12 +37,15 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; /** * @author shura */ public class RunUITestFinder extends AbstractTestFinder { + static final String ADD_EXPORTS = "unit.test.addExports"; static final String TEST_NAME = "unit.test.testname"; static final String UNIT_TEST_CLASS_NAME = "unit.test.classname"; static final String NO_DESCRIPTION = "unit.test.nodescription"; @@ -92,6 +96,7 @@ boolean hasCheckUI = findAnnotations(testClass, CheckUI.class).size() > 0; List resources = new ArrayList(runUIs.size()); List keys = findAnnotations(testClass, Keywords.class); + List addExportsList = findAnnotations(testClass, AddExports.class); if (!runUIs.isEmpty()) { boolean nodescription = false; for (RunUI runUI : runUIs) { @@ -126,6 +131,17 @@ System.out.println("The following keywords \"" + key_str + "\" were found in the test " + file.getName()); } + // --add-exports value + if (!addExportsList.isEmpty()) { + String[] addExportsArray = new String[addExportsList.size()]; + for (int i = 0; i < addExportsList.size(); i++) { + addExportsArray[i] = addExportsList.get(i).value(); + } + String addExports = Stream.of(TestScript.combineAddExports(addExportsArray)).collect(Collectors.joining(" ")); + tagValues.put(ADD_EXPORTS, addExports); + System.out.println("The following addExports \"" + addExports + "\" were found in the test " + file.getName()); + } + if (nodescription) { tagValues.put("testName", removeDotJavaExtensionFromFilePath(filePath)); tagValues.put(FILE_PATH_PROP, path); --- old/tools/FxTestRunner/src/client/test/runner/TestScript.java 2017-02-15 15:58:11.107586866 +0300 +++ new/tools/FxTestRunner/src/client/test/runner/TestScript.java 2017-02-15 15:58:11.051586344 +0300 @@ -49,6 +49,10 @@ import java.net.Socket; import java.net.URL; import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.logging.Level; @@ -334,13 +338,26 @@ String[] jvmVmOptions = savedEnv.lookup(BasicFXInterview.VM_OPTIONS_PARAM_NAME); + String[] xPatch = savedEnv.lookup(BasicFXInterview.XPATCH_PARAM_NAME); + String xPatchArg = ""; + if (xPatch != null && xPatch.length > 0) { + File xPatchFile = new File(xPatch[0]); + xPatchArg = xPatchFile.getAbsolutePath(); + } + + boolean enableAddExports = YesNoQuestion.YES.equals(lookup( + BasicFXInterview.ENABLE_ADD_EXPORTS_PARAM_NAME, YesNoQuestion.NO)); + + String noAddExportsArg = enableAddExports ? null : "-DnoAddExports=true"; + + String addExportsArg[] = enableAddExports + ? combineAddExports( + savedEnv.lookup(BasicFXInterview.ADD_EXPORTS_PARAM_NAME), + td.getParameter(RunUITestFinder.ADD_EXPORTS)) + : null; + String jvmArgPrismOrder = getJvmArgPrismOrder(); - //TODO (SG): is this still required? - String jvmArgLibraryPath = ""; - if (fxSdkHome != null) { - jvmArgLibraryPath = "-Djava.library.path=" + fxSdkHome + File.separator + "rt"; - } // String externaloutput = lookup(BasicFXInterview.EXTERNALOUTPUT, ""); // if (externaloutput != null) { @@ -374,7 +391,7 @@ String swtTestOpt = ""; try { - if (System.getProperty("os.name").toLowerCase().indexOf("mac") >= 0) { + if (System.getProperty("os.name").toLowerCase().contains("mac")) { RunWith wunWithAnnotation = Class.forName(testClassName).getAnnotation(RunWith.class); if ((wunWithAnnotation != null) && (wunWithAnnotation.value().equals(CanvasRunner.class))) { swtTestOpt = "-XstartOnFirstThread"; @@ -390,9 +407,17 @@ String[] command = new String[]{}; command = addToArray(command, javaExec.trim()); command = addToArray(command, jvmVmOptions); + if (addExportsArg != null) { + command = addToArray(command, addExportsArg); + } else if (noAddExportsArg != null) { + command = addToArray(command, noAddExportsArg); + } + if (xPatchArg != null && !xPatchArg.isEmpty()) { + command = addToArray(command, "--patch-module " + xPatchArg); + } command = addToArray(command, lookAndFeelOptions); command = addToArray(command, ipV4); - command = addToArray(command, jvmArgPrismOrder, jvmArgLibraryPath, jvmArgImageUtils); + command = addToArray(command, jvmArgPrismOrder, jvmArgImageUtils); command = addToArray(command, additionalOptions); command = addToArray(command, jvmArgNoDesc, jvmProxyHost, jvmProxyPort, jvmInterop, swtTestOpt); command = addToArray(command, jvmArgClientTestRoot); @@ -403,6 +428,35 @@ return command; } + static String[] combineAddExports(String[] addExportsArray, String addExportsValue) { + if (addExportsValue == null) { + return combineAddExports(addExportsArray); + } else { + String[] newArray = new String[addExportsArray.length + 1]; + System.arraycopy(addExportsArray, 0, newArray, 1, addExportsArray.length); + newArray[0] = addExportsValue; + return combineAddExports(newArray); + } + } + + static String[] combineAddExports(String[] addExportsArray) { + List addExportsList = new ArrayList<>(); + for (String addExports : addExportsArray) { + if (addExports != null) { + for (String value : addExports.split("\\s*,\\s*")) { + if (!value.isEmpty() && !addExportsList.contains(value.trim())) { + addExportsList.add("--add-exports"); + addExportsList.add(value.trim()); + addExportsList.add("--add-opens"); + addExportsList.add(value.trim()); + } + } + } + } + return addExportsList.toArray(new String[addExportsList.size()]); + } + + /** * * @param td --- old/tools/Jemmy/JemmyFX/build.xml 2017-02-15 15:58:11.367589288 +0300 +++ new/tools/Jemmy/JemmyFX/build.xml 2017-02-15 15:58:11.291588580 +0300 @@ -73,12 +73,16 @@ + + + + @@ -95,7 +99,7 @@ -No Jemmy core sources! +No Jemmy core sources! Sources are available from jemmy.java.net. Specify the location by jemmy.core.source variable. @@ -107,9 +111,9 @@ - + - + --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/ByID.java 2017-02-15 15:58:11.643591860 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/ByID.java 2017-02-15 15:58:11.563591115 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2016, 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 @@ -73,4 +73,11 @@ }.dispatch(Environment.getEnvironment()); } + + @Override + public String toString() { + return "id is " + super.toString(); + // TODO: Get access to text and uncomment proper code: +// return "Id = " + text; + } } --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/Lookups.java 2017-02-15 15:58:11.879594059 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/Lookups.java 2017-02-15 15:58:11.827593574 +0300 @@ -60,7 +60,7 @@ */ @SuppressWarnings("unchecked") public static Wrap byID(Wrap parent, String id, Class type) { - return byID(parent.as(Parent.class, Node.class), id, type); + return byID((Parent) parent.as(Parent.class, Node.class), id, type); } /** * Equivalent to parent.lookup(type, new ByText(text)).wrap(0) @@ -84,7 +84,7 @@ */ @SuppressWarnings("unchecked") public static Wrap byText(Wrap parent, String id, Class type) { - return byText(parent.as(Parent.class, Node.class), id, type); + return byText((Parent) parent.as(Parent.class, Node.class), id, type); } /** * Equivalent to FXRoot.ROOT.lookup(new ByTitleSceneLookup(title)).wrap(0).as(Parent.class, Node.class) --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/QueueExecutor.java 2017-02-15 15:58:12.107596183 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/QueueExecutor.java 2017-02-15 15:58:12.051595661 +0300 @@ -222,7 +222,7 @@ } public boolean failed() { - return action.failed(); + return !done || action.failed(); } public Throwable getThrowable() { @@ -231,8 +231,9 @@ public synchronized void waitDone(Timeout timeout) { try { - while (!done) { - wait(timeout.getValue()); + long maxTime = System.currentTimeMillis() + timeout.getValue(); + while (!done && System.currentTimeMillis() < maxTime) { + wait(maxTime - System.currentTimeMillis()); } } catch (InterruptedException ex) { } --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/SceneList.java 2017-02-15 15:58:12.347598419 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/SceneList.java 2017-02-15 15:58:12.291597897 +0300 @@ -47,9 +47,8 @@ @Override public void run(Object... parameters) { LinkedList res = new LinkedList(); - Iterator windows = Window.impl_getWindows(); - while(windows.hasNext()) { - res.add(windows.next().getScene()); + for (Window w : Window.getWindows()) { + res.add(w.getScene()); } setResult(res); } --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/WindowList.java 2017-02-15 15:58:12.595600730 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/WindowList.java 2017-02-15 15:58:12.543600246 +0300 @@ -47,10 +47,7 @@ @Override public void run(Object... parameters) { LinkedList res = new LinkedList(); - Iterator windows = Window.impl_getWindows(); - while(windows.hasNext()) { - res.add(windows.next()); - } + res.addAll(Window.getWindows()); setResult(res); } }; --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ContextMenuWrap.java 2017-02-15 15:58:12.831602929 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ContextMenuWrap.java 2017-02-15 15:58:12.779602444 +0300 @@ -83,7 +83,7 @@ @As(MenuItem.class) public StringMenuOwner asMenuOwner() { if (menuOwner == null) { - menuOwner = new StringMenuOwnerImpl(this, this.as(Parent.class, Menu.class)); + menuOwner = new StringMenuOwnerImpl(this, (Parent )this.as(Parent.class, Menu.class)); } return menuOwner; } --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemWrap.java 2017-02-15 15:58:13.071605165 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemWrap.java 2017-02-15 15:58:13.011604606 +0300 @@ -117,12 +117,12 @@ public void show() { final List items = listViewWrap.getItems(); - AbstractScroll scroll1 = Utils.getContainerScroll(listViewWrap.as(Parent.class, Node.class), listViewWrap.getControl().getOrientation() == Orientation.VERTICAL); + AbstractScroll scroll1 = Utils.getContainerScroll((Parent )listViewWrap.as(Parent.class, Node.class), listViewWrap.getControl().getOrientation() == Orientation.VERTICAL); if (scroll1 != null) { TableUtils.scrollToInSingleDimension((Wrap) viewWrap, ListCell.class, p -> items.indexOf(p.getItem()), listViewWrap.getItems().indexOf(getControl()), scroll1.caret(), listViewWrap.vertical()); } - AbstractScroll scroll2 = Utils.getContainerScroll(listViewWrap.as(Parent.class, Node.class), listViewWrap.getControl().getOrientation() != Orientation.VERTICAL); + AbstractScroll scroll2 = Utils.getContainerScroll((Parent )listViewWrap.as(Parent.class, Node.class), listViewWrap.getControl().getOrientation() != Orientation.VERTICAL); Utils.makeCenterVisible(getClippedContainerWrap(), this, scroll2); } --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/MenuBarWrap.java 2017-02-15 15:58:13.291607215 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/MenuBarWrap.java 2017-02-15 15:58:13.235606693 +0300 @@ -108,7 +108,7 @@ @As(MenuItem.class) public StringMenuOwner asMenuOwner() { if (menuOwner == null) { - menuOwner = new StringMenuOwnerImpl(this, this.as(Parent.class, Menu.class)); + menuOwner = new StringMenuOwnerImpl(this, (Parent )this.as(Parent.class, Menu.class)); } return menuOwner; } --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/MenuButtonWrap.java 2017-02-15 15:58:13.527609414 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/MenuButtonWrap.java 2017-02-15 15:58:13.471608892 +0300 @@ -97,7 +97,7 @@ @As(MenuItem.class) public StringMenuOwner asMenuOwner() { if (menuOwner == null) { - menuOwner = new StringMenuOwnerImpl(this, this.as(Parent.class, Menu.class)) { + menuOwner = new StringMenuOwnerImpl(this, (Parent )this.as(Parent.class, Menu.class)) { @Override protected void prepare() { --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/MenuWrap.java 2017-02-15 15:58:13.767611650 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/MenuWrap.java 2017-02-15 15:58:13.715611165 +0300 @@ -73,7 +73,7 @@ @As(MenuItem.class) public StringMenuOwner asMenuOwner() { if (menuOwner == null) { - menuOwner = new StringMenuOwnerImpl(this, this.as(Parent.class, Menu.class)); + menuOwner = new StringMenuOwnerImpl(this, (Parent )this.as(Parent.class, Menu.class)); } return menuOwner; } --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableUtils.java 2017-02-15 15:58:13.995613774 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableUtils.java 2017-02-15 15:58:13.939613252 +0300 @@ -255,8 +255,8 @@ * @return */ static Rectangle getActuallyVisibleArea(final Wrap wrap) { - final Rectangle viewArea = getContainerWrap(wrap.as(Parent.class, Node.class)).getScreenBounds(); - final Rectangle clippedContainerArea = getClippedContainerWrap(wrap.as(Parent.class, Node.class)).getScreenBounds(); + final Rectangle viewArea = getContainerWrap((Parent )wrap.as(Parent.class, Node.class)).getScreenBounds(); + final Rectangle clippedContainerArea = getClippedContainerWrap((Parent )wrap.as(Parent.class, Node.class)).getScreenBounds(); return new Rectangle(viewArea.x, viewArea.y, clippedContainerArea.width, clippedContainerArea.height); } --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableViewWrap.java 2017-02-15 15:58:14.223615898 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableViewWrap.java 2017-02-15 15:58:14.171615414 +0300 @@ -24,7 +24,7 @@ */ package org.jemmy.fx.control; -import com.sun.javafx.scene.control.skin.VirtualFlow; +import javafx.scene.control.skin.VirtualFlow; import javafx.collections.ObservableList; import javafx.scene.control.*; import org.jemmy.Point; --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableViewWrap.java 2017-02-15 15:58:14.451618023 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableViewWrap.java 2017-02-15 15:58:14.399617538 +0300 @@ -24,7 +24,7 @@ */ package org.jemmy.fx.control; -import com.sun.javafx.scene.control.skin.VirtualFlow; +import javafx.scene.control.skin.VirtualFlow; import java.util.ArrayList; import java.util.List; import javafx.collections.FXCollections; @@ -582,4 +582,4 @@ } return cellParent; } -} \ No newline at end of file +} --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeViewWrap.java 2017-02-15 15:58:14.691620259 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeViewWrap.java 2017-02-15 15:58:14.639619774 +0300 @@ -24,7 +24,7 @@ */ package org.jemmy.fx.control; -import com.sun.javafx.scene.control.skin.VirtualFlow; +import javafx.scene.control.skin.VirtualFlow; import javafx.scene.Node; import javafx.scene.control.ScrollBar; import javafx.scene.control.TreeCell; @@ -381,4 +381,4 @@ return TreeViewWrap.this.getEnvironment(); } } -} \ No newline at end of file +} --- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/CaspianDriverFactory.java 2017-02-15 15:58:14.931622495 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/CaspianDriverFactory.java 2017-02-15 15:58:14.875621973 +0300 @@ -24,8 +24,8 @@ */ package org.jemmy.fx.control.caspian; -import com.sun.javafx.scene.control.skin.ScrollBarSkin; -import com.sun.javafx.scene.control.skin.SliderSkin; +import javafx.scene.control.skin.ScrollBarSkin; +import javafx.scene.control.skin.SliderSkin; import javafx.scene.Node; import javafx.scene.control.*; import org.jemmy.action.FutureAction; --- old/tools/SharedTestUtilsOpen/nbproject/project.properties 2017-02-15 15:58:15.179624806 +0300 +++ new/tools/SharedTestUtilsOpen/nbproject/project.properties 2017-02-15 15:58:15.119624247 +0300 @@ -64,8 +64,8 @@ file.reference.JemmyCore.jar=../Jemmy/jemmy_core/JemmyCore.jar file.reference.JemmySupport.jar=../Jemmy/jemmy_core/JemmySupport.jar file.reference.junit.jar=../Jemmy/jemmy_core/junit.jar -file.reference.jfxrt.jar=${javafx.rt}/lib/ext/jfxrt.jar -file.reference.jfxswt.jar=${javafx.rt}/lib/jfxswt.jar +file.reference.jfxrt.jar=${java.home}/lib/ext/jfxrt.jar +file.reference.jfxswt.jar=${java.home}/lib/javafx-swt.jar includes=** jar.archive.disabled=${jnlp.enabled} jar.compress=false --- old/tools/SharedTestUtilsOpen/src/test/javaclient/shared/AppLauncher.java 2017-02-15 15:58:15.419627042 +0300 +++ new/tools/SharedTestUtilsOpen/src/test/javaclient/shared/AppLauncher.java 2017-02-15 15:58:15.359626483 +0300 @@ -55,6 +55,7 @@ case SWING: instantiateOnSwingQueue(cl, args); break; + // https://bugs.openjdk.java.net/browse/JDK-8131888 case SWT: instantiateOnSWTQueue(cl, args); break; @@ -105,6 +106,7 @@ } } + // https://bugs.openjdk.java.net/browse/JDK-8131888 private static void instantiateOnSWTQueue(final Class cl, String[] args) { try { Interoperability obj = cl.newInstance(); @@ -154,10 +156,8 @@ } return Boolean.TRUE; } else { - Iterator it = Stage.impl_getWindows(); - while (it.hasNext()) { - - if (it.next().isShowing()) { + for (Window w : Stage.getWindows()) { + if (w.isShowing()) { return Boolean.TRUE; } } --- old/tools/SharedTestUtilsOpen/src/test/javaclient/shared/CombinedTestChooserPresenter.java 2017-02-15 15:58:15.655629241 +0300 +++ new/tools/SharedTestUtilsOpen/src/test/javaclient/shared/CombinedTestChooserPresenter.java 2017-02-15 15:58:15.599628719 +0300 @@ -39,6 +39,7 @@ import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import org.eclipse.swt.widgets.Shell; +import com.sun.javafx.stage.WindowHelper; /** * @@ -183,7 +184,8 @@ stage.setScene(scene); stage.show(); stage.toFront(); - stage.setFocused(true); + //stage.setFocused(true); + WindowHelper.setFocused(stage, true); } public void show(final Object frame, final Object panel) { --- old/tools/SharedTestUtilsOpen/src/test/javaclient/shared/CombinedTestChooserPresenter3D.java 2017-02-15 15:58:15.895631477 +0300 +++ new/tools/SharedTestUtilsOpen/src/test/javaclient/shared/CombinedTestChooserPresenter3D.java 2017-02-15 15:58:15.843630993 +0300 @@ -28,6 +28,7 @@ import javafx.scene.layout.Pane; import javafx.scene.Group; import javafx.stage.Stage; +import com.sun.javafx.stage.WindowHelper; /** * @@ -67,7 +68,8 @@ stage.show(); stage.toFront(); setNodeForScreenshot(null); - stage.setFocused(true); + //stage.setFocused(true); + WindowHelper.setFocused(stage, true); } } --- old/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestBase.java 2017-02-15 15:58:16.131633676 +0300 +++ new/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestBase.java 2017-02-15 15:58:16.075633154 +0300 @@ -306,7 +306,8 @@ res2Name, diffName); } else { Wrap imViewWrap = - (new NodeDock(getScene().as(Parent.class, Node.class), "ViewOfNodeSnapshot")).wrap(); + //(new NodeDock(getScene().as(Parent.class, Node.class), "ViewOfNodeSnapshot")).wrap(); + (new NodeDock((Parent)getScene().as(Parent.class, Node.class), "ViewOfNodeSnapshot")).wrap(); //Lookups.byID(scene, "ViewOfNodeSnapshot", ImageView.class); imViewWrap.waitImage(getScene().getEnvironment().getImageLoader().load(resName), --- old/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestBaseBase.java 2017-02-15 15:58:16.367635875 +0300 +++ new/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestBaseBase.java 2017-02-15 15:58:16.311635353 +0300 @@ -95,7 +95,7 @@ * new ControlDock because there is no ButtonDock Yet. */ final ControlWrap label = - new ControlDock(scene.as(Parent.class, Node.class), name).wrap(); + new ControlDock((Parent )scene.as(Parent.class, Node.class), name).wrap(); label.mouse().move(); Utils.deferAction(new Runnable() { public void run() { --- old/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestUtil.java 2017-02-15 15:58:16.603638074 +0300 +++ new/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestUtil.java 2017-02-15 15:58:16.551637590 +0300 @@ -37,6 +37,7 @@ import org.jemmy.timing.State; import test.javaclient.shared.description.TreeNode; import test.javaclient.shared.screenshots.GoldenImageManager; +import com.sun.javafx.stage.WindowHelper; /** * Utility methods @@ -176,7 +177,8 @@ scene = Root.ROOT.lookup(new ByWindowType(Stage.class)).lookup(Scene.class).wrap(0); Utils.deferAction(new Runnable() { public void run() { - scene.getControl().getWindow().setFocused(true); + //scene.getControl().getWindow().setFocused(true); + WindowHelper.setFocused(scene.getControl().getWindow(), true); } }); --- old/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/GoldenImageManager.java 2017-02-15 15:58:16.843640310 +0300 +++ new/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/GoldenImageManager.java 2017-02-15 15:58:16.787639789 +0300 @@ -44,7 +44,7 @@ private static final String IMG_FOLDER = "images-svn"; private static File getImagesRoot() throws IOException { - return new File("../", IMG_FOLDER).getCanonicalFile(); + return new File("./", IMG_FOLDER).getCanonicalFile(); } private static String getSuiteName() throws IOException { --- old/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/ScreenshotUtils.java 2017-02-15 15:58:17.071642435 +0300 +++ new/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/ScreenshotUtils.java 2017-02-15 15:58:17.011641875 +0300 @@ -167,7 +167,8 @@ public static Wrap getPageContent() { Node n = application.getNodeForScreenshot(); final Wrap scene = Root.ROOT.lookup(new ByWindowType(Stage.class)).lookup(Scene.class).wrap(0); - return new NodeDock(scene.as(Parent.class, Node.class), n.getId()).wrap(); + //return new NodeDock(scene.as(Parent.class, Node.class), n.getId()).wrap(); + return new NodeDock((Parent)scene.as(Parent.class, Node.class), n.getId()).wrap(); } /** --- /dev/null 2017-02-06 10:30:55.634050603 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/datepicker/ChronologiesTest.java.excluded 2017-02-15 15:58:17.247644075 +0300 @@ -0,0 +1,263 @@ +/* + * Copyright (c) 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 javafx.scene.control.test.datepicker; + +import java.time.chrono.Chronology; +import java.util.HashMap; +import javafx.scene.Node; +import javafx.scene.control.test.utils.ptables.AbstractPropertyController.SettingType; +import org.jemmy.Point; +import org.jemmy.fx.control.TextInputControlDock; +import org.jemmy.interfaces.Keyboard.KeyboardButtons; +import org.jemmy.interfaces.Parent; +import static org.junit.Assert.fail; +import org.junit.Test; +import org.junit.runner.RunWith; +import test.javaclient.shared.FilteredTestRunner; + +/** + * + * @author Dmitry Zinkevich + */ +@RunWith(FilteredTestRunner.class) +public class ChronologiesTest extends TestBase { + /** + * Checks initial appearance of the DateChooser + * with predefined date using ISO chronology. + */ + @Test(timeout = 10000) + public void initialPopupAppearanceISO() throws Throwable { + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, Chronology.of("ISO")); + setDefaultDate(); + showPopup(); + + checkScreenshot("DatePicker-initialPopupISO", getRootWrap(getPopupWrap())); + throwScreenshotError(); + } + + /** + * Checks initial appearance of the DateChooser + * with predefined date using Minguo chronology. + */ + @Test(timeout = 10000) + public void initialPopupAppearanceMinguo() throws Throwable { + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, Chronology.of("Minguo")); + setDefaultDate(); + showPopup(); + + checkScreenshot("DatePicker-initialPopupMinguo", getRootWrap(getPopupWrap())); + throwScreenshotError(); + } + + /** + * Checks initial appearance of the DateChooser + * with predefined date using ThaiBuddhist chronology. + */ + @Test(timeout = 10000) + public void initialPopupAppearanceThaiBuddhist() throws Throwable { + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, Chronology.of("ThaiBuddhist")); + setDefaultDate(); + showPopup(); + + checkScreenshot("DatePicker-initialPopupThaiBuddhist", getRootWrap(getPopupWrap())); + throwScreenshotError(); + } + + /** + * Checks initial appearance of the DateChooser + * with predefined date using Japanese chronology. + */ + @Test(timeout = 10000) + public void initialPopupAppearanceJapanese() throws Throwable { + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, Chronology.of("Japanese")); + setDefaultDate(); + showPopup(); + + checkScreenshot("DatePicker-initialPopupJapanese", getRootWrap(getPopupWrap())); + throwScreenshotError(); + } + + /** + * Checks initial appearance of the DateChooser + * with predefined date using Hijrah-umalqura chronology. + */ + @Test(timeout = 10000) + public void initialPopupAppearanceHijrahUmalqura() throws Throwable { + final Chronology chronology = Chronology.of("Hijrah-umalqura"); + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, chronology); + setDefaultDate(); + showPopup(); + checkScreenshot("DatePicker-initialPopupHijrahUmalqura", getRootWrap(getPopupWrap())); + throwScreenshotError(); + } + + /** + * Checks that DateField shows correct date representation + * according using ISO chronology. + */ + @Test(timeout = 10000) + public void dateRepresentationISO() { + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, Chronology.of("ISO")); + setDefaultDate(); + waitShownText("10/11/1990"); + } + + /** + * Checks that DateField shows correct date representation + * according using Minguo chronology. + */ + @Test(timeout = 10000) + public void dateRepresentationMinguo() { + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, Chronology.of("Minguo")); + setDefaultDate(); + waitShownText("10/11/0079 1"); + } + + /** + * Checks that DateField shows correct date representation + * according using Thai Buddhist chronology. + */ + @Test(timeout = 10000) + public void dateRepresentationThaiBuddhist() { + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, Chronology.of("ThaiBuddhist")); + setDefaultDate(); + waitShownText("10/11/2533 B.E."); + } + + /** + * Checks that DateField shows correct date representation + * according using Japanese chronology. + */ + @Test(timeout = 10000) + public void dateRepresentationJapanese() { + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, Chronology.of("Japanese")); + setDefaultDate(); + waitShownText("10/11/0002 H"); + } + + /** + * Checks that DateField shows correct date representation + * according using Hijrah-umalqura chronology. + */ + @Test(timeout = 10000) + public void dateRepresentationHijrahUmalqura() { + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, Chronology.of("Hijrah-umalqura")); + setDefaultDate(); + waitShownText("3/21/1411 AH"); + } + + /** + * Test checks that after typing + * a correct date in the DateField the DateChooser will render + * it correctly. + * Using ISO chronology. + */ + @Test(timeout = 10000) + public void dateTypingISO() throws InterruptedException { + HashMap expectedState = new HashMap(3); + expectedState.put("selectedDay", "29"); + expectedState.put("monthName", "february"); + expectedState.put("year", "2012"); + checkTypedDate(Chronology.of("ISO"), expectedState, "2/29/2012"); + } + + /** + * Test checks that after typing + * a correct date in the DateField the DateChooser will render + * it correctly. + * Using Minguo chronology. + */ + @Test(timeout = 10000) + public void dateTypingMinguo() throws InterruptedException { + HashMap expectedState = new HashMap(3); + expectedState.put("selectedDay", "29"); + expectedState.put("monthName", "february"); + expectedState.put("year", "101"); + checkTypedDate(Chronology.of("Minguo"), expectedState, "2/29/0101 1"); + } + + /** + * Test checks that after typing + * a correct date in the DateField the DateChooser will render + * it correctly. + * Using ThaiBuddhist chronology. + */ + @Test(timeout = 10000) + public void dateTypingThaiBuddhist() throws InterruptedException { + HashMap expectedState = new HashMap(3); + expectedState.put("selectedDay", "29"); + expectedState.put("monthName", "february"); + expectedState.put("year", "2555"); + checkTypedDate(Chronology.of("ThaiBuddhist"), expectedState, "2/29/2555 B.E."); + } + + /** + * Test checks that after typing + * a correct date in the DateField the DateChooser will render + * it correctly. + * Using Japanese chronology. + */ + @Test(timeout = 10000) + public void dateTypingJapanese() throws InterruptedException { + HashMap expectedState = new HashMap(3); + expectedState.put("selectedDay", "29"); + expectedState.put("monthName", "february"); + expectedState.put("year", "Heisei24"); + checkTypedDate(Chronology.of("Japanese"), expectedState, "2/29/0024 H"); + } + + /** + * Test checks that after typing + * a correct date in the DateField the DateChooser will render + * it correctly. + * Using Hijrah-umalqura chronology. + */ + @Test(timeout = 10000) + public void dateTypingHijrahUmalqura() throws InterruptedException { + HashMap expectedState = new HashMap(3); + expectedState.put("selectedDay", "29"); + expectedState.put("monthName", "february"); + expectedState.put("year", "2012"); + checkTypedDate(Chronology.of("Hijrah-umalqura"), expectedState, "4/7/1433 AH"); + } + + public void checkTypedDate(Chronology chronology, HashMap expectedState, String date) throws InterruptedException { + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, chronology); + TextInputControlDock in = new TextInputControlDock(testedControl.as(Parent.class, Node.class)); + in.type(date); + in.keyboard().pushKey(KeyboardButtons.ENTER); + waitShownText(date); + + clickDropDownButton(); + waitPopupShowingState(true); + + PopupSceneDescription description = new PopupSceneDescription(); + description.extractData(); + + testedControl.waitState(new DateState(expectedState, description)); + //Close pop up + scene.mouse().click(1, new Point(2, 2)); + } +} --- /dev/null 2017-02-06 10:30:55.634050603 +0300 +++ new/functional/ControlsTests/test/javafx/scene/control/test/datepicker/DatePickerTest.java.excluded 2017-02-15 15:58:17.435645826 +0300 @@ -0,0 +1,715 @@ +/* + * Copyright (c) 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 javafx.scene.control.test.datepicker; + +import java.time.LocalDate; +import java.time.Month; +import java.time.chrono.Chronology; +import java.util.Arrays; +import java.util.Comparator; +import java.util.HashMap; +import java.util.logging.Level; +import java.util.logging.Logger; +import javafx.scene.Node; +import javafx.scene.control.DateCell; +import javafx.scene.control.DatePicker; +import javafx.scene.control.TextInputControl; +import javafx.scene.control.test.datepicker.DatePickerApp.DummyConverter; +import javafx.scene.control.test.datepicker.DatePickerApp.LocalDateConverter; +import javafx.scene.control.test.datepicker.DatePickerApp.WorkingDays; +import static javafx.scene.control.test.datepicker.TestBase.testedControl; +import javafx.scene.control.test.util.PropertyTest; +import javafx.scene.control.test.utils.ptables.AbstractPropertyController.SettingType; +import javafx.util.Callback; +import javafx.util.StringConverter; +import org.jemmy.Point; +import org.jemmy.action.GetAction; +import org.jemmy.control.Wrap; +import org.jemmy.fx.ByStyleClass; +import org.jemmy.fx.control.TextInputControlDock; +import org.jemmy.interfaces.Keyboard.KeyboardButton; +import org.jemmy.interfaces.Keyboard.KeyboardButtons; +import org.jemmy.interfaces.Keyboard.KeyboardModifiers; +import org.jemmy.interfaces.Modifier; +import org.jemmy.interfaces.Parent; +import org.jemmy.timing.State; +import static org.junit.Assert.*; +import org.junit.Test; +import org.junit.runner.RunWith; +import test.javaclient.shared.FilteredTestRunner; + +/** + * @author Alexander Kirov, Dmitry Zinkevich + * + */ +@RunWith(FilteredTestRunner.class) +public class DatePickerTest extends TestBase { + Double width; + + void checkFinalState() { + checkTextFieldValue(Properties.width, width.doubleValue()); + defaultController.check(); + } + + void rememberInitialState(Enum... excludePropertiesList) { + width = new GetAction() { + @Override + public void run(Object... parameters) throws Exception { + setResult(Double.valueOf(testedControl.getControl().getWidth())); + } + }.dispatch(testedControl.getEnvironment()); + + initChangingController(parent); + defaultController.include().allTables().allProperties().allCounters().apply(); + defaultController.exclude().allTables().properties(excludePropertiesList).apply(); + defaultController.fixCurrentState(); + } + + /** + * Checks that week numbers have been rendered. + */ + @Test(timeout = 10000) + public void weekNumbersScreenshotTest() throws Throwable { + setDate(LocalDate.of(1990, Month.OCTOBER, 11)); + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + setPropertyByToggleClick(SettingType.SETTER, Properties.showWeekNumbers, Boolean.TRUE); + showPopup(); + + checkFinalState(); + + checkScreenshot("DatePicker-weekNumbers", getRootWrap(getPopupWrap())); + throwScreenshotError(); + } + + /** + * Checks that the current date is shown by default in the DateChooser. + */ + @Test(timeout = 10000) + public void currentDateShownTest() throws InterruptedException { + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + clickDropDownButton(); + waitPopupShowingState(true); + + PopupSceneDescription description = new PopupSceneDescription(); + final PopupInfoDescription infoDescription = description.getInfoDescription(); + LocalDate now = LocalDate.now(); + + assertEquals(Integer.parseInt(infoDescription.year), now.getYear()); + assertEquals(infoDescription.monthName.toLowerCase(), now.getMonth().toString().toLowerCase()); + assertEquals(infoDescription.today.mainDate, now.getDayOfMonth()); + + boolean found = false; + for (DateCellDescription descriptionVar : infoDescription.currentMonthDays) { + if (descriptionVar.mainDate == now.getDayOfMonth()) { + found = true; + } + } + assertTrue(found); + + checkFinalState(); + } + + /** + * Checks that previous month button works as expected. + */ + @Test(timeout = 10000) + public void correctPreviousMonthTest() throws InterruptedException { + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + clickDropDownButton(); + waitPopupShowingState(true); + + final PopupSceneDescription description = new PopupSceneDescription(); + final PopupInfoDescription infoDescription = description.getInfoDescription(); + + final int initialDaysNum = description.currentMonthDays.size(); + + description.previousMonthWrap.mouse().click(); + + testedControl.waitState(new State() { + public Object reached() { + PopupInfoDescription infoDescription2 = null; + try { + infoDescription2 = description.getInfoDescription(); + } catch (InterruptedException ex) { + Logger.getLogger(DatePickerTest.class.getName()).log(Level.SEVERE, null, ex); + } + + if (Month.valueOf(infoDescription.monthName.toUpperCase()).minus(1).equals(Month.valueOf(infoDescription2.monthName.toUpperCase())) + && (initialDaysNum != description.currentMonthDays.size() + || infoDescription.monthName.equalsIgnoreCase("AUGUST") + || infoDescription.monthName.equalsIgnoreCase("JANUARY"))) { + return true; + } else { + return null; + } + } + }); + + checkFinalState(); + } + + /** + * Checks that next month button works as expected. + */ + @Test(timeout = 10000) + public void correctNextMonthTest() throws InterruptedException { + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + clickDropDownButton(); + waitPopupShowingState(true); + + final PopupSceneDescription description = new PopupSceneDescription(); + final PopupInfoDescription infoDescription = description.getInfoDescription(); + + final int initialDaysNum = description.currentMonthDays.size(); + + description.nextMonthWrap.mouse().click(); + + testedControl.waitState(new State() { + public Object reached() { + PopupInfoDescription infoDescription2 = null; + try { + infoDescription2 = description.getInfoDescription(); + } catch (InterruptedException ex) { + Logger.getLogger(DatePickerTest.class.getName()).log(Level.SEVERE, null, ex); + } + if (Month.valueOf(infoDescription.monthName.toUpperCase()).plus(1).equals(Month.valueOf(infoDescription2.monthName.toUpperCase())) + && (initialDaysNum != description.currentMonthDays.size() + || infoDescription.monthName.equalsIgnoreCase("JULY") + || infoDescription.monthName.equalsIgnoreCase("DECEMBER"))) { + return true; + } else { + return null; + } + } + }); + + checkFinalState(); + } + + /** + * Checks that arrows which increase/decrease year work correctly + */ + @Test(timeout = 10000) + public void yearNavigationTest() throws InterruptedException { + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + setDate(LocalDate.of(2012, 5, 9)); + clickDropDownButton(); + + PopupSceneDescription description = new PopupSceneDescription(); + description.extractData(); + description.previousYearWrap.mouse().click(); + + HashMap expectedState = new HashMap(2); + expectedState.put("monthName", "May"); + expectedState.put("year", "2011"); + testedControl.waitState(new DateState(expectedState, description)); + + description.extractData(); description.currentMonthDays.get(30).mouse().click(); + waitShownText("5/31/2011"); + + setDate(LocalDate.of(2012, 2, 29)); + clickDropDownButton(); + description = new PopupSceneDescription(); + description.extractData(); description.nextYearWrap.mouse().click(); + expectedState.put("monthName", "February"); + expectedState.put("year", "2013"); + testedControl.waitState(new DateState(expectedState, description)); + + description.extractData(); description.currentMonthDays.get(27).mouse().click(); + waitShownText("2/28/2013"); + + checkFinalState(); + } + + /** + * Checks that when mouse clicks the first or the last cell + * in the DateChooser then the current month is set to the previous or + * to the next from current respectively. + */ + @Test(timeout = 10000) + public void extremeDateCellsChangeCurrentMonth() throws InterruptedException { + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + setDate(LocalDate.of(2000, 1, 27)); + clickDropDownButton(); + + PopupSceneDescription description = new PopupSceneDescription(); + description.extractData(); description.previousMonthDays.get(0).mouse().click(); + + HashMap expectedState = new HashMap(2); + expectedState.put("monthName", "December"); + expectedState.put("year", "1999"); + testedControl.waitState(new DateState(expectedState, description)); + + clickDropDownButton(); + description.extractData(); description.currentMonthDays.get(30).mouse().click(); + waitShownText("12/31/1999"); + + setDate(LocalDate.of(2019, 12, 20)); + clickDropDownButton(); + + description = new PopupSceneDescription(); + description.extractData(); description.nextMonthDays.get(description.nextMonthDays.size() - 1).mouse().click(); + expectedState.put("monthName", "January"); + expectedState.put("year", "2020"); + testedControl.waitState(new DateState(expectedState, description)); + + clickDropDownButton(); + description.extractData(); description.currentMonthDays.get(26).mouse().click(); + waitShownText("1/27/2020"); + checkFinalState(); + } + + /** + * Checks that when navigating in horizontal or vertical direction + * the switching between days and months occurs correctly. + * + * Also, tests for month/year navigation, respectively Control+PgUp/Control+PgDn and PgUp/PgDn + * @see RT-32493 and RT-32492 + */ + @Test(timeout = 20000) + public void keyboardNavigation() throws InterruptedException { + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + setDate(LocalDate.of(2013, 01, 06)); + clickDropDownButton(); + waitPopupShowingState(true); + + scene.keyboard().pushKey(KeyboardButtons.LEFT); + PopupSceneDescription description = new PopupSceneDescription(); + description.extractData(); + + //Focus must be on 1/5/2013 + description.currentMonthDays.get(4).waitProperty("isFocused", Boolean.TRUE); + + for (int i = 0; i < 5; i++) scene.keyboard().pushKey(KeyboardButtons.LEFT); + + //Expect switching to the previous month and year + HashMap expectedState = new HashMap(3); + expectedState.put("monthName", "december"); + expectedState.put("year", "2012"); + expectedState.put("focusedDay", "31"); + description.extractData(); + testedControl.waitState(new DateState(expectedState, description)); + + //Expect to switch to the next month and year + scene.keyboard().pushKey(KeyboardButtons.DOWN); + expectedState.put("monthName", "january"); + expectedState.put("year", "2013"); + expectedState.put("focusedDay", "7"); + description.extractData(); + testedControl.waitState(new DateState(expectedState, description)); + + for (int i = 0; i < 6; i++) scene.keyboard().pushKey(KeyboardButtons.RIGHT); + + //Expect to move to the next week + expectedState.put("monthName", "january"); + expectedState.put("year", "2013"); + expectedState.put("focusedDay", "13"); + description.extractData(); + testedControl.waitState(new DateState(expectedState, description)); + + for (int i = 0; i < 2; i++) scene.keyboard().pushKey(KeyboardButtons.DOWN); + for (int i = 0; i < 5; i++) scene.keyboard().pushKey(KeyboardButtons.RIGHT); + + //Expect to move to the next month + expectedState.put("monthName", "february"); + expectedState.put("year", "2013"); + expectedState.put("focusedDay", "1"); + description.extractData(); + testedControl.waitState(new DateState(expectedState, description)); + + scene.keyboard().pushKey(KeyboardButtons.RIGHT); + scene.keyboard().pushKey(KeyboardButtons.UP); + + //Expect to move to the prev month + expectedState.put("monthName", "january"); + expectedState.put("year", "2013"); + expectedState.put("focusedDay", "26"); + description.extractData(); + testedControl.waitState(new DateState(expectedState, description)); + + for (int i = 0; i < 3; ++i) + scene.keyboard().pushKey(KeyboardButtons.PAGE_DOWN, KeyboardModifiers.CTRL_DOWN_MASK); + + //Expect to move forward in three years + expectedState.put("monthName", "january"); + expectedState.put("year", "2016"); + expectedState.put("focusedDay", "26"); + description.extractData(); + testedControl.waitState(new DateState(expectedState, description)); + + scene.keyboard().pushKey(KeyboardButtons.PAGE_UP, KeyboardModifiers.CTRL_DOWN_MASK); + + //Expect to move backward for one years + expectedState.put("monthName", "january"); + expectedState.put("year", "2015"); + expectedState.put("focusedDay", "26"); + description.extractData(); + testedControl.waitState(new DateState(expectedState, description)); + + for (int i = 0; i < 4; ++i) + scene.keyboard().pushKey(KeyboardButtons.PAGE_UP); + + //Expect to move backward for four months + expectedState.put("monthName", "september"); + expectedState.put("year", "2014"); + expectedState.put("focusedDay", "26"); + description.extractData(); + testedControl.waitState(new DateState(expectedState, description)); + + for (int i = 0; i < 6; ++i) + scene.keyboard().pushKey(KeyboardButtons.PAGE_DOWN); + + //Expect to move forward for six months + expectedState.put("monthName", "march"); + expectedState.put("year", "2015"); + expectedState.put("focusedDay", "26"); + description.extractData(); + testedControl.waitState(new DateState(expectedState, description)); + checkFinalState(); + } + + /** + * Checks all possible ways to select a date with the keyboard. + */ + @Test(timeout = 10000) + public void keyboardDateSelection() throws InterruptedException { + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + + clickDropDownButton(); + waitPopupShowingState(true); + + PopupSceneDescription description = new PopupSceneDescription(); + description.extractData(); + description.currentMonthDays.get(14).mouse().click(); + waitPopupShowingState(false); + checkExpectedDate(LocalDate.now().withDayOfMonth(15)); + + clickDropDownButton(); + scene.keyboard().pushKey(KeyboardButtons.DOWN); + scene.keyboard().pushKey(KeyboardButtons.SPACE); + checkExpectedDate(LocalDate.now().withDayOfMonth(22)); + + clickDropDownButton(); + for (int i = 0; i < 2; i++) scene.keyboard().pushKey(KeyboardButtons.UP); + scene.keyboard().pushKey(KeyboardButtons.ENTER); + checkExpectedDate(LocalDate.now().withDayOfMonth(8)); + + clickDropDownButton(); + scene.keyboard().pushKey(KeyboardButtons.DOWN); + scene.keyboard().pushKey(KeyboardButtons.ESCAPE); + checkExpectedDate(LocalDate.now().withDayOfMonth(8)); + + checkFinalState(); + } + + /** + * Check that after typing a correct date + * the DateChooser will also show it. + * First time the default converter is used which + * reads date in en_US format according to test default locale. + * The second time a custom converter is used in the format yyyy-MM-dd. + */ + @Test(timeout = 20000) + public void customConverter() throws InterruptedException { + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + + final StringConverter converter = new DummyConverter(); + setConverter(converter); + assertSame(converter, getConverter()); + selectObjectFromChoiceBox(SettingType.UNIDIRECTIONAL, Properties.converter, null); + + String dates[][] = {{"7/4/1776", "July", "4", "1776"}, {"1779-07-14", "July", "14", "1779"}}; + + TextInputControlDock text = new TextInputControlDock(parent, new ByStyleClass("date-picker-display-node")); + HashMap expectedState = new HashMap(3); + + for (int i = 0; i < 2; i++) { + String[] dateParts = dates[i]; + text.clear(); + text.asSelectionText().type(dateParts[0]); + text.keyboard().pushKey(KeyboardButtons.ENTER); + waitShownText(dateParts[0]); + + clickDropDownButton(); + PopupSceneDescription description = new PopupSceneDescription(); + description.extractData(); + + expectedState.put("monthName", dateParts[1]); + expectedState.put("selectedDay", dateParts[2]); + expectedState.put("year", dateParts[3]); + + testedControl.waitState(new DateState(expectedState, description)); + + testedControl.keyboard().pushKey(KeyboardButtons.ESCAPE); + waitPopupShowingState(false); + + //The second time test custom converter + selectObjectFromChoiceBox(SettingType.UNIDIRECTIONAL, Properties.converter, LocalDateConverter.class); + } + checkFinalState(); + } + + /** + * Checks that disabled DateCell can't be selected and + * that state doesn't change after. + */ + @Test(timeout = 10000) + public void daysRestriction() throws InterruptedException { + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + + final Callback dayCellFactory = new Callback() { + public DateCell call(DatePicker param) { return new DateCell(); } + }; + setDayCellFactory(dayCellFactory); + assertSame(dayCellFactory, getDayCellFactory()); + + selectObjectFromChoiceBox(SettingType.BIDIRECTIONAL, Properties.dayCellFactory, WorkingDays.class); + setDate(LocalDate.of(2020, 10, 31)); + clickDropDownButton(); + waitPopupShowingState(true); + + PopupSceneDescription description = new PopupSceneDescription(); + description.extractData(); + Wrap cellWrap = description.currentMonthDays.get(24); + DateCellDescription cell = new DateCellDescription(cellWrap); + assertEquals("[Selected wrong day]", 25, cell.mainDate); + + cellWrap.mouse().click(); + waitPopupShowingState(true); + + HashMap expectedState = new HashMap(2); + expectedState.put("selectedDay", "31"); + expectedState.put("monthName", "October"); + expectedState.put("year", "2020"); + testedControl.waitState(new DateState(expectedState, description)); + waitShownText("10/31/2020"); + + testedControl.keyboard().pushKey(KeyboardButtons.ESCAPE); + setDate(LocalDate.of(2020, Month.OCTOBER, 25)); + checkFinalState(); + } + + /** + * Changes value of the property 'showWeekNumbers' + * and checks that DateChooser is rendered correctly. + * The value is set via api and via context menu. + */ + @Test(timeout = 20000) + public void showWeekNumbersProperty() throws InterruptedException { + assertFalse(new GetAction() { + @Override public void run(Object... parameters) throws Exception { + setResult(new DatePicker().isShowWeekNumbers()); + } + }.dispatch(testedControl.getEnvironment()).booleanValue()); + + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + + setDate(LocalDate.of(2013, Month.DECEMBER, 31)); + for(SettingType settingType : SettingType.values()) { + System.out.format("Testing binding:%s\n", settingType.toString()); + setPropertyByToggleClick(settingType, Properties.showWeekNumbers, Boolean.TRUE); + + checkTextFieldText(Properties.showWeekNumbers, "true"); + + clickDropDownButton(); waitPopupShowingState(true); + + PopupSceneDescription description = new PopupSceneDescription(); + description.extractData(); + assertEquals("[Incorrect count of week numbers]", 6, description.weeksNumbers.size()); + + description.weeksNumbers.sort(new Comparator>() { + public int compare(Wrap o1, Wrap o2) { + return o1.getScreenBounds().y - o2.getScreenBounds().y; + } + }); + + Integer[] expectedNumbers = {49, 50, 51, 52, 1, 2}; + assertEquals("[Weeks are not in correct order]", Arrays.asList(expectedNumbers), description.getInfoDescription().weekNumbers); + + setPropertyByToggleClick(settingType, Properties.showWeekNumbers, Boolean.FALSE); + + description.extractData(); + assertEquals("[No week numbers expected]", 0, description.weeksNumbers.size()); + + scene.mouse().click(1, new Point(2, 2)); + switchOffBinding(settingType, Properties.showWeekNumbers); + } + checkFinalState(); + } + + /** + * Checks bindings of the 'chronology' property. + */ + @Test(timeout = 10000) + public void chronologyProperty() { + rememberInitialState(); + + final String PROPERTY_NAME = "ThaiBuddhist"; + final Chronology CHRONOLOGY = Chronology.of(PROPERTY_NAME); + for(SettingType settingType : SettingType.values()) { + System.out.format("Testing binding:%s\n", settingType.toString()); + selectObjectFromChoiceBox(settingType, Properties.chronology, CHRONOLOGY); + + checkTextFieldText(Properties.chronology, PROPERTY_NAME); + + switchOffBinding(settingType, Properties.chronology); + selectObjectFromChoiceBox(SettingType.SETTER, Properties.chronology, Chronology.of("ISO")); + } + checkFinalState(); + } + + /** + * Check value of the 'showing' property. + */ + @Test(timeout = 20000) + public void showingProperty() throws InterruptedException { + assertFalse(new GetAction() { + @Override public void run(Object... parameters) throws Exception { + setResult(new DatePicker().showingProperty().getValue()); + } + }.dispatch(testedControl.getEnvironment()).booleanValue()); + + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + + clickDropDownButton(); + waitPopupShowingState(true); + + clickDropDownButton(); + waitPopupShowingState(false); + + testedControl.mouse().click(); + waitPopupShowingState(false); + + Object[][] keyCombinations = { + {KeyboardButtons.F4}, + {KeyboardButtons.DOWN, KeyboardModifiers.ALT_DOWN_MASK}, + {KeyboardButtons.UP, KeyboardModifiers.ALT_DOWN_MASK} + }; + + for(Object[] keyCombo : keyCombinations) { + System.out.println(Arrays.toString(keyCombo)); + if (keyCombo.length == 1) { + testedControl.keyboard().pushKey((KeyboardButton) keyCombo[0]); + } else { + testedControl.keyboard().pushKey((KeyboardButton) keyCombo[0], (Modifier) keyCombo[1]); + } + waitPopupShowingState(true); + testedControl.keyboard().pushKey(KeyboardButtons.ESCAPE); + waitPopupShowingState(false); + } + + checkFinalState(); + } + + /** + * Checks bindings of the 'editable' property. + */ + @Test(timeout = 20000) + public void editableProperty() { + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + final LocalDate INITIAL_DATE = LocalDate.of(2041, Month.SEPTEMBER, 22); + final String INITIAL_DATE_TEXT = "9/22/2041"; + final LocalDate TESTED_DATE = LocalDate.of(2000, Month.JANUARY, 1); + final String DATE_TEXT = "1/1/2000"; + + setDate(INITIAL_DATE); + waitShownText(INITIAL_DATE_TEXT); + setPropertyByToggleClick(SettingType.SETTER, Properties.editable, Boolean.FALSE); + + //Test non editable state + TextInputControlDock input = new TextInputControlDock(testedControl.as(Parent.class, Node.class)); + selectAllText(input); + assertEquals("[Text was not selected]", INITIAL_DATE_TEXT, input.asSelectionText().selection()); + input.keyboard().pushKey(KeyboardButtons.A); + input.keyboard().pushKey(KeyboardButtons.ENTER); + + waitShownText(INITIAL_DATE_TEXT); + + for(SettingType settingType : SettingType.values()) { + System.out.format("Testing binding:%s\n", settingType.toString()); + setPropertyByToggleClick(settingType, Properties.editable, Boolean.TRUE); + + checkTextFieldText(Properties.editable, "true"); + + input = new TextInputControlDock(testedControl.as(Parent.class, Node.class)); + selectAllText(input); + assertEquals("[Text was not selected]", INITIAL_DATE_TEXT, input.asSelectionText().selection()); + + input.type(DATE_TEXT); + input.keyboard().pushKey(KeyboardButtons.ENTER); + assertEquals("[Date was not typed]", TESTED_DATE, getDate()); + waitShownText(DATE_TEXT); + + switchOffBinding(settingType, Properties.editable); + setPropertyByToggleClick(SettingType.SETTER, Properties.editable, Boolean.FALSE); + + //Restore initial state + setDate(INITIAL_DATE); + waitShownText(INITIAL_DATE_TEXT); + } + setPropertyByToggleClick(SettingType.SETTER, Properties.editable, Boolean.TRUE); + checkFinalState(); + } + + /** + * Check bindings of the 'prompt text' property + */ + @Test(timeout = 10000) + public void promptTextProperty() { + rememberInitialState(); + assertTrue("[Propmpt text is empty by default]", new GetAction() { + @Override public void run(Object... parameters) throws Exception { + setResult(new DatePicker().promptTextProperty().getValue().isEmpty()); + } + }.dispatch(testedControl.getEnvironment()).booleanValue()); + + final String TESTED_TEXT = "MM_dd_YY"; + final String DEFAULT_TEXT = "default"; + + for(SettingType settingType : SettingType.values()) { + System.out.format("Testing binding:%s\n", settingType.toString()); + + setPropertyByTextField(settingType, Properties.prompttext, TESTED_TEXT); + checkTextFieldText(Properties.prompttext, TESTED_TEXT); + + switchOffBinding(settingType, Properties.prompttext); + setPropertyByTextField(SettingType.SETTER, Properties.prompttext, DEFAULT_TEXT); + } + checkFinalState(); + } + + /** + * Test that TextField returned by getEditor() method remains the same after + * changing editable property + */ + @Test(timeout = 10000) + public void editorProperty() throws Throwable { + rememberInitialState(Properties.showing, Properties.hover, Properties.pressed, Properties.armed); + + new PropertyTest.EditorPropertyTest(testedControl).test(); + + checkFinalState(); + } +}; --- /dev/null 2017-02-06 10:30:55.634050603 +0300 +++ new/functional/FxmlTests/src/test/fxmltests/app/LineNumberApp.java.excluded 2017-02-15 15:58:17.651647838 +0300 @@ -0,0 +1,265 @@ +// https://bugs.openjdk.java.net/browse/INTJDK-7624138 +/* + * Copyright (c) 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 test.fxmltests.app; + +import javafx.fxml.LoadListener; +import com.sun.javafx.runtime.VersionInfo; +import java.util.ArrayList; +import java.util.List; +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Node; +import javafx.scene.Scene; +import javafx.scene.layout.VBox; +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; +import javafx.stage.Stage; +import test.javaclient.shared.BasicButtonChooserApp; +import test.javaclient.shared.PageWithSlots; +import test.javaclient.shared.TestNode; + +public class LineNumberApp extends BasicButtonChooserApp { + + private static String FXML_MAIN_RESOURCE = "/test/fxmltests/resources/line_number.fxml"; + private static String FXML_TYPE_RESOURCE = "/test/fxmltests/resources/line_number_type.fxml"; + private static String FXML_PROPERTY_RESOURCE = "/test/fxmltests/resources/line_number_property.fxml"; + public static List importProcessingInstruction = new ArrayList(); + final public static Integer[] importProcessingInstructionMatrix = new Integer[]{3, 4, 5, 6, 7}; + public static List languageProcessingInstruction = new ArrayList(); + final public static Integer[] languageProcessingInstructionMatrix = new Integer[]{9}; + public static List comment = new ArrayList(); + final public static Integer[] commentMatrix = new Integer[]{12, 15}; + public static List instanceDeclarationElement = new ArrayList(); + final public static Integer[] instanceDeclarationElementMatrix = new Integer[]{25, 26, 27, 31, 32, 34, 37}; + public static List includeElement = new ArrayList(); + final public static Integer[] includeElementMatrix = new Integer[]{35}; + public static List referenceElement = new ArrayList(); + final public static Integer[] referenceElementMatrix = new Integer[]{38}; + public static int rootElement = 0; + final public static int rootElementLine = 11; + public static List readUnknownStaticProperty = new ArrayList(); + final public static Integer[] readUnknownStaticPropertyMatrix = new Integer[]{5}; + public static List beginUnknowStaticElement = new ArrayList(); + final public static Integer[] beginUnknowStaticElementMatrix = new Integer[]{5}; + public static List beginUnknowStaticPropertyElement = new ArrayList(); + final public static Integer[] beginUnknowStaticPropertyElementMatrix = new Integer[]{6}; + public static List propertyElement = new ArrayList(); + final public static Integer[] propertyElementMatrix = new Integer[]{28}; + public static List scriptElement = new ArrayList(); + final public static Integer[] scriptElementMatrix = new Integer[]{19}; + public static List defineElement = new ArrayList(); + final public static Integer[] defineElementMatrix = new Integer[]{16, 41}; + public static List readPropertyAttribute = new ArrayList(); + final public static Integer[] readPropertyAttributeMatrix = new Integer[]{11, 11, 26, 27, 27, 27, 27, 32}; + public static List readInternalAttribute = new ArrayList(); + final public static Integer[] readInternalAttributeMatrix = new Integer[]{11, 27, 35, 38}; + public static List readEventHandlerAttribute = new ArrayList(); + final public static Integer[] readEventHandlerAttributeMatrix = new Integer[]{32}; + public static List endElement = new ArrayList(); + final public static Integer[] endElementMatrix = new Integer[]{18, 24, 28, 29, 30, 32, 33, 35, 36, 38, 39, 40, 43, 44}; + public static List copyElement = new ArrayList(); + final public static Integer[] copyElementMatrix = new Integer[]{}; + private static int WIDTH = 300; + private static int HEIGHT = 300; + + public enum Pages { + + mainPage, unknownTypePage, unknownPropertyPage + } + + public LineNumberApp() { + super(WIDTH, HEIGHT, VersionInfo.getRuntimeVersion(), false); + } + + @Override + protected TestNode setup() { + TestNode root = new TestNode(); + + PageWithSlots pageMain = new PageWithSlots(LineNumberApp.Pages.mainPage.name(), HEIGHT - 15, WIDTH - 10); + pageMain.add(new FxmlLoadPage(FXML_MAIN_RESOURCE), LineNumberApp.Pages.mainPage.name()); + + PageWithSlots pageType = new PageWithSlots(LineNumberApp.Pages.unknownTypePage.name(), HEIGHT - 15, WIDTH - 10); + pageType.add(new FxmlLoadPage(FXML_TYPE_RESOURCE), LineNumberApp.Pages.mainPage.name()); + + PageWithSlots pageProperty = new PageWithSlots(LineNumberApp.Pages.unknownPropertyPage.name(), HEIGHT - 15, WIDTH - 10); + pageProperty.add(new FxmlLoadPage(FXML_PROPERTY_RESOURCE), LineNumberApp.Pages.mainPage.name()); + + root.add(pageMain); + root.add(pageType); + root.add(pageProperty); + + return root; + } + + private class FxmlLoadPage extends TestNode { + + private String resource; + + public FxmlLoadPage(String resource) { + this.resource = resource; + } + + @Override + public Node drawNode() { + LineNumberApp.reset(); + final FXMLLoader loader = new FXMLLoader(getClass().getResource(resource)); + loader.impl_setStaticLoad(true); + + // The following line requires --add-exports javafx.fxml/com.sun.javafx.fxml=ALL-UNNAMED + loader.setLoadListener(new LoadListener() { + + @Override + public void readImportProcessingInstruction(String string) { + importProcessingInstruction.add(loader.impl_getLineNumber()); + } + + @Override + public void readLanguageProcessingInstruction(String string) { + languageProcessingInstruction.add(loader.impl_getLineNumber()); + } + + @Override + public void readComment(String string) { + comment.add(loader.impl_getLineNumber()); + } + + @Override + public void beginInstanceDeclarationElement(Class tye) { + instanceDeclarationElement.add(loader.impl_getLineNumber()); + } + + @Override + public void beginUnknownTypeElement(String string) { + beginUnknowStaticElement.add(loader.impl_getLineNumber()); + } + + @Override + public void beginIncludeElement() { + includeElement.add(loader.impl_getLineNumber()); + } + + @Override + public void beginReferenceElement() { + referenceElement.add(loader.impl_getLineNumber()); + } + + @Override + public void beginCopyElement() { + copyElement.add(loader.impl_getLineNumber()); + } + + @Override + public void beginRootElement() { + rootElement = loader.impl_getLineNumber(); + } + + @Override + public void beginPropertyElement(String string, Class type) { + propertyElement.add(loader.impl_getLineNumber()); + } + + @Override + public void beginUnknownStaticPropertyElement(String string) { + beginUnknowStaticPropertyElement.add(loader.impl_getLineNumber()); + } + + @Override + public void beginScriptElement() { + scriptElement.add(loader.impl_getLineNumber()); + } + + @Override + public void beginDefineElement() { + defineElement.add(loader.impl_getLineNumber()); + } + + @Override + public void readInternalAttribute(String string, String string1) { + readInternalAttribute.add(loader.impl_getLineNumber()); + } + + @Override + public void readPropertyAttribute(String string, Class type, String string1) { + readPropertyAttribute.add(loader.impl_getLineNumber()); + } + + @Override + public void readUnknownStaticPropertyAttribute(String string, String string1) { + readUnknownStaticProperty.add(loader.impl_getLineNumber()); + } + + @Override + public void readEventHandlerAttribute(String string, String string1) { + readEventHandlerAttribute.add(loader.impl_getLineNumber()); + } + + @Override + public void endElement(Object o) { + endElement.add(loader.impl_getLineNumber()); + } + }); + try { + VBox vb = new VBox(); + vb.setPrefSize(200, 200); + loader.setRoot(vb); + return (Node) loader.load(); + } catch (Exception exc) { + exc.printStackTrace(); + return new Rectangle(10, 10) { + + { + setFill(Color.RED); + } + }; + } + } + } + + public static void main(String[] args) { + launch(args); + } + + public static void reset() { + importProcessingInstruction.clear(); + languageProcessingInstruction.clear(); + comment.clear(); + instanceDeclarationElement.clear(); + beginUnknowStaticElement.clear(); + includeElement.clear(); + referenceElement.clear(); + copyElement.clear(); + rootElement = 0; + propertyElement.clear(); + beginUnknowStaticPropertyElement.clear(); + scriptElement.clear(); + defineElement.clear(); + readInternalAttribute.clear(); + readPropertyAttribute.clear(); + readUnknownStaticProperty.clear(); + readEventHandlerAttribute.clear(); + endElement.clear(); + } +} --- /dev/null 2017-02-06 10:30:55.634050603 +0300 +++ new/functional/FxmlTests/src/test/fxmltests/app/staticPropertyLoadApp.java.excluded 2017-02-15 15:58:17.847649665 +0300 @@ -0,0 +1,2781 @@ +// https://bugs.openjdk.java.net/browse/INTJDK-7624138 +/* + * Copyright (c) 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 test.fxmltests.app; + +import javafx.fxml.LoadListener; +import com.sun.javafx.fxml.ParseTraceElement; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Locale; +import java.util.ResourceBundle; +import java.util.logging.Level; +import java.util.logging.Logger; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.css.CssMetaData; +import javafx.css.Styleable; +import javafx.event.ActionEvent; +import javafx.event.EventHandler; +import javafx.fxml.FXMLLoader; +import javafx.fxml.JavaFXBuilderFactory; +import javafx.fxml.LoadException; +import javafx.scene.Group; + + +import javafx.scene.Node; +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.control.Label; +import javafx.scene.control.Labeled; +import javafx.scene.control.ListView; +import javafx.scene.control.Menu; +import javafx.scene.control.MenuBar; +import javafx.scene.control.MenuItem; +import javafx.scene.control.RadioButton; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.ToggleGroup; +import javafx.scene.control.cell.PropertyValueFactory; +import javafx.scene.input.KeyCombination; +import javafx.scene.layout.*; +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; +import javafx.scene.text.Font; +import javafx.scene.text.Text; +import javafx.util.Callback; +import javafx.util.Pair; + +import test.javaclient.shared.BasicButtonChooserApp; +import test.javaclient.shared.PageWithSlots; +import test.javaclient.shared.TestNode; +import test.javaclient.shared.Utils; + +public class staticPropertyLoadApp extends BasicButtonChooserApp { + + public static final String RESOURCE_BASE = "/test/fxmltests/resources/"; + public static final String staticPropertyResourcePath = RESOURCE_BASE + "static-property.fxml"; + public static final String hashmapResourcePath = RESOURCE_BASE + "hashmap.fxml"; + public static final String customClassLoadResourcePath = RESOURCE_BASE + "include.fxml"; + public static final String factoryResourcePath = RESOURCE_BASE + "factory.fxml"; + public static final String builderResourcePath = RESOURCE_BASE + "builder.fxml"; + public static final String propertyElementsResourcePath = RESOURCE_BASE + "propertyElements.fxml"; + public static final String referenceResourcePath = RESOURCE_BASE + "reference.fxml"; + public static final String copyResourcePath = RESOURCE_BASE + "fxcopy.fxml"; + public static final String propertySetterResourcePath = RESOURCE_BASE + "propertySetter.fxml"; + public static final String roListResourcePath = RESOURCE_BASE + "rolist.fxml"; + public static final String roMapResourcePath = RESOURCE_BASE + "romap.fxml"; + public static final String defaultPropertyResourcePath = RESOURCE_BASE + "defaultProperty.fxml"; + public static final String fxdefineResourcePath = RESOURCE_BASE + "fxdefine.fxml"; + public static final String fxdefine2ResourcePath = RESOURCE_BASE + "fxdefine2.fxml"; + public static final String namespaceBindingResourcePath = RESOURCE_BASE + "namespaceBinding.fxml"; + public static final String staticPropertiesResourcePath = RESOURCE_BASE + "static-properties.fxml"; + public static final String rootMethodEventHandlerResourcePath = RESOURCE_BASE + "rootMethodEventHandler.fxml"; + public static final String scriptEventHandlerResourcePath = RESOURCE_BASE + "scriptEventHandler.fxml"; + public static final String scriptResourcePath = RESOURCE_BASE + "script.fxml"; + public static final String menuitemResourcePath = RESOURCE_BASE + "menuitem.fxml"; + public static final String resourceResourcePath = RESOURCE_BASE + "resourcefxml.fxml"; + public static final String splitpanebugResourcePath = RESOURCE_BASE + "vt1.fxml"; + public static final String throw1ResourcePath = RESOURCE_BASE + "throw1.fxml"; + public static final String throw2ResourcePath = RESOURCE_BASE + "throw2.fxml"; + public static final String rt19133ResourcePath = RESOURCE_BASE + "rt19133.fxml"; + + public static enum Pages { + staticProperty,HashMap,customClassAndInclude,factory,simple, + propertyElements,reference,copy,prSetter,roList,roMap, + defaultProperty,fxdefine,namespaceBinding,staticProperties,rootMethodEventHandler, + scriptEventHandler,script,menuItem,resources1,resources2,namespace, + splitpanebug,charset, loadExceptions, + slotDefaultLabeled, slotDefaultListview, slotDefaultMenu, slotDefaultMenuBar, + slotDefaultScrollpane, slotDefaultTabpane, slotDefaultTableView, + slotDefaultTextinput, slotDefaultTitledpane, slotDefaultTreeview, + slotDefaultImageview, slotDefaultPane, slotControllerFactory, + specificSignatureMethod, loadfontSlot, scenebuilderSlot, + scenebuilderNoRoot, references2, apConstraints, coerce, listviewItems, listenerNullArg, + gridapplet, csspath, errorFXML, colorValueOF, escapeCharacter, collectionEventsHandlers, + noArgControllerMethod, overloadedControllerMethod, customIDProperty, unknownCustomType, + baseControllerProperty, relativeStylesheet, FXMLLoaderAPI, fullyQualifiedNames, importPI, + beanInstantiation, valueOf, root, fxId, fxController, noDefaultController, lateRoot, + lateController, variableResolution, externalScript + + } + + public staticPropertyLoadApp() { + super(800, 600, "LoadFXML", false); + } + + Rectangle retRec = new Rectangle(10,10){{setFill(Color.GREEN);}}; + Rectangle redRectangle = new Rectangle(10,10){{setFill(Color.RED);}}; + + abstract private class TestNodeWithIOExceptionProcessing extends TestNode { + + abstract protected Node impl_drawNode() throws IOException; + protected String impl_getPathToResource() { return null; }; + protected URL resource = null; + protected File f = null; + + @Override + public Node drawNode() { + Node result = redRectangle; + + VBox vb = null; + + if (null != impl_getPathToResource()) { + resource = getClass().getResource(impl_getPathToResource()); + if (null != resource && null != (f = new File(resource.getFile()))) { + System.out.println("loading " + f.getPath()); + } else { + String tmpMsg = "resource file error. [" + impl_getPathToResource() + "]"; + System.out.println(tmpMsg); + reportGetterFailure(tmpMsg); + return result; + } + } + try { + result = impl_drawNode(); + } catch (IOException ex) { + reportGetterFailure("TestNodeWithIOExceptionProcessing: IOException"); + Logger.getLogger(staticPropertyLoadApp.class.getName()).log(Level.SEVERE, null, ex); + } catch (Exception ex) { + reportGetterFailure("TestNodeWithIOExceptionProcessing: Exception"); + Logger.getLogger(staticPropertyLoadApp.class.getName()).log(Level.SEVERE, null, ex); + } + return result; + } + } + + private class slotStaticProperty extends TestNodeWithIOExceptionProcessing { + @Override + protected String impl_getPathToResource() { + return staticPropertyResourcePath; + } + @Override + public Node impl_drawNode() throws IOException { + Node uplevelNode = null; + try { + uplevelNode = FXMLLoader.load(resource); + } catch (Exception e) { + System.out.println("message: " + e.getMessage()); + reportGetterFailure("message: " + e.getMessage()); + } + return uplevelNode; + } + } + + private class hashmaptest extends TestNodeWithIOExceptionProcessing { + + HashMap hm = null; + String value1; + String value2; + + @Override + protected String impl_getPathToResource() { + return hashmapResourcePath; + } + + @Override + public Node impl_drawNode() throws IOException { + + try { + hm = FXMLLoader.load(resource); + value1 = (String) hm.get("foo"); + value2 = (String) hm.get("bar"); + } catch (Exception e) { + System.out.println("message: " + e.getMessage()); + reportGetterFailure("exception thrown."); + } + if (value1.equals("123") && value2.equals("456")) { + return retRec; + } else { + reportGetterFailure("failed."); + return redRectangle; + } + } + } + + CustomClass cc; + private class customClassLoadSlot extends TestNodeWithIOExceptionProcessing { + + @Override + protected String impl_getPathToResource() { + return customClassLoadResourcePath; + } + + @Override + public Node impl_drawNode() throws IOException { + FXMLLoader fxmlLoader = new FXMLLoader(); + + InputStream is = null; + try { + fxmlLoader.setLocation(resource); + is = resource.openStream(); + cc = (CustomClass) fxmlLoader.load(is); + } catch (Exception e) { + System.out.println("message: " + e.getMessage()); + e.printStackTrace(); + reportGetterFailure("exception thrown."); + } finally { + is.close(); + } + +// System.out.println(" includes: " + fxmlLoader.getIncludes()); + System.out.println("cc.getFld(): " + cc.getFld()); + + if (cc.getFld().equals("fine!")) { + return retRec; + } else { + reportGetterFailure("failed."); + return redRectangle; + } + } + } + + private class factorySlot extends TestNodeWithIOExceptionProcessing { + + ObservableList ss = FXCollections.observableArrayList(); + + @Override + protected String impl_getPathToResource() { + return factoryResourcePath; + } + + @Override + public Node impl_drawNode() throws IOException { + try { + ss = FXMLLoader.load(resource); + } catch (Exception e) { + System.out.println("message: " + e.getMessage()); + reportGetterFailure("exception thrown."); + } + if (ss.get(0).equals("A") && ss.get(1).equals("B") && ss.get(2).equals("C")) { + return retRec; + } else { + reportGetterFailure("failed."); + return redRectangle; + } + } + } + + private class simpleSlot extends TestNodeWithIOExceptionProcessing { + + Color color = Color.ALICEBLUE; + + @Override + protected String impl_getPathToResource() { + return builderResourcePath; + } + + @Override + public Node impl_drawNode() throws IOException { + InputStream is = null; + try { + FXMLLoader fxmlLoader2 = new FXMLLoader(); + is = resource.openStream(); + ClassLoader defaultClassLoader = fxmlLoader2.getClassLoader(); + + fxmlLoader2.setBuilderFactory(new JavaFXBuilderFactory(defaultClassLoader)); + color = (Color) fxmlLoader2.load(is); // see RT-18091 + } catch (Exception e) { + e.printStackTrace(); + System.out.println("message: " + e.getMessage()); + reportGetterFailure("exception thrown."); + } finally { + is.close(); + } + System.out.println("color: " + color); + if (color.equals(Color.color(1., 0., 0.))) { + return retRec; + } else { + reportGetterFailure("failed."); + return redRectangle; + } + } + } + + private class propertyElementsSlot extends TestNodeWithIOExceptionProcessing { + + Label label; + + @Override + protected String impl_getPathToResource() { + return propertyElementsResourcePath; + } + + @Override + public Node impl_drawNode() { + try { + label = FXMLLoader.load(resource); + } catch (Exception e) { + System.out.println("message: " + e.getMessage()); + reportGetterFailure("exception thrown."); + } + if (label.getText().equals("label")) { + return label; + } else { + reportGetterFailure("failed."); + return redRectangle; + } + } + } + + private class referenceSlot extends TestNodeWithIOExceptionProcessing { + + List