Class CellTreeNodeView.NodeCellList<C>
java.lang.Object
com.google.gwt.user.cellview.client.CellTreeNodeView.NodeCellList<C>
- Type Parameters:
C- the child item type
- All Implemented Interfaces:
HasHandlers,HasCellPreviewHandlers<C>,HasData<C>,HasRows
- Enclosing class:
- CellTreeNodeView<T>
The
HasData used to show children. This
class is intentionally static because we might move it to a new
CellTreeNodeView, and we don't want non-static references to the
old CellTreeNodeView.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNodeCellList(TreeViewModel.NodeInfo<C> nodeInfo, CellTreeNodeView<?> nodeView, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptionaddCellPreviewHandler(CellPreviewEvent.Handler<C> handler) Adds aCellPreviewEventhandler.Add aRangeChangeEvent.Handler.Add aRowCountChangeEvent.Handler.voidcleanup()Cleanup this node view.voidFires the given event to the handlers listening to the event's type.intintGet the total count of all rows.SelectionModel<? super C>Get theSelectionModelused by thisHasData.getVisibleItem(int indexOnPage) Get the row value at the specified visible index.intGet the number of visible items being displayed.Get anIterablecomposed of all of the visible items.Get the range of visible rows.booleanCheck if the total row count is exact, or an estimate.final voidsetRowCount(int count) Set the exact total count of all rows.voidsetRowCount(int size, boolean isExact) Set the total count of all rows, specifying whether the count is exact or an estimate.voidsetRowData(int start, List<? extends C> values) Set a values associated with the rows in the visible range.voidsetSelectionModel(SelectionModel<? super C> selectionModel) Set theSelectionModelused by thisHasData.final voidsetVisibleRange(int start, int length) Set the visible range or rows.voidsetVisibleRange(Range range) Set the visible range or rows.voidsetVisibleRangeAndClearData(Range range, boolean forceRangeChangeEvent) Set the visible range and clear the current visible data.
-
Field Details
-
presenter
-
-
Constructor Details
-
NodeCellList
-
-
Method Details
-
addCellPreviewHandler
Description copied from interface:HasCellPreviewHandlersAdds aCellPreviewEventhandler.- Specified by:
addCellPreviewHandlerin interfaceHasCellPreviewHandlers<C>- Parameters:
handler- the handler- Returns:
- the registration for the event
-
addRangeChangeHandler
Description copied from interface:HasRowsAdd aRangeChangeEvent.Handler.- Specified by:
addRangeChangeHandlerin interfaceHasRows- Parameters:
handler- the handler- Returns:
- a
HandlerRegistrationto remove the handler
-
addRowCountChangeHandler
Description copied from interface:HasRowsAdd aRowCountChangeEvent.Handler.- Specified by:
addRowCountChangeHandlerin interfaceHasRows- Parameters:
handler- the handler- Returns:
- a
HandlerRegistrationto remove the handler
-
cleanup
public void cleanup()Cleanup this node view. -
getDefaultPageSize
public int getDefaultPageSize() -
getRowCount
public int getRowCount()Description copied from interface:HasRowsGet the total count of all rows.- Specified by:
getRowCountin interfaceHasRows- Returns:
- the total row count
- See Also:
-
getSelectionModel
Description copied from interface:HasDataGet theSelectionModelused by thisHasData.- Specified by:
getSelectionModelin interfaceHasData<C>- Returns:
- the
SelectionModel - See Also:
-
getVisibleItem
Description copied from interface:HasDataGet the row value at the specified visible index. Index 0 corresponds to the first item on the page.- Specified by:
getVisibleItemin interfaceHasData<C>- Parameters:
indexOnPage- the index on the page- Returns:
- the row value
-
getVisibleItemCount
public int getVisibleItemCount()Description copied from interface:HasDataGet 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.- Specified by:
getVisibleItemCountin interfaceHasData<C>- Returns:
- the number of visible items on the page
-
getVisibleItems
Description copied from interface:HasDataGet anIterablecomposed of all of the visible items.- Specified by:
getVisibleItemsin interfaceHasData<C>- Returns:
- an
Iterableinstance
-
getVisibleRange
Description copied from interface:HasRowsGet the range of visible rows.- Specified by:
getVisibleRangein interfaceHasRows- Returns:
- the visible range
- See Also:
-
isRowCountExact
public boolean isRowCountExact()Description copied from interface:HasRowsCheck if the total row count is exact, or an estimate.- Specified by:
isRowCountExactin interfaceHasRows- Returns:
- true if exact, false if an estimate
-
setRowCount
public final void setRowCount(int count) Description copied from interface:HasRowsSet the exact total count of all rows. This method defers toHasRows.setRowCount(int, boolean).- Specified by:
setRowCountin interfaceHasRows- Parameters:
count- the exact total count- See Also:
-
setRowCount
public void setRowCount(int size, boolean isExact) Description copied from interface:HasRowsSet the total count of all rows, specifying whether the count is exact or an estimate.- Specified by:
setRowCountin interfaceHasRows- Parameters:
size- the total countisExact- true if the count is exact, false if an estimate- See Also:
-
setRowData
Description copied from interface:HasDataSet 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 specified values. You must call
HasRows.setRowCount(int)to set the total number of rows in the display. You should also useHasRows.setRowCount(int)to remove rows when the total number of rows decreases.- Specified by:
setRowDatain interfaceHasData<C>- Parameters:
start- the start index of the datavalues- the values within the range
-
setSelectionModel
Description copied from interface:HasDataSet theSelectionModelused by thisHasData.- Specified by:
setSelectionModelin interfaceHasData<C>- Parameters:
selectionModel- theSelectionModel- See Also:
-
setVisibleRange
public final void setVisibleRange(int start, int length) Description copied from interface:HasRowsSet the visible range or rows. This method defers toHasRows.setVisibleRange(Range).- Specified by:
setVisibleRangein interfaceHasRows- Parameters:
start- the start indexlength- the length- See Also:
-
setVisibleRange
Description copied from interface:HasRowsSet the visible range or rows.- Specified by:
setVisibleRangein interfaceHasRows- Parameters:
range- the visible range- See Also:
-
setVisibleRangeAndClearData
Description copied from interface:HasDataSet the visible range and clear the current visible data.
If the second argument
forceRangeChangeEventis true, aRangeChangeEventwill be fired even if the range does not change. If false, aRangeChangeEventwill only be fired if the range changes.- Specified by:
setVisibleRangeAndClearDatain interfaceHasData<C>- Parameters:
range- the newRangeforceRangeChangeEvent- true to fire aRangeChangeEventeven if theRangedoesn't change
-