changeset 3647:580e861f53d1

[TEST-ONLY] added event constructor tests, mostly testing feature RT-9383.
author Pavel Safrata
date Tue, 21 May 2013 16:44:32 +0100
parents f197a76ee364
children f160d58b21ef
files javafx-ui-common/test/unit/javafx/scene/input/ContextMenuEventTest.java javafx-ui-common/test/unit/javafx/scene/input/DragAndDropTest.java javafx-ui-common/test/unit/javafx/scene/input/GestureEventTest.java javafx-ui-common/test/unit/javafx/scene/input/InputEventTest.java javafx-ui-common/test/unit/javafx/scene/input/KeyEventTest.java javafx-ui-common/test/unit/javafx/scene/input/MouseDragEventTest.java javafx-ui-common/test/unit/javafx/scene/input/MouseEventTest.java javafx-ui-common/test/unit/javafx/scene/input/RotateEventTest.java javafx-ui-common/test/unit/javafx/scene/input/ScrollEventTest.java javafx-ui-common/test/unit/javafx/scene/input/SwipeEventTest.java javafx-ui-common/test/unit/javafx/scene/input/TouchEventTest.java javafx-ui-common/test/unit/javafx/scene/input/ZoomEventTest.java javafx-ui-common/test/unit/javafx/stage/WindowEventTest.java
diffstat 13 files changed, 1585 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/test/unit/javafx/scene/input/ContextMenuEventTest.java	Tue May 21 16:03:34 2013 +0100
+++ b/javafx-ui-common/test/unit/javafx/scene/input/ContextMenuEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -26,23 +26,129 @@
 package javafx.scene.input;
 
 import com.sun.javafx.pgstub.StubScene;
+import javafx.event.Event;
 import javafx.scene.Group;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import javafx.scene.Node;
 import javafx.scene.Scene;
 import javafx.scene.shape.Rectangle;
 import javafx.event.EventHandler;
