modules/controls/src/test/java/test/javafx/scene/control/skin/ColorPickerSkinTest.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2015, 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.skin;
+ import com.sun.javafx.scene.SceneHelper;
import test.com.sun.javafx.scene.control.infrastructure.KeyEventFirer;
import test.com.sun.javafx.scene.control.infrastructure.MouseEventFirer;
import test.com.sun.javafx.scene.control.infrastructure.MouseEventGenerator;
import com.sun.javafx.tk.Toolkit;
import javafx.scene.Scene;
*** 76,89 ****
double yval = grid.getBoundsInLocal().getMinY();
Scene paletteScene = ColorPickerPaletteShim.getPopup(colorPicker).getScene();
paletteScene.getWindow().requestFocus();
! paletteScene.impl_processMouseEvent(
generator.generateMouseEvent(MouseEvent.MOUSE_PRESSED, xval+85, yval+40));
! paletteScene.impl_processMouseEvent(
generator.generateMouseEvent(MouseEvent.MOUSE_RELEASED, xval+85, yval+40));
tk.firePulse();
assertEquals(colorPicker.getValue().toString(), "0x330033ff");
}
--- 77,90 ----
double yval = grid.getBoundsInLocal().getMinY();
Scene paletteScene = ColorPickerPaletteShim.getPopup(colorPicker).getScene();
paletteScene.getWindow().requestFocus();
! SceneHelper.processMouseEvent(paletteScene,
generator.generateMouseEvent(MouseEvent.MOUSE_PRESSED, xval+85, yval+40));
! SceneHelper.processMouseEvent(paletteScene,
generator.generateMouseEvent(MouseEvent.MOUSE_RELEASED, xval+85, yval+40));
tk.firePulse();
assertEquals(colorPicker.getValue().toString(), "0x330033ff");
}