quick.dbtable
Class DBTableEventListener

java.lang.Object
  extended byquick.dbtable.DBTableEventListener

public class DBTableEventListener
extends java.lang.Object


Constructor Summary
DBTableEventListener()
           
 
Method Summary
 void afterColumnSelectionChange(int fromColumn, int toColumn)
          This function is called after the column selection change has happened.
 void afterRowSelectionChange(int fromRow, int toRow)
          This function is called after the row selection change has happened.
 boolean beforeColumnSelectionChange(int fromColumn, int toColumn, int fromRow, int toRow)
          This function is called whenever the user changes the selection from one column to another.
 boolean beforeRowSelectionChange(int fromRow, int toRow, int fromColumn, int toColumn)
          This function is called whenever the user changes the selection from one row to another.
 boolean onSortColumn(int column, boolean ascending)
          This function is called when the user clicks on the table column header to sort by that column.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBTableEventListener

public DBTableEventListener()
Method Detail

beforeRowSelectionChange

public boolean beforeRowSelectionChange(int fromRow,
                                        int toRow,
                                        int fromColumn,
                                        int toColumn)
This function is called whenever the user changes the selection from one row to another. You should use this method only if you do not want to allow the user to move to a new row based on validation, otherwise use afterRowSelectionChange() method. Note: Even if the user has rearranged columns or rows, you will still get the old column/row index as they were originally created. Important: This method will work only for JDK 1.3 or above

Parameters:
fromRow - the original row from which the user is trying to change selection
toRow - the new row which the user is trying to go.
fromColumn - the original column from which the user is trying to change selection
toColumn - the new column which the user is trying to go.
Returns:
if you want to allow the row selection change return true else return false

beforeColumnSelectionChange

public boolean beforeColumnSelectionChange(int fromColumn,
                                           int toColumn,
                                           int fromRow,
                                           int toRow)
This function is called whenever the user changes the selection from one column to another. You should use this method only if you do not want to allow the user to move to a new column based on validation, otherwise use afterColumnSelectionChange() method. Note: Even if the user has rearranged columns or rows, you will still get the old column/row index as they were originally created. Important: This method will work only for JDK 1.3 or above

Parameters:
fromColumn - the original column from which the user is trying to change selection
toColumn - the new column which the user is trying to go.
fromRow - the original row from which the user is trying to change selection
toRow - the new row which the user is trying to go.
Returns:
if you want to allow the row selection change return true else return false

afterRowSelectionChange

public void afterRowSelectionChange(int fromRow,
                                    int toRow)
This function is called after the row selection change has happened. Note: Even if the user has rearranged columns or rows, you will still get the old column/row index as they were originally created.

Parameters:
fromRow - the original row from which the user is trying to change selection
toRow - the new row which the user is trying to go.

afterColumnSelectionChange

public void afterColumnSelectionChange(int fromColumn,
                                       int toColumn)
This function is called after the column selection change has happened. Note: Even if the user has rearranged columns, you will still get the old column index as they were originally created.

Parameters:
fromColumn - the original column from which the user is trying to change selection
toColumn - the new column which the user is trying to go.

onSortColumn

public boolean onSortColumn(int column,
                            boolean ascending)
This function is called when the user clicks on the table column header to sort by that column. If sort is disabled, this method will never be called. Note: Even if the user has rearranged columns, you will still get the old column index as they were originally created.

Parameters:
column - the column which user has clicked to sort
ascending - the sort order in which we are trying to sort
Returns:
if you want to allow the column sort return true else return false