+import javafx.geometry.Point3D;
 import javafx.stage.Stage;
 
 import org.junit.Test;
 
 public class ContextMenuEventTest {
 
+    @Test public void testShortConstructor() {
+        Rectangle node = new Rectangle(10, 10);
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        ContextMenuEvent e = new ContextMenuEvent(
+                ContextMenuEvent.CONTEXT_MENU_REQUESTED, 10, 20, 30, 40,
+                false, pickRes);
+        assertSame(ContextMenuEvent.CONTEXT_MENU_REQUESTED, e.getEventType());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isKeyboardTrigger());
+        assertFalse(e.isConsumed());
+        assertSame(pickRes, e.getPickResult());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+
+        e = new ContextMenuEvent(
+                ContextMenuEvent.CONTEXT_MENU_REQUESTED, 10, 20, 30, 40,
+                true, pickRes);
+        assertTrue(e.isKeyboardTrigger());
+    }
+
+    @Test public void testShortConstructorWithoutPickResult() {
+        ContextMenuEvent e = new ContextMenuEvent(
+                ContextMenuEvent.CONTEXT_MENU_REQUESTED, 10, 20, 30, 40,
+                false, null);
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+    }
+
+    @Test public void testLongConstructor() {
+        Rectangle node = new Rectangle(10, 10);
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        ContextMenuEvent e = new ContextMenuEvent(n1, n2,
+                ContextMenuEvent.CONTEXT_MENU_REQUESTED, 10, 20, 30, 40,
+                false, pickRes);
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertSame(ContextMenuEvent.CONTEXT_MENU_REQUESTED, e.getEventType());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isKeyboardTrigger());
+        assertFalse(e.isConsumed());
+        assertSame(pickRes, e.getPickResult());
+
+        e = new ContextMenuEvent(
+                ContextMenuEvent.CONTEXT_MENU_REQUESTED, 10, 20, 30, 40,
+                true, null);
+        assertTrue(e.isKeyboardTrigger());
+    }
+
+
+    @Test public void testLongConstructorWithoutPickResult() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        ContextMenuEvent e = new ContextMenuEvent(n1, n2,
+                ContextMenuEvent.CONTEXT_MENU_REQUESTED, 10, 20, 30, 40,
+                false, null);
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertSame(ContextMenuEvent.CONTEXT_MENU_REQUESTED, e.getEventType());
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+    }
+
     @Test public void mouseTriggerKeepsCoordinates() {
         Rectangle rect = new Rectangle(100, 100);
         rect.setTranslateX(100);
--- a/javafx-ui-common/test/unit/javafx/scene/input/DragAndDropTest.java	Tue May 21 16:03:34 2013 +0100
+++ b/javafx-ui-common/test/unit/javafx/scene/input/DragAndDropTest.java	Tue May 21 16:44:32 2013 +0100
@@ -25,12 +25,7 @@
 
 package javafx.scene.input;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.security.AccessControlContext;
@@ -42,7 +37,6 @@
 
 import com.sun.javafx.tk.TKScene;
 import javafx.event.EventHandler;
-import javafx.event.EventType;
 import javafx.scene.Group;
 import javafx.scene.Node;
 import javafx.scene.Scene;
@@ -61,8 +55,15 @@
 import com.sun.javafx.tk.TKDropTargetListener;
 import com.sun.javafx.tk.Toolkit;
 import com.sun.javafx.test.MouseEventGenerator;
+import javafx.event.Event;
+import javafx.geometry.Point3D;
 import javafx.scene.SubScene;
 import javafx.scene.image.Image;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
 public class DragAndDropTest {
     
@@ -86,6 +87,161 @@
     }
     
     /************************************************************************/
+    /*                      DRAG EVENT CONSTRUCTOR                          */
+    /************************************************************************/
+
+    @Test public void testShortConstructor() {
+        Rectangle node = new Rectangle(10, 10);
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        Dragboard db = new Dragboard(new ClipboardImpl());
+        Rectangle gsrc = new Rectangle(10, 10);
+        Rectangle gtrg = new Rectangle(10, 10);
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        DragEvent e = new DragEvent(DragEvent.DRAG_ENTERED, db, 10, 20, 30, 40,
+            TransferMode.LINK, gsrc, gtrg, pickRes);
+
+        assertSame(DragEvent.DRAG_ENTERED, e.getEventType());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertSame(db, e.getDragboard());
+        assertSame(gsrc, e.getGestureSource());
+        assertSame(gtrg, e.getGestureTarget());
+        assertSame(TransferMode.LINK, e.getTransferMode());
+        assertSame(pickRes, e.getPickResult());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+        assertFalse(e.isAccepted());
+        assertNull(e.getAcceptedTransferMode());
+        assertFalse(e.isConsumed());
+    }
+
+    @Test public void testShortConstructorWithoutPickResult() {
+        Dragboard db = new Dragboard(new ClipboardImpl());
+        Rectangle gsrc = new Rectangle(10, 10);
+        Rectangle gtrg = new Rectangle(10, 10);
+        DragEvent e = new DragEvent(DragEvent.DRAG_ENTERED, db, 10, 20, 30, 40,
+            TransferMode.LINK, gsrc, gtrg, null);
+
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+    }
+
+    @Test public void testLongConstructor() {
+        Rectangle node = new Rectangle(10, 10);
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        Dragboard db = new Dragboard(new ClipboardImpl());
+        Rectangle gsrc = new Rectangle(10, 10);
+        Rectangle gtrg = new Rectangle(10, 10);
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        DragEvent e = new DragEvent(n1, n2, DragEvent.DRAG_ENTERED, db,
+                10, 20, 30, 40, TransferMode.LINK, gsrc, gtrg, pickRes);
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertSame(DragEvent.DRAG_ENTERED, e.getEventType());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertSame(TransferMode.LINK, e.getTransferMode());
+        assertSame(db, e.getDragboard());
+        assertSame(gsrc, e.getGestureSource());
+        assertSame(gtrg, e.getGestureTarget());
+        assertSame(pickRes, e.getPickResult());
+        assertFalse(e.isConsumed());
+        assertFalse(e.isAccepted());
+        assertNull(e.getAcceptedTransferMode());
+    }
+
+    @Test public void testLongConstructorWithoutPickResult() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        Dragboard db = new Dragboard(new ClipboardImpl());
+        Rectangle gsrc = new Rectangle(10, 10);
+        Rectangle gtrg = new Rectangle(10, 10);
+        DragEvent e = new DragEvent(n1, n2, DragEvent.DRAG_ENTERED, db,
+                10, 20, 30, 40, TransferMode.LINK, gsrc, gtrg, null);
+
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+    }
+
+    @Test public void shortConstructorMakesDropAccepted() {
+        DragEvent e = new DragEvent(DragEvent.DRAG_DROPPED,
+                new Dragboard(new ClipboardImpl()), 10, 20, 30, 40,
+                TransferMode.LINK, new Rectangle(), new Rectangle(), null);
+        assertSame(DragEvent.DRAG_DROPPED, e.getEventType());
+        assertTrue(e.isAccepted());
+        assertSame(TransferMode.LINK, e.getAcceptedTransferMode());
+    }
+
+    @Test public void shortConstructorMakesDoneAccepted() {
+        DragEvent e = new DragEvent(DragEvent.DRAG_DONE,
+                new Dragboard(new ClipboardImpl()), 10, 20, 30, 40,
+                TransferMode.LINK, new Rectangle(), new Rectangle(), null);
+        assertSame(DragEvent.DRAG_DONE, e.getEventType());
+        assertTrue(e.isAccepted());
+        assertSame(TransferMode.LINK, e.getAcceptedTransferMode());
+    }
+
+    @Test public void longConstructorMakesDropAccepted() {
+        DragEvent e = new DragEvent(new Rectangle(), new Rectangle(),
+                DragEvent.DRAG_DROPPED,
+                new Dragboard(new ClipboardImpl()), 10, 20, 30, 40,
+                TransferMode.LINK, new Rectangle(), new Rectangle(), null);
+        assertSame(DragEvent.DRAG_DROPPED, e.getEventType());
+        assertTrue(e.isAccepted());
+        assertSame(TransferMode.LINK, e.getAcceptedTransferMode());
+    }
+
+    @Test public void longConstructorMakesDoneAccepted() {
+        DragEvent e = new DragEvent(new Rectangle(), new Rectangle(),
+                DragEvent.DRAG_DONE,
+                new Dragboard(new ClipboardImpl()), 10, 20, 30, 40,
+                TransferMode.LINK, new Rectangle(), new Rectangle(), null);
+        assertSame(DragEvent.DRAG_DONE, e.getEventType());
+        assertTrue(e.isAccepted());
+        assertSame(TransferMode.LINK, e.getAcceptedTransferMode());
+    }
+
+    /************************************************************************/
     /*                         DRAG INITIATION                              */
     /************************************************************************/
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-ui-common/test/unit/javafx/scene/input/GestureEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javafx.scene.input;
+
+import javafx.event.Event;
+import javafx.geometry.Point3D;
+import javafx.scene.shape.Rectangle;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+
+public class GestureEventTest {
+
+    @Test public void testShortConstructor() {
+        Rectangle node = new Rectangle();
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        GestureEvent e = new GestureEvent(
+                GestureEvent.ANY, 10, 20, 30, 40,
+                false, true, false, true, false, true, pickRes);
+
+        assertSame(GestureEvent.ANY, e.getEventType());
+        assertSame(pickRes, e.getPickResult());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isDirect());
+        assertTrue(e.isInertia());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+        assertFalse(e.isConsumed());
+
+        e = new GestureEvent(
+                GestureEvent.ANY, 10, 20, 30, 40,
+                true, false, true, false, true, false, null);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isDirect());
+        assertFalse(e.isInertia());
+    }
+
+    @Test public void testShortConstructorWithoutPickResult() {
+        GestureEvent e = new GestureEvent(
+                GestureEvent.ANY, 10, 20, 30, 40,
+                false, true, false, true, false, true, null);
+
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+    }
+
+    @Test public void testLongConstructor() {
+        Rectangle node = new Rectangle(10, 10);
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        GestureEvent e = new GestureEvent(n1, n2,
+                GestureEvent.ANY, 10, 20, 30, 40,
+                false, true, false, true, false, true, pickRes);
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertSame(GestureEvent.ANY, e.getEventType());
+        assertSame(pickRes, e.getPickResult());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isDirect());
+        assertTrue(e.isInertia());
+        assertFalse(e.isConsumed());
+
+        e = new GestureEvent(n1, n2,
+                GestureEvent.ANY, 10, 20, 30, 40,
+                true, false, true, false, true, false, null);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isDirect());
+        assertFalse(e.isInertia());
+    }
+
+
+    @Test public void testLongConstructorWithoutPickResult() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        GestureEvent e = new GestureEvent(n1, n2,
+                GestureEvent.ANY, 10, 20, 30, 40,
+                false, true, false, true, false, true, null);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-ui-common/test/unit/javafx/scene/input/InputEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javafx.scene.input;
+
+import javafx.event.Event;
+import javafx.scene.shape.Rectangle;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertSame;
+
+public class InputEventTest {
+
+    @Test public void testShortConstructor() {
+        Rectangle node = new Rectangle(10, 10);
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+
+        InputEvent e = new InputEvent(InputEvent.ANY);
+        assertSame(InputEvent.ANY, e.getEventType());
+        assertFalse(e.isConsumed());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+    }
+
+    @Test public void testLongConstructor() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+
+        InputEvent e = new InputEvent(n1, n2, InputEvent.ANY);
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertSame(InputEvent.ANY, e.getEventType());
+        assertFalse(e.isConsumed());
+    }
+}
--- a/javafx-ui-common/test/unit/javafx/scene/input/KeyEventTest.java	Tue May 21 16:03:34 2013 +0100
+++ b/javafx-ui-common/test/unit/javafx/scene/input/KeyEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -48,7 +48,7 @@
     @Test
     public void shouldCreateKeyTypedEvent() {
         KeyEvent event = new KeyEvent(null, node1, KeyEvent.KEY_TYPED, "A", "A", KeyCodeMap.valueOf(0x41), true,
-                false, false, false);
+                false, true, false);
 
         assertSame(node1, event.getTarget());
         assertEquals("A", event.getCharacter());
