1 19 20 package org.netbeans.modules.tasklist.core; 21 22 import java.awt.Dimension ; 23 import javax.swing.*; 24 import javax.swing.table.TableColumnModel ; 25 import javax.swing.table.TableModel ; 26 import org.openide.explorer.view.TreeTableView; 27 28 31 public final class MyTreeTableView extends TreeTableView { 32 33 private static final long serialVersionUID = 1; 34 35 public MyTreeTableView() { 36 37 JTable table = treeTable; 38 table.setShowHorizontalLines(true); 39 table.setShowVerticalLines(false); 40 41 44 table.setIntercellSpacing(new Dimension (0, table.getRowMargin())); 47 double height = new JLabel("Z").getPreferredSize().getHeight(); int intheight = (int) height; 49 table.setRowHeight(intheight); 50 51 59 } 60 61 public JTree getTree() { 62 return tree; 63 } 64 65 public JTable getTable() { 66 return treeTable; 67 } 68 69 public TableModel getModel() { 70 return treeTable.getModel(); 71 } 72 73 public TableColumnModel getHeaderModel() { 74 return treeTable.getTableHeader().getColumnModel(); 75 } 76 } 77 78 | Popular Tags |