Description: 用java写得一个treetable实现,可以携带用户自己的数据类。本例带有一个简单得使用例子:
1、导入到Eclipse,把package换成你自己得package
2、运行TreetableMain.java即可
这是本人参考sun公司给出得那个treetable例子写得。重大改进如下:
1、sun公司的例子可能是由于写得较早,里面重写了TreeModel和AbstractTableModel的很多方法。本人改进了它里面的TreeTableModel和TreeTableModelAdapter类,直接从TreeModel和AbstractTableModel继承,所以使代码大幅度缩短。
2、建立了TreetableUserClass抽象类,这个类专门用于存储我们自己的数据。内建递归算法和行转换方法,使一个此类的实例对应于treetable的一行。例子里面有一个很简单的此类的实现,可以直接运行。
(前面上传过一次,不过好像不成功,这里重新传一次。)-written with a treetable realized, users can bring their own data types. The cases with a simple example in the use of : 1, Introduction to the Eclipse, you package replaced two of its own package, can run TreetableMain.java this is my reference sun in the company that is written treetable example. Significant improvements are as follows : 1. Sun's example may be due to earlier written inside a rewrite of the TreeModel and AbstractTableModel many ways. I improved it and inside the TreeTableModel TreeTableModelAdapter category directly from the TreeModel and AbstractTableModel succession that's why the code greatly reduced. 2, a TreetableUserClass abstract category, the category devoted to the memory of our own data. Built - recursive algorithm and line conversion methods to make an Platform: |
Size: 33940 |
Author:李振华 |
Hits:
Description: 自己定义的表格,继承AbstractTableModel类,实现自己的表格,文件MyTableDemo.java-own definition of the form, inheritance AbstractTableModel class and realize their forms, documents MyTableDemo.java Platform: |
Size: 4860 |
Author:郭喜春 |
Hits:
Description: 自己定义的表格,继承AbstractTableModel类,实现自己的表格,文件MyTableDemo.java-own definition of the form, inheritance AbstractTableModel class and realize their forms, documents MyTableDemo.java Platform: |
Size: 4096 |
Author:郭喜春 |
Hits: