functional/ControlsTests/src/javafx/scene/control/test/pagination/PaginationApp.java

Print this page

        

*** 27,37 **** import javafx.event.ActionEvent; import javafx.event.EventHandler; 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.*; import javafx.scene.control.test.utils.ptables.PropertiesTable; import javafx.scene.control.test.utils.ptables.PropertyTablesFactory; --- 27,36 ----
*** 108,143 **** PropertyTablesFactory.explorePropertiesList(testedPagination, tb); SpecialTablePropertiesProvider.provideForControl(testedPagination, tb); 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(); hardResetButton.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); hb.getChildren().clear(); prepareMainSceneStructure(); prepareScene(); } }); ! Button setBulletPageIndicatorButton = ButtonBuilder.create().id(SET_BULLET_PAGE_INDICATOR_BUTTON_ID).text("Set bullet").build(); setBulletPageIndicatorButton.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { //testedPagination.setStyle(Pagination.STYLE_CLASS_BULLET); testedPagination.getStyleClass().add(Pagination.STYLE_CLASS_BULLET); } }); ! Button setPageCountToIndeterminateButton = ButtonBuilder.create().id(SET_PAGE_COUNT_TO_INDETERMINATE_BUTTON_ID).text("Set indeterminate\n page count").build(); setPageCountToIndeterminateButton.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { testedPagination.setPageCount(Pagination.INDETERMINATE); } }); ! Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build(); softResetButton.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { tb.refresh(); Pagination newOne = new Pagination(i); --- 107,146 ---- PropertyTablesFactory.explorePropertiesList(testedPagination, tb); SpecialTablePropertiesProvider.provideForControl(testedPagination, tb); tb.addDoublePropertyLine(testedPagination.minHeightProperty(), -100, 300, 50, testedPagination); tb.addDoublePropertyLine(testedPagination.minWidthProperty(), -100, 300, 50, testedPagination); ! Button hardResetButton = new Button("Hard reset"); ! hardResetButton.setId(HARD_RESET_BUTTON_ID); hardResetButton.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { HBox hb = (HBox) getRoot(); hb.getChildren().clear(); prepareMainSceneStructure(); prepareScene(); } }); ! Button setBulletPageIndicatorButton = new Button("Set bullet"); ! setBulletPageIndicatorButton.setId(SET_BULLET_PAGE_INDICATOR_BUTTON_ID); setBulletPageIndicatorButton.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { //testedPagination.setStyle(Pagination.STYLE_CLASS_BULLET); testedPagination.getStyleClass().add(Pagination.STYLE_CLASS_BULLET); } }); ! Button setPageCountToIndeterminateButton = new Button("Set indeterminate\n page count"); ! setPageCountToIndeterminateButton.setId(SET_PAGE_COUNT_TO_INDETERMINATE_BUTTON_ID); setPageCountToIndeterminateButton.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { testedPagination.setPageCount(Pagination.INDETERMINATE); } }); ! Button softResetButton = new Button("Soft reset"); ! softResetButton.setId(SOFT_RESET_BUTTON_ID); softResetButton.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { tb.refresh(); Pagination newOne = new Pagination(i);
*** 146,156 **** testedPagination.setPageFactory(newOne.getPageFactory()); testedPagination.setMaxPageIndicatorCount(newOne.maxPageIndicatorCountProperty().get()); } }); ! Button setNewPageFactory = ButtonBuilder.create().id(SET_NEW_PAGE_FACTORY_BUTTON_ID).text("Set new page factory").build(); setNewPageFactory.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { Callback<Integer, Node> newOne = new Callback<Integer, Node>() { @Override --- 149,160 ---- testedPagination.setPageFactory(newOne.getPageFactory()); testedPagination.setMaxPageIndicatorCount(newOne.maxPageIndicatorCountProperty().get()); } }); ! Button setNewPageFactory = new Button("Set new page factory"); ! setNewPageFactory.setId(SET_NEW_PAGE_FACTORY_BUTTON_ID); setNewPageFactory.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { Callback<Integer, Node> newOne = new Callback<Integer, Node>() { @Override
*** 168,178 **** assertFalse(testedPagination.pageFactoryProperty().getValue().equals(oldOne)); assertFalse(testedPagination.getPageFactory().equals(oldOne)); } }); ! Button setOldPageFactory = ButtonBuilder.create().id(SET_OLD_PAGE_FACTORY_BUTTON_ID).text("Set old page factory").build(); setOldPageFactory.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { Callback<Integer, Node> newOne = new Callback<Integer, Node>() { @Override --- 172,183 ---- assertFalse(testedPagination.pageFactoryProperty().getValue().equals(oldOne)); assertFalse(testedPagination.getPageFactory().equals(oldOne)); } }); ! Button setOldPageFactory = new Button("Set old page factory"); ! setOldPageFactory.setId(SET_OLD_PAGE_FACTORY_BUTTON_ID); setOldPageFactory.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { Callback<Integer, Node> newOne = new Callback<Integer, Node>() { @Override