如何在星云NatTable中显示行号

时间:2017-09-28 09:08:47

标签: eclipse-rcp nattable nebula

我可以使用这些代码向NatTable显示CSV内容:

IDataProvider bodyDataProvider = ...;

DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
viewportLayer.setRegionName(GridRegion.BODY);

natTable.setLayer(viewportLayer);

我们如何显示行号?我尝试使用GridLayer,但没有列标题。请帮忙!

1 个答案:

答案 0 :(得分:0)

我解决了这个问题。我使用try { //your code that might cause an error to occur }catch (e){ console.log("ERROR:" + e.toString()); }

CompositeLayer