edu.jhu.tmaj.client.tables
Class InputPanel4

java.lang.Object
  extended by edu.jhu.tmaj.client.tables.InputPanel4
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Direct Known Subclasses:
PaperInputPanel, SpecimenInputPanel, UserInputPanel

public class InputPanel4
extends java.lang.Object
implements java.awt.event.ActionListener

A Panel that turns a regular database table into a JTable with lots of functionality for adding, modifying, and deleting rows.


Field Summary
protected  javax.swing.JCheckBox singleCheckBox
           
protected  javax.swing.JTable table
           
protected  TableData4 tableData
           
protected  BeanTableModel tableModel
           
protected  javax.swing.JScrollPane tableScrollPane
           
 
Constructor Summary
InputPanel4(TableData4 tableData)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 void addComponent(javax.swing.JComponent button)
           
 void copyColumns()
           
protected  void delete()
           
 void disableAddingNewRows()
           
 void disableEditing()
           
 void foreignSearch(SearchTerm searchTerm, java.lang.String value, java.util.List columnIdentifiers)
          Sets the search fields in the gui and then does a search.
 javax.swing.JPanel getPanel()
           
protected  SingleInputPanel getSingleInputPanel()
           
 TableData4 getTableData()
           
 void hideColumns()
          Displays a HideColumnsFrame
 void save()
          Saves any changes the user has made to the table
 void search()
          Searches the database for any records that match the search-fields and puts the records in the table
protected static void setReducedFont(java.awt.Component component)
           
static void shrinkButton(javax.swing.JComponent component)
          Shrinks a JButton by lessening its font and margin in the interests of saving space.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

singleCheckBox

protected javax.swing.JCheckBox singleCheckBox

tableData

protected final TableData4 tableData

tableScrollPane

protected final javax.swing.JScrollPane tableScrollPane

table

protected final javax.swing.JTable table

tableModel

protected final BeanTableModel tableModel
Constructor Detail

InputPanel4

public InputPanel4(TableData4 tableData)
Method Detail

addComponent

public void addComponent(javax.swing.JComponent button)

getSingleInputPanel

protected SingleInputPanel getSingleInputPanel()

disableEditing

public void disableEditing()

disableAddingNewRows

public void disableAddingNewRows()

setReducedFont

protected static void setReducedFont(java.awt.Component component)

shrinkButton

public static void shrinkButton(javax.swing.JComponent component)
Shrinks a JButton by lessening its font and margin in the interests of saving space.


hideColumns

public void hideColumns()
Displays a HideColumnsFrame


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

delete

protected void delete()

foreignSearch

public void foreignSearch(SearchTerm searchTerm,
                          java.lang.String value,
                          java.util.List columnIdentifiers)
Sets the search fields in the gui and then does a search.


search

public void search()
Searches the database for any records that match the search-fields and puts the records in the table


save

public void save()
Saves any changes the user has made to the table


copyColumns

public void copyColumns()

getPanel

public final javax.swing.JPanel getPanel()

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTableData

public TableData4 getTableData()