Howto render row as header. [message #1015170] |
Wed, 27 February 2013 16:12 |
Alex Kipling Messages: 260 Registered: July 2012 |
Senior Member |
|
|
I am trying to render a row as a header.
I am doing it manually, since I do not have any SelectionLayer to create a RowHeaderLayer.
I came up with the following code, but the row is still not rendered as a header - the Data in DefaultRowHeaderLayerConfiguration are not used.
Do I miss something?
DataLayer headerLayer = new DataLayer(emptyOneCellHeaderDataProvider, 50, 20);
//just adding the Configuration does not work. Try overriding and using labels: add GridRegion.ROW_HEADER
ColumnLabelAccumulator overrideLabelAccumulator = new ColumnLabelAccumulator(){
@Override
public void accumulateConfigLabels(LabelStack configLabels,
int columnPosition, int rowPosition) {
super.accumulateConfigLabels(configLabels, columnPosition, rowPosition);
configLabels.addLabel(GridRegion.ROW_HEADER); //add GridRegion.ROW_HEADER, so that DefaultRowHeaderLayerConfiguration starts to work
}
};
headerLayer.setConfigLabelAccumulator(overrideLabelAccumulator);
//reuse the default configurations. This makes the row header look like a header.
DefaultRowHeaderLayerConfiguration configuration = new DefaultRowHeaderLayerConfiguration();
//add to layer
headerLayer.addConfiguration(configuration);
[Updated on: Wed, 27 February 2013 16:13] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03857 seconds