public class ColumnGroupGroupHeaderLayer extends AbstractLayerTransform
NatTable.saveState(String, Properties)
is invoked.
Internally uses the ColumnGroupModel
to track the column groups.
See ColumnGroupGridExample
underlyingLayer
DOT, VALUE_SEPARATOR
Constructor and Description |
---|
ColumnGroupGroupHeaderLayer(ColumnGroupHeaderLayer columnGroupHeaderLayer,
SelectionLayer selectionLayer,
ColumnGroupModel columnGroupModel) |
ColumnGroupGroupHeaderLayer(ColumnGroupHeaderLayer columnGroupHeaderLayer,
SelectionLayer selectionLayer,
ColumnGroupModel columnGroupModel,
boolean useDefaultConfiguration) |
Modifier and Type | Method and Description |
---|---|
void |
addColumnsIndexesToGroup(String colGroupName,
int... colIndexes) |
void |
clearAllGroups() |
ILayerCell |
getCellByPosition(int columnPosition,
int rowPosition)
If a cell belongs to a column group:
column position - set to the start position of the group
span - set to the width/size of the column group
NOTE: gc.setClip() is used in the CompositeLayerPainter to ensure that partially visible
Column group header cells are rendered properly.
|
protected int |
getColumnSpan(int columnPosition)
Calculates the span of a cell in a Column Group.
|
LabelStack |
getConfigLabelsByPosition(int columnPosition,
int rowPosition) |
Object |
getDataValueByPosition(int columnPosition,
int rowPosition) |
String |
getDisplayModeByPosition(int columnPosition,
int rowPosition) |
int |
getHeight()
Returns the total height in pixels of this layer.
|
ILayerPainter |
getLayerPainter() |
int |
getPreferredHeight() |
int |
getPreferredRowCount() |
LabelStack |
getRegionLabelsByXY(int x,
int y)
Layer can apply its own labels to any cell it wishes.
|
int |
getRowCount() |
int |
getRowHeightByPosition(int rowPosition)
Returns the height in pixels of the given row.
|
int |
getRowIndexByPosition(int rowPosition)
Gets the underlying non-transformed row index for the given row position.
|
int |
getRowPositionByY(int y)
Returns the row position that contains the given y coordinate.
|
int |
getStartYOfRowPosition(int rowPosition)
Returns the y offset in pixels of the given row.
|
boolean |
isRowPositionResizable(int rowPosition) |
void |
setGroupAsCollapsed(int columnIndex) |
void |
setGroupUnbreakable(int columnIndex) |
void |
setRowHeight(int rowHeight) |
configure, dispose, doCommand, getCellPainter, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnWidthByPosition, getPreferredColumnCount, getPreferredWidth, getStartXOfColumnPosition, getUnderlyingLayer, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, isColumnPositionResizable, loadState, localToUnderlyingColumnPosition, localToUnderlyingRowPosition, saveState, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, underlyingToLocalRowPosition, underlyingToLocalRowPositions
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getRegionName, handleLayerEvent, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterPersistable
public ColumnGroupGroupHeaderLayer(ColumnGroupHeaderLayer columnGroupHeaderLayer, SelectionLayer selectionLayer, ColumnGroupModel columnGroupModel)
public ColumnGroupGroupHeaderLayer(ColumnGroupHeaderLayer columnGroupHeaderLayer, SelectionLayer selectionLayer, ColumnGroupModel columnGroupModel, boolean useDefaultConfiguration)
public ILayerPainter getLayerPainter()
getLayerPainter
in interface ILayer
getLayerPainter
in class AbstractLayerTransform
ILayerPainter
. Defaults to GridLineCellLayerPainter
public int getRowCount()
getRowCount
in interface ILayer
getRowCount
in class AbstractLayerTransform
public int getPreferredRowCount()
getPreferredRowCount
in interface ILayer
getPreferredRowCount
in class AbstractLayerTransform
public int getRowIndexByPosition(int rowPosition)
ILayer
getRowIndexByPosition
in interface ILayer
getRowIndexByPosition
in class AbstractLayerTransform
rowPosition
- a row position relative to this coordinate modelpublic int getHeight()
ILayer
getHeight
in interface ILayer
getHeight
in class AbstractLayerTransform
public int getPreferredHeight()
getPreferredHeight
in interface ILayer
getPreferredHeight
in class AbstractLayerTransform
public int getRowHeightByPosition(int rowPosition)
ILayer
getRowHeightByPosition
in interface ILayer
getRowHeightByPosition
in class AbstractLayerTransform
rowPosition
- the row position in this layerpublic void setRowHeight(int rowHeight)
public boolean isRowPositionResizable(int rowPosition)
isRowPositionResizable
in interface ILayer
isRowPositionResizable
in class AbstractLayerTransform
public int getRowPositionByY(int y)
ILayer
getRowPositionByY
in interface ILayer
getRowPositionByY
in class AbstractLayerTransform
y
- a vertical pixel location relative to the pixel boundary of this layerpublic int getStartYOfRowPosition(int rowPosition)
ILayer
getStartYOfRowPosition
in interface ILayer
getStartYOfRowPosition
in class AbstractLayerTransform
rowPosition
- the row position in this layerpublic ILayerCell getCellByPosition(int columnPosition, int rowPosition)
getCellByPosition
in interface ILayer
getCellByPosition
in class AbstractLayerTransform
protected int getColumnSpan(int columnPosition)
columnPosition
- position of any column belonging to the grouppublic String getDisplayModeByPosition(int columnPosition, int rowPosition)
getDisplayModeByPosition
in interface ILayer
getDisplayModeByPosition
in class AbstractLayerTransform
columnPosition
- the column position of the cellrowPosition
- the row position of the cellDisplayMode
for the cell at the given position.
The DisplayMode
affects the settings out of the ConfigRegistry
.
Display mode is NORMAL by default.
Example: SelectionLayer
overrides this to return the SELECT
label for cells which are selected.
public LabelStack getConfigLabelsByPosition(int columnPosition, int rowPosition)
getConfigLabelsByPosition
in interface ILayer
getConfigLabelsByPosition
in class AbstractLayerTransform
public Object getDataValueByPosition(int columnPosition, int rowPosition)
getDataValueByPosition
in interface ILayer
getDataValueByPosition
in class AbstractLayerTransform
public LabelStack getRegionLabelsByXY(int x, int y)
ILayer
getRegionLabelsByXY
in interface ILayer
getRegionLabelsByXY
in class AbstractLayerTransform
x
- the x pixel coordinatey
- the y pixel coordinatepublic void addColumnsIndexesToGroup(String colGroupName, int... colIndexes)
public void clearAllGroups()
public void setGroupUnbreakable(int columnIndex)
public void setGroupAsCollapsed(int columnIndex)
Copyright © 2013. All Rights Reserved.