Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Howto render row as header.
Howto render row as header. [message #1015170] Wed, 27 February 2013 16:12
Alex Kipling is currently offline Alex KiplingFriend
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

Previous Topic:Is 1.0.0 actually released?
Next Topic:Grouping AND Binding (GlazedLists)
Goto Forum:
  


Current Time: Tue Apr 23 13:30:06 GMT 2024

Powered by FUDForum. Page generated in 0.03857 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top