Class zebkit.ui.ScrollManager <zebkit.ui>

Scroll manager class.

Constructor:
zebkit.ui.ScrollManager (t)

Parameters:



public <Integer> getSX ( )
public <Integer> getSY ( )
public void makeVisible (x, y, w, h)
public void scrollTo (x, y)
public void scrollXTo (v)
public void scrollYTo (v)

public <Integer> getSX ( )

Get current target component x scroll location


Returns: <Integer>

a x scroll location

public <Integer> getSY ( )

Get current target component y scroll location


Returns: <Integer>

a y scroll location

public chainable makeVisible (x, y, w, h)

Make visible the given rectangular area of the scrolled target component


Parameters:
  • x <Integer>

    a x coordinate of top left corner of the rectangular area

  • y <Integer>

    a y coordinate of top left corner of the rectangular area

  • w <Integer>

    a width of the rectangular area

  • h <Integer>

    a height of the rectangular area

public void scrollTo (x, y)

Scroll the target component into the specified location


Parameters:
  • x <Integer>

    a x location

  • y <Integer>

    a y location

public void scrollXTo (v)

Set a target component scroll x location to the specified value


Parameters:
  • v <Integer>

    a x scroll location

public void scrollYTo (v)

Set a target component scroll y location to the specified value


Parameters:
  • v <Integer>

    a y scroll location


public <zebkit.ui.Panel> target

Target UI component for that the scroll manager has been instantiated


scrolled

Fired when a target component has been scrolled

       scrollManager.on(function(px, py) {
           ...
       });

Parameters:
  • px <Integer>

    a previous x location target component scroll location

  • py <Integer>

    a previous y location target component scroll location

scrollStateUpdated

Fired when a scroll state has been updated

       scrollManager.scrollStateUpdated = function(x, y, px, py) {
           ...
       };

Parameters:
  • x <Integer>

    a new x location target component scroll location

  • y <Integer>

    a new y location target component scroll location

  • px <Integer>

    a previous x location target component scroll location

  • py <Integer>

    a previous y location target component scroll location