JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.datasource
Interface ReadOnlyBindingModel

All Known Subinterfaces:
BindingModel
All Known Implementing Classes:
ReadOnlyBinding

public interface ReadOnlyBindingModel

This interface provides a single-level, 2-dimensional view of a set of data. It groups all non-update methods and handles read-only events. This interface exists only to provide a logical separation between read-only and non-read-only methods and event handling.

See Also:
BindingModel

Method Summary
 void addBindingListener(com.klg.jclass.datasource.DataModelListener listener)
          Implements DataModel method addDataModelListener.
 Object getCell(com.klg.jclass.datasource.DataModelListener originator, int rowIndex, int columnIndex)
          Get the value in a cell for a specified row.
 Object getCell(com.klg.jclass.datasource.DataModelListener originator, int rowIndex, String columnName)
          Get the value in a cell for a specified row.
 int getColumnCount()
          Return the number of columns in this table.
 String getColumnIdentifier(int colIndex)
          Return the name of this column.
 int getColumnIndex(String columnName)
          Return the index for this column name.
 com.klg.jclass.datasource.ColumnModel getColumnObject(String columnName)
           
 Object getCurrentCell(com.klg.jclass.datasource.DataModelListener originator, String columnName)
          Get the value in a cell for the row currently in focus.
 com.klg.jclass.datasource.DataTableModel getCurrentDataTableModel(com.klg.jclass.datasource.DataModelListener originator)
          Get the table currently in scope.
 int getCurrentRowIndex()
          Return the index of the row currently in focus.
 com.klg.jclass.datasource.DataModel getDataModel()
          Get the data model containing this level.
 String getDescription()
          Get the name for this level.
 int getJavaColumnType(int columnIndex)
          Return the MetaDataModel type for this column.
 int getJavaColumnType(String columnName)
          Return the MetaDataModel type for this column.
 Object getListeners()
          Returns a list of listeners
 com.klg.jclass.datasource.MetaDataModel getMetaDataModel()
          Get the meta data model for this level.
 com.klg.jclass.datasource.Binding getParent()
          Get the parent Binding of this table.
 int getRowCount()
          Return the number of rows in the table currently in scope.
 boolean isDataAvailable()
          Return true if data is available from this table.
 boolean isOurData(com.klg.jclass.datasource.DataModelEvent e)
          Is the event intend for this level?
 boolean moveToRowIndex(com.klg.jclass.datasource.DataModelListener originator, int rowIndex)
          Move focus to a new row in the current table.
 void removeBindingListener(com.klg.jclass.datasource.DataModelListener listener)
          Implements DataModel method removeDataModelListener.
 void requeryAll(com.klg.jclass.datasource.DataModelListener originator)
          Requery all levels.
 void requeryCurrentRow(com.klg.jclass.datasource.DataModelListener originator)
          Requery the row currently in focus.
 void requeryCurrentRowAndDetails(com.klg.jclass.datasource.DataModelListener originator)
          Requery the row currently in focus and its details.
 void requeryLevel(com.klg.jclass.datasource.DataModelListener originator)
          Requery all rows in the table currently in focus.
 void requeryRow(com.klg.jclass.datasource.DataModelListener originator, int rowIndex)
          Requery the specified row.
 void requeryRowAndDetails(com.klg.jclass.datasource.DataModelListener originator, int rowIndex)
          Requery a row and its details.
 void setDataModel(com.klg.jclass.datasource.DataModel dataModel)
          Set the data model for this level.
 void setDescription(String name)
          Set the name for this level.
 void setMetaDataModel(com.klg.jclass.datasource.MetaDataModel metaDataModel)
          Set the meta data model for this level.
 

Method Detail

getCurrentDataTableModel

public com.klg.jclass.datasource.DataTableModel getCurrentDataTableModel(com.klg.jclass.datasource.DataModelListener originator)
                                                                  throws DataModelException
Get the table currently in scope.

Parameters:
originator - the DataModelListener making this request.
Returns:
the DataTableModel currently in focus for this level.
DataModelException

getMetaDataModel

public com.klg.jclass.datasource.MetaDataModel getMetaDataModel()
Get the meta data model for this level.

Returns:
the MetaDataModel for this level.

setMetaDataModel

public void setMetaDataModel(com.klg.jclass.datasource.MetaDataModel metaDataModel)
Set the meta data model for this level.


getParent

public com.klg.jclass.datasource.Binding getParent()
Get the parent Binding of this table.

Returns:
the Binding which is the parent of this level.

getDataModel