@@ -56,24 +56,24 @@
         assertSame(KeyCode.UNDEFINED, event.getCode());
         assertTrue(event.isShiftDown());
         assertFalse(event.isControlDown());
-        assertFalse(event.isAltDown());
+        assertTrue(event.isAltDown());
         assertFalse(event.isMetaDown());
         assertSame(KeyEvent.KEY_TYPED, event.getEventType());
     }
 
     @Test
     public void shouldCreateKeyReleasedEvent() {
-        KeyEvent event = new KeyEvent(null, node1, KeyEvent.KEY_RELEASED, "A", "A", KeyCodeMap.valueOf(0x41), true,
-                false, false, false);
+        KeyEvent event = new KeyEvent(null, node1, KeyEvent.KEY_RELEASED, "A", "A", KeyCodeMap.valueOf(0x41), false,
+                true, false, true);
 
         assertSame(node1, event.getTarget());
         assertEquals(KeyEvent.CHAR_UNDEFINED, event.getCharacter());
         assertEquals("A", event.getText());
         assertSame(KeyCode.A, event.getCode());
-        assertTrue(event.isShiftDown());
-        assertFalse(event.isControlDown());
+        assertFalse(event.isShiftDown());
+        assertTrue(event.isControlDown());
         assertFalse(event.isAltDown());
-        assertFalse(event.isMetaDown());
+        assertTrue(event.isMetaDown());
         assertSame(KeyEvent.KEY_RELEASED, event.getEventType());
     }
 
--- a/javafx-ui-common/test/unit/javafx/scene/input/MouseDragEventTest.java	Tue May 21 16:03:34 2013 +0100
+++ b/javafx-ui-common/test/unit/javafx/scene/input/MouseDragEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -34,12 +34,179 @@
 import javafx.stage.Stage;
 
 import com.sun.javafx.test.MouseEventGenerator;
