public class VScrollTablePatched
extends com.google.gwt.user.client.ui.FlowPanel
implements com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.event.dom.client.ScrollHandler, com.vaadin.client.ui.dd.VHasDropHandler, com.google.gwt.event.dom.client.FocusHandler, com.google.gwt.event.dom.client.BlurHandler, com.vaadin.client.Focusable, com.vaadin.client.ui.ActionOwner, com.vaadin.client.ui.SubPartAware, com.vaadin.client.DeferredWorker
Modifier and Type | Class and Description |
---|---|
class |
VScrollTablePatched.ContextMenuDetails
Used to recall the position of an open context menu if we need to close
and reopen it during a row update.
|
class |
VScrollTablePatched.FocusableScrollContextPanel
For internal use only.
|
class |
VScrollTablePatched.FooterCell
A cell in the footer
|
class |
VScrollTablePatched.HeaderCell |
class |
VScrollTablePatched.RowHeadersFooterCell
HeaderCell that is header cell for row headers.
|
class |
VScrollTablePatched.RowHeadersHeaderCell
HeaderCell that is header cell for row headers.
|
class |
VScrollTablePatched.RowRequestHandler
For internal use only.
|
static class |
VScrollTablePatched.SelectMode |
class |
VScrollTablePatched.TableFooter
The footer of the table which can be seen in the bottom of the Table.
|
class |
VScrollTablePatched.TableHead |
class |
VScrollTablePatched.VScrollTableBody
This Panel can only contain VScrollTableRow type of widgets.
|
class |
VScrollTablePatched.VScrollTableDropHandler |
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
Modifier and Type | Field and Description |
---|---|
static char |
ALIGN_CENTER |
static char |
ALIGN_LEFT |
static char |
ALIGN_RIGHT |
String[] |
bodyActionKeys
For internal use only.
|
protected com.vaadin.client.ApplicationConnection |
client |
com.vaadin.shared.ui.table.CollapseMenuContent |
collapsibleMenuContent
For internal use only.
|
VScrollTablePatched.ContextMenuDetails |
contextMenu
For internal use only.
|
VScrollTablePatched.VScrollTableDropHandler |
dropHandler
For internal use only.
|
boolean |
enabled
For internal use only.
|
VScrollTablePatched.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.
|
protected int |
multiselectmode |
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.
|
VScrollTablePatched.RowRequestHandler |
rowRequestHandler
For internal use only.
|
VScrollTablePatched.VScrollTableBody |
scrollBody
For internal use only.
|
VScrollTablePatched.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 server
For internal use only.
|
VScrollTablePatched.VScrollTableBody.VScrollTableRow |
selectionRangeStart
Helper to store selection range start in when using the keyboard
For internal use only.
|
boolean |
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). -1 means
unknown.
|
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.
|
VScrollTablePatched.TableFooter |
tFoot
For internal use only.
|
VScrollTablePatched.TableHead |
tHead
For internal use only.
|
int |
totalRows
For internal use only.
|
Constructor and Description |
---|
VScrollTablePatched() |
Modifier and Type | Method and Description |
---|---|
void |
addAndRemoveRows(com.vaadin.client.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(com.vaadin.client.UIDL uidl)
Helper function to build html snippet for column or row headers
|
protected int |
calcFirstRowInViewPort() |
void |
cancelScrollingVelocityTimer() |
protected VScrollTablePatched.HeaderCell |
createHeaderCell(String colId,
String headerText) |
protected VScrollTablePatched.VScrollTableBody |
createScrollBody() |
protected VScrollTablePatched.TableHead |
createTableHead() |
void |
deselectAll()
Deselects all items
|
protected void |
discardRowsOutsideCacheWindow()
Updates the internal cache by unlinking rows that fall outside of the
caching window.
|
void |
focus() |
void |
focusRowFromBody()
For internal use only.
|
String |
getActionCaption(String actionKey) |
String |
getActionIcon(String actionKey) |
com.vaadin.client.ui.Action[] |
getActions() |
com.vaadin.client.HasChildMeasurementHintConnector.ChildMeasurementHint |
getChildMeasurementHint() |
com.vaadin.client.ApplicationConnection |
getClient() |
VScrollTablePatched.VScrollTableDropHandler |
getDropHandler() |
protected VScrollTablePatched.VScrollTableBody.VScrollTableRow |
getFocusedRow() |
protected int |
getHierarchyColumnIndex()
This method exists for the needs of
VTreeTable 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() |
VScrollTablePatched.VScrollTableBody.VScrollTableRow |
getRenderedRowByKey(String key)
Get a rendered row by its key
|
com.google.gwt.user.client.Element |
getSubPartElement(String subPart) |
String |
getSubPartName(com.google.gwt.user.client.Element subElement) |
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 table
|
void |
hideScrollPositionAnnotation()
For internal use only.
|
void |
init(com.vaadin.client.ApplicationConnection client) |
void |
initializeRows(com.vaadin.client.UIDL uidl,
com.vaadin.client.UIDL rowData)
For internal use only.
|
boolean |
isFocusable()
Can the Table be focused?
|
protected boolean |
isMultiSelectModeAny() |
protected boolean |
isMultiSelectModeDefault() |
protected boolean |
isMultiSelectModeSimple() |
boolean |
isScrollPositionVisible()
For internal use only.
|
boolean |
isSelectable()
For internal use only.
|
protected boolean |
isSingleSelectMode() |
boolean |
isVisibleInHierarchy() |
boolean |
isWorkPending() |
void |
lazyRevertFocusToRow(VScrollTablePatched.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 scrolls
|
void |
onUnregister() |
void |
removeRowFromUnsentSelectionRanges(VScrollTablePatched.VScrollTableBody.VScrollTableRow row)
Removes a key from a range if the key is found in a selected range
|
protected void |
reOrderColumn(String columnKey,
int newIndex) |
void |
resizeSortedColumnForSortIndicator()
For internal use only.
|
void |
selectFirstRenderedRowInViewPort(boolean focusOnly)
Selects the first row visible in the table
For internal use only.
|
void |
selectLastRenderedRowInViewPort(boolean focusOnly)
Selects the last row visible in the table
For internal use only.
|
boolean |
selectSelectedRows(com.vaadin.client.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(com.vaadin.client.UIDL uidl)
For internal use only.
|
void |
setChildMeasurementHint(com.vaadin.client.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) |
protected void |
setMultiSelectMode(int multiselectmode) |
void |
setProperTabIndex()
Sets the proper tabIndex for scrollBodyPanel (the focusable elemen in the
component).
|
boolean |
setRowFocus(VScrollTablePatched.VScrollTableBody.VScrollTableRow row)
Moves the selection head to a specific row
|
void |
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(com.vaadin.client.UIDL mainUidl)
For internal use only.
|
void |
updateBody(com.vaadin.client.UIDL uidl,
int firstRow,
int reqRows)
For internal use only.
|
void |
updateColumnProperties(com.vaadin.client.UIDL uidl)
For internal use only.
|
void |
updateDragMode(com.vaadin.client.UIDL uidl)
For internal use only.
|
void |
updateFirstVisibleAndScrollIfNeeded(com.vaadin.client.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(com.vaadin.client.UIDL uidl)
For internal use only.
|
void |
updateRowsInBody(com.vaadin.client.UIDL partialRowUpdates)
For internal use only.
|
void |
updateSelectionProperties(com.vaadin.client.UIDL uidl,
com.vaadin.shared.AbstractComponentState state,
boolean readOnly)
For internal use only.
|
void |
updateSortingProperties(com.vaadin.client.UIDL uidl)
For internal use only.
|
void |
updateTotalRows(com.vaadin.client.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.
|
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
add, adopt, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, clear, iterator, remove
forEach, spliterator
public static final String STYLENAME
public static final char ALIGN_CENTER
public static final char ALIGN_LEFT
public static final char ALIGN_RIGHT
public boolean showRowHeaders
protected com.vaadin.client.ApplicationConnection client
public String paintableId
public boolean immediate
public boolean selectLastItemInNextRender
public boolean selectFirstItemInNextRender
public boolean focusFirstItemInNextRender
public boolean focusLastItemInNextRender
public VScrollTablePatched.VScrollTableBody.VScrollTableRow focusedRow
For internal use only. May be removed or replaced in the future.
public VScrollTablePatched.VScrollTableBody.VScrollTableRow selectionRangeStart
For internal use only. May be removed or replaced in the future.
public boolean selectionChanged
For internal use only. May be removed or replaced in the future.
public String[] bodyActionKeys
public boolean initializedAndAttached
public boolean headerChangedDuringUpdate
For internal use only. May be removed or replaced in the future.
public final VScrollTablePatched.TableHead tHead
public final VScrollTablePatched.TableFooter tFoot
public final VScrollTablePatched.FocusableScrollContextPanel scrollBodyPanel
public int totalRows
public final VScrollTablePatched.RowRequestHandler rowRequestHandler
public VScrollTablePatched.VScrollTableBody scrollBody
public boolean enabled
public boolean showColHeaders
public boolean showColFooters
public boolean recalcWidths
refreshContentWidths
in method VScrollTablePatched.TableHead.updateCellsFromUIDL(UIDL)
.
For internal use only. May be removed or replaced in the future.
public boolean rendering
protected int multiselectmode
public int tabIndex
public int lastRenderedHeight
public int serverCacheFirst
public int serverCacheLast
public boolean postponeSanityCheckForLastRendered
public boolean sizeNeedsInit
public VScrollTablePatched.ContextMenuDetails contextMenu
public VScrollTablePatched.VScrollTableDropHandler dropHandler
public boolean multiselectPending
public com.vaadin.shared.ui.table.CollapseMenuContent collapsibleMenuContent
protected VScrollTablePatched.TableHead createTableHead()
protected VScrollTablePatched.HeaderCell createHeaderCell(String colId, String headerText)
public boolean isVisibleInHierarchy()
public void setStyleName(String style)
setStyleName
in class com.google.gwt.user.client.ui.UIObject
public void setStylePrimaryName(String style)
setStylePrimaryName
in class com.google.gwt.user.client.ui.UIObject
public void init(com.vaadin.client.ApplicationConnection client)
protected void sendSelectedRows()
protected void sendSelectedRows(boolean immediately)
immediately
- set to true to immediately send the rowsprotected int getNavigationUpKey()
protected int getNavigationDownKey()
protected int getNavigationLeftKey()
protected int getNavigationRightKey()
protected int getNavigationSelectKey()
protected int getNavigationPageUpKey()
protected int getNavigationPageDownKey()
protected int getNavigationStartKey()
protected int getNavigationEndKey()
public void initializeRows(com.vaadin.client.UIDL uidl, com.vaadin.client.UIDL rowData)
public void updateColumnProperties(com.vaadin.client.UIDL uidl)
public boolean selectSelectedRows(com.vaadin.client.UIDL uidl)
public void updateSortingProperties(com.vaadin.client.UIDL uidl)
public void resizeSortedColumnForSortIndicator()
public void updateFirstVisibleAndScrollIfNeeded(com.vaadin.client.UIDL uidl)
protected int measureRowHeightOffset(int rowIx)
public void updatePageLength(com.vaadin.client.UIDL uidl)
public void updateSelectionProperties(com.vaadin.client.UIDL uidl, com.vaadin.shared.AbstractComponentState state, boolean readOnly)
public void updateDragMode(com.vaadin.client.UIDL uidl)
public void updateTotalRows(com.vaadin.client.UIDL uidl)
protected void setTotalRows(int newTotalRows)
public int getTotalRows()
protected int getHierarchyColumnIndex()
VTreeTable
only. Not part of
the official API, extend at your own risk. May be removed or
replaced in the future.public void updateMaxIndent()
public void focusRowFromBody()
protected VScrollTablePatched.VScrollTableBody createScrollBody()
public void selectLastRenderedRowInViewPort(boolean focusOnly)
For internal use only. May be removed or replaced in the future.
focusOnly
- Should the focus only be moved to the last rowpublic void selectFirstRenderedRowInViewPort(boolean focusOnly)
For internal use only. May be removed or replaced in the future.
focusOnly
- Should the focus only be moved to the first rowpublic void setCacheRateFromUIDL(com.vaadin.client.UIDL uidl)
public void updateActionMap(com.vaadin.client.UIDL mainUidl)
public void updateBody(com.vaadin.client.UIDL uidl, int firstRow, int reqRows)
uidl
- which contains row datafirstRow
- first row in data setreqRows
- amount of rows in data setpublic void updateRowsInBody(com.vaadin.client.UIDL partialRowUpdates)
protected void discardRowsOutsideCacheWindow()
public void addAndRemoveRows(com.vaadin.client.UIDL partialRowAdditions)
For internal use only. May be removed or replaced in the future.
partialRowAdditions
- the UIDL containing row updates.protected boolean isMultiSelectModeSimple()
protected boolean isSingleSelectMode()
protected boolean isMultiSelectModeAny()
protected boolean isMultiSelectModeDefault()
protected void setMultiSelectMode(int multiselectmode)
public boolean isSelectable()
protected void setColWidth(int colIndex, int w, boolean isDefinedWidth)
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 truepublic VScrollTablePatched.VScrollTableBody.VScrollTableRow getRenderedRowByKey(String key)
key
- The key to search withprotected void reOrderColumn(String columnKey, int newIndex)
protected void onDetach()
onDetach
in class com.google.gwt.user.client.ui.Widget
public void onAttach()
onAttach
in class com.google.gwt.user.client.ui.Widget
public void sizeInit()
protected boolean willHaveScrollbars()
public void hideScrollPositionAnnotation()
public boolean isScrollPositionVisible()
public void deselectAll()
public void updatePageLength()
public void updateWidth()
public void setHeight(String height)
setHeight
in class com.google.gwt.user.client.ui.UIObject
public void updateHeight()
public void setVisible(boolean visible)
setVisible
in interface com.google.gwt.user.client.ui.HasVisibility
setVisible
in class com.google.gwt.user.client.ui.UIObject
protected String buildCaptionHtmlSnippet(com.vaadin.client.UIDL uidl)
uidl
- possibly with values caption and iconpublic void onScroll(com.google.gwt.event.dom.client.ScrollEvent event)
onScroll
in interface com.google.gwt.event.dom.client.ScrollHandler
protected int calcFirstRowInViewPort()
public VScrollTablePatched.VScrollTableDropHandler getDropHandler()
getDropHandler
in interface com.vaadin.client.ui.dd.VHasDropHandler
protected VScrollTablePatched.VScrollTableBody.VScrollTableRow getFocusedRow()
public boolean setRowFocus(VScrollTablePatched.VScrollTableBody.VScrollTableRow row)
row
- The row to where the selection head should moveprotected boolean handleNavigation(int keycode, boolean ctrl, boolean shift)
event
- The keyboard event receivedpublic void onFocus(com.google.gwt.event.dom.client.FocusEvent event)
onFocus
in interface com.google.gwt.event.dom.client.FocusHandler
public void onBlur(com.google.gwt.event.dom.client.BlurEvent event)
onBlur
in interface com.google.gwt.event.dom.client.BlurHandler
public void removeRowFromUnsentSelectionRanges(VScrollTablePatched.VScrollTableBody.VScrollTableRow row)
key
- The key to removepublic boolean isFocusable()
public void focus()
focus
in interface com.vaadin.client.Focusable
public void setProperTabIndex()
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.
public void startScrollingVelocityTimer()
public void cancelScrollingVelocityTimer()
public void lazyRevertFocusToRow(VScrollTablePatched.VScrollTableBody.VScrollTableRow currentlyFocusedRow)
public com.vaadin.client.ui.Action[] getActions()
getActions
in interface com.vaadin.client.ui.ActionOwner
public com.vaadin.client.ApplicationConnection getClient()
getClient
in interface com.vaadin.client.ui.ActionOwner
public String getPaintableId()
getPaintableId
in interface com.vaadin.client.ui.ActionOwner
public void triggerLazyColumnAdjustment(boolean now)
public com.google.gwt.user.client.ui.Widget getWidgetForPaintable()
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
getSubPartElement
in interface com.vaadin.client.ui.SubPartAware
public String getSubPartName(com.google.gwt.user.client.Element subElement)
getSubPartName
in interface com.vaadin.client.ui.SubPartAware
public void onUnregister()
public boolean isWorkPending()
isWorkPending
in interface com.vaadin.client.DeferredWorker
public com.vaadin.client.HasChildMeasurementHintConnector.ChildMeasurementHint getChildMeasurementHint()
public void setChildMeasurementHint(com.vaadin.client.HasChildMeasurementHintConnector.ChildMeasurementHint hint)
Copyright © 2016 Magnolia International Ltd.. All rights reserved.