com.extjs.gxt.ui.client.dnd
Class ScrollSupport

java.lang.Object
  extended by com.extjs.gxt.ui.client.dnd.ScrollSupport

public class ScrollSupport
extends java.lang.Object

Adds scroll support to a given element.


Constructor Summary
ScrollSupport()
          Creates a new scroll support instance.
ScrollSupport(El scrollElement)
          Creates a new scroll support instance.
 
Method Summary
 int getScrollDelay()
          Returns the scroll delay.
 El getScrollElement()
          Returns the scroll element.
 int getScrollRegionHeight()
          Returns the scroll region height.
 int getScrollRepeatDelay()
          Returns the scroll repeat delay.
 boolean isAutoScroll()
          Returns true if auto scroll is enabled.
protected  void onMove(DomEvent de)
           
protected  void onScrollDown(DomEvent de)
           
protected  void onScrollUp(DomEvent de)
           
protected  void onStart()
           
 void setAutoScroll(boolean autoScroll)
          True to enable auto scroll (defaults to true).
 void setScrollDelay(int scrollDelay)
          Sets the amount of time before auto scroll is activated (defaults to 400).
 void setScrollElement(El scrollElement)
          Sets the scroll element.
 void setScrollRegionHeight(int scrollRegionHeight)
          Sets the height of the scroll region (defaults to 25).
 void setScrollRepeatDelay(int scrollRepeatDelay)
          Sets the amount of time between scroll changes after auto scrolling is activated (defaults to 300).
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScrollSupport

public ScrollSupport()
Creates a new scroll support instance. The scroll element must be set, see setScrollElement(El).


ScrollSupport

public ScrollSupport(El scrollElement)
Creates a new scroll support instance.

Parameters:
scrollElement - the scroll element
Method Detail

getScrollDelay

public int getScrollDelay()
Returns the scroll delay.

Returns:
the scroll delay in milliseconds

getScrollElement

public El getScrollElement()
Returns the scroll element.

Returns:
the scroll element

getScrollRegionHeight

public int getScrollRegionHeight()
Returns the scroll region height.

Returns:
the scroll region height

getScrollRepeatDelay

public int getScrollRepeatDelay()
Returns the scroll repeat delay.

Returns:
the scroll repeat delay

isAutoScroll

public boolean isAutoScroll()
Returns true if auto scroll is enabled.

Returns:
true if auto scroll is enabled, otherwise false

setAutoScroll

public void setAutoScroll(boolean autoScroll)
True to enable auto scroll (defaults to true).

Parameters:
autoScroll - true if auto scroll is enabled

setScrollDelay

public void setScrollDelay(int scrollDelay)
Sets the amount of time before auto scroll is activated (defaults to 400).

Parameters:
scrollDelay - the scroll delay in milliseconds

setScrollElement

public void setScrollElement(El scrollElement)
Sets the scroll element.

Parameters:
scrollElement - the scroll element

setScrollRegionHeight

public void setScrollRegionHeight(int scrollRegionHeight)
Sets the height of the scroll region (defaults to 25).

Parameters:
scrollRegionHeight - the scroll region in pixels

setScrollRepeatDelay

public void setScrollRepeatDelay(int scrollRepeatDelay)
Sets the amount of time between scroll changes after auto scrolling is activated (defaults to 300).

Parameters:
scrollRepeatDelay - the repeat delay in milliseconds

start

public void start()

stop

public void stop()

onMove

protected void onMove(DomEvent de)

onScrollDown

protected void onScrollDown(DomEvent de)

onScrollUp

protected void onScrollUp(DomEvent de)

onStart

protected void onStart()