+import javafx.event.Event;
+import javafx.geometry.Point3D;
 
 import static org.junit.Assert.*;
 import org.junit.Test;
 
 public class MouseDragEventTest {
 
+    @Test public void testShortConstructor() {
+        Rectangle node = new Rectangle();
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        Rectangle gsrc = new Rectangle();
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+
+        MouseDragEvent e = new MouseDragEvent(MouseDragEvent.MOUSE_DRAG_OVER,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                true, false, false, true,
+                false, true, false,
+                true, false, pickRes, gsrc);
+
+        assertSame(MouseDragEvent.MOUSE_DRAG_OVER, e.getEventType());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertSame(MouseButton.MIDDLE, e.getButton());
+        assertEquals(3, e.getClickCount());
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isPrimaryButtonDown());
+        assertTrue(e.isMiddleButtonDown());
+        assertFalse(e.isSecondaryButtonDown());
+        assertTrue(e.isSynthesized());
+        assertFalse(e.isPopupTrigger());
+        assertSame(gsrc, e.getGestureSource());
+        assertFalse(e.isConsumed());
+        assertSame(pickRes, e.getPickResult());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+
+        e = new MouseDragEvent(MouseDragEvent.MOUSE_DRAG_OVER,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                false, true, true, false,
+                true, false, true,
+                false, true, pickRes, gsrc);
+
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isPrimaryButtonDown());
+        assertFalse(e.isMiddleButtonDown());
+        assertTrue(e.isSecondaryButtonDown());
+        assertFalse(e.isSynthesized());
+        assertTrue(e.isPopupTrigger());
+    }
+
+    @Test public void testShortConstructorWithoutPickResult() {
+        MouseDragEvent e = new MouseDragEvent(MouseDragEvent.MOUSE_DRAG_OVER,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                true, false, false, true,
+                false, true, false,
+                true, false, null, new Rectangle());
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+    }
+
+    @Test public void testLongConstructor() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        Rectangle node = new Rectangle();
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        Rectangle gsrc = new Rectangle();
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+
+        MouseDragEvent e = new MouseDragEvent(n1, n2, MouseDragEvent.MOUSE_DRAG_OVER,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                true, false, false, true,
+                false, true, false,
+                true, false, pickRes, gsrc);
+
+        assertSame(MouseDragEvent.MOUSE_DRAG_OVER, e.getEventType());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertSame(MouseButton.MIDDLE, e.getButton());
+        assertEquals(3, e.getClickCount());
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isPrimaryButtonDown());
+        assertTrue(e.isMiddleButtonDown());
+        assertFalse(e.isSecondaryButtonDown());
+        assertTrue(e.isSynthesized());
+        assertFalse(e.isPopupTrigger());
+        assertSame(gsrc, e.getGestureSource());
+        assertFalse(e.isConsumed());
+        assertSame(pickRes, e.getPickResult());
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+
+        e = new MouseDragEvent(n1, n2, MouseDragEvent.MOUSE_DRAG_OVER,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                false, true, true, false,
+                true, false, true,
+                false, true, pickRes, gsrc);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isPrimaryButtonDown());
+        assertFalse(e.isMiddleButtonDown());
+        assertTrue(e.isSecondaryButtonDown());
+        assertFalse(e.isSynthesized());
+        assertTrue(e.isPopupTrigger());
+    }
+
+
+    @Test public void testLongConstructorWithoutPickResult() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        MouseDragEvent e = new MouseDragEvent(n1, n2, MouseDragEvent.MOUSE_DRAG_OVER,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                true, false, false, true,
+                false, true, false,
+                true, false, null, new Rectangle());
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+    }
+
     @Test
     public void fullPDRShouldNotStartAutomatically() {
         World w = new World(false, false);
--- a/javafx-ui-common/test/unit/javafx/scene/input/MouseEventTest.java	Tue May 21 16:03:34 2013 +0100
+++ b/javafx-ui-common/test/unit/javafx/scene/input/MouseEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -25,13 +25,15 @@
 
 package javafx.scene.input;
 
+import javafx.event.Event;
+import javafx.geometry.Point3D;
+import javafx.scene.Node;
+import javafx.scene.shape.Rectangle;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import javafx.scene.Node;
 
 import org.junit.Test;
 
@@ -44,6 +46,171 @@
             11, 12, 13, 14, MouseButton.PRIMARY, 2,
             true, false, true, false, false, true, false, false, true, false, null);
 
