JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.datasource
Interface BindingModel

All Superinterfaces:
ReadOnlyBindingModel
All Known Implementing Classes:
ReadOnlyBinding

public interface BindingModel
extends ReadOnlyBindingModel

Extends ReadOnlyBindingModel and provides update methods. Operations can be performed on the row currently in focus (i.e. getCurrentRowStatus()) or by specifying a row index (i.e. getRowStatus(rowIndex)).

See Also:
ReadOnlyBindingModel, ReadOnlyBinding, Binding

Method Summary
 void addRow(com.klg.jclass.datasource.DataModelListener originator)
          Add a row to the table currently in focus.
 void cancelAll(com.klg.jclass.datasource.DataModelListener originator)
          Cancel edits in all levels.
 void cancelCurrentRowChanges(com.klg.jclass.datasource.DataModelListener originator)
          Cancel edits to the row currently in focus.
 void cancelRowChanges(com.klg.jclass.datasource.DataModelListener originator, int rowIndex)
          Cancel edits to the specified row.
 void commitAll(com.klg.jclass.datasource.DataModelListener originator)
          Commit pending edits in all levels.
 void commitCurrentRow(com.klg.jclass.datasource.DataModelListener originator)
          Commit pending edits on the row currently in focus making them permanent.
 void commitRow(com.klg.jclass.datasource.DataModelListener originator, int rowIndex)
          Commit pending edits on the specified row making them permanent.
 void deleteCurrentRow(com.klg.jclass.datasource.DataModelListener originator)
          Delete the row currently in focus.
 void deleteRow(com.klg.jclass.datasource.DataModelListener originator, int rowIndex)
          Delete the specified row.
 void deleteRows(com.klg.jclass.datasource.DataModelListener originator, int rowIndex, int number)
          Delete a range of rows from the table currently in focus.
 int getCurrentRowStatus()
          Return the edit status of the row currently in focus.
 int getRowStatus(int rowIndex)
          Return the edit status of the specified row.
 boolean isColumnEditable(int columnIndex)
          Return true if edits are permitted on this column.
 boolean isColumnEditable(String columnName)
          Return true if edits are permitted on this column.
 boolean isCurrentRowModified()
          Return true if row currently in focus is modified.
 boolean isRowModified(int rowIndex)
          Return true if the specified row is modified.
 void moveToBestRowAfterDelete(com.klg.jclass.datasource.DataModelListener originator, com.klg.jclass.datasource.DataModelEvent event)
           
 void requeryLevel(com.klg.jclass.datasource.DataModelListener originator)
          Requery all rows in the table currently in focus.
 void setCell(com.klg.jclass.datasource.DataModelListener originator, int rowIndex, int columnIndex, Object newValue)
          Set the value in a cell on the specified row.
 void setCurrentCell(com.klg.jclass.datasource.DataModelListener originator, String columnName, Object newValue)
          Set the value in the cell on the row currently in focus.
 
Methods inherited from interface com.klg.jclass.datasource.ReadOnlyBindingModel
addBindingListener, getCell, getCell, getColumnCount, getColumnIdentifier, getColumnIndex, getColumnObject, getCurrentCell, getCurrentDataTableModel, getCurrentRowIndex, getDataModel, getDescription, getJavaColumnType, getJavaColumnType, getListeners, getMetaDataModel, getParent, getRowCount, isDataAvailable, isOurData, moveToRowIndex, removeBindingListener, requeryAll, requeryCurrentRow, requeryCurrentRowAndDetails, requeryRow, requeryRowAndDetails, setDataModel, setDescription, setMetaDataModel
 

Method Detail

isColumnEditable

public boolean isColumnEditable(String columnName)
Return true if edits are permitted on this column.

Returns:
true if edits are permitted on this column, false otherwise.

isColumnEditable

public boolean isColumnEditable(int columnIndex)
Return true if edits are permitted on this column.

Returns:
true if edits are permitted on this column, false otherwise.

deleteRows

public void deleteRows(com.klg.jclass.datasource.DataModelListener originator,
                       int rowIndex,
                       int number)
                throws DataModelException
Delete a range of rows from the table currently in focus.

Parameters:
originator - the DataModelListener making the delete request.
rowIndex - the row index at which the deletes will start.
number - the number of rows to delete
DataModelException

deleteRow

public void deleteRow(com.klg.jclass.datasource.DataModelListener originator,
                      int rowIndex)
               throws DataModelException
Delete the specified row.

Parameters:
originator - the DataModelListener making the delete request.
rowIndex - the row index at which the deletes will start.
DataModelException

deleteCurrentRow

