Package muntjac :: Package terminal :: Module scrollable :: Class IScrollable
[hide private]
[frames] | no frames]

Class IScrollable

source code

object --+
         |
        IScrollable
Known Subclasses:

This interface is implemented by all visual objects that can be scrolled programmatically from the server-side, or for which it is possible to know the scroll position on the server-side.. The unit of scrolling is pixel.


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
getScrollLeft(self)
Gets scroll left offset.
source code
 
setScrollLeft(self, pixelsScrolled)
Sets scroll left offset.
source code
 
getScrollTop(self)
Gets scroll top offset.
source code
 
setScrollTop(self, pixelsScrolled)
Sets scroll top offset.
source code
 
isScrollable(self)
Is programmatic scrolling enabled.
source code
 
setScrollable(self, isScrollingEnabled)
Enables or disables programmatic scrolling.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getScrollLeft(self)

source code 

Gets scroll left offset.

Scrolling offset is the number of pixels this scrollable has been scrolled right.

Returns:
Horizontal scrolling position in pixels.

setScrollLeft(self, pixelsScrolled)

source code 

Sets scroll left offset.

Scrolling offset is the number of pixels this scrollable has been scrolled right.

The method only has effect if programmatic scrolling is enabled for the scrollable. Some implementations may require enabling programmatic before this method can be used. See setScrollable for more information.

Parameters:
  • pixelsScrolled - the xOffset.

getScrollTop(self)

source code 

Gets scroll top offset.

Scrolling offset is the number of pixels this scrollable has been scrolled down.

Returns:
Vertical scrolling position in pixels.

setScrollTop(self, pixelsScrolled)

source code 

Sets scroll top offset.

Scrolling offset is the number of pixels this scrollable has been scrolled down.

The method only has effect if programmatic scrolling is enabled for the scrollable. Some implementations may require enabling programmatic before this method can be used. See setScrollable for more information.

The scrolling position is limited by the current height of the content area. If the position is below the height, it is scrolled to the bottom. However, if the same response also adds height to the content area, scrolling to bottom only scrolls to the bottom of the previous content area.

Parameters:
  • pixelsScrolled - the yOffset.

isScrollable(self)

source code 

Is programmatic scrolling enabled.

Whether programmatic scrolling with setScrollLeft and setScrollTop is enabled.

Returns:
True if the scrolling is enabled, otherwise False.

setScrollable(self, isScrollingEnabled)

source code 

Enables or disables programmatic scrolling.

Enables setting the scroll position with setScrollLeft and setScrollTop. Implementations of the interface may have programmatic scrolling disabled by default, in which case you need to enable it to use the mentioned methods.

Notice that this does <i>not</i> control whether scroll bars are shown for a scrollable component. That normally happens automatically when the content grows too big for the component, relying on the "overflow: auto" property in CSS.

Parameters:
  • isScrollingEnabled - true if the scrolling is allowed.