Class Swipe

  extended by zk.Object
      extended by zk.Swipe

public class Swipe
extends Object

A swipe object used to make a DOM element swipe-able.

Field Summary
Fields inherited from class zk.Object
$class, $oid
Method Summary
 void $init(Object widget, DOMElement node, Map opts)
          The Constructor.
 void destroy()
          Destroys this swipe-able object.
Methods inherited from class zk.Object
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail


public void $init(Object widget,
                  DOMElement node,
                  Map opts)
The Constructor.

widget - the object for swipe. It can be anything, but it is usually a widget (Widget).
node - [optional] the DOM element that is made to be swipe-able. If omitted and widget is a widget, Widget.$n(_global_.String) is assumed.
opts - [optional] options. Allowed options:
  • int scrollThreshold: swipe displacement(pixel). When larger than threshold, prevent page scrolling. Default: 5.
  • int duration: swipe start to end time duration(millisecond). When larger than time duration, it is not a swipe action. Default: 500.
  • int minDisplacement: the minimum swipe displacement(pixel). When smaller than minimum displacement, it is not a swipe action. Default: 30.
  • int maxDisplacement: the maximum swipe displacement(pixel). When larger than maximum displacement, it is not a swipe action. Default: 75.


public void destroy()
Destroys this swipe-able object. This method must be called to clean up, if you don't want to associate the swipe-able feature to a DOM element.

Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo