Class VScrollTable
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.ComplexPanel
-
- com.google.gwt.user.client.ui.FlowPanel
-
- com.vaadin.client.ui.VScrollTable
-
- All Implemented Interfaces:
com.google.gwt.event.dom.client.BlurHandler
,com.google.gwt.event.dom.client.FocusHandler
,com.google.gwt.event.dom.client.ScrollHandler
,com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.shared.EventHandler
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IndexedPanel
,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
,com.google.gwt.user.client.ui.InsertPanel
,com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,DeferredWorker
,Focusable
,ActionOwner
,VHasDropHandler
,SubPartAware
,Iterable<com.google.gwt.user.client.ui.Widget>
- Direct Known Subclasses:
VTreeTable
public class VScrollTable extends com.google.gwt.user.client.ui.FlowPanel implements com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.event.dom.client.ScrollHandler, VHasDropHandler, com.google.gwt.event.dom.client.FocusHandler, com.google.gwt.event.dom.client.BlurHandler, Focusable, ActionOwner, SubPartAware, DeferredWorker
VScrollTable VScrollTable 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 VScrollTableBody object which handles content. To save some bandwidth and to improve clients responsiveness with loads of data, in VScrollTableBody all rows are not necessary rendered. There are "spacers" in VScrollTableBody 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 VScrollTable 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
Nested Classes Modifier and Type Class Description class
VScrollTable.ContextMenuDetails
Used to recall the position of an open context menu if we need to close and reopen it during a row update.class
VScrollTable.FocusableScrollContextPanel
For internal use only.class
VScrollTable.FooterCell
A cell in the footerclass
VScrollTable.HeaderCell
class
VScrollTable.RowHeadersFooterCell
HeaderCell that is header cell for row headers.class
VScrollTable.RowHeadersHeaderCell
HeaderCell that is header cell for row headers.class
VScrollTable.RowRequestHandler
For internal use only.static class
VScrollTable.SelectMode
class
VScrollTable.TableFooter
The footer of the table which can be seen in the bottom of the Table.class
VScrollTable.TableHead
class
VScrollTable.VScrollTableBody
This Panel can only contain VScrollTableRow type of widgets.class
VScrollTable.VScrollTableDropHandler
-
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
-
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
-
-
Field Summary
Fields Modifier and Type Field Description static char
ALIGN_CENTER
static char
ALIGN_LEFT
static char
ALIGN_RIGHT
String[]
bodyActionKeys
For internal use only.protected ApplicationConnection
client
CollapseMenuContent
collapsibleMenuContent
For internal use only.VScrollTable.ContextMenuDetails
contextMenu
For internal use only.VScrollTable.VScrollTableDropHandler
dropHandler
For internal use only.boolean
enabled
For internal use only.VScrollTable.VScrollTableBody.VScrollTableRow
focusedRow
The currently focused row.boolean
focusFirstItemInNextRender
For internal use only.boolean
focusLastItemInNextRender
For internal use only.boolean
headerChangedDuringUpdate
Flag to indicate if a column width recalculation is needed due update.boolean
immediate
For internal use only.boolean
initializedAndAttached
For internal use only.int
lastRenderedHeight
For internal use only.boolean
multiselectPending
For internal use only.String
paintableId
For internal use only.boolean
postponeSanityCheckForLastRendered
In several cases TreeTable depends on the scrollBody.lastRendered being 'out of sync' while the update is being done.boolean
recalcWidths
Read from the "recalcWidths" -attribute.boolean
rendering
For internal use only.VScrollTable.RowRequestHandler
rowRequestHandler
For internal use only.VScrollTable.VScrollTableBody
scrollBody
For internal use only.VScrollTable.FocusableScrollContextPanel
scrollBodyPanel
For internal use only.HashSet<String>
selectedRowKeys
boolean
selectFirstItemInNextRender
For internal use only.boolean
selectionChanged
Flag for notifying when the selection has changed and should be sent to the serverVScrollTable.VScrollTableBody.VScrollTableRow
selectionRangeStart
Helper to store selection range start in when using the keyboardboolean
selectLastItemInNextRender
For internal use only.int
serverCacheFirst
Values (serverCacheFirst+serverCacheLast) sent by server that tells which rows (indexes) are in the server side cache (page buffer).int
serverCacheLast
boolean
showColFooters
For internal use only.boolean
showColHeaders
For internal use only.boolean
showRowHeaders
For internal use only.boolean
sizeNeedsInit
For internal use only.static String
STYLENAME
int
tabIndex
For internal use only.VScrollTable.TableFooter
tFoot
For internal use only.VScrollTable.TableHead
tHead
For internal use only.int
totalRows
For internal use only.
-
Constructor Summary
Constructors Constructor Description VScrollTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAndRemoveRows(UIDL partialRowAdditions)
Inserts rows in the table body or removes them from the table body based on the commands in the UIDL.protected String
buildCaptionHtmlSnippet(UIDL uidl)
Helper function to build html snippet for column or row headersprotected int
calcFirstRowInViewPort()
void
cancelScrollingVelocityTimer()
protected VScrollTable.VScrollTableBody
createScrollBody()
void
deselectAll()
Deselects all itemsprotected void
discardRowsOutsideCacheWindow()
Updates the internal cache by unlinking rows that fall outside of the caching window.void
focus()
Sets focus to this widget.void
focusRowFromBody()
For internal use only.String
getActionCaption(String actionKey)
String
getActionIcon(String actionKey)
Action[]
getActions()
HasChildMeasurementHintConnector.ChildMeasurementHint
getChildMeasurementHint()
ApplicationConnection
getClient()
VScrollTable.VScrollTableDropHandler
getDropHandler()
protected VScrollTable.VScrollTableBody.VScrollTableRow
getFocusedRow()
protected int
getHierarchyColumnIndex()
This method exists for the needs ofVTreeTable
only.protected int
getNavigationDownKey()
Get the key that moves the selection head downwards.protected int
getNavigationEndKey()
Get the key the moves the selection to the end of the table.protected int
getNavigationLeftKey()
Get the key that scrolls to the left in the table.protected int
getNavigationPageDownKey()
Get the key the moves the selection one page down in the table.protected int
getNavigationPageUpKey()
Get the key the moves the selection one page up in the table.protected int
getNavigationRightKey()
Get the key that scroll to the right on the table.protected int
getNavigationSelectKey()
Get the key that selects an item in the table.protected int
getNavigationStartKey()
Get the key the moves the selection to the beginning of the table.protected int
getNavigationUpKey()
Get the key that moves the selection head upwards.String
getPaintableId()
VScrollTable.VScrollTableBody.VScrollTableRow
getRenderedRowByKey(String key)
Get a rendered row by its keycom.google.gwt.user.client.Element
getSubPartElement(String subPart)
Locates an element inside a component using the identifier provided insubPart
.String
getSubPartName(com.google.gwt.user.client.Element subElement)
Provides an identifier that identifies the element within the component.int
getTotalRows()
com.google.gwt.user.client.ui.Widget
getWidgetForPaintable()
protected boolean
handleNavigation(int keycode, boolean ctrl, boolean shift)
Handles the keyboard events handled by the tablevoid
hideScrollPositionAnnotation()
For internal use only.void
init(ApplicationConnection client)
void
initializeRows(UIDL uidl, UIDL rowData)
For internal use only.boolean
isFocusable()
Can the Table be focused?boolean
isScrollPositionVisible()
For internal use only.boolean
isSelectable()
For internal use only.boolean
isWorkPending()
Checks whether there are operations pending for this widget or connector that must be executed before reaching a steady state.void
lazyRevertFocusToRow(VScrollTable.VScrollTableBody.VScrollTableRow currentlyFocusedRow)
protected int
measureRowHeightOffset(int rowIx)
void
onAttach()
void
onBlur(com.google.gwt.event.dom.client.BlurEvent event)
protected void
onDetach()
void
onFocus(com.google.gwt.event.dom.client.FocusEvent event)
void
onScroll(com.google.gwt.event.dom.client.ScrollEvent event)
This method has logic which rows needs to be requested from server when user scrollsvoid
onUnregister()
protected void
reOrderColumn(String columnKey, int newIndex)
void
resizeSortedColumnForSortIndicator()
For internal use only.void
selectFirstRenderedRowInViewPort(boolean focusOnly)
Selects the first row visible in the tablevoid
selectLastRenderedRowInViewPort(boolean focusOnly)
Selects the last row visible in the tableboolean
selectSelectedRows(UIDL uidl)
For internal use only.protected void
sendSelectedRows()
Sends the selection to the server if changed since the last update/visit.protected void
sendSelectedRows(boolean immediately)
Sends the selection to the server if it has been changed since the last update/visit.void
setCacheRateFromUIDL(UIDL uidl)
For internal use only.void
setChildMeasurementHint(HasChildMeasurementHintConnector.ChildMeasurementHint hint)
protected void
setColWidth(int colIndex, int w, boolean isDefinedWidth)
Note: not part of the official API, extend at your own risk.void
setHeight(String height)
void
setProperTabIndex()
Sets the proper tabIndex for scrollBodyPanel (the focusable elemen in the component).boolean
setRowFocus(VScrollTable.VScrollTableBody.VScrollTableRow row)
Moves the selection head to a specific rowvoid
setStyleName(String style)
void
setStylePrimaryName(String style)
protected void
setTotalRows(int newTotalRows)
void
setVisible(boolean visible)
void
sizeInit()
Run only once when component is attached and received its initial content.void
startScrollingVelocityTimer()
void
triggerLazyColumnAdjustment(boolean now)
void
updateActionMap(UIDL mainUidl)
For internal use only.void
updateBody(UIDL uidl, int firstRow, int reqRows)
For internal use only.void
updateColumnProperties(UIDL uidl)
For internal use only.void
updateDragMode(UIDL uidl)
For internal use only.void
updateFirstVisibleAndScrollIfNeeded(UIDL uidl)
For internal use only.void
updateHeight()
For internal use only.void
updateMaxIndent()
For internal use only.void
updatePageLength()
Determines the pagelength when the table height is fixed.void
updatePageLength(UIDL uidl)
For internal use only.void
updateRowsInBody(UIDL partialRowUpdates)
For internal use only.void
updateSelectionProperties(UIDL uidl, AbstractComponentState state, boolean readOnly)
For internal use only.void
updateSortingProperties(UIDL uidl)
For internal use only.void
updateTotalRows(UIDL uidl)
For internal use only.void
updateWidth()
For internal use only.protected boolean
willHaveScrollbars()
Note: this method is not part of official API although declared as protected.-
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
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, resolvePotentialElement, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setWidth, sinkBitlessEvent, toString
-
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
-
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
-
-
-
-
Field Detail
-
STYLENAME
public static final String STYLENAME
- 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
-
showRowHeaders
public boolean showRowHeaders
For internal use only. May be removed or replaced in the future.
-
client
protected ApplicationConnection client
-
paintableId
public String paintableId
For internal use only. May be removed or replaced in the future.
-
immediate
public boolean immediate
For internal use only. May be removed or replaced in the future.
-
selectLastItemInNextRender
public boolean selectLastItemInNextRender
For internal use only. May be removed or replaced in the future.
-
selectFirstItemInNextRender
public boolean selectFirstItemInNextRender
For internal use only. May be removed or replaced in the future.
-
focusFirstItemInNextRender
public boolean focusFirstItemInNextRender
For internal use only. May be removed or replaced in the future.
-
focusLastItemInNextRender
public boolean focusLastItemInNextRender
For internal use only. May be removed or replaced in the future.
-
focusedRow
public VScrollTable.VScrollTableBody.VScrollTableRow focusedRow
The currently focused row.For internal use only. May be removed or replaced in the future.
-
selectionRangeStart
public VScrollTable.VScrollTableBody.VScrollTableRow selectionRangeStart
Helper to store selection range start in when using the keyboardFor internal use only. May be removed or replaced in the future.
-
selectionChanged
public boolean selectionChanged
Flag for notifying when the selection has changed and should be sent to the serverFor internal use only. May be removed or replaced in the future.
-
bodyActionKeys
public String[] bodyActionKeys
For internal use only. May be removed or replaced in the future.
-
initializedAndAttached
public boolean initializedAndAttached
For internal use only. May be removed or replaced in the future.
-
headerChangedDuringUpdate
public boolean headerChangedDuringUpdate
Flag to indicate if a column width recalculation is needed due update.For internal use only. May be removed or replaced in the future.
-
tHead
public final VScrollTable.TableHead tHead
For internal use only. May be removed or replaced in the future.
-
tFoot
public final VScrollTable.TableFooter tFoot
For internal use only. May be removed or replaced in the future.
-
scrollBodyPanel
public final VScrollTable.FocusableScrollContextPanel scrollBodyPanel
For internal use only. May be removed or replaced in the future.
-
totalRows
public int totalRows
For internal use only. May be removed or replaced in the future.
-
rowRequestHandler
public final VScrollTable.RowRequestHandler rowRequestHandler
For internal use only. May be removed or replaced in the future.
-
scrollBody
public VScrollTable.VScrollTableBody scrollBody
For internal use only. May be removed or replaced in the future.
-
enabled
public boolean enabled
For internal use only. May be removed or replaced in the future.
-
showColHeaders
public boolean showColHeaders
For internal use only. May be removed or replaced in the future.
-
showColFooters
public boolean showColFooters
For internal use only. May be removed or replaced in the future.
-
recalcWidths
public boolean recalcWidths
Read from the "recalcWidths" -attribute. When it is true, the table will recalculate the widths for columns - desirable in some cases. For #1983, marked experimental. See also variablerefreshContentWidths
in methodVScrollTable.TableHead.updateCellsFromUIDL(UIDL)
.For internal use only. May be removed or replaced in the future.
-
rendering
public boolean rendering
For internal use only. May be removed or replaced in the future.
-
tabIndex
public int tabIndex
For internal use only. May be removed or replaced in the future.
-
lastRenderedHeight
public int lastRenderedHeight
For internal use only. May be removed or replaced in the future.
-
serverCacheFirst
public int serverCacheFirst
Values (serverCacheFirst+serverCacheLast) sent by server that tells which rows (indexes) are in the server side cache (page buffer). -1 means unknown. The server side cache row MUST MATCH the client side cache rows. If the client side cache contains additional rows with e.g. buttons, it will cause out of sync when such a button is pressed. If the server side cache contains additional rows with e.g. buttons, scrolling in the client will cause empty buttons to be rendered (cached=true request for non-existing components) For internal use only. May be removed or replaced in the future.
-
serverCacheLast
public int serverCacheLast
-
postponeSanityCheckForLastRendered
public boolean postponeSanityCheckForLastRendered
In several cases TreeTable depends on the scrollBody.lastRendered being 'out of sync' while the update is being done. In those cases the sanity check must be performed afterwards.
-
sizeNeedsInit
public boolean sizeNeedsInit
For internal use only. May be removed or replaced in the future.
-
contextMenu
public VScrollTable.ContextMenuDetails contextMenu
For internal use only. May be removed or replaced in the future.
-
dropHandler
public VScrollTable.VScrollTableDropHandler dropHandler
For internal use only. May be removed or replaced in the future.
-
multiselectPending
public boolean multiselectPending
For internal use only. May be removed or replaced in the future.
-
collapsibleMenuContent
public CollapseMenuContent collapsibleMenuContent
For internal use only. May be removed or replaced in the future.
-
-
Method Detail
-
setStyleName
public void setStyleName(String style)
- Overrides:
setStyleName
in classcom.google.gwt.user.client.ui.UIObject
-
setStylePrimaryName
public void setStylePrimaryName(String style)
- Overrides:
setStylePrimaryName
in classcom.google.gwt.user.client.ui.UIObject
-
init
public void init(ApplicationConnection client)
-
sendSelectedRows
protected void sendSelectedRows()
Sends the selection to the server if changed since the last update/visit.
-
sendSelectedRows
protected void sendSelectedRows(boolean immediately)
Sends the selection to the server if it has been changed since the last update/visit.- Parameters:
immediately
- set to true to immediately send the rows
-
getNavigationUpKey
protected int getNavigationUpKey()
Get the key that moves the selection head upwards. By default it is the up arrow key but by overriding this you can change the key to whatever you want.- Returns:
- The keycode of the key
-
getNavigationDownKey
protected int getNavigationDownKey()
Get the key that moves the selection head downwards. By default it is the down arrow key but by overriding this you can change the key to whatever you want.- Returns:
- The keycode of the key
-
getNavigationLeftKey
protected int getNavigationLeftKey()
Get the key that scrolls to the left in the table. By default it is the left arrow key but by overriding this you can change the key to whatever you want.- Returns:
- The keycode of the key
-
getNavigationRightKey
protected int getNavigationRightKey()
Get the key that scroll to the right on the table. By default it is the right arrow key but by overriding this you can change the key to whatever you want.- Returns:
- The keycode of the key
-
getNavigationSelectKey
protected int getNavigationSelectKey()
Get the key that selects an item in the table. By default it is the space bar key but by overriding this you can change the key to whatever you want.- Returns:
-
getNavigationPageUpKey
protected int getNavigationPageUpKey()
Get the key the moves the selection one page up in the table. By default this is the Page Up key but by overriding this you can change the key to whatever you want.- Returns:
-
getNavigationPageDownKey
protected int getNavigationPageDownKey()
Get the key the moves the selection one page down in the table. By default this is the Page Down key but by overriding this you can change the key to whatever you want.- Returns:
-
getNavigationStartKey
protected int getNavigationStartKey()
Get the key the moves the selection to the beginning of the table. By default this is the Home key but by overriding this you can change the key to whatever you want.- Returns:
-
getNavigationEndKey
protected int getNavigationEndKey()
Get the key the moves the selection to the end of the table. By default this is the End key but by overriding this you can change the key to whatever you want.- Returns:
-
initializeRows
public void initializeRows(UIDL uidl, UIDL rowData)
For internal use only. May be removed or replaced in the future.
-
updateColumnProperties
public void updateColumnProperties(UIDL uidl)
For internal use only. May be removed or replaced in the future.
-
selectSelectedRows
public boolean selectSelectedRows(UIDL uidl)
For internal use only. May be removed or replaced in the future.
-
updateSortingProperties
public void updateSortingProperties(UIDL uidl)
For internal use only. May be removed or replaced in the future.
-
resizeSortedColumnForSortIndicator
public void resizeSortedColumnForSortIndicator()
For internal use only. May be removed or replaced in the future.
-
updateFirstVisibleAndScrollIfNeeded
public void updateFirstVisibleAndScrollIfNeeded(UIDL uidl)
For internal use only. May be removed or replaced in the future.
-
measureRowHeightOffset
protected int measureRowHeightOffset(int rowIx)
-
updatePageLength
public void updatePageLength(UIDL uidl)
For internal use only. May be removed or replaced in the future.
-
updateSelectionProperties
public void updateSelectionProperties(UIDL uidl, AbstractComponentState state, boolean readOnly)
For internal use only. May be removed or replaced in the future.
-
updateDragMode
public void updateDragMode(UIDL uidl)
For internal use only. May be removed or replaced in the future.
-
updateTotalRows
public void updateTotalRows(UIDL uidl)
For internal use only. May be removed or replaced in the future.
-
setTotalRows
protected void setTotalRows(int newTotalRows)
-
getTotalRows
public int getTotalRows()
-
getHierarchyColumnIndex
protected int getHierarchyColumnIndex()
This method exists for the needs ofVTreeTable
only. Not part of the official API, extend at your own risk. May be removed or replaced in the future.- Returns:
- index of TreeTable's hierarchy column, or -1 if not applicable
-
updateMaxIndent
public void updateMaxIndent()
For internal use only. May be removed or replaced in the future.
-
focusRowFromBody
public void focusRowFromBody()
For internal use only. May be removed or replaced in the future.
-
createScrollBody
protected VScrollTable.VScrollTableBody createScrollBody()
-
selectLastRenderedRowInViewPort
public void selectLastRenderedRowInViewPort(boolean focusOnly)
Selects the last row visible in the tableFor internal use only. May be removed or replaced in the future.
- Parameters:
focusOnly
- Should the focus only be moved to the last row
-
selectFirstRenderedRowInViewPort
public void selectFirstRenderedRowInViewPort(boolean focusOnly)
Selects the first row visible in the tableFor internal use only. May be removed or replaced in the future.
- Parameters:
focusOnly
- Should the focus only be moved to the first row
-
setCacheRateFromUIDL
public void setCacheRateFromUIDL(UIDL uidl)
For internal use only. May be removed or replaced in the future.
-
updateActionMap
public void updateActionMap(UIDL mainUidl)
For internal use only. May be removed or replaced in the future.
-
updateBody
public void updateBody(UIDL uidl, int firstRow, int reqRows)
For internal use only. May be removed or replaced in the future.- Parameters:
uidl
- which contains row datafirstRow
- first row in data setreqRows
- amount of rows in data set
-
updateRowsInBody
public void updateRowsInBody(UIDL partialRowUpdates)
For internal use only. May be removed or replaced in the future.
-
discardRowsOutsideCacheWindow
protected void discardRowsOutsideCacheWindow()
Updates the internal cache by unlinking rows that fall outside of the caching window.
-
addAndRemoveRows
public void addAndRemoveRows(UIDL partialRowAdditions)
Inserts rows in the table body or removes them from the table body based on the commands in the UIDL.For internal use only. May be removed or replaced in the future.
- Parameters:
partialRowAdditions
- the UIDL containing row updates.
-
isSelectable
public boolean isSelectable()
For internal use only. May be removed or replaced in the future.
-
setColWidth
protected void setColWidth(int colIndex, int w, boolean isDefinedWidth)
Note: not part of the official API, extend at your own risk. May be removed or replaced in the future. Sets the indicated column's width for headers and scrollBody alike.- Parameters:
colIndex
- index of the modified columnw
- new width (may be subject to modifications if doesn't meet minimum requirements)isDefinedWidth
- disables expand ratio if set true
-
getRenderedRowByKey
public VScrollTable.VScrollTableBody.VScrollTableRow getRenderedRowByKey(String key)
Get a rendered row by its key- Parameters:
key
- The key to search with- Returns:
-
reOrderColumn
protected void reOrderColumn(String columnKey, int newIndex)
-
onDetach
protected void onDetach()
- Overrides:
onDetach
in classcom.google.gwt.user.client.ui.Widget
-
onAttach
public void onAttach()
- Overrides:
onAttach
in classcom.google.gwt.user.client.ui.Widget
-
sizeInit
public void sizeInit()
Run only once when component is attached and received its initial content. This function: * Syncs headers and bodys "natural widths and saves the values. * Sets proper width and height * Makes deferred request to get some cache rows For internal use only. May be removed or replaced in the future.
-
willHaveScrollbars
protected boolean willHaveScrollbars()
Note: this method is not part of official API although declared as protected. Extend at your own risk.- Returns:
- true if content area will have scrollbars visible.
-
hideScrollPositionAnnotation
public void hideScrollPositionAnnotation()
For internal use only. May be removed or replaced in the future.
-
isScrollPositionVisible
public boolean isScrollPositionVisible()
For internal use only. May be removed or replaced in the future.
-
deselectAll
public void deselectAll()
Deselects all items
-
updatePageLength
public void updatePageLength()
Determines the pagelength when the table height is fixed.
-
updateWidth
public void updateWidth()
For internal use only. May be removed or replaced in the future.
-
setHeight
public void setHeight(String height)
- Overrides:
setHeight
in classcom.google.gwt.user.client.ui.UIObject
-
updateHeight
public void updateHeight()
For internal use only. May be removed or replaced in the future.
-
setVisible
public void setVisible(boolean visible)
- Specified by:
setVisible
in interfacecom.google.gwt.user.client.ui.HasVisibility
- Overrides:
setVisible
in classcom.google.gwt.user.client.ui.UIObject
-
buildCaptionHtmlSnippet
protected String buildCaptionHtmlSnippet(UIDL uidl)
Helper function to build html snippet for column or row headers- Parameters:
uidl
- possibly with values caption and icon- Returns:
- html snippet containing possibly an icon + caption text
-
onScroll
public void onScroll(com.google.gwt.event.dom.client.ScrollEvent event)
This method has logic which rows needs to be requested from server when user scrolls- Specified by:
onScroll
in interfacecom.google.gwt.event.dom.client.ScrollHandler
-
calcFirstRowInViewPort
protected int calcFirstRowInViewPort()
-
getDropHandler
public VScrollTable.VScrollTableDropHandler getDropHandler()
- Specified by:
getDropHandler
in interfaceVHasDropHandler
-
getFocusedRow
protected VScrollTable.VScrollTableBody.VScrollTableRow getFocusedRow()
-
setRowFocus
public boolean setRowFocus(VScrollTable.VScrollTableBody.VScrollTableRow row)
Moves the selection head to a specific row- Parameters:
row
- The row to where the selection head should move- Returns:
- Returns true if focus was moved successfully, else false
-
handleNavigation
protected boolean handleNavigation(int keycode, boolean ctrl, boolean shift)
Handles the keyboard events handled by the table- Parameters:
event
- The keyboard event received- Returns:
- true iff the navigation event was handled
-
onFocus
public void onFocus(com.google.gwt.event.dom.client.FocusEvent event)
- Specified by:
onFocus
in interfacecom.google.gwt.event.dom.client.FocusHandler
-
onBlur
public void onBlur(com.google.gwt.event.dom.client.BlurEvent event)
- Specified by:
onBlur
in interfacecom.google.gwt.event.dom.client.BlurHandler
-
isFocusable
public boolean isFocusable()
Can the Table be focused?- Returns:
- True if the table can be focused, else false
-
focus
public void focus()
Description copied from interface:Focusable
Sets focus to this widget.
-
setProperTabIndex
public void setProperTabIndex()
Sets the proper tabIndex for scrollBodyPanel (the focusable elemen in the component).If the component has no explicit tabIndex a zero is given (default tabbing order based on dom hierarchy) or -1 if the component does not need to gain focus. The component needs no focus if it has no scrollabars (not scrollable) and not selectable. Note that in the future shortcut actions may need focus.
For internal use only. May be removed or replaced in the future.
-
startScrollingVelocityTimer
public void startScrollingVelocityTimer()
-
cancelScrollingVelocityTimer
public void cancelScrollingVelocityTimer()
-
lazyRevertFocusToRow
public void lazyRevertFocusToRow(VScrollTable.VScrollTableBody.VScrollTableRow currentlyFocusedRow)
-
getActions
public Action[] getActions()
- Specified by:
getActions
in interfaceActionOwner
- Returns:
- Array of IActions
-
getClient
public ApplicationConnection getClient()
- Specified by:
getClient
in interfaceActionOwner
-
getPaintableId
public String getPaintableId()
- Specified by:
getPaintableId
in interfaceActionOwner
-
triggerLazyColumnAdjustment
public void triggerLazyColumnAdjustment(boolean now)
-
getWidgetForPaintable
public com.google.gwt.user.client.ui.Widget getWidgetForPaintable()
-
getSubPartElement
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
Description copied from interface:SubPartAware
Locates an element inside a component using the identifier provided insubPart
. ThesubPart
identifier is component specific and may be any string of characters, numbers, space characters and brackets.- Specified by:
getSubPartElement
in interfaceSubPartAware
- Parameters:
subPart
- The identifier for the element inside the component- Returns:
- The element identified by subPart or null if the element could not be found.
-
getSubPartName
public String getSubPartName(com.google.gwt.user.client.Element subElement)
Description copied from interface:SubPartAware
Provides an identifier that identifies the element within the component. ThesubElement
is a part of the component and must never be null.Note!
getSubPartElement(getSubPartName(element)) == element
is not always true. A component can choose to provide a more generic identifier for any given element if the results of all interactions withsubElement
are the same as interactions with the element identified by the return value. For example a button can return an identifier for the root element even though a DIV inside the button was passed assubElement
because interactions with the DIV and the root button element produce the same result.- Specified by:
getSubPartName
in interfaceSubPartAware
- Parameters:
subElement
- The element the identifier string should uniquely identify- Returns:
- An identifier that uniquely identifies
subElement
or null if no identifier could be provided.
-
onUnregister
public void onUnregister()
- Since:
- 7.2.6
-
isWorkPending
public boolean isWorkPending()
Description copied from interface:DeferredWorker
Checks whether there are operations pending for this widget or connector that must be executed before reaching a steady state.- Specified by:
isWorkPending
in interfaceDeferredWorker
-
getChildMeasurementHint
public HasChildMeasurementHintConnector.ChildMeasurementHint getChildMeasurementHint()
-
setChildMeasurementHint
public void setChildMeasurementHint(HasChildMeasurementHintConnector.ChildMeasurementHint hint)
-
-