com.extentech.ExtenXLS.binder
Class BeanBoundCell

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

public final class BeanBoundCell
extends Object
implements BoundCell

The BeanBoundCell class extends the CellHandle class with data binding functionality
using the value Object.

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

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

Constructor Detail

BeanBoundCell

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


BeanBoundCell

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


BeanBoundCell

public BeanBoundCell(CellHandle c,
                     Object d,
                     String fieldname,
                     int i)
Create a BeanBoundCell passing in the CellHandle that it represents, the Object to which it is bound, and the field/index in the Object 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 Object value bound to this CellHandle.

Specified by:
updateCell in interface BoundCell

updateCell

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

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

updateFromCell

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

Specified by:
updateFromCell in interface BoundCell

bindObject

public void bindObject(Object dobj,
                       String col)
bind a Object field in the first row of data for the Object 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 Object field to this CellHandle field.

Specified by:
bindObject in interface BoundCell


Copyright © 2011 Extentech Inc. All Rights Reserved.