Package org.zkoss.zk.ui.event
Class ScrollEvent
- java.lang.Object
-
- org.zkoss.zk.ui.event.Event
-
- org.zkoss.zk.ui.event.ScrollEvent
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ScrollEventExt
public class ScrollEvent extends Event
Represents an event caused by that user is scrolling or has scrolled at the client.- Author:
- tomyeh
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ScrollEvent(java.lang.String name, Component target, double pos)
Constructs an scroll-relevant event.ScrollEvent(java.lang.String name, Component target, double dPos, boolean outBound)
Constructs an scroll-relevant event.ScrollEvent(java.lang.String name, Component target, int pos)
Constructs an scroll-relevant event.ScrollEvent(java.lang.String name, Component target, int pos, boolean outBound)
Constructs an scroll-relevant event.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPos()
Returns the position.double
getPosInDouble()
Returns the position.static ScrollEvent
getScrollEvent(AuRequest request)
Converts an AU request to a scroll event.boolean
isOutOfBound()
Return true if the scroll position is outside of boundary on tablet/mobile device.-
Methods inherited from class org.zkoss.zk.ui.event.Event
getData, getEvent, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
-
-
-
-
Constructor Detail
-
ScrollEvent
public ScrollEvent(java.lang.String name, Component target, int pos)
Constructs an scroll-relevant event.- Parameters:
pos
- the new position
-
ScrollEvent
public ScrollEvent(java.lang.String name, Component target, double pos)
Constructs an scroll-relevant event.- Parameters:
pos
- the new position- Since:
- 7.0.1
-
ScrollEvent
public ScrollEvent(java.lang.String name, Component target, int pos, boolean outBound)
Constructs an scroll-relevant event.- Parameters:
pos
- the new positionoutBound
- the position is outside the boundary or not (only used on tablet/mobile device)
-
ScrollEvent
public ScrollEvent(java.lang.String name, Component target, double dPos, boolean outBound)
Constructs an scroll-relevant event.- Parameters:
dPos
- the new positionoutBound
- the position is outside the boundary or not (only used on tablet/mobile device)- Since:
- 7.0.1
-
-
Method Detail
-
getScrollEvent
public static final ScrollEvent getScrollEvent(AuRequest request)
Converts an AU request to a scroll event.- Since:
- 5.0.0
-
getPos
public final int getPos()
Returns the position.
-
getPosInDouble
public final double getPosInDouble()
Returns the position.- Since:
- 7.0.1
-
isOutOfBound
public boolean isOutOfBound()
Return true if the scroll position is outside of boundary on tablet/mobile device.- Since:
- 6.5.0
-
-