cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [45/50] [abbrv] git commit: Added missing ScrollEvent.java file.
Date Wed, 22 Jan 2014 19:38:56 GMT
Added missing ScrollEvent.java file.


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/fdb3bef8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/fdb3bef8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/fdb3bef8

Branch: refs/heads/master
Commit: fdb3bef8e3add109020a8c3ce9e1bbc10ce22731
Parents: 70ce111
Author: Archana Naik <naika@lab126.com>
Authored: Wed Dec 18 10:50:17 2013 -0800
Committer: Joe Bowser <bowserj@apache.org>
Committed: Wed Jan 22 11:37:23 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/cordova/ScrollEvent.java     | 67 ++++++++++++++++++++
 1 file changed, 67 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/fdb3bef8/framework/src/org/apache/cordova/ScrollEvent.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/ScrollEvent.java b/framework/src/org/apache/cordova/ScrollEvent.java
new file mode 100644
index 0000000..5546613
--- /dev/null
+++ b/framework/src/org/apache/cordova/ScrollEvent.java
@@ -0,0 +1,67 @@
+/*
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+*/
+
+package org.apache.cordova;
+
+import android.view.View;
+
+/*
+ * This can be used by any view, including native views
+ * 
+ */
+
+
+public class ScrollEvent {
+    
+    public int l, t, nl, nt;
+    private View targetView;
+    
+    /*
+     * ScrollEvent constructor
+     * No idea why it uses l and t instead of x and y
+     * 
+     * @param x
+     * @param y
+     * @param nx
+     * @param ny
+     * @param view
+     */
+    
+    ScrollEvent(int nx, int ny, int x, int y, View view)
+    {
+        l = x; y = t; nl = nx; nt = ny;
+        targetView = view;
+    }
+    
+    public int dl()
+    {
+        return nl - l;
+    }
+    
+    public int dt()
+    {
+        return nt - t;
+    }
+    
+    public View getTargetView()
+    {
+        return targetView;
+    }
+
+}


Mime
View raw message