com.datamessenger.util
Class FillConstraints


java.lang.Object

  |

  +--com.datamessenger.util.FillConstraints


public class FillConstraints
extends java.lang.Object

This Object is used to fill a RecordSet within a specified range. After initalization, successive calls to nextColumn and nextRow respectivly, will increment the constaints to the next cell in a range bound by the width and initial row and column index. The constraints do not include a maximum length.

See Also:
RecordSet.fill(Object,Object,FillConstraints)

Field Summary
protected  int column
           
protected  int mincolumn
           
protected  int minrow
           
protected  int row
           
 int width
           
 
Constructor Summary
FillConstraints()
          A new FillConstraints with a starting row and column index of 0.
FillConstraints(int column, int row, int width)
          A new FillConstraints with the specified starting row and column index and column width.
 
Method Summary
 int column()
          The current column.
 int nextColumn()
          Gets the next column index.
 int nextRow()
          Gets the next row index.
 void reset()
          Resets the row and column indexes to their original location.
 int row()
          The current row.
 void setCurrentColumn(int col)
          Sets the constrains to a new column index.
 void setCurrentRow(int row)
          Sets the constrains to a new row index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mincolumn


protected int mincolumn

minrow


protected int minrow

column


protected int column

row


protected int row

width


public int width
Constructor Detail

FillConstraints


public FillConstraints()
A new FillConstraints with a starting row and column index of 0. width must be set prior to use.

FillConstraints


public FillConstraints(int column,

                       int row,

                       int width)
A new FillConstraints with the specified starting row and column index and column width.
Method Detail

nextColumn


public int nextColumn()
Gets the next column index. This should always be called before nextRow.
Returns:
the next column index

nextRow


public int nextRow()
Gets the next row index. This method will increment by 1 if the constaints column is reset to it's minimum.

reset


public void reset()
Resets the row and column indexes to their original location.

setCurrentColumn


public void setCurrentColumn(int col)
Sets the constrains to a new column index. The value -1 will set to the column index to it's minimum and will result in a row increment.
Throws:
ArrayIndexOutOfBoundsException - if col index is out of range.

setCurrentRow


public void setCurrentRow(int row)
Sets the constrains to a new row index.
Throws:
ArrayIndexOutOfBoundsException - if row index is less than the minimum range.

row


public int row()
The current row.
Returns:
The current row.

column


public int column()
The current column.
Returns:
The current column.


Comments, suggestions, and bug reports are welcomed and encouraged.
Please refer them to our support page. Thank you.

Copyright © 1999-2001 Produx House, Corp. All rights reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc.