M
- the model typepublic class GroupingView<M> extends GridView<M> implements CollapseItemEvent.HasCollapseItemHandlers<List<M>>, ExpandItemEvent.HasExpandItemHandlers<List<M>>
GridView
that groups data based on a given grouping column.Modifier and Type | Class and Description |
---|---|
static class |
GroupingView.GroupingData<M>
Wrapper describing a given group, with the items in the group, and the value they hold in common.
|
static interface |
GroupingView.GroupingViewAppearance |
static interface |
GroupingView.GroupingViewStyle |
static interface |
GroupingView.GroupSummaryTemplate<M> |
GridView.GridAppearance, GridView.GridStateStyles, GridView.GridStyles, GridView.GridTemplates
Constructor and Description |
---|
GroupingView()
Creates a new grouping view instance.
|
GroupingView(GridView.GridAppearance appearance,
GroupingView.GroupingViewAppearance groupingAppearance)
Creates a new grouping view instance.
|
GroupingView(GroupingView.GroupingViewAppearance groupAppearance)
Creates a new grouping view instance.
|
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addCollapseHandler(CollapseItemEvent.CollapseItemHandler<List<M>> handler)
Adds a
CollapseItemEvent.CollapseItemHandler handler for CollapseItemEvent
events. |
HandlerRegistration |
addExpandHandler(ExpandItemEvent.ExpandItemHandler<List<M>> handler)
Adds a
ExpandItemEvent.ExpandItemHandler handler for ExpandItemEvent events. |
void |
collapseAllGroups()
Collapses all groups.
|
void |
expandAllGroups()
Expands all groups.
|
GroupingView.GroupingViewAppearance |
getGroupingAppearance()
Returns the grouping view appearance.
|
Store.StoreSortInfo<M> |
getSortState()
Returns the grid's sort information.
|
void |
groupBy(ColumnConfig<M,?> column) |
boolean |
isEnabledNoGroups()
Returns true if the user can turn off grouping.
|
boolean |
isEnableGroupingMenu()
Returns true if the grouping menu is enabled.
|
boolean |
isExpanded(Element group)
Returns true if the group is expanded.
|
boolean |
isShowGroupedColumn()
Returns true if the grouped column is visible.
|
boolean |
isStartCollapsed()
Returns true if start collapsed is enabled.
|
void |
setEnableGroupingMenu(boolean enableGroupingMenu)
True to enable the the grouping menu items in the header context menu (defaults to true).
|
void |
setEnableNoGroups(boolean enableNoGroups)
True to enable the no groups menu item in the header context menu (defaults to true).
|
void |
setShowGroupedColumn(boolean showGroupedColumn)
Sets whether the grouped column is visible (defaults to true).
|
void |
setStartCollapsed(boolean startCollapsed)
Sets whether the groups should start collapsed (defaults to false).
|
void |
toggleAllGroups(boolean expanded)
Toggles all groups.
|
addHandler, ensureVisible, ensureVisible, findCell, findCellIndex, findRow, findRowIndex, fireEvent, focus, focusCell, focusRow, getAppearance, getAutoExpandColumn, getAutoExpandMax, getAutoExpandMin, getBody, getCell, getEditorParent, getEmptyText, getHeader, getRow, getRow, getRowBody, getRowBodyRowSpan, getScroller, getScrollState, getStateStyles, getViewConfig, isAdjustForHScroll, isAutoFill, isColumnLines, isDeferUpdates, isEnableRowBody, isForceFit, isSelectableTarget, isShowDirtyCells, isSortingEnabled, isStripeRows, isTrackMouseOver, layout, refresh, scrollToTop, scrollToTop, setAdjustForHScroll, setAutoExpandColumn, setAutoExpandMax, setAutoExpandMin, setAutoFill, setColumnHeader, setColumnLines, setDeferUpdates, setEmptyText, setEnableRowBody, setForceFit, setRowBodyRowSpan, setShowDirtyCells, setSortingEnabled, setStripeRows, setTrackMouseOver, setViewConfig
public GroupingView()
public GroupingView(GridView.GridAppearance appearance, GroupingView.GroupingViewAppearance groupingAppearance)
appearance
- the grid appearancegroupingAppearance
- the grouping appearancepublic GroupingView(GroupingView.GroupingViewAppearance groupAppearance)
groupAppearance
- the group appearancepublic HandlerRegistration addCollapseHandler(CollapseItemEvent.CollapseItemHandler<List<M>> handler)
CollapseItemEvent.HasCollapseItemHandlers
CollapseItemEvent.CollapseItemHandler
handler for CollapseItemEvent
events.addCollapseHandler
in interface CollapseItemEvent.HasCollapseItemHandlers<List<M>>
handler
- the handlerpublic HandlerRegistration addExpandHandler(ExpandItemEvent.ExpandItemHandler<List<M>> handler)
ExpandItemEvent.HasExpandItemHandlers
ExpandItemEvent.ExpandItemHandler
handler for ExpandItemEvent
events.addExpandHandler
in interface ExpandItemEvent.HasExpandItemHandlers<List<M>>
handler
- the handlerpublic void collapseAllGroups()
public void expandAllGroups()
public GroupingView.GroupingViewAppearance getGroupingAppearance()
public Store.StoreSortInfo<M> getSortState()
GridView
getSortState
in class GridView<M>
public void groupBy(ColumnConfig<M,?> column)
public boolean isEnableGroupingMenu()
public void setEnableGroupingMenu(boolean enableGroupingMenu)
enableGroupingMenu
- true to enable the grouping menu itemspublic boolean isEnabledNoGroups()
public boolean isExpanded(Element group)
group
- the grouppublic boolean isShowGroupedColumn()
public void setShowGroupedColumn(boolean showGroupedColumn)
showGroupedColumn
- true to show the grouped columnpublic boolean isStartCollapsed()
public void setStartCollapsed(boolean startCollapsed)
startCollapsed
- true to start collapsedpublic void setEnableNoGroups(boolean enableNoGroups)
enableNoGroups
- true to enable no groups menu itempublic void toggleAllGroups(boolean expanded)
expanded
- true to expandCopyright © 2015. All rights reserved.