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
FieldsFields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
commandHandlers, eventHandlers, eventHelperLock, layerPainterFields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionGroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider) Create aGroupByHeaderLayerthat uses the defaultGroupByHeaderConfiguration.GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayerby either using the givenGroupByHeaderConfigurationor creating a newGroupByHeaderConfigurationusing the given column headerIDataProvider.GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer) Create aGroupByHeaderLayerthat uses the defaultGroupByHeaderConfiguration.GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayerby either using the givenGroupByHeaderConfigurationor creating a newGroupByHeaderConfigurationusing the given column headerIDataProvider.GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayerthat uses the givenGroupByHeaderConfiguration. -
Method Summary
Modifier and TypeMethodDescriptiongetCellByPosition(int columnPosition, int rowPosition) Returns the cell for the given coordinates on this layer.intgetGroupByColumnIndexAtXY(int x, int y) intReturns the total height in pixels of this layer.intgetRowHeightByPosition(int rowPosition) Returns the height in pixels of the given row.booleanvoidsetVisible(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, underlyingToLocalRowPositionsMethods 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 aGroupByHeaderLayerthat uses the defaultGroupByHeaderConfiguration.- Parameters:
groupByModel- TheGroupByModelneeded for grouping operations.horizontalLayerDependency- TheILayerto which this header layer is horizontally dependent.columnHeaderDataProvider- TheIDataProviderof the column header which is needed to create theGroupByHeaderConfiguration
-
GroupByHeaderLayer
public GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer) Create aGroupByHeaderLayerthat uses the defaultGroupByHeaderConfiguration.- Parameters:
groupByModel- TheGroupByModelneeded for grouping operations.horizontalLayerDependency- TheILayerto which this header layer is horizontally dependent.columnHeaderDataProvider- TheIDataProviderof the column header which is needed to create theGroupByHeaderConfigurationcolumnHeaderLayer- TheColumnHeaderLayerwhich should be used to create theGroupByHeaderConfigurationif it should support showing the renamed column headers. Can benullwhich results in using either the given columnHeaderDataProvider or the givenGroupByHeaderConfiguration.- Since:
- 1.5
-
GroupByHeaderLayer
public GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayerthat uses the givenGroupByHeaderConfiguration.- Parameters:
groupByModel- TheGroupByModelneeded for grouping operations.horizontalLayerDependency- TheILayerto which this header layer is horizontally dependent.groupByHeaderConfiguration- TheGroupByHeaderConfigurationthat should be added to thisGroupByHeaderLayer. Needs to be aGroupByHeaderConfigurationbecause we retrieve the necessaryGroupByHeaderPainterout of the configuration to setup this layer accordingly.
-
GroupByHeaderLayer
public GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayerby either using the givenGroupByHeaderConfigurationor creating a newGroupByHeaderConfigurationusing the given column headerIDataProvider. Note that either theIDataProvideror theGroupByHeaderConfigurationparameter must be set. If both arenullanIllegalArgumentExceptionwill be thrown.- Parameters:
groupByModel- TheGroupByModelneeded for grouping operations.horizontalLayerDependency- TheILayerto which this header layer is horizontally dependent.columnHeaderDataProvider- TheIDataProviderof the column header which is needed to create theGroupByHeaderConfiguration. Can benullif groupByHeaderConfiguration is notnull.groupByHeaderConfiguration- TheGroupByHeaderConfigurationthat should be added to thisGroupByHeaderLayer. Needs to be aGroupByHeaderConfigurationbecause we retrieve the necessaryGroupByHeaderPainterout of the configuration to setup this layer accordingly. Can benullif columnHeaderDataProvider is notnull.
-
GroupByHeaderLayer
public GroupByHeaderLayer(GroupByModel groupByModel, ILayer horizontalLayerDependency, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer, GroupByHeaderConfiguration groupByHeaderConfiguration) Create aGroupByHeaderLayerby either using the givenGroupByHeaderConfigurationor creating a newGroupByHeaderConfigurationusing the given column headerIDataProvider. Note that either theIDataProvideror theGroupByHeaderConfigurationparameter must be set. If both arenullanIllegalArgumentExceptionwill be thrown.- Parameters:
groupByModel- TheGroupByModelneeded for grouping operations.horizontalLayerDependency- TheILayerto which this header layer is horizontally dependent.columnHeaderDataProvider- TheIDataProviderof the column header which is needed to create theGroupByHeaderConfiguration. Can benullif groupByHeaderConfiguration is notnull.columnHeaderLayer- TheColumnHeaderLayerwhich should be used to create theGroupByHeaderConfigurationif it should support showing the renamed column headers. Can benullwhich results in using either the given columnHeaderDataProvider or the givenGroupByHeaderConfiguration.groupByHeaderConfiguration- TheGroupByHeaderConfigurationthat should be added to thisGroupByHeaderLayer. Needs to be aGroupByHeaderConfigurationbecause we retrieve the necessaryGroupByHeaderPainterout of the configuration to setup this layer accordingly. Can benullif 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:ILayerReturns the total height in pixels of this layer.- Specified by:
getHeightin interfaceILayer- Overrides:
getHeightin classDimensionallyDependentLayer- Returns:
- The total height in pixels of this layer.
-
getRowHeightByPosition
public int getRowHeightByPosition(int rowPosition) Description copied from interface:ILayerReturns the height in pixels of the given row. The height of invisible and non-existing rows is 0.- Specified by:
getRowHeightByPositionin interfaceILayer- Overrides:
getRowHeightByPositionin classDimensionallyDependentLayer- Parameters:
rowPosition- The row position in this layer.- Returns:
- The height of the row.
-
getCellByPosition
Description copied from interface:ILayerReturns the cell for the given coordinates on this layer.- Specified by:
getCellByPositionin interfaceILayer- Overrides:
getCellByPositionin classAbstractLayer- Parameters:
columnPosition- The column position of the requested cell.rowPosition- The row position of the requested cell.- Returns:
- The
ILayerCellfor the given coordinates in this layer ornullif the coordinates are invalid on this layer.
-
getGroupByColumnIndexAtXY
public int getGroupByColumnIndexAtXY(int x, int y)
-