|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.nebula.widgets.nattable.layer.AbstractLayer
org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
org.eclipse.nebula.widgets.nattable.group.ColumnGroupGroupHeaderLayer
public class ColumnGroupGroupHeaderLayer
Adds the Column grouping functionality to the column headers.
Also persists the state of the column groups when NatTable.saveState(String, Properties) is invoked.
Internally uses the ColumnGroupModel to track the column groups.
See ColumnGroupGridExample
| 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 |
|---|
layerPainter |
| Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable |
|---|
DOT, VALUE_SEPARATOR |
| Constructor Summary | |
|---|---|
ColumnGroupGroupHeaderLayer(ColumnGroupHeaderLayer columnGroupHeaderLayer,
SelectionLayer selectionLayer,
ColumnGroupModel columnGroupModel)
|
|
ColumnGroupGroupHeaderLayer(ColumnGroupHeaderLayer columnGroupHeaderLayer,
SelectionLayer selectionLayer,
ColumnGroupModel columnGroupModel,
boolean useDefaultConfiguration)
|
|
| Method Summary | |
|---|---|
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. |
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 |
isColumnInGroup(int bodyColumnIndex)
|
boolean |
isRowPositionResizable(int rowPosition)
|
void |
setGroupAsCollapsed(int columnIndex)
|
void |
setGroupUnbreakable(int columnIndex)
|
void |
setRowHeight(int rowHeight)
|
void |
setStaticColumnIndexesByGroup(String colGroupName,
int... staticColumnIndexes)
|
| Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer |
|---|
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getRegionName, handleLayerEvent, 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 |
| Constructor Detail |
|---|
public ColumnGroupGroupHeaderLayer(ColumnGroupHeaderLayer columnGroupHeaderLayer,
SelectionLayer selectionLayer,
ColumnGroupModel columnGroupModel)
public ColumnGroupGroupHeaderLayer(ColumnGroupHeaderLayer columnGroupHeaderLayer,
SelectionLayer selectionLayer,
ColumnGroupModel columnGroupModel,
boolean useDefaultConfiguration)
| Method Detail |
|---|
public int getRowCount()
getRowCount in interface ILayergetRowCount in class AbstractLayerTransformpublic int getPreferredRowCount()
getPreferredRowCount in interface ILayergetPreferredRowCount in class AbstractLayerTransformpublic int getRowIndexByPosition(int rowPosition)
ILayer
getRowIndexByPosition in interface ILayergetRowIndexByPosition in class AbstractLayerTransformrowPosition - a row position relative to this coordinate model
public int getHeight()
ILayer
getHeight in interface ILayergetHeight in class AbstractLayerTransformpublic int getPreferredHeight()
getPreferredHeight in interface ILayergetPreferredHeight in class AbstractLayerTransformpublic int getRowHeightByPosition(int rowPosition)
ILayer
getRowHeightByPosition in interface ILayergetRowHeightByPosition in class AbstractLayerTransformrowPosition - the row position in this layer
public void setRowHeight(int rowHeight)
public boolean isRowPositionResizable(int rowPosition)
isRowPositionResizable in interface ILayerisRowPositionResizable in class AbstractLayerTransformpublic int getRowPositionByY(int y)
ILayer
getRowPositionByY in interface ILayergetRowPositionByY in class AbstractLayerTransformy - a vertical pixel location relative to the pixel boundary of this layer
public int getStartYOfRowPosition(int rowPosition)
ILayer
getStartYOfRowPosition in interface ILayergetStartYOfRowPosition in class AbstractLayerTransformrowPosition - the row position in this layer
public ILayerCell getCellByPosition(int columnPosition,
int rowPosition)
getCellByPosition in interface ILayergetCellByPosition in class AbstractLayerTransformprotected int getColumnSpan(int columnPosition)
columnPosition - position of any column belonging to the group
public String getDisplayModeByPosition(int columnPosition,
int rowPosition)
getDisplayModeByPosition in interface ILayergetDisplayModeByPosition in class AbstractLayerTransformcolumnPosition - the column position of the cellrowPosition - the row position of the cell
DisplayMode 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 ILayergetConfigLabelsByPosition in class AbstractLayerTransform
public Object getDataValueByPosition(int columnPosition,
int rowPosition)
getDataValueByPosition in interface ILayergetDataValueByPosition in class AbstractLayerTransform
public LabelStack getRegionLabelsByXY(int x,
int y)
ILayer
getRegionLabelsByXY in interface ILayergetRegionLabelsByXY in class AbstractLayerTransformx - the x pixel coordinatey - the y pixel coordinate
public void addColumnsIndexesToGroup(String colGroupName,
int... colIndexes)
public void clearAllGroups()
public void setStaticColumnIndexesByGroup(String colGroupName,
int... staticColumnIndexes)
public boolean isColumnInGroup(int bodyColumnIndex)
public void setGroupUnbreakable(int columnIndex)
ColumnGroupModel.ColumnGroup.setUnbreakable(boolean)public void setGroupAsCollapsed(int columnIndex)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||