changeset 1278:c9f8ab00f5be

TouchPoint constructor removed from public API.
author Pavel Safrata
date Fri, 08 Jun 2012 09:39:08 +0200
parents 4427dc34e097
children d5146a3b928f
files javafx-ui-common/src/javafx/scene/Scene.java javafx-ui-common/src/javafx/scene/input/TouchPoint.java javafx-ui-common/test/unit/javafx/scene/input/TouchPoint_builder_Test.java
diffstat 3 files changed, 13 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/Scene.java	Thu Jun 07 11:26:41 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/Scene.java	Fri Jun 08 09:39:08 2012 +0200
@@ -2461,7 +2461,8 @@
                 throw new RuntimeException("Too many touch points reported");
             }
 
-            touchPoints[order] = new TouchPoint(id, state, x, y, xAbs, yAbs);
+            touchPoints[order] = TouchPoint.impl_touchPoint(id, state,
+                    x, y, xAbs, yAbs);
         }
 
         @Override
--- a/javafx-ui-common/src/javafx/scene/input/TouchPoint.java	Thu Jun 07 11:26:41 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/input/TouchPoint.java	Fri Jun 08 09:39:08 2012 +0200
@@ -53,7 +53,7 @@
     private EventTarget target;
     private Object source;
 
-    public TouchPoint(int id, State state, double x, double y, double screenX,
+    private TouchPoint(int id, State state, double x, double y, double screenX,
             double screenY) {
         this.target = null;
         this.id = id;
@@ -293,6 +293,16 @@
     }
 
     /**
+     * @treatAsPrivate implementation detail
+     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+     */
+    @Deprecated
+    public static TouchPoint impl_touchPoint(
+            int id, State state, double x, double y, double screenX, double screenY) {
+        return new TouchPoint(id, state, x, y, screenX, screenY);
+    }
+
+    /**
      * Represents current state of the touch point
      */
     public enum State {
--- a/javafx-ui-common/test/unit/javafx/scene/input/TouchPoint_builder_Test.java	Thu Jun 07 11:26:41 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 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 com.sun.javafx.test.BuilderTestBase;
-import java.util.Arrays;
-import java.util.Collection;
-import javafx.scene.shape.Rectangle;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-@RunWith(Parameterized.class)
-public final class TouchPoint_builder_Test extends BuilderTestBase {
-    @Parameters
-    public static Collection data() {
-        BuilderTestBase.Configuration cfg = new BuilderTestBase.Configuration(TouchPoint.class);
-
-        cfg.addProperty("x", 1.0);
-        cfg.addProperty("y", 1.0);
-        cfg.addProperty("screenX", 1.0);
-        cfg.addProperty("screenY", 1.0);
-        cfg.addProperty("state", TouchPoint.State.MOVED);
-        cfg.addProperty("id", 1);
-
-        return Arrays.asList(new Object[] {
-            config(cfg)
-        });
-    }
-
-    public TouchPoint_builder_Test(final Configuration configuration) {
-        super(configuration);
-    }
-}