Class RowHeaderLayer
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
-
- org.eclipse.nebula.widgets.nattable.grid.layer.DimensionallyDependentLayer
-
- org.eclipse.nebula.widgets.nattable.grid.layer.RowHeaderLayer
-
- All Implemented Interfaces:
ILayer
,ILayerListener
,IPersistable
- Direct Known Subclasses:
FixedSummaryRowHeaderLayer
public class RowHeaderLayer extends DimensionallyDependentLayer
Layer for the row header of the grid layer.
-
-
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
Constructors Constructor Description RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer selectionLayer)
Creates a row header layer using the default configuration and painter.RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer... selectionLayer)
Creates a row header layer using the default configuration and painter.RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer[] selectionLayer, boolean useDefaultConfiguration)
Creates a row header layer using the default painter.RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer[] selectionLayer, boolean useDefaultConfiguration, ILayerPainter layerPainter)
RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer selectionLayer, boolean useDefaultConfiguration)
Creates a row header layer using the default painter.RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer selectionLayer, boolean useDefaultConfiguration, ILayerPainter layerPainter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doCommand(ILayerCommand command)
Opportunity to respond to a command as it flows down the stack.LabelStack
getConfigLabelsByPosition(int columnPosition, int rowPosition)
Returns the config labels for the cell at the given coordinates.DisplayMode
getDisplayModeByPosition(int columnPosition, int rowPosition)
Returns the activeDisplayMode
for the cell at the given coordinates.-
Methods inherited from class org.eclipse.nebula.widgets.nattable.grid.layer.DimensionallyDependentLayer
configure, getBaseLayer, getClientAreaProvider, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnWidthByPosition, getDataValueByPosition, getHeight, getHorizontalLayerDependency, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, 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, getCellByPosition, getCellPainter, getConfigLabelAccumulator, getProvidedLabels, getRegionName, handleLayerEvent, hasLayerListener, isDynamicSizeLayer, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistable
-
-
-
-
Constructor Detail
-
RowHeaderLayer
public RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer selectionLayer)
Creates a row header layer using the default configuration and painter.- Parameters:
baseLayer
- The base layer for this layer, typically a DataLayer.verticalLayerDependency
- The layer to link the vertical dimension to, typically the body layer.selectionLayer
- The SelectionLayer needed to respond to selection events.
-
RowHeaderLayer
public RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer... selectionLayer)
Creates a row header layer using the default configuration and painter.- Parameters:
baseLayer
- The base layer for this layer, typically a DataLayer.verticalLayerDependency
- The layer to link the vertical dimension to, typically the body layer.selectionLayer
- 0 to multiple SelectionLayer needed to respond to selection events.- Since:
- 1.4
-
RowHeaderLayer
public RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer selectionLayer, boolean useDefaultConfiguration)
Creates a row header layer using the default painter.- Parameters:
baseLayer
- The base layer for this layer, typically a DataLayer.verticalLayerDependency
- The layer to link the vertical dimension to, typically the body layer.selectionLayer
- The SelectionLayer needed to respond to selection events.useDefaultConfiguration
- Flag to configure whether to use the default configuration or not.
-
RowHeaderLayer
public RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer[] selectionLayer, boolean useDefaultConfiguration)
Creates a row header layer using the default painter.- Parameters:
baseLayer
- The base layer for this layer, typically a DataLayer.verticalLayerDependency
- The layer to link the vertical dimension to, typically the body layer.selectionLayer
- 0 to multiple SelectionLayer needed to respond to selection events.useDefaultConfiguration
- Flag to configure whether to use the default configuration or not.- Since:
- 1.4
-
RowHeaderLayer
public RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer selectionLayer, boolean useDefaultConfiguration, ILayerPainter layerPainter)
- Parameters:
baseLayer
- The base layer for this layer, typically a DataLayer.verticalLayerDependency
- The layer to link the vertical dimension to, typically the body layer.selectionLayer
- The SelectionLayer needed to respond to selection events.useDefaultConfiguration
- Flag to configure whether to use the default configuration or not.layerPainter
- The painter for this layer ornull
to use the painter of the base layer
-
RowHeaderLayer
public RowHeaderLayer(IUniqueIndexLayer baseLayer, ILayer verticalLayerDependency, SelectionLayer[] selectionLayer, boolean useDefaultConfiguration, ILayerPainter layerPainter)
- Parameters:
baseLayer
- The base layer for this layer, typically a DataLayer.verticalLayerDependency
- The layer to link the vertical dimension to, typically the body layer.selectionLayer
- 0 to multiple SelectionLayer needed to respond to selection events.useDefaultConfiguration
- Flag to configure whether to use the default configuration or not.layerPainter
- The painter for this layer ornull
to use the painter of the base layer- Since:
- 1.4
-
-
Method Detail
-
doCommand
public boolean doCommand(ILayerCommand command)
Description copied from interface:ILayer
Opportunity to respond to a command as it flows down the stack. If the layer is not interested in the command it should allow the command to keep traveling down the stack.Note: Before the layer can process a command it must convert the command to its local coordinates using
ILayerCommand.convertToTargetLayer(ILayer)
- Specified by:
doCommand
in interfaceILayer
- Overrides:
doCommand
in classDimensionallyDependentLayer
- Parameters:
command
- The command to execute.- Returns:
true
if the command has been handled and was therefore consumed,false
otherwise.
-
getDisplayModeByPosition
public DisplayMode getDisplayModeByPosition(int columnPosition, int rowPosition)
Description copied from interface:ILayer
Returns the activeDisplayMode
for the cell at the given coordinates. Needed to retrieve the corresponding configurations out of theIConfigRegistry
. The default value isDisplayMode.NORMAL
. The SelectionLayer for example overrides this to returnDisplayMode.SELECT
for cells that are currently selected.- Specified by:
getDisplayModeByPosition
in interfaceILayer
- Overrides:
getDisplayModeByPosition
in classDimensionallyDependentLayer
- Parameters:
columnPosition
- The column position of the cell.rowPosition
- The row position of the cell.- Returns:
DisplayMode
for the cell at the given coordinates.
-
getConfigLabelsByPosition
public LabelStack getConfigLabelsByPosition(int columnPosition, int rowPosition)
Description copied from interface:ILayer
Returns the config labels for the cell at the given coordinates. Needed to retrieve the corresponding configurations out of theIConfigRegistry
.- Specified by:
getConfigLabelsByPosition
in interfaceILayer
- Overrides:
getConfigLabelsByPosition
in classDimensionallyDependentLayer
- Parameters:
columnPosition
- The column position of the cell.rowPosition
- The row position of the cell.- Returns:
- The
LabelStack
with the config labels for the cell at the given coordinates.
-
-