+    @Test public void testShortConstructor() {
+        Rectangle node = new Rectangle();
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+
+        MouseEvent e = new MouseEvent(MouseEvent.MOUSE_DRAGGED,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                true, false, false, true,
+                false, true, false,
+                true, false, true, pickRes);
+
+        assertSame(MouseEvent.MOUSE_DRAGGED, e.getEventType());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertSame(MouseButton.MIDDLE, e.getButton());
+        assertEquals(3, e.getClickCount());
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isPrimaryButtonDown());
+        assertTrue(e.isMiddleButtonDown());
+        assertFalse(e.isSecondaryButtonDown());
+        assertTrue(e.isSynthesized());
+        assertFalse(e.isPopupTrigger());
+        assertTrue(e.isStillSincePress());
+        assertFalse(e.isConsumed());
+        assertSame(pickRes, e.getPickResult());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+
+        e = new MouseEvent(MouseEvent.MOUSE_DRAGGED,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                false, true, true, false,
+                true, false, true,
+                false, true, false, pickRes);
+
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isPrimaryButtonDown());
+        assertFalse(e.isMiddleButtonDown());
+        assertTrue(e.isSecondaryButtonDown());
+        assertFalse(e.isSynthesized());
+        assertTrue(e.isPopupTrigger());
+        assertFalse(e.isStillSincePress());
+    }
+
+    @Test public void testShortConstructorWithoutPickResult() {
+        MouseDragEvent e = new MouseDragEvent(MouseDragEvent.MOUSE_DRAG_OVER,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                true, false, false, true,
+                false, true, false,
+                true, false, null, new Rectangle());
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+    }
+
+    @Test public void testLongConstructor() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        Rectangle node = new Rectangle();
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+
+        MouseEvent e = new MouseEvent(n1, n2, MouseEvent.MOUSE_DRAGGED,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                true, false, false, true,
+                false, true, false,
+                true, false, true, pickRes);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertSame(MouseEvent.MOUSE_DRAGGED, e.getEventType());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertSame(MouseButton.MIDDLE, e.getButton());
+        assertEquals(3, e.getClickCount());
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isPrimaryButtonDown());
+        assertTrue(e.isMiddleButtonDown());
+        assertFalse(e.isSecondaryButtonDown());
+        assertTrue(e.isSynthesized());
+        assertFalse(e.isPopupTrigger());
+        assertTrue(e.isStillSincePress());
+        assertFalse(e.isConsumed());
+        assertSame(pickRes, e.getPickResult());
+
+        e = new MouseEvent(n1, n2, MouseEvent.MOUSE_DRAGGED,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                false, true, true, false,
+                true, false, true,
+                false, true, false, pickRes);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isPrimaryButtonDown());
+        assertFalse(e.isMiddleButtonDown());
+        assertTrue(e.isSecondaryButtonDown());
+        assertFalse(e.isSynthesized());
+        assertTrue(e.isPopupTrigger());
+        assertFalse(e.isStillSincePress());
+    }
+
+
+    @Test public void testLongConstructorWithoutPickResult() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        MouseEvent e = new MouseEvent(n1, n2, MouseEvent.MOUSE_DRAGGED,
+                10, 20, 30, 40, MouseButton.MIDDLE, 3,
+                true, false, false, true,
+                false, true, false,
+                true, false, true, null);
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+    }
+
     @Test
     public void shouldCreateDoubleClickMouseEvent() {
         /* constructor called during initialization */
--- a/javafx-ui-common/test/unit/javafx/scene/input/RotateEventTest.java	Tue May 21 16:03:34 2013 +0100
+++ b/javafx-ui-common/test/unit/javafx/scene/input/RotateEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -27,7 +27,9 @@
 
 import com.sun.javafx.pgstub.StubScene;
 import com.sun.javafx.test.MouseEventGenerator;
+import javafx.event.Event;
 import javafx.event.EventHandler;
+import javafx.geometry.Point3D;
 import javafx.scene.Group;
 import javafx.scene.Scene;
 import javafx.scene.shape.Rectangle;
@@ -40,7 +42,145 @@
     private boolean rotated;
     private boolean rotated2;
     private PickResult pickRes;
-    
+
+    @Test public void testShortConstructor() {
+        Rectangle node = new Rectangle();
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+
+        pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        RotateEvent e = new RotateEvent(
+                RotateEvent.ROTATION_FINISHED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                45, 55, pickRes);
+
+        assertSame(RotateEvent.ROTATION_FINISHED, e.getEventType());
+        assertSame(pickRes, e.getPickResult());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isDirect());
+        assertTrue(e.isInertia());
+        assertEquals(45.0, e.getAngle(), 10e-20);
+        assertEquals(55.0, e.getTotalAngle(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+        assertFalse(e.isConsumed());
+
+        e = new RotateEvent(
+                RotateEvent.ROTATION_FINISHED, 10, 20, 30, 40,
+                true, false, true, false, true, false,
+                45, 55, pickRes);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isDirect());
+        assertFalse(e.isInertia());
+    }
+
+    @Test public void testShortConstructorWithoutPickResult() {
+        RotateEvent e = new RotateEvent(
+                RotateEvent.ROTATION_FINISHED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                45, 55, null);
+
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+    }
+
+    @Test public void testLongConstructor() {
+        Rectangle node = new Rectangle(10, 10);
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+
+        pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        RotateEvent e = new RotateEvent(n1, n2,
+                RotateEvent.ROTATION_FINISHED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                45, 55, pickRes);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertSame(RotateEvent.ROTATION_FINISHED, e.getEventType());
+        assertSame(pickRes, e.getPickResult());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isDirect());
+        assertTrue(e.isInertia());
+        assertEquals(45.0, e.getAngle(), 10e-20);
+        assertEquals(55.0, e.getTotalAngle(), 10e-20);
+        assertFalse(e.isConsumed());
+
+        e = new RotateEvent(n1, n2,
+                RotateEvent.ROTATION_FINISHED, 10, 20, 30, 40,
+                true, false, true, false, true, false,
+                45, 55, pickRes);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isDirect());
+        assertFalse(e.isInertia());
+    }
+
+    @Test public void testLongConstructorWithoutPickResult() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        RotateEvent e = new RotateEvent(n1, n2,
+                RotateEvent.ROTATION_FINISHED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                45, 55, null);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+    }
+
     @Test
     public void shouldDeliverRotateEventToPickedNode() {
         Scene scene = createScene();
--- a/javafx-ui-common/test/unit/javafx/scene/input/ScrollEventTest.java	Tue May 21 16:03:34 2013 +0100
+++ b/javafx-ui-common/test/unit/javafx/scene/input/ScrollEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -27,7 +27,9 @@
 
 import com.sun.javafx.pgstub.StubScene;
 import com.sun.javafx.test.MouseEventGenerator;
+import javafx.event.Event;
 import javafx.event.EventHandler;
+import javafx.geometry.Point3D;
 import javafx.scene.Group;
 import javafx.scene.Scene;
 import javafx.scene.shape.Rectangle;
@@ -40,7 +42,166 @@
     private boolean scrolled;
     private boolean scrolled2;
     private PickResult pickRes;
-    
+
+    @Test public void testShortConstructor() {
+        Rectangle node = new Rectangle();
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+
+        pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        ScrollEvent e = new ScrollEvent(
+                ScrollEvent.SCROLL_STARTED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                2, 3, 4, 5, ScrollEvent.HorizontalTextScrollUnits.CHARACTERS, 6,
+                ScrollEvent.VerticalTextScrollUnits.PAGES, 7, 8, pickRes);
+
+        assertSame(ScrollEvent.SCROLL_STARTED, e.getEventType());
+        assertSame(pickRes, e.getPickResult());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isDirect());
+        assertTrue(e.isInertia());
+        assertEquals(2.0, e.getDeltaX(), 10e-20);
+        assertEquals(3.0, e.getDeltaY(), 10e-20);
+        assertEquals(4.0, e.getTotalDeltaX(), 10e-20);
+        assertEquals(5.0, e.getTotalDeltaY(), 10e-20);
+        assertSame(ScrollEvent.HorizontalTextScrollUnits.CHARACTERS, e.getTextDeltaXUnits());
+        assertEquals(6.0, e.getTextDeltaX(), 10e-20);
+        assertSame(ScrollEvent.VerticalTextScrollUnits.PAGES, e.getTextDeltaYUnits());
+        assertEquals(7.0, e.getTextDeltaY(), 10e-20);
+        assertEquals(8.0, e.getTouchCount(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+        assertFalse(e.isConsumed());
+
+        e = new ScrollEvent(
+                ScrollEvent.SCROLL_STARTED, 10, 20, 30, 40,
+                true, false, true, false, true, false,
+                2, 3, 4, 5, ScrollEvent.HorizontalTextScrollUnits.CHARACTERS, 6,
+                ScrollEvent.VerticalTextScrollUnits.PAGES, 7, 8, pickRes);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isDirect());
+        assertFalse(e.isInertia());
+    }
+
+    @Test public void testShortConstructorWithoutPickResult() {
+        ScrollEvent e = new ScrollEvent(
+                ScrollEvent.SCROLL_STARTED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                2, 3, 4, 5, ScrollEvent.HorizontalTextScrollUnits.CHARACTERS, 6,
+                ScrollEvent.VerticalTextScrollUnits.PAGES, 7, 8, null);
+
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+    }
+
+    @Test public void testLongConstructor() {
+        Rectangle node = new Rectangle(10, 10);
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+
+        pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        ScrollEvent e = new ScrollEvent(n1, n2,
+                ScrollEvent.SCROLL_STARTED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                2, 3, 4, 5, ScrollEvent.HorizontalTextScrollUnits.CHARACTERS, 6,
+                ScrollEvent.VerticalTextScrollUnits.PAGES, 7, 8, pickRes);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertSame(ScrollEvent.SCROLL_STARTED, e.getEventType());
+        assertSame(pickRes, e.getPickResult());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isDirect());
+        assertTrue(e.isInertia());
+        assertEquals(2.0, e.getDeltaX(), 10e-20);
+        assertEquals(3.0, e.getDeltaY(), 10e-20);
+        assertEquals(4.0, e.getTotalDeltaX(), 10e-20);
+        assertEquals(5.0, e.getTotalDeltaY(), 10e-20);
+        assertSame(ScrollEvent.HorizontalTextScrollUnits.CHARACTERS, e.getTextDeltaXUnits());
+        assertEquals(6.0, e.getTextDeltaX(), 10e-20);
+        assertSame(ScrollEvent.VerticalTextScrollUnits.PAGES, e.getTextDeltaYUnits());
+        assertEquals(7.0, e.getTextDeltaY(), 10e-20);
+        assertEquals(8.0, e.getTouchCount(), 10e-20);
+        assertFalse(e.isConsumed());
+
+        e = new ScrollEvent(n1, n2,
+                ScrollEvent.SCROLL_STARTED, 10, 20, 30, 40,
+                true, false, true, false, true, false,
+                2, 3, 4, 5, ScrollEvent.HorizontalTextScrollUnits.CHARACTERS, 6,
+                ScrollEvent.VerticalTextScrollUnits.PAGES, 7, 8, pickRes);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isDirect());
+        assertFalse(e.isInertia());
+    }
+
+    @Test public void testLongConstructorWithoutPickResult() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        ScrollEvent e = new ScrollEvent(n1, n2,
+                ScrollEvent.SCROLL_STARTED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                2, 3, 4, 5, ScrollEvent.HorizontalTextScrollUnits.CHARACTERS, 6,
+                ScrollEvent.VerticalTextScrollUnits.PAGES, 7, 8, null);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+    }
+
+
     @Test
     public void shouldDeliverScrollEventToPickedNode() {
         Scene scene = createScene();
--- a/javafx-ui-common/test/unit/javafx/scene/input/SwipeEventTest.java	Tue May 21 16:03:34 2013 +0100
+++ b/javafx-ui-common/test/unit/javafx/scene/input/SwipeEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -27,7 +27,9 @@
 
 import com.sun.javafx.pgstub.StubScene;
 import com.sun.javafx.test.MouseEventGenerator;
+import javafx.event.Event;
 import javafx.event.EventHandler;
+import javafx.geometry.Point3D;
 import javafx.scene.Group;
 import javafx.scene.Scene;
 import javafx.scene.shape.Rectangle;
@@ -40,6 +42,136 @@
     private boolean swiped;
     private boolean swiped2;
 
+    @Test public void testShortConstructor() {
+        Rectangle node = new Rectangle();
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        SwipeEvent e = new SwipeEvent(
+                SwipeEvent.SWIPE_UP, 10, 20, 30, 40,
+                false, true, false, true, false, 3, pickRes);
+
+        assertSame(SwipeEvent.SWIPE_UP, e.getEventType());
+        assertSame(pickRes, e.getPickResult());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isDirect());
+        assertFalse(e.isInertia());
+        assertEquals(3.0, e.getTouchCount(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+        assertFalse(e.isConsumed());
+
+        e = new SwipeEvent(
+                SwipeEvent.SWIPE_UP, 10, 20, 30, 40,
+                true, false, true, false, true, 3, pickRes);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isDirect());
+        assertFalse(e.isInertia());
+    }
+
+    @Test public void testShortConstructorWithoutPickResult() {
+        SwipeEvent e = new SwipeEvent(
+                SwipeEvent.SWIPE_UP, 10, 20, 30, 40,
+                false, true, false, true, false, 3, null);
+
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+    }
+
+    @Test public void testLongConstructor() {
+        Rectangle node = new Rectangle(10, 10);
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        SwipeEvent e = new SwipeEvent(n1, n2,
+                SwipeEvent.SWIPE_UP, 10, 20, 30, 40,
+                false, true, false, true, false, 3, pickRes);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertSame(SwipeEvent.SWIPE_UP, e.getEventType());
+        assertSame(pickRes, e.getPickResult());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isDirect());
+        assertFalse(e.isInertia());
+        assertEquals(3.0, e.getTouchCount(), 10e-20);
+        assertFalse(e.isConsumed());
+
+        e = new SwipeEvent(n1, n2,
+                SwipeEvent.SWIPE_UP, 10, 20, 30, 40,
+                true, false, true, false, true, 3, pickRes);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isDirect());
+        assertFalse(e.isInertia());
+    }
+
+    @Test public void testLongConstructorWithoutPickResult() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        SwipeEvent e = new SwipeEvent(n1, n2,
+                SwipeEvent.SWIPE_UP, 10, 20, 30, 40,
+                false, true, false, true, false, 3, null);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+    }
+
     @Test
     public void shouldDeliverSwipeLeftEventToPickedNode() {
         Scene scene = createScene();
--- a/javafx-ui-common/test/unit/javafx/scene/input/TouchEventTest.java	Tue May 21 16:03:34 2013 +0100
+++ b/javafx-ui-common/test/unit/javafx/scene/input/TouchEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -26,12 +26,16 @@
 package javafx.scene.input;
 
 import com.sun.javafx.pgstub.StubScene;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Random;
+import javafx.event.Event;
 import javafx.scene.Group;
 import javafx.scene.Scene;
 import javafx.scene.shape.Rectangle;
 import javafx.stage.Stage;
 import javafx.event.EventHandler;
+import javafx.geometry.Point3D;
 import org.junit.Ignore;
 import org.junit.Test;
 import static org.junit.Assert.*;
@@ -42,6 +46,129 @@
 
     private int touched;
 
+    @Test public void testTouchPointConstructor() {
+        Rectangle node = new Rectangle();
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        PickResult pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        TouchPoint tp = new TouchPoint(2, TouchPoint.State.STATIONARY,
+                10, 20, 30, 40, node, pickRes);
+
+        assertEquals(2, tp.getId());
+        assertSame(TouchPoint.State.STATIONARY, tp.getState());
+        assertEquals(18, tp.getX(), 10e-20);
+        assertEquals(27, tp.getY(), 10e-20);
+        assertEquals(150, tp.getZ(), 10e-20);
+        assertEquals(10, tp.getSceneX(), 10e-20);
+        assertEquals(20, tp.getSceneY(), 10e-20);
+        assertEquals(30, tp.getScreenX(), 10e-20);
+        assertEquals(40, tp.getScreenY(), 10e-20);
+        assertSame(node, tp.getTarget());
+        assertSame(pickRes, tp.getPickResult());
+    }
+
+    @Test public void testTouchPointConstructorWithoutPickResult() {
+        Rectangle node = new Rectangle();
+        TouchPoint tp = new TouchPoint(2, TouchPoint.State.STATIONARY,
+                10, 20, 30, 40, node, null);
+
+        assertEquals(10, tp.getX(), 10e-20);
+        assertEquals(20, tp.getY(), 10e-20);
+        assertEquals(0, tp.getZ(), 10e-20);
+        assertEquals(10, tp.getSceneX(), 10e-20);
+        assertEquals(20, tp.getSceneY(), 10e-20);
+        assertEquals(30, tp.getScreenX(), 10e-20);
+        assertEquals(40, tp.getScreenY(), 10e-20);
+        assertNotNull(tp.getPickResult());
+        assertNotNull(tp.getPickResult().getIntersectedPoint());
+        assertEquals(10, tp.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, tp.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, tp.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+    }
+
+    @Test public void testShortConstructor() {
+        Rectangle node = new Rectangle();
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+
+        PickResult pickRes1 = new PickResult(node, new Point3D(15, 25, 100), 33);
+        PickResult pickRes2 = new PickResult(node, new Point3D(16, 26, 101), 33);
+        TouchPoint tp1 = new TouchPoint(2, TouchPoint.State.STATIONARY, 10, 20, 30, 40, node, pickRes1);
+        TouchPoint tp2 = new TouchPoint(3, TouchPoint.State.PRESSED, 11, 21, 31, 41, node, pickRes2);
+
+        TouchEvent e = new TouchEvent(
+                TouchEvent.TOUCH_PRESSED, tp2,
+                new ArrayList<>(Arrays.asList(tp1, tp2)), 158,
+                false, true, false, true);
+
+        assertSame(TouchEvent.TOUCH_PRESSED, e.getEventType());
+        assertSame(tp2, e.getTouchPoint());
+        assertEquals(2, e.getTouchPoints().size());
+        assertSame(tp1, e.getTouchPoints().get(0));
+        assertSame(tp2, e.getTouchPoints().get(1));
+        assertEquals(158, e.getEventSetId());
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+        assertFalse(e.isConsumed());
+
+        e = new TouchEvent(
+                TouchEvent.TOUCH_PRESSED, tp2,
+                new ArrayList<>(Arrays.asList(tp1, tp2)), 158,
+                true, false, true, false);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+    }
+
+    @Test public void testLongConstructor() {
+        Rectangle node = new Rectangle(10, 10);
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+
+        PickResult pickRes1 = new PickResult(node, new Point3D(15, 25, 100), 33);
+        PickResult pickRes2 = new PickResult(node, new Point3D(16, 26, 101), 33);
+        TouchPoint tp1 = new TouchPoint(2, TouchPoint.State.STATIONARY, 10, 20, 30, 40, node, pickRes1);
+        TouchPoint tp2 = new TouchPoint(3, TouchPoint.State.PRESSED, 11, 21, 31, 41, node, pickRes2);
+
+        TouchEvent e = new TouchEvent(n1, n2,
+                TouchEvent.TOUCH_PRESSED, tp2,
+                new ArrayList<>(Arrays.asList(tp1, tp2)), 158,
+                false, true, false, true);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertSame(TouchEvent.TOUCH_PRESSED, e.getEventType());
+        assertSame(tp2, e.getTouchPoint());
+        assertEquals(2, e.getTouchPoints().size());
+        assertSame(tp1, e.getTouchPoints().get(0));
+        assertSame(tp2, e.getTouchPoints().get(1));
+        assertEquals(158, e.getEventSetId());
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isConsumed());
+
+        e = new TouchEvent(n1, n2,
+                TouchEvent.TOUCH_PRESSED, tp2,
+                new ArrayList<>(Arrays.asList(tp1, tp2)), 158,
+                true, false, true, false);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+    }
+
     @Test
     public void shouldPassModifiers() {
         Scene scene = createScene();
--- a/javafx-ui-common/test/unit/javafx/scene/input/ZoomEventTest.java	Tue May 21 16:03:34 2013 +0100
+++ b/javafx-ui-common/test/unit/javafx/scene/input/ZoomEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -27,7 +27,9 @@
 
 import com.sun.javafx.pgstub.StubScene;
 import com.sun.javafx.test.MouseEventGenerator;
+import javafx.event.Event;
 import javafx.event.EventHandler;
+import javafx.geometry.Point3D;
 import javafx.scene.Group;
 import javafx.scene.Scene;
 import javafx.scene.shape.Rectangle;
@@ -40,7 +42,145 @@
     private boolean zoomed;
     private boolean zoomed2;
     private PickResult pickRes;
-    
+
+    @Test public void testShortConstructor() {
+        Rectangle node = new Rectangle();
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+
+        pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        ZoomEvent e = new ZoomEvent(
+                ZoomEvent.ZOOM_FINISHED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                0.75, 1.5, pickRes);
+
+        assertSame(ZoomEvent.ZOOM_FINISHED, e.getEventType());
+        assertSame(pickRes, e.getPickResult());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isDirect());
+        assertTrue(e.isInertia());
+        assertEquals(0.75, e.getZoomFactor(), 10e-20);
+        assertEquals(1.5, e.getTotalZoomFactor(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+        assertFalse(e.isConsumed());
+
+        e = new ZoomEvent(
+                ZoomEvent.ZOOM_FINISHED, 10, 20, 30, 40,
+                true, false, true, false, true, false,
+                0.75, 1.5, pickRes);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isDirect());
+        assertFalse(e.isInertia());
+    }
+
+    @Test public void testShortConstructorWithoutPickResult() {
+        ZoomEvent e = new ZoomEvent(
+                ZoomEvent.ZOOM_FINISHED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                0.75, 1.5, null);
+
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+        assertSame(Event.NULL_SOURCE_TARGET, e.getSource());
+        assertSame(Event.NULL_SOURCE_TARGET, e.getTarget());
+    }
+
+    @Test public void testLongConstructor() {
+        Rectangle node = new Rectangle(10, 10);
+        node.setTranslateX(3);
+        node.setTranslateY(2);
+        node.setTranslateZ(50);
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+
+        pickRes = new PickResult(node, new Point3D(15, 25, 100), 33);
+        ZoomEvent e = new ZoomEvent(n1, n2,
+                ZoomEvent.ZOOM_FINISHED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                0.75, 1.5, pickRes);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertSame(ZoomEvent.ZOOM_FINISHED, e.getEventType());
+        assertSame(pickRes, e.getPickResult());
+        assertEquals(18, e.getX(), 10e-20);
+        assertEquals(27, e.getY(), 10e-20);
+        assertEquals(150, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertFalse(e.isShiftDown());
+        assertTrue(e.isControlDown());
+        assertFalse(e.isAltDown());
+        assertTrue(e.isMetaDown());
+        assertFalse(e.isDirect());
+        assertTrue(e.isInertia());
+        assertEquals(0.75, e.getZoomFactor(), 10e-20);
+        assertEquals(1.5, e.getTotalZoomFactor(), 10e-20);
+        assertFalse(e.isConsumed());
+
+        e = new ZoomEvent(n1, n2,
+                ZoomEvent.ZOOM_FINISHED, 10, 20, 30, 40,
+                true, false, true, false, true, false,
+                0.75, 1.5, pickRes);
+        assertTrue(e.isShiftDown());
+        assertFalse(e.isControlDown());
+        assertTrue(e.isAltDown());
+        assertFalse(e.isMetaDown());
+        assertTrue(e.isDirect());
+        assertFalse(e.isInertia());
+    }
+
+    @Test public void testLongConstructorWithoutPickResult() {
+        Rectangle n1 = new Rectangle(10, 10);
+        Rectangle n2 = new Rectangle(10, 10);
+        ZoomEvent e = new ZoomEvent(n1, n2,
+                ZoomEvent.ZOOM_FINISHED, 10, 20, 30, 40,
+                false, true, false, true, false, true,
+                0.75, 1.5, null);
+
+        assertSame(n1, e.getSource());
+        assertSame(n2, e.getTarget());
+        assertEquals(10, e.getX(), 10e-20);
+        assertEquals(20, e.getY(), 10e-20);
+        assertEquals(0, e.getZ(), 10e-20);
+        assertEquals(10, e.getSceneX(), 10e-20);
+        assertEquals(20, e.getSceneY(), 10e-20);
+        assertEquals(30, e.getScreenX(), 10e-20);
+        assertEquals(40, e.getScreenY(), 10e-20);
+        assertNotNull(e.getPickResult());
+        assertNotNull(e.getPickResult().getIntersectedPoint());
+        assertEquals(10, e.getPickResult().getIntersectedPoint().getX(), 10e-20);
+        assertEquals(20, e.getPickResult().getIntersectedPoint().getY(), 10e-20);
+        assertEquals(0, e.getPickResult().getIntersectedPoint().getZ(), 10e-20);
+    }
+
     @Test
     public void shouldDeliverZoomEventToPickedNode() {
         Scene scene = createScene();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-ui-common/test/unit/javafx/stage/WindowEventTest.java	Tue May 21 16:44:32 2013 +0100
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javafx.stage;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertSame;
+import org.junit.Test;
+
+public class WindowEventTest {
+
+    @Test public void testConstructor() {
+        Window w = new Window();
+        WindowEvent e = new WindowEvent(w, WindowEvent.WINDOW_HIDING);
+        assertSame(WindowEvent.WINDOW_HIDING, e.getEventType());
+        assertFalse(e.isConsumed());
+        assertSame(w, e.getSource());
+        assertSame(w, e.getTarget());
+    }
+}