public void deleteCurrentRow(com.klg.jclass.datasource.DataModelListener originator)
                      throws DataModelException
Delete the row currently in focus.

Parameters:
originator - the DataModelListener making the delete request.
DataModelException

addRow

public void addRow(com.klg.jclass.datasource.DataModelListener originator)
            throws DataModelException
Add a row to the table currently in focus.

Parameters:
originator - the DataModelListener making the add request.
DataModelException

cancelRowChanges

public void cancelRowChanges(com.klg.jclass.datasource.DataModelListener originator,
                             int rowIndex)
                      throws DataModelException
Cancel edits to the specified row.

Parameters:
originator - the DataModelListener making the cancel request.
rowIndex - the row index to be cancelled.
DataModelException

cancelCurrentRowChanges

public void cancelCurrentRowChanges(com.klg.jclass.datasource.DataModelListener originator)
                             throws DataModelException
Cancel edits to the row currently in focus.

Parameters:
originator - the DataModelListener making the cancel request.
DataModelException

cancelAll

public void cancelAll(com.klg.jclass.datasource.DataModelListener originator)
               throws DataModelException
Cancel edits in all levels.

Parameters:
originator - the DataModelListener making the cancel request.
DataModelException

commitRow

public void commitRow(com.klg.jclass.datasource.DataModelListener originator,
                      int rowIndex)
               throws DataModelException
Commit pending edits on the specified row making them permanent.

Parameters:
originator - the DataModelListener making the commit request.
rowIndex - the row index to be committed.
DataModelException

commitCurrentRow

public void commitCurrentRow(com.klg.jclass.datasource.DataModelListener originator)
                      throws DataModelException
Commit pending edits on the row currently in focus making them permanent.

Parameters:
originator - the DataModelListener making the commit request.
DataModelException

commitAll

public void commitAll(com.klg.jclass.datasource.DataModelListener originator)
               throws DataModelException
Commit pending edits in all levels.

Parameters:
originator - the DataModelListener making the commit request.
DataModelException

setCell

public void setCell(com.klg.jclass.datasource.DataModelListener originator,
                    int rowIndex,
                    int columnIndex,
                    Object newValue)
             throws DataModelException
Set the value in a cell on the specified row.

Parameters:
originator - the DataModelListener making the set request.
newValue - the new Object for the cell.
rowIndex - the row index.
columnIndex - the column index.
DataModelException

setCurrentCell

public void setCurrentCell(com.klg.jclass.datasource.DataModelListener originator,
                           String columnName,
                           Object newValue)
                    throws DataModelException
Set the value in the cell on the row currently in focus. The row must be committed to make the change permanent, or cancelled to restore the original value.

Parameters:
originator - DataModelListener the listener requesting the update.
columnName - the string name of the column to be updated.
newValue - the Object which is the new value for the cell.
DataModelException

isRowModified

public boolean isRowModified(int rowIndex)
                      throws DataModelException
Return true if the specified row is modified.

Parameters:
rowIndex - the row index.
Returns:
true if any cell on this row has pending edits, false otherwise.
DataModelException

isCurrentRowModified

public boolean isCurrentRowModified()
                             throws DataModelException
Return true if row currently in focus is modified.

Returns:
true if any cell on this row has pending edits, false otherwise.
DataModelException

getRowStatus

public int getRowStatus(int rowIndex)
                 throws DataModelException
Return the edit status of the specified row.

Parameters:
rowIndex - the row index.
Returns:
one of DataTableModel.UPDATED, DataTableModel.INSERTED, DataTableModel.DELETED, DataTableModel.COMMITTED, DataTableModel.NONEXISTENT.
DataModelException

getCurrentRowStatus

public int getCurrentRowStatus()
                        throws DataModelException
Return the edit status of the row currently in focus.

Returns:
one of DataTableModel.UPDATED, DataTableModel.INSERTED, DataTableModel.DELETED, DataTableModel.COMMITTED, DataTableModel.NONEXISTENT.
DataModelException

requeryLevel

public void requeryLevel(com.klg.jclass.datasource.DataModelListener originator)
                  throws DataModelException
Requery all rows in the table currently in focus.

Specified by:
requeryLevel in interface ReadOnlyBindingModel
Parameters:
originator - the DataModelListener making the requery request.
DataModelException

moveToBestRowAfterDelete

public void moveToBestRowAfterDelete(com.klg.jclass.datasource.DataModelListener originator,
                                     com.klg.jclass.datasource.DataModelEvent event)
                              throws DataModelException
DataModelException

Copyright © 2004 Quest Software Inc..
All rights reserved.