com.extentech.ExtenXLS.binder
Class DataBoundCell

java.lang.Object
  extended by com.extentech.ExtenXLS.binder.DataBoundCell
All Implemented Interfaces:
BoundCell

public final class DataBoundCell
extends Object
implements BoundCell

The DataBoundCell class extends the CellHandle class with data binding functionality
using the ExtenDataObject persistent data bean classes.

Since:
1.3
Version:
2.0
Author:
John McMahon -- Copyright ©2011Extentech Inc.
See Also:
ExtenDataObject, CellHandle, XLSRecord, ExtenDataObject

Constructor Summary
DataBoundCell()
          Default Constructor.
DataBoundCell(CellHandle c, DataObject d, String fieldname)
          Create a DataBoundCell passing in the CellHandle that it represents, the DataObject to which it is bound, and the field/index in the DataObject containing its values.
DataBoundCell(CellHandle c, DataObject d, String fieldname, int i)
          Create a DataBoundCell passing in the CellHandle that it represents, the DataObject to which it is bound, and the field/index in the DataObject containing its values.
 
Method Summary
 void bindObject(Object dobj, String col)
          bind a DataObject field in the first row of data for the DataObject to this CellHandle.
 void bindObject(Object dobj, String col, int row)
          bind a DataObject field to this CellHandle field.
 void setCell(CellHandle c)
           
 String toString()
           
 boolean updateCell()
          refresh the CellHandle values from the underlying DataObject value bound to this CellHandle.
 boolean updateCell(boolean overrideMismatch)
          refresh the CellHandle values from the underlying DataObject value bound to this CellHandle.
 void updateFromCell()
          refresh the DataObject value from the value of this CellHandle.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataBoundCell

public DataBoundCell()
Default Constructor. You need to set the CellHandle that it represents, the DataObject to which it is bound, and the field/index in the DataObject containing its values.


DataBoundCell

public DataBoundCell(CellHandle c,
                     DataObject d,
                     String fieldname)
Create a DataBoundCell passing in the CellHandle that it represents, the DataObject to which it is bound, and the field/index in the DataObject containing its values.


DataBoundCell

public DataBoundCell(CellHandle c,
                     DataObject d,
                     String fieldname,
                     int i)
Create a DataBoundCell passing in the CellHandle that it represents, the DataObject to which it is bound, and the field/index in the DataObject containing its values.

Method Detail

setCell

public void setCell(CellHandle c)
Specified by:
setCell in interface BoundCell

updateCell

public boolean updateCell()
refresh the CellHandle values from the underlying DataObject value bound to this CellHandle.

Specified by:
updateCell in interface BoundCell

updateCell

public boolean updateCell(boolean overrideMismatch)
refresh the CellHandle values from the underlying DataObject value bound to this CellHandle.

Specified by:
updateCell in interface BoundCell
Parameters:
overrideMismatch - - override cell type mismatch exceptions by deleting and re-creating the cell;

updateFromCell

public void updateFromCell()
refresh the DataObject value from the value of this CellHandle.

Specified by:
updateFromCell in interface BoundCell

bindObject

public void bindObject(Object dobj,
                       String col)
bind a DataObject field in the first row of data for the DataObject to this CellHandle.

Specified by:
bindObject in interface BoundCell

toString

public String toString()
Overrides:
toString in class Object

bindObject

public void bindObject(Object dobj,
                       String col,
                       int row)
bind a DataObject field to this CellHandle field.

Specified by:
bindObject in interface BoundCell


Copyright © 2011 Extentech Inc. All Rights Reserved.