Class GroupByHeaderLayer
java.lang.Object
org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
org.eclipse.nebula.widgets.nattable.grid.layer.DimensionallyDependentLayer
org.eclipse.nebula.widgets.nattable.extension.glazedlists.groupBy.GroupByHeaderLayer
- All Implemented Interfaces:
ILayer
,ILayerListener
,IPersistable
The layer that is used to render the groupBy region where columns can be
dragged from to perform grouping and ungrouping actions.
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
commandHandlers, eventHandlers, eventHelperLock, layerPainter
Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR
-
Constructor Summary
ConstructorDescriptionGroupByHeaderLayer
(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider) Create aGroupByHeaderLayer
that uses the defaultGroupByHeaderConfiguration
.GroupByHeaderLayer
(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayer
by either using the givenGroupByHeaderConfiguration
or creating a newGroupByHeaderConfiguration
using the given column headerIDataProvider
.GroupByHeaderLayer
(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer) Create aGroupByHeaderLayer
that uses the defaultGroupByHeaderConfiguration
.GroupByHeaderLayer
(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayer
by either using the givenGroupByHeaderConfiguration
or creating a newGroupByHeaderConfiguration
using the given column headerIDataProvider
.GroupByHeaderLayer
(GroupByModel groupByModel, ILayer horizontalLayerDependency, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayer
that uses the givenGroupByHeaderConfiguration
. -
Method Summary
Modifier and TypeMethodDescriptiongetCellByPosition
(int columnPosition, int rowPosition) Returns the cell for the given coordinates on this layer.int
getGroupByColumnIndexAtXY
(int x, int y) int
Returns the total height in pixels of this layer.int
getRowHeightByPosition
(int rowPosition) Returns the height in pixels of the given row.boolean
void
setVisible
(boolean visible) Methods inherited from class org.eclipse.nebula.widgets.nattable.grid.layer.DimensionallyDependentLayer
configure, doCommand, getBaseLayer, getClientAreaProvider, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnWidthByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getHorizontalLayerDependency, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowCount, getRowIndexByPosition, getRowPositionByY, getStartXOfColumnPosition, getStartYOfRowPosition, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getVerticalLayerDependency, getWidth, isColumnPositionResizable, isRowPositionResizable, loadState, localToUnderlyingColumnPosition, localToUnderlyingRowPosition, saveState, setClientAreaProvider, setHorizontalLayerDependency, setVerticalLayerDependency, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, underlyingToLocalRowPosition, underlyingToLocalRowPositions
Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
addConfiguration, addLayerListener, clearConfiguration, dispose, fireLayerEvent, getBoundsByPosition, getCellPainter, getConfigLabelAccumulator, getProvidedLabels, getRegionName, handleLayerEvent, hasLayerListener, isDynamicSizeLayer, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistable
-
Field Details
-
GROUP_BY_REGION
- See Also:
-
-
Constructor Details
-
GroupByHeaderLayer
public GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider) Create aGroupByHeaderLayer
that uses the defaultGroupByHeaderConfiguration
.- Parameters:
groupByModel
- TheGroupByModel
needed for grouping operations.horizontalLayerDependency
- TheILayer
to which this header layer is horizontally dependent.columnHeaderDataProvider
- TheIDataProvider
of the column header which is needed to create theGroupByHeaderConfiguration
-
GroupByHeaderLayer
public GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer) Create aGroupByHeaderLayer
that uses the defaultGroupByHeaderConfiguration
.- Parameters:
groupByModel
- TheGroupByModel
needed for grouping operations.horizontalLayerDependency
- TheILayer
to which this header layer is horizontally dependent.columnHeaderDataProvider
- TheIDataProvider
of the column header which is needed to create theGroupByHeaderConfiguration
columnHeaderLayer
- TheColumnHeaderLayer
which should be used to create theGroupByHeaderConfiguration
if it should support showing the renamed column headers. Can benull
which results in using either the given columnHeaderDataProvider or the givenGroupByHeaderConfiguration
.- Since:
- 1.5
-
GroupByHeaderLayer
public GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayer
that uses the givenGroupByHeaderConfiguration
.- Parameters:
groupByModel
- TheGroupByModel
needed for grouping operations.horizontalLayerDependency
- TheILayer
to which this header layer is horizontally dependent.groupByHeaderConfiguration
- TheGroupByHeaderConfiguration
that should be added to thisGroupByHeaderLayer
. Needs to be aGroupByHeaderConfiguration
because we retrieve the necessaryGroupByHeaderPainter
out of the configuration to setup this layer accordingly.
-
GroupByHeaderLayer
public GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayer
by either using the givenGroupByHeaderConfiguration
or creating a newGroupByHeaderConfiguration
using the given column headerIDataProvider
. Note that either theIDataProvider
or theGroupByHeaderConfiguration
parameter must be set. If both arenull
anIllegalArgumentException
will be thrown.- Parameters:
groupByModel
- TheGroupByModel
needed for grouping operations.horizontalLayerDependency
- TheILayer
to which this header layer is horizontally dependent.columnHeaderDataProvider
- TheIDataProvider
of the column header which is needed to create theGroupByHeaderConfiguration
. Can benull
if groupByHeaderConfiguration is notnull
.groupByHeaderConfiguration
- TheGroupByHeaderConfiguration
that should be added to thisGroupByHeaderLayer
. Needs to be aGroupByHeaderConfiguration
because we retrieve the necessaryGroupByHeaderPainter
out of the configuration to setup this layer accordingly. Can benull
if columnHeaderDataProvider is notnull
.
-
GroupByHeaderLayer
public GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayer
by either using the givenGroupByHeaderConfiguration
or creating a newGroupByHeaderConfiguration
using the given column headerIDataProvider
. Note that either theIDataProvider
or theGroupByHeaderConfiguration
parameter must be set. If both arenull
anIllegalArgumentException
will be thrown.- Parameters:
groupByModel
- TheGroupByModel
needed for grouping operations.horizontalLayerDependency
- TheILayer
to which this header layer is horizontally dependent.columnHeaderDataProvider
- TheIDataProvider
of the column header which is needed to create theGroupByHeaderConfiguration
. Can benull
if groupByHeaderConfiguration is notnull
.columnHeaderLayer
- TheColumnHeaderLayer
which should be used to create theGroupByHeaderConfiguration
if it should support showing the renamed column headers. Can benull
which results in using either the given columnHeaderDataProvider or the givenGroupByHeaderConfiguration
.groupByHeaderConfiguration
- TheGroupByHeaderConfiguration
that should be added to thisGroupByHeaderLayer
. Needs to be aGroupByHeaderConfiguration
because we retrieve the necessaryGroupByHeaderPainter
out of the configuration to setup this layer accordingly. Can benull
if columnHeaderDataProvider is notnull
.- Since:
- 1.5
-
-
Method Details
-
getGroupByModel
-
setVisible
public void setVisible(boolean visible) -
isVisible
public boolean isVisible() -
getHeight
public int getHeight()Description copied from interface:ILayer
Returns the total height in pixels of this layer.- Specified by:
getHeight
in interfaceILayer
- Overrides:
getHeight
in classDimensionallyDependentLayer
- Returns:
- The total height in pixels of this layer.
-
getRowHeightByPosition
public int getRowHeightByPosition(int rowPosition) Description copied from interface:ILayer
Returns the height in pixels of the given row. The height of invisible and non-existing rows is 0.- Specified by:
getRowHeightByPosition
in interfaceILayer
- Overrides:
getRowHeightByPosition
in classDimensionallyDependentLayer
- Parameters:
rowPosition
- The row position in this layer.- Returns:
- The height of the row.
-
getCellByPosition
Description copied from interface:ILayer
Returns the cell for the given coordinates on this layer.- Specified by:
getCellByPosition
in interfaceILayer
- Overrides:
getCellByPosition
in classAbstractLayer
- Parameters:
columnPosition
- The column position of the requested cell.rowPosition
- The row position of the requested cell.- Returns:
- The
ILayerCell
for the given coordinates in this layer ornull
if the coordinates are invalid on this layer.
-
getGroupByColumnIndexAtXY
public int getGroupByColumnIndexAtXY(int x, int y)
-