java.lang.Object | |||
↳ | com.google.gwt.user.client.ui.UIObject | ||
↳ | com.google.gwt.user.client.ui.Widget | ||
↳ | com.google.gwt.user.cellview.client.AbstractHasData<T> |
Known Direct Subclasses |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an
AbstractHasData with the given page size. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a
CellPreviewEvent handler. | |||||||||||
Add a
RangeChangeEvent.Handler . | |||||||||||
Add a
RowCountChangeEvent.Handler . | |||||||||||
Get the access key.
| |||||||||||
This method is deprecated.
use
getVisibleItem(int) instead
| |||||||||||
This method is deprecated.
use
getVisibleItems() instead
| |||||||||||
Return the key provider.
| |||||||||||
Return the range size.
| |||||||||||
Return the range start.
| |||||||||||
Return the outer element that contains all of the rendered row values.
| |||||||||||
Get the total count of all rows.
| |||||||||||
Get the
SelectionModel used by this HasData . | |||||||||||
Gets the widget's position in the tab index.
| |||||||||||
Get the row value at the specified visible index.
| |||||||||||
Get the number of visible items being displayed.
| |||||||||||
Return the row values that the widget is currently displaying as an
immutable list.
| |||||||||||
Get the range of visible rows.
| |||||||||||
Check if the total row count is exact, or an estimate.
| |||||||||||
Handle browser events.
| |||||||||||
Redraw the widget using the existing data.
| |||||||||||
Sets the widget's 'access key'.
| |||||||||||
Explicitly focus/unfocus this widget.
| |||||||||||
Set the number of rows per page and refresh the view.
| |||||||||||
Set the starting index of the current visible page.
| |||||||||||
Set the exact total count of all rows.
| |||||||||||
Set the total count of all rows, specifying whether the count is exact or
an estimate.
| |||||||||||
Set the complete list of values to display on one page. | |||||||||||
Set a values associated with the rows in the visible range. | |||||||||||
Set the
SelectionModel that defines which items are selected and
the CellPreviewEvent.Handler that
controls how user selection is handled. | |||||||||||
Set the
SelectionModel used by this HasData . | |||||||||||
Sets the widget's position in the tab index.
| |||||||||||
Set the visible range or rows.
| |||||||||||
Set the visible range or rows.
| |||||||||||
Set the visible range and clear the current visible data. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Check if a cell consumes the specified event type.
| |||||||||||
Check that the row is within the correct bounds.
| |||||||||||
Convert the specified HTML into DOM elements and return the parent of the
DOM elements.
| |||||||||||
Check whether or not the cells in the view depend on the selection state.
| |||||||||||
Return the element that holds the rendered cells.
| |||||||||||
Get the element that has keyboard selection.
| |||||||||||
Get the row index of the keyboard selected row.
| |||||||||||
Get the key for the specified value.
| |||||||||||
Check if keyboard navigation is being suppressed, such as when the user is
editing a cell.
| |||||||||||
Checks that the row is within bounds of the view.
| |||||||||||
Called when the widget is blurred.
| |||||||||||
Called after
onBrowserEvent(Event) completes. | |||||||||||
Called when the widget is focused.
| |||||||||||
This method is called immediately before a widget will be detached from the
browser's document.
| |||||||||||
This method is deprecated.
this method is never called by AbstractHasData, render the
selected styles in
renderRowValues(SafeHtmlBuilder, List, int, SelectionModel)
| |||||||||||
Render all row values into the specified
SafeHtmlBuilder . | |||||||||||
Replace all children with the specified html.
| |||||||||||
Convert the specified HTML into DOM elements and replace the existing
elements starting at the specified index.
| |||||||||||
Reset focus on the currently focused cell.
| |||||||||||
Make an element focusable or not.
| |||||||||||
Update an element to reflect its keyboard selected state.
| |||||||||||
This method is deprecated.
this method is never called by AbstractHasData, render the
selected styles in
renderRowValues(SafeHtmlBuilder, List, int, SelectionModel)
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.Widget
| |||||||||||
From class
com.google.gwt.user.client.ui.UIObject
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface com.google.gwt.event.logical.shared.HasAttachHandlers | |||||||||||
From interface com.google.gwt.event.shared.HasHandlers | |||||||||||
From interface
com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy
| |||||||||||
From interface
com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy
| |||||||||||
From interface
com.google.gwt.user.client.EventListener
| |||||||||||
From interface
com.google.gwt.user.client.ui.Focusable
| |||||||||||
From interface
com.google.gwt.user.client.ui.IsWidget
| |||||||||||
From interface
com.google.gwt.view.client.HasCellPreviewHandlers
| |||||||||||
From interface
com.google.gwt.view.client.HasData
| |||||||||||
From interface
com.google.gwt.view.client.HasKeyProvider
| |||||||||||
From interface
com.google.gwt.view.client.HasRows
|
Constructs an AbstractHasData
with the given page size.
elem | the parent Element |
---|---|
pageSize | the page size |
keyProvider | the key provider, or null |
Adds a CellPreviewEvent
handler.
handler | the handler |
---|
Add a RangeChangeEvent.Handler
.
handler | the handler |
---|
HandlerRegistration
to remove the handler
Add a RowCountChangeEvent.Handler
.
handler | the handler |
---|
HandlerRegistration
to remove the handler
This method is deprecated.
use getVisibleItem(int)
instead
Get the row value at the specified visible index. Index 0 corresponds to the first item on the page.
indexOnPage | the index on the page |
---|
This method is deprecated.
use getVisibleItems()
instead
Return the row values that the widget is currently displaying as an immutable list.
Return the range size.
Return the range start.
Return the outer element that contains all of the rendered row values. This
method delegates to getChildContainer()
;
Element
that contains the rendered row values
Get the total count of all rows.
Get the SelectionModel
used by this HasData
.
SelectionModel
Gets the widget's position in the tab index.
Get the row value at the specified visible index. Index 0 corresponds to the first item on the page.
indexOnPage | the index on the page |
---|
Get the number of visible items being displayed. Note that this value might be less than the page size if there is not enough data to fill the page.
Return the row values that the widget is currently displaying as an immutable list.
Check if the total row count is exact, or an estimate.
Handle browser events. Subclasses should override
onBrowserEvent2(Event)
if they want to extend browser event
handling.
event | the event received |
---|
Redraw the widget using the existing data.
Sets the widget's 'access key'. This key is used (in conjunction with a browser-specific modifier key) to automatically focus the widget.
key | the widget's access key |
---|
Explicitly focus/unfocus this widget. Only one widget can have focus at a time, and the widget that does will receive all keyboard events.
focused | whether this widget should take focus or release it |
---|
policy | the paging policy |
---|
policy | the selection policy |
---|
Set the number of rows per page and refresh the view.
pageSize | the page size |
---|
Set the starting index of the current visible page. The actual page start will be clamped in the range [0, getSize() - 1].
pageStart | the index of the row that should appear at the start of the page |
---|
Set the exact total count of all rows. This method defers to
setRowCount(int, boolean)
.
count | the exact total count |
---|
Set the total count of all rows, specifying whether the count is exact or an estimate.
size | the total count |
---|---|
isExact | true if the count is exact, false if an estimate |
Set the complete list of values to display on one page.
Equivalent to calling setRowCount(int)
with the length of the list
of values, setVisibleRange(Range)
from 0 to the size of the list
of values, and setRowData(int, List)
with a start of 0 and the
specified list of values.
Set a values associated with the rows in the visible range.
This method does not replace all rows in the display; it replaces
the row values starting at the specified start index through the length of
the the specified values. You must call setRowCount(int)
to set
the total number of rows in the display. You should also use
setRowCount(int)
to remove rows when the total number of rows
decreases.
start | the start index of the data |
---|---|
values | the values within the range |
Set the SelectionModel
that defines which items are selected and
the CellPreviewEvent.Handler
that
controls how user selection is handled.
selectionModel | the SelectionModel that defines selection |
---|---|
selectionEventManager | the handler that controls user selection |
Set the SelectionModel
used by this HasData
.
selectionModel | the SelectionModel |
---|
Sets the widget's position in the tab index. If more than one widget has
the same tab index, each such widget will receive focus in an arbitrary
order. Setting the tab index to -1
will cause this widget to
be removed from the tab order.
index | the widget's tab index |
---|
Set the visible range or rows.
range | the visible range |
---|
Set the visible range or rows. This method defers to
setVisibleRange(Range)
.
start | the start index |
---|---|
length | the length |
Set the visible range and clear the current visible data.
If the second argument forceRangeChangeEvent
is true, a
RangeChangeEvent
will be fired even if the range does not change.
If false, a RangeChangeEvent
will only be fired if the range
changes.
range | the new Range |
---|---|
forceRangeChangeEvent | true to fire a RangeChangeEvent even
if the Range doesn't change
|
Check if a cell consumes the specified event type.
cell | the cell |
---|---|
eventType | the event type to check |
Check that the row is within the correct bounds.
row | row index to check |
---|
IndexOutOfBoundsException |
---|
Convert the specified HTML into DOM elements and return the parent of the DOM elements.
html | the HTML to convert |
---|
Check whether or not the cells in the view depend on the selection state.
Return the element that holds the rendered cells.
Element
Get the element that has keyboard selection.
Get the row index of the keyboard selected row.
Get the key for the specified value.
value | the value |
---|
Check if keyboard navigation is being suppressed, such as when the user is editing a cell.
Checks that the row is within bounds of the view.
row | row index to check |
---|
Called when the widget is blurred.
Called after onBrowserEvent(Event)
completes.
event | the event that was fired |
---|
Called when the widget is focused.
This method is called immediately before a widget will be detached from the browser's document.
This method is deprecated.
this method is never called by AbstractHasData, render the
selected styles in
renderRowValues(SafeHtmlBuilder, List, int, SelectionModel)
Called when selection changes.
Render all row values into the specified SafeHtmlBuilder
.
sb | the SafeHtmlBuilder to render into |
---|---|
values | the row values |
start | the absolute start index of the values |
selectionModel | the SelectionModel
|
Replace all children with the specified html.
values | the values of the new children |
---|---|
html | the html to render in the child |
Convert the specified HTML into DOM elements and replace the existing elements starting at the specified index. If the number of children specified exceeds the existing number of children, the remaining children should be appended.
values | the values of the new children |
---|---|
start | the start index to be replaced, relative to the page start |
html | the HTML to convert |
Reset focus on the currently focused cell.
Make an element focusable or not.
elem | the element |
---|---|
focusable | true to make focusable, false to make unfocusable |
Update an element to reflect its keyboard selected state.
index | the index of the element |
---|---|
selected | true if selected, false if not |
stealFocus | true if the row should steal focus, false if not |
This method is deprecated.
this method is never called by AbstractHasData, render the
selected styles in
renderRowValues(SafeHtmlBuilder, List, int, SelectionModel)
Update an element to reflect its selected state.
elem | the element to update |
---|---|
selected | true if selected, false if not |