public com.klg.jclass.datasource.DataModel getDataModel()
Get the data model containing this level.

Returns:
the DataModel which contains this level.

setDataModel

public void setDataModel(com.klg.jclass.datasource.DataModel dataModel)
Set the data model for this level.

Parameters:
dataModel - the data model for this level.

setDescription

public void setDescription(String name)
Set the name for this level.


getDescription

public String getDescription()
Get the name for this level.

Returns:
the name for this level.

addBindingListener

public void addBindingListener(com.klg.jclass.datasource.DataModelListener listener)
Implements DataModel method addDataModelListener.


removeBindingListener

public void removeBindingListener(com.klg.jclass.datasource.DataModelListener listener)
Implements DataModel method removeDataModelListener.


getListeners

public Object getListeners()
Returns a list of listeners

Returns:
the list of listeners.

getRowCount

public int getRowCount()
Return the number of rows in the table currently in scope.

Returns:
the number of rows in the table currently in scope.

getColumnCount

public int getColumnCount()
Return the number of columns in this table.

Returns:
the number of columns in this table.

moveToRowIndex

public boolean moveToRowIndex(com.klg.jclass.datasource.DataModelListener originator,
                              int rowIndex)
                       throws DataModelException
Move focus to a new row in the current table.

Parameters:
originator - the DataModelListener requesting the move.
rowIndex - the index of the row
DataModelException

isDataAvailable

public boolean isDataAvailable()
Return true if data is available from this table.

Returns:
true if this table has data, false otherwise.

getColumnIdentifier

public String getColumnIdentifier(int colIndex)
Return the name of this column.

Parameters:
colIndex - the int column index.
Returns:
the String name of this column.

getJavaColumnType

public int getJavaColumnType(String columnName)
Return the MetaDataModel type for this column.

Parameters:
columnName - the name of the column.
Returns:
one of MetaDataModel.TYPE_*.
See Also:
MetaDataModel

getJavaColumnType

public int getJavaColumnType(int columnIndex)
Return the MetaDataModel type for this column.

Returns:
one of MetaDataModel.TYPE_*.
See Also:
MetaDataModel

getCell

public Object getCell(com.klg.jclass.datasource.DataModelListener originator,
                      int rowIndex,
                      int columnIndex)
               throws DataModelException
Get the value in a cell for a specified row.

Parameters:
originator - the DataModelListener making the commit request.
rowIndex - the row index.
columnIndex - the column index.
Throws:
DataModelException - If get fails.

getCell

public Object getCell(com.klg.jclass.datasource.DataModelListener originator,
                      int rowIndex,
                      String columnName)
               throws DataModelException
Get the value in a cell for a specified row.

Parameters:
originator - the DataModelListener making the commit request.
rowIndex - the row index.
columnName - the column name.
Throws:
DataModelException - If get fails.

getCurrentCell

public Object getCurrentCell(com.klg.jclass.datasource.DataModelListener originator,
                             String columnName)
                      throws DataModelException
Get the value in a cell for the row currently in focus.

Parameters:
originator - the DataModelListener requesting the value.
columnName - the String column name for the column.
Returns:
the Object in this cell.
Throws:
DataModelException - If get fails.

getCurrentRowIndex

public int getCurrentRowIndex()
Return the index of the row currently in focus.

Returns:
the index of the current row.

requeryRow

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

Parameters:
originator - the DataModelListener making the requery request.
rowIndex - the row index to be requeried.
DataModelException

requeryCurrentRow

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

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

requeryRowAndDetails

public void requeryRowAndDetails(com.klg.jclass.datasource.DataModelListener originator,
                                 int rowIndex)
                          throws DataModelException
Requery a row and its details.

Parameters:
originator - the DataModelListener making the requery request.
rowIndex - the row index to be requeried.
DataModelException

requeryCurrentRowAndDetails

public void requeryCurrentRowAndDetails(com.klg.jclass.datasource.DataModelListener originator)
                                 throws DataModelException
Requery the row currently in focus and its details.

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

requeryAll

public void requeryAll(com.klg.jclass.datasource.DataModelListener originator)
                throws DataModelException
Requery all levels.

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

getColumnIndex

public int getColumnIndex(String columnName)
Return the index for this column name.

Returns:
the index of this column.

requeryLevel

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

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

isOurData

public boolean isOurData(com.klg.jclass.datasource.DataModelEvent e)
Is the event intend for this level?


getColumnObject

public com.klg.jclass.datasource.ColumnModel getColumnObject(String columnName)

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