WUI : API


org.westofj.wui.table
Class WTableServerScrollLayout

java.lang.Object
  extended byorg.westofj.wui.table.WTableServerScrollLayout
All Implemented Interfaces:
WTableLayout

public class WTableServerScrollLayout
extends Object
implements WTableLayout

Author:
bill

Constructor Summary
WTableServerScrollLayout()
           
 
Method Summary
 int getCurrentIndex()
          Returns the current scroll index of the table.
 int getViewportSize()
          Returns the number of rows displayed at one time.
protected  void handleParams(WRunner runner, String[] values)
           
 void initialize(WTable table)
           
 boolean isScrollEnabled()
          Returns true if the table scroll bar is displayed, false otherwise.
 void pageDown()
          Scrolls the view down one page.
 void pageUp()
          Scrolls the view up one page.
 void render(WRunner runner, WRenderContext context, PrintWriter out)
           
 void scrollBottom()
          Scrolls to the end of the data set.
 void scrollDown()
          Scrolls the view down one row.
 void scrollTop()
          Scrolls to the beginning of the data set.
 void scrollUp()
          Scrolls the view up one row.
 void setCurrentIndex(int currentIndex)
          Sets the current scroll index of the table.
 void setScrollEnabled(boolean scrollEnabled)
          Sets if the table scroll bar should be displayed.
 void setViewportSize(int viewportSize)
          Sets the number of rows displayed at one time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WTableServerScrollLayout

public WTableServerScrollLayout()
Method Detail

initialize

public void initialize(WTable table)
Specified by:
initialize in interface WTableLayout

render

public void render(WRunner runner,
                   WRenderContext context,
                   PrintWriter out)
            throws WRenderException
Specified by:
render in interface WTableLayout
Throws:
WRenderException

getCurrentIndex

public int getCurrentIndex()
Returns the current scroll index of the table.

Returns:
int the current scroll index of the table.

setCurrentIndex

public void setCurrentIndex(int currentIndex)
Sets the current scroll index of the table. This method may be utilized to switch the view to another section of the table.

Parameters:
currentIndex - the scrol index of the table.

getViewportSize

public int getViewportSize()
Returns the number of rows displayed at one time.

Returns:
int the number of rows displayed at one time.

setViewportSize

public void setViewportSize(int viewportSize)
Sets the number of rows displayed at one time.

Parameters:
viewportSize - the number of rows displayed at one time.

isScrollEnabled

public boolean isScrollEnabled()
Returns true if the table scroll bar is displayed, false otherwise.

Returns:
boolean true if the table scroll bar is displayed, false otherwise.

setScrollEnabled

public void setScrollEnabled(boolean scrollEnabled)
Sets if the table scroll bar should be displayed. True indicates that the table scroll bar is displayed. False indicates that the table scrollbar is not displayed.

Parameters:
scrollEnabled - true if the table scroll bar is displayed, false otherwise.

scrollUp

public void scrollUp()
Scrolls the view up one row.


scrollDown

public void scrollDown()
Scrolls the view down one row.


pageUp

public void pageUp()
Scrolls the view up one page. The number of rows scrolled is equivalent to the number of rows in the viewport.


pageDown

public void pageDown()
Scrolls the view down one page. The number of rows scrolled is equivalent to the number of rows in the viewport.


scrollTop

public void scrollTop()
Scrolls to the beginning of the data set.


scrollBottom

public void scrollBottom()
Scrolls to the end of the data set.


handleParams

protected void handleParams(WRunner runner,
                            String[] values)

Copyright (c) 2003 West of J - All rights reserved.