Interface HasDataPresenter.View<T>
- Type Parameters:
T
- the data type
- Enclosing class:
HasDataPresenter<T>
static interface HasDataPresenter.View<T>
The view that this presenter presents.
-
Method Summary
Modifier and TypeMethodDescription<H extends EventHandler>
HandlerRegistrationaddHandler
(H handler, GwtEvent.Type<H> type) Add a handler to the view.void
replaceAllChildren
(List<T> values, SelectionModel<? super T> selectionModel, boolean stealFocus) Replace all children with the specified values.void
replaceChildren
(List<T> values, int start, SelectionModel<? super T> selectionModel, boolean stealFocus) Replace existing elements starting at the specified index.void
Re-establish focus on an element within the view if the view already had focus.void
setKeyboardSelected
(int index, boolean selected, boolean stealFocus) Update an element to reflect its keyboard selected state.void
Set the current loading state of the data.
-
Method Details
-
replaceAllChildren
void replaceAllChildren(List<T> values, SelectionModel<? super T> selectionModel, boolean stealFocus) Replace all children with the specified values.- Parameters:
values
- the values of the new childrenselectionModel
- theSelectionModel
stealFocus
- true if the row should steal focus, false if not
-
replaceChildren
void replaceChildren(List<T> values, int start, SelectionModel<? super T> selectionModel, boolean stealFocus) Replace 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.- Parameters:
values
- the values of the new childrenstart
- the start index to be replaced, relative to the pageStartselectionModel
- theSelectionModel
stealFocus
- true if the row should steal focus, false if not
-
resetFocus
void resetFocus()Re-establish focus on an element within the view if the view already had focus. -
setKeyboardSelected
void setKeyboardSelected(int index, boolean selected, boolean stealFocus) Update an element to reflect its keyboard selected state.- Parameters:
index
- the index of the element relative to page startselected
- true if selected, false if notstealFocus
- true if the row should steal focus, false if not
-
setLoadingState
Set the current loading state of the data.- Parameters:
state
- the loading state