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
-
Constructor Summary
ConstructorDescriptionNodeCellList
(TreeViewModel.NodeInfo<C> nodeInfo, CellTreeNodeView<?> nodeView, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptionaddCellPreviewHandler
(CellPreviewEvent.Handler<C> handler) Adds aCellPreviewEvent
handler.Add aRangeChangeEvent.Handler
.Add aRowCountChangeEvent.Handler
.void
cleanup()
Cleanup this node view.void
Fires the given event to the handlers listening to the event's type.int
int
Get the total count of all rows.SelectionModel
<? super C> Get theSelectionModel
used by thisHasData
.getVisibleItem
(int indexOnPage) Get the row value at the specified visible index.int
Get the number of visible items being displayed.Get anIterable
composed of all of the visible items.Get the range of visible rows.boolean
Check if the total row count is exact, or an estimate.final void
setRowCount
(int count) Set the exact total count of all rows.void
setRowCount
(int size, boolean isExact) Set the total count of all rows, specifying whether the count is exact or an estimate.void
setRowData
(int start, List<? extends C> values) Set a values associated with the rows in the visible range.void
setSelectionModel
(SelectionModel<? super C> selectionModel) Set theSelectionModel
used by thisHasData
.final void
setVisibleRange
(int start, int length) Set the visible range or rows.void
setVisibleRange
(Range range) Set the visible range or rows.void
setVisibleRangeAndClearData
(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:HasCellPreviewHandlers
Adds aCellPreviewEvent
handler.- Specified by:
addCellPreviewHandler
in interfaceHasCellPreviewHandlers<C>
- Parameters:
handler
- the handler- Returns:
- the registration for the event
-
addRangeChangeHandler
Description copied from interface:HasRows
Add aRangeChangeEvent.Handler
.- Specified by:
addRangeChangeHandler
in interfaceHasRows
- Parameters:
handler
- the handler- Returns:
- a
HandlerRegistration
to remove the handler
-
addRowCountChangeHandler
Description copied from interface:HasRows
Add aRowCountChangeEvent.Handler
.- Specified by:
addRowCountChangeHandler
in interfaceHasRows
- Parameters:
handler
- the handler- Returns:
- a
HandlerRegistration
to remove the handler
-
cleanup
public void cleanup()Cleanup this node view. -
getDefaultPageSize
public int getDefaultPageSize() -
getRowCount
public int getRowCount()Description copied from interface:HasRows
Get the total count of all rows.- Specified by:
getRowCount
in interfaceHasRows
- Returns:
- the total row count
- See Also:
-
getSelectionModel
Description copied from interface:HasData
Get theSelectionModel
used by thisHasData
.- Specified by:
getSelectionModel
in interfaceHasData<C>
- Returns:
- the
SelectionModel
- See Also:
-
getVisibleItem
Description copied from interface:HasData
Get the row value at the specified visible index. Index 0 corresponds to the first item on the page.- Specified by:
getVisibleItem
in interfaceHasData<C>
- Parameters:
indexOnPage
- the index on the page- Returns:
- the row value
-
getVisibleItemCount
public int getVisibleItemCount()Description copied from interface:HasData
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.- Specified by:
getVisibleItemCount
in interfaceHasData<C>
- Returns:
- the number of visible items on the page
-
getVisibleItems
Description copied from interface:HasData
Get anIterable
composed of all of the visible items.- Specified by:
getVisibleItems
in interfaceHasData<C>
- Returns:
- an
Iterable
instance
-
getVisibleRange
Description copied from interface:HasRows
Get the range of visible rows.- Specified by:
getVisibleRange
in interfaceHasRows
- Returns:
- the visible range
- See Also:
-
isRowCountExact
public boolean isRowCountExact()Description copied from interface:HasRows
Check if the total row count is exact, or an estimate.- Specified by:
isRowCountExact
in interfaceHasRows
- Returns:
- true if exact, false if an estimate
-
setRowCount
public final void setRowCount(int count) Description copied from interface:HasRows
Set the exact total count of all rows. This method defers toHasRows.setRowCount(int, boolean)
.- Specified by:
setRowCount
in interfaceHasRows
- Parameters:
count
- the exact total count- See Also:
-
setRowCount
public void setRowCount(int size, boolean isExact) Description copied from interface:HasRows
Set the total count of all rows, specifying whether the count is exact or an estimate.- Specified by:
setRowCount
in interfaceHasRows
- Parameters:
size
- the total countisExact
- true if the count is exact, false if an estimate- See Also:
-
setRowData
Description copied from interface:HasData
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 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:
setRowData
in interfaceHasData<C>
- Parameters:
start
- the start index of the datavalues
- the values within the range
-
setSelectionModel
Description copied from interface:HasData
Set theSelectionModel
used by thisHasData
.- Specified by:
setSelectionModel
in interfaceHasData<C>
- Parameters:
selectionModel
- theSelectionModel
- See Also:
-
setVisibleRange
public final void setVisibleRange(int start, int length) Description copied from interface:HasRows
Set the visible range or rows. This method defers toHasRows.setVisibleRange(Range)
.- Specified by:
setVisibleRange
in interfaceHasRows
- Parameters:
start
- the start indexlength
- the length- See Also:
-
setVisibleRange
Description copied from interface:HasRows
Set the visible range or rows.- Specified by:
setVisibleRange
in interfaceHasRows
- Parameters:
range
- the visible range- See Also:
-
setVisibleRangeAndClearData
Description copied from interface:HasData
Set the visible range and clear the current visible data.
If the second argument
forceRangeChangeEvent
is true, aRangeChangeEvent
will be fired even if the range does not change. If false, aRangeChangeEvent
will only be fired if the range changes.- Specified by:
setVisibleRangeAndClearData
in interfaceHasData<C>
- Parameters:
range
- the newRange
forceRangeChangeEvent
- true to fire aRangeChangeEvent
even if theRange
doesn't change
-