1 package jp.ac.aiit.xdf.component.swingx.datasource;
3 import javax.swing.event.TreeModelListener;
4 import javax.swing.tree.TreePath;
6 import org.jdesktop.swingx.treetable.TreeTableModel;
8 public class DatasourceWrappedModel implements TreeTableModel {
9 private TreetableDataSource dataSource;
11 public DatasourceWrappedModel(TreetableDataSource dataSource) {
12 this.dataSource = dataSource;
15 public TreetableDataSource getDataSource() {
20 public Class<?> getColumnClass(int columnIndex) {
21 return dataSource.getColumnInfo(columnIndex).getColumnClass();
25 public int getColumnCount() {
26 return dataSource.getColumnCount();
30 public String getColumnName(int column) {
31 return dataSource.getColumnInfo(column).getColumnName();
35 public int getHierarchicalColumn() {
36 return dataSource.getHierarchicalColumn();
40 public Object getValueAt(Object node, int column) {
41 return dataSource.getValueAt(node, column);
45 public boolean isCellEditable(Object node, int column) {
46 return dataSource.isCellEditable(node, column);
50 public void setValueAt(Object value, Object node, int column) {
51 dataSource.setValueAt(value, node, column);
55 public Object getChild(Object parent, int index) {
56 return dataSource.getChild(parent, index);
60 public int getChildCount(Object parent) {
61 return dataSource.getChildCount(parent);
65 public int getIndexOfChild(Object parent, Object child) {
66 return dataSource.getIndexOfChild(parent, child);
70 public Object getRoot() {
71 return dataSource.getRoot();
75 public boolean isLeaf(Object node) {
76 return dataSource.isLeaf(node);
80 public void addTreeModelListener(TreeModelListener l) {}
83 public void removeTreeModelListener(TreeModelListener l) {}
86 public void valueForPathChanged(TreePath path, Object newValue) {}