org.fife.ui.modifiabletable
Interface RowHandler


public interface RowHandler

A RowHandler is called whenever the user wants to add, modify, or remove a row from a ModifiableTable. It is responsible for getting new data from the user, and has the power to veto a removal.

Version:
1.0
Author:
Robert Futrell

Method Summary
 java.lang.Object[] getNewRowInfo(java.lang.Object[] oldData)
          Called when the user chooses to add or modify a row in the table.
 boolean shouldRemoveRow(int row)
          Called when the user chooses to remove a row in the table.
 void updateUI()
          If this row handler has any Swing components/windows in it, this method will update their UI's.
 

Method Detail

getNewRowInfo

public java.lang.Object[] getNewRowInfo(java.lang.Object[] oldData)
Called when the user chooses to add or modify a row in the table.

Parameters:
oldData - The old values of the cells in this row. If the user is adding a new row, this value is null.
Returns:
The new values for the cells in this row. If the user cancels the add/modify operation, this method should return null.

shouldRemoveRow

public boolean shouldRemoveRow(int row)
Called when the user chooses to remove a row in the table. This method gives the program a chance to veto the removal, prompt the user to validate the removal, etc.

Parameters:
row - The row that might be removed.
Returns:
Whether the row should be removed.

updateUI

public void updateUI()
If this row handler has any Swing components/windows in it, this method will update their UI's. This method is called in response to an LaF change.