0

我正在使用 Netbeans RCP 并希望使 jtable 中的单元格选择更加明显。因此我喜欢画如下红线:

见截图:http: //i.stack.imgur.com/WRRyq.png

我只使用 GIMP 在屏幕截图上画线 ;-)

When selection increases and more cells are selected, the red lines should be the borders of the selection and should mark the whole width in the columnheader and the whole height in the row header.

我的表会更大,固定列数约为 35,行数未定义。有没有人尝试过这样的事情?

提前非常感谢!- 迈克尔

4

1 回答 1

0

这些可能会引导您获得有用的信息。抱歉,我无法为您的情况提供确切的答案。

大纲视图是一个大胖子JTable,所以基本上搜索父组件的信息会给你更多关于内部事物的信息。

org.openide.explorer.view.OutlineView outlineView;

要启用行选择: outlineView.getOutline().setRowSelectionAllowed(true);

定义行选择模式: outlineView.getOutline().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

要禁用单元格选择: outlineView.getOutline().setCellSelectionEnabled(false);

于 2012-04-13T06:41:24.393 回答