1 23 24 29 30 package com.sun.enterprise.tools.common.ui; 31 import java.awt.*; 32 import java.awt.event.*; 33 import javax.swing.*; 34 import javax.swing.table.*; 35 import com.sun.enterprise.tools.common.util.diagnostics.Reporter; 36 37 44 45 public abstract class GenericTable extends JPanel 46 { 47 public GenericTable() 48 { 49 } 50 51 53 public void setGenericTableInfo(GenericTableInfo gti) 54 { 55 Reporter.assertIt(gti); theModel = new GenericTableModel(gti); 57 theTable = new JTable(theModel); 58 add(new JScrollPane(theTable)); 59 } 61 62 64 public Object getPropertyValue() throws java.lang.IllegalStateException 65 { 66 return saveData(); 67 } 68 69 71 protected GenericTableModel getModel() 72 { 73 return theModel; 74 } 75 76 78 protected JTable getJTable() 79 { 80 return theTable; 81 } 82 83 85 public abstract Object saveData(); 86 87 89 private JTable theTable = null; 90 private GenericTableModel theModel = null; 91 } 92 | Popular Tags |