org.fife.ui.modifiabletable
Interface RowHandler

All Known Implementing Classes:
AbstractRowHandler

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
See Also:
AbstractRowHandler

Method Summary
 boolean canModifyRow(int row)
          Called when the user selects a row in the table.
 boolean canRemoveRow(int row)
          Called when the user selects a row in the table.
 java.lang.Object[] getNewRowInfo(java.lang.Object[] oldData)
          Called when the user chooses to add or modify 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

canModifyRow

boolean canModifyRow(int row)
Called when the user selects a row in the table. If this method returns false, the "Modify" button is disabled.

Parameters:
row - The row that might be modified.
Returns:
Whether the row should be modified.
See Also:
canRemoveRow(int)

canRemoveRow

boolean canRemoveRow(int row)
Called when the user selects a row in the table. If this method returns false, then the "Remove" button is disabled.

Parameters:
row - The row that might be removed.
Returns:
Whether the row should be removed.
See Also:
canModifyRow(int)

getNewRowInfo

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.

updateUI

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.