Class ColumnGroupExpandCollapseLayer
java.lang.Object
org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
org.eclipse.nebula.widgets.nattable.hideshow.AbstractColumnHideShowLayer
org.eclipse.nebula.widgets.nattable.group.ColumnGroupExpandCollapseLayer
- All Implemented Interfaces:
IColumnGroupModelListener
,ILayer
,ILayerListener
,IUniqueIndexLayer
,IPersistable
public class ColumnGroupExpandCollapseLayer
extends AbstractColumnHideShowLayer
implements IColumnGroupModelListener
Tracks the Expand/Collapse of a Column Group header NOTE: Only relevant when
Column Grouping is enabled.
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
underlyingLayer
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
ConstructorDescriptionColumnGroupExpandCollapseLayer
(IUniqueIndexLayer underlyingLayer, ColumnGroupModel model) ColumnGroupExpandCollapseLayer
(IUniqueIndexLayer underlyingLayer, ColumnGroupModel... models) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Will collect and return all indexes of the columns that are hidden in this layer.int[]
Will collect and return all indexes of the columns that are hidden in this layer.getModel
(int row) boolean
Check if this layer actively hides columns.boolean
isColumnIndexHidden
(int columnIndex) Will check if the column at the specified index is hidden or not.Methods inherited from class org.eclipse.nebula.widgets.nattable.hideshow.AbstractColumnHideShowLayer
cacheVisibleColumnIndexes, doCommand, getCellByPosition, getColumnCount, getColumnIndexByPosition, getColumnPositionByIndex, getColumnPositionByX, getColumnPositionsByIndexes, getColumnPositionsByIndexes, getRowPositionByIndex, getStartXOfColumnPosition, getUnderlyingLayer, getWidth, handleLayerEvent, invalidateCache, localToUnderlyingColumnPosition, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions
Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
configure, dispose, getCellPainter, getColumnWidthByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeight, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByY, getStartYOfRowPosition, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, isColumnPositionResizable, isDynamicSizeLayer, isRowPositionResizable, loadState, localToUnderlyingRowPosition, saveState, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalRowPosition, underlyingToLocalRowPositions
Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getProvidedLabels, getRegionName, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.nebula.widgets.nattable.layer.ILayer
addLayerListener, configure, dispose, fireLayerEvent, getBoundsByPosition, getCellPainter, getClientAreaProvider, getColumnWidthByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeight, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getProvidedLabels, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByY, getStartYOfRowPosition, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, hasLayerListener, isColumnPositionResizable, isDynamicSizeLayer, isRowPositionResizable, localToUnderlyingRowPosition, registerCommandHandler, registerPersistable, removeLayerListener, setClientAreaProvider, underlyingToLocalRowPosition, underlyingToLocalRowPositions, unregisterCommandHandler, unregisterPersistable
Methods inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
loadState, saveState
-
Constructor Details
-
ColumnGroupExpandCollapseLayer
-
ColumnGroupExpandCollapseLayer
public ColumnGroupExpandCollapseLayer(IUniqueIndexLayer underlyingLayer, ColumnGroupModel... models)
-
-
Method Details
-
getModel
-
isColumnIndexHidden
public boolean isColumnIndexHidden(int columnIndex) Description copied from class:AbstractColumnHideShowLayer
Will check if the column at the specified index is hidden or not.- Specified by:
isColumnIndexHidden
in classAbstractColumnHideShowLayer
- Parameters:
columnIndex
- The column index of the column whose visibility state should be checked.- Returns:
true
if the column at the specified index is hidden,false
if it is visible.
-
getHiddenColumnIndexes
Description copied from class:AbstractColumnHideShowLayer
Will collect and return all indexes of the columns that are hidden in this layer.Note: It is not intended that it also collects the column indexes of underlying layers. This would cause issues on calculating positions, as every layer is responsible for those calculations itself.
Since 2.0 it is recommended to use
AbstractColumnHideShowLayer.getHiddenColumnIndexesArray()
to avoid unnecessary autoboxing operations.- Specified by:
getHiddenColumnIndexes
in classAbstractColumnHideShowLayer
- Returns:
- Collection of all column indexes that are hidden in this layer.
-
getHiddenColumnIndexesArray
public int[] getHiddenColumnIndexesArray()Description copied from class:AbstractColumnHideShowLayer
Will collect and return all indexes of the columns that are hidden in this layer.Note: It is not intended that it also collects the column indexes of underlying layers. This would cause issues on calculating positions, as every layer is responsible for those calculations itself.
- Specified by:
getHiddenColumnIndexesArray
in classAbstractColumnHideShowLayer
- Returns:
- All column indexes that are hidden in this layer.
-
hasHiddenColumns
public boolean hasHiddenColumns()Description copied from class:AbstractColumnHideShowLayer
Check if this layer actively hides columns.- Specified by:
hasHiddenColumns
in classAbstractColumnHideShowLayer
- Returns:
true
if columns are hidden by this layer,false
if not.
-
columnGroupModelChanged
public void columnGroupModelChanged()- Specified by:
columnGroupModelChanged
in interfaceIColumnGroupModelListener
-