1 7 8 package org.jdesktop.jdnc; 9 10 import javax.swing.Icon ; 11 import javax.swing.JScrollPane ; 12 13 import org.jdesktop.swing.decorator.FilterPipeline; 14 import org.jdesktop.swing.JXTreeTable; 15 import org.jdesktop.swing.treetable.DefaultTreeTableModel; 16 import org.jdesktop.swing.treetable.TreeTableModel; 17 18 28 public class JNTreeTable extends JNTable { 29 32 public JNTreeTable() { 33 this(new DefaultTreeTableModel()); 34 } 35 36 43 public JNTreeTable(TreeTableModel model) { 44 super(new JXTreeTable(model)); 45 } 46 47 52 public JXTreeTable getTreeTable() { 53 return (JXTreeTable) jxtable; 54 } 55 56 61 public TreeTableModel getTreeTableModel() { 62 return ((JXTreeTable) jxtable).getTreeTableModel(); 63 } 64 65 73 public void setTreeTableModel(TreeTableModel model) { 74 ((JXTreeTable) jxtable).setTreeTableModel(model); 75 } 76 77 public void setFilters(FilterPipeline pipeline) { 78 } 80 81 public void setCollapsedIcon(Icon icon) { 82 ((JXTreeTable) jxtable).setCollapsedIcon(icon); 83 } 84 85 public void setExpandedIcon(Icon icon) { 86 ((JXTreeTable) jxtable).setExpandedIcon(icon); 87 } 88 89 public void setOpenIcon(Icon icon) { 90 ((JXTreeTable) jxtable).setOpenIcon(icon); 91 } 92 93 public void setClosedIcon(Icon icon) { 94 ((JXTreeTable) jxtable).setClosedIcon(icon); 95 } 96 97 public void setLeafIcon(Icon icon) { 98 ((JXTreeTable) jxtable).setLeafIcon(icon); 99 } 100 103 public void collapseRow(int row) { 104 ((JXTreeTable) jxtable).collapseRow(row); 105 } 106 107 110 public void expandRow(int row) { 111 ((JXTreeTable) jxtable).expandRow(row); 112 } 113 114 117 public void collapseAll() { 118 ((JXTreeTable) jxtable).collapseAll(); 119 } 120 121 124 public void expandAll() { 125 ((JXTreeTable) jxtable).expandAll(); 126 } 127 } 128 | Popular Tags |