0
我有一個NatTable實例,我試圖做這樣的事情:點擊一個鏈接後,我應該選擇一個我的NatTable網格的單元格(自動對焦)即一旦鏈接被點擊,光標應放置在特定單元格內並突出顯示該單元格。在互聯網上的一些線程,我發現SelectCellCommand和EditSelectionCommand的使用將有助於我沒了下文: -NatTable:如何在NatTable網格中啓用自動對焦功能
natTable.doCommand(new SelectCellCommand(getSelectionLayer(), 4, 0, true, true));
natTable.doCommand(new EditSelectionCommand(parent, configRegistry));
不過,我沒有看到任何效果。有人可以幫我實施嗎?如果這塊代碼沒有提供足夠的信息,請告訴我。 (這裏getSelectionLayer()
給了我選擇圖層實例)