Class ch.component.scrollbar.ScrollEvent

Description

Event of a scroll.

Method Index

new ScrollEvent()
getPosition(), getRatio(), getScroller(), getScrollValue(), isRefresh(), toString()

Constructor Detail

ScrollEvent

public function ScrollEvent(source:ScrollBarModel, scroller:Object, scrolled:Number, ratio:Number, position:Number, isRefresh:Boolean)

Create a new ScrollEvent.

Parameters

sourceThe event source.
scrollerThe object changing the scroll.
scrolledThe number of pixel scrolled.
ratioThe current ratio after the scroll.
positionThe current position after the scroll.
isRefreshIndicates if the event is only for the refresh.

Method Detail

isRefresh

public function isRefresh(Void):Boolean

Get if the current ScrollEvent is generated only for a refresh action.

Return

true if this is a refresh event.

getScroller

public function getScroller(Void):Object

Get the object that is scrolling the current source.

This value let you retrieve which object has been used to perform the scroll.

Return

The scroller.

getScrollValue

public function getScrollValue(Void):Number

Get the scrolled pixels.

Return

The scrolled pixels.

getRatio

public function getRatio(Void):Number

Get the current ratio of the content.

Return

The ratio.

getPosition

public function getPosition(Void):Number

Get the current position of the content.

Return

The position.

toString

public function toString(Void):String

Represent the current instance into a String.

Return

A String representing the ScrollEvent instance.