d*****l 发帖数: 8441 | 1 谁有更好的table类?最好能有setCellColor(int row, int column, Color color);
的方法,可以直接拿来用。 |
l********0 发帖数: 283 | 2 JTable的功能确实很多没有现成的方法
但是也是为了性能问题
你可以创建自己的renderer,或者覆盖某些方法来实现
【在 d*****l 的大作中提到】 : 谁有更好的table类?最好能有setCellColor(int row, int column, Color color); : 的方法,可以直接拿来用。
|
d*****l 发帖数: 8441 | 3 创建自己的renderer或覆盖TabelCellRenderer也有缺点,只能实现
有限种类的背景色,一旦决定背景色的内部逻辑复杂了,该覆盖的函数就
会变得极其复杂。而且往往希望由别的类对象来决定或实现背景色决定逻辑
比较好。
【在 l********0 的大作中提到】 : JTable的功能确实很多没有现成的方法 : 但是也是为了性能问题 : 你可以创建自己的renderer,或者覆盖某些方法来实现
|
c*****t 发帖数: 1879 | 4 楼主需要的没那么复杂。其实就是给 cell renderer implementation 里 pass
一个 shared cell color map 。然后 render 前查一下是否某个 cell 需要被
highlight 就是了。
【在 d*****l 的大作中提到】 : 创建自己的renderer或覆盖TabelCellRenderer也有缺点,只能实现 : 有限种类的背景色,一旦决定背景色的内部逻辑复杂了,该覆盖的函数就 : 会变得极其复杂。而且往往希望由别的类对象来决定或实现背景色决定逻辑 : 比较好。
|
F****n 发帖数: 3271 | 5 If you want to build complex visualization, you should not use Swing
components. You should directly paint a JComponent based on your customized
logic. And it is not easy. Go search for a package called "prefuse"
【在 d*****l 的大作中提到】 : 创建自己的renderer或覆盖TabelCellRenderer也有缺点,只能实现 : 有限种类的背景色,一旦决定背景色的内部逻辑复杂了,该覆盖的函数就 : 会变得极其复杂。而且往往希望由别的类对象来决定或实现背景色决定逻辑 : 比较好。
|
c*****t 发帖数: 1879 | 6 Prefuse is not for table rendering... It's for graph visualization.
customized
【在 F****n 的大作中提到】 : If you want to build complex visualization, you should not use Swing : components. You should directly paint a JComponent based on your customized : logic. And it is not easy. Go search for a package called "prefuse"
|
F****n 发帖数: 3271 | 7 It's a dataflow-based visualization package that can be used to visualize
anything.
【在 c*****t 的大作中提到】 : Prefuse is not for table rendering... It's for graph visualization. : : customized
|