com.sencha.gxt.core.client.dom
Class AutoScrollSupport

java.lang.Object
  extended by com.sencha.gxt.core.client.dom.AutoScrollSupport

public class AutoScrollSupport
extends java.lang.Object

Automatically scrolls an element when the mouse is near the top or bottom of the element.

Use start() and stop() enable and disable.


Constructor Summary
AutoScrollSupport()
          Creates a new scroll support instance.
AutoScrollSupport(XElement scrollElement)
          Creates a new scroll support instance.
 
Method Summary
 int getScrollDelay()
          Returns the scroll delay.
 XElement 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.
 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(XElement 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()
          Starts monitoring for auto scroll.
 void stop()
          Stops monitoring for auto scroll.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoScrollSupport

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


AutoScrollSupport

public AutoScrollSupport(XElement 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 XElement 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(XElement 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()
Starts monitoring for auto scroll.


stop

public void stop()
Stops monitoring for auto scroll.



Copyright © 2012. All Rights Reserved.