com.itmill.toolkit.terminal.gwt.client.ui
Class IScrollTable

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by com.google.gwt.user.client.ui.FlowPanel
                      extended by com.itmill.toolkit.terminal.gwt.client.ui.IScrollTable
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.ScrollListener, Paintable, Table, Iterable<com.google.gwt.user.client.ui.Widget>

public class IScrollTable
extends com.google.gwt.user.client.ui.FlowPanel
implements Table, com.google.gwt.user.client.ui.ScrollListener

IScrollTable IScrollTable is a FlowPanel having two widgets in it: * TableHead component * ScrollPanel TableHead contains table's header and widgets + logic for resizing, reordering and hiding columns. ScrollPanel contains IScrollTableBody object which handles content. To save some bandwidth and to improve clients responsiveness with loads of data, in IScrollTableBody all rows are not necessary rendered. There are "spacers" in IScrollTableBody to use the exact same space as non-rendered rows would use. This way we can use seamlessly traditional scrollbars and scrolling to fetch more rows instead of "paging". In IScrollTable we listen to scroll events. On horizontal scrolling we also update TableHeads scroll position which has its scrollbars hidden. On vertical scroll events we will check if we are reaching the end of area where we have rows rendered and TODO implement unregistering for child components in Cells


Nested Class Summary
 class IScrollTable.HeaderCell
           
 class IScrollTable.IScrollTableBody
          This Panel can only contain IScrollTableRow type of widgets.
 class IScrollTable.RowHeadersHeaderCell
          HeaderCell that is header cell for row headers.
 class IScrollTable.TableHead
           
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
static char ALIGN_CENTER
           
static char ALIGN_LEFT
           
static char ALIGN_RIGHT
           
static String CLASSNAME
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Fields inherited from interface com.itmill.toolkit.terminal.gwt.client.ui.Table
SELECT_MODE_MULTI, SELECT_MODE_NONE, SELECT_MODE_SINGLE
 
Constructor Summary
IScrollTable()
           
 
Method Summary
 void deselectAll()
           
 String getActionCaption(String actionKey)
           
 String getActionIcon(String actionKey)
           
protected  void onAttach()
           
protected  void onDetach()
           
 void onScroll(com.google.gwt.user.client.ui.Widget widget, int scrollLeft, int scrollTop)
          This method has logic which rows needs to be requested from server when user scrolls
 void setHeight(String height)
           
 void setWidth(String width)
           
 void setVisible(boolean visible)
           
 void updateFromUIDL(UIDL uidl, ApplicationConnection client)
           
 
Methods inherited from class com.google.gwt.user.client.ui.FlowPanel
add, insert
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, insert, insert, iterator, remove, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onBrowserEvent, removeFromParent
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.user.client.ui.HasWidgets
add, clear, iterator, remove
 

Field Detail

CLASSNAME

public static final String CLASSNAME
See Also:
Constant Field Values

ALIGN_CENTER

public static final char ALIGN_CENTER
See Also:
Constant Field Values

ALIGN_LEFT

public static final char ALIGN_LEFT
See Also:
Constant Field Values

ALIGN_RIGHT

public static final char ALIGN_RIGHT
See Also:
Constant Field Values
Constructor Detail

IScrollTable

public IScrollTable()
Method Detail

updateFromUIDL

public void updateFromUIDL(UIDL uidl,
                           ApplicationConnection client)
Specified by:
updateFromUIDL in interface Paintable

getActionCaption

public String getActionCaption(String actionKey)

getActionIcon

public String getActionIcon(String actionKey)

onAttach

protected void onAttach()
Overrides:
onAttach in class com.google.gwt.user.client.ui.Widget

onDetach

protected void onDetach()
Overrides:
onDetach in class com.google.gwt.user.client.ui.Widget

onScroll

public void onScroll(com.google.gwt.user.client.ui.Widget widget,
                     int scrollLeft,
                     int scrollTop)
This method has logic which rows needs to be requested from server when user scrolls

Specified by:
onScroll in interface com.google.gwt.user.client.ui.ScrollListener

deselectAll

public void deselectAll()

setWidth

public void setWidth(String width)
Overrides:
setWidth in class com.google.gwt.user.client.ui.UIObject

setHeight

public void setHeight(String height)
Overrides:
setHeight in class com.google.gwt.user.client.ui.UIObject

setVisible

public void setVisible(boolean visible)
Overrides:
setVisible in class com.google.gwt.user.client.ui.UIObject


Copyright © 2000-2009 IT Mill Ltd. All Rights Reserved.