modules/controls/src/test/java/test/javafx/scene/control/PaginationTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2010, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 23,32 **** --- 23,33 ---- * questions. */ package test.javafx.scene.control; + import com.sun.javafx.scene.SceneHelper; import static test.com.sun.javafx.scene.control.infrastructure.ControlTestUtils.assertStyleClassContains; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame;
*** 196,206 **** assertTrue(pagination.isFocused()); double xval = (pagination.localToScene(pagination.getLayoutBounds())).getMinX(); double yval = (pagination.localToScene(pagination.getLayoutBounds())).getMinY(); ! scene.impl_processMouseEvent( MouseEventGenerator.generateMouseEvent(MouseEvent.MOUSE_PRESSED, xval+170, yval+380)); tk.firePulse(); assertEquals(3, pagination.getCurrentPageIndex()); } --- 197,207 ---- assertTrue(pagination.isFocused()); double xval = (pagination.localToScene(pagination.getLayoutBounds())).getMinX(); double yval = (pagination.localToScene(pagination.getLayoutBounds())).getMinY(); ! SceneHelper.processMouseEvent(scene, MouseEventGenerator.generateMouseEvent(MouseEvent.MOUSE_PRESSED, xval+170, yval+380)); tk.firePulse(); assertEquals(3, pagination.getCurrentPageIndex()); }