table.model
Class RowContainer

java.lang.Object
  |
  +--table.model.RowContainer

public class RowContainer
extends java.lang.Object

This class stores information about EnvelopeTableModel's row.

Version:
1.0
Author:
Stanislav Lapitsky

Field Summary
protected  java.util.ArrayList children
          List of row's children (for grouped data).
protected  int groupLevel
          Store group level.
protected  boolean isOriginal
          Flag shows whether the row represents original row.
protected  int originalRowIndex
          Index of row of original data.
protected  RowContainer parent
          Parent row (for grouped data).
protected  java.util.ArrayList rowData
          Row data.
 
Constructor Summary
RowContainer(int originalRowIndex, boolean isOriginal, int columnCount)
          Constructs new row container instance.
RowContainer(int originalRowIndex, boolean isOriginal, int columnCount, int groupLevel)
          Constructs new row container instance.
 
Method Summary
 RowContainer getChildAt(int index)
          Gets row's child.
 int getChildCount()
          Gets count of children.
 int getLevel()
          Gets row level.
 int getOriginalRowNumber()
          Gets number of original row.
 RowContainer getParent()
          Gets the row's parent.
 java.lang.Object getRowData(int columnIndex)
          Gets data from specified row's cell.
 boolean isOriginal()
          Gets whether the row has original prototype.
 void setGroupFunctionEMPTY(int columnIndex)
          Removes data from specified column.
 void setOriginalRowNumber(int index)
          Sets number of original row.
 void setParent(RowContainer newParent)
          Sets the row's parent.
 void setRowData(int columnIndex, java.lang.Object value)
          Sets data to specified cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

originalRowIndex

protected int originalRowIndex
Index of row of original data.


rowData

protected java.util.ArrayList rowData
Row data.


children

protected java.util.ArrayList children
List of row's children (for grouped data).


parent

protected RowContainer parent
Parent row (for grouped data).


isOriginal

protected boolean isOriginal
Flag shows whether the row represents original row.


groupLevel

protected int groupLevel
Store group level.

Constructor Detail

RowContainer

public RowContainer(int originalRowIndex,
                    boolean isOriginal,
                    int columnCount)
Constructs new row container instance.

Parameters:
originalRowIndex - index of original row (-1 means the row isn't original).
isOriginal - flag shows whether the row is original.
columnCount - column count.

RowContainer

public RowContainer(int originalRowIndex,
                    boolean isOriginal,
                    int columnCount,
                    int groupLevel)
Constructs new row container instance.

Parameters:
originalRowIndex - index of original row (-1 means the row isn't original).
isOriginal - flag shows whether the row is original.
columnCount - column count.
groupLevel - group level number (original rows have level 0).
Method Detail

setParent

public void setParent(RowContainer newParent)
Sets the row's parent.

Parameters:
newParent - parent row.

getParent

public RowContainer getParent()
Gets the row's parent.

Returns:
parent row.

getChildAt

public RowContainer getChildAt(int index)
Gets row's child.

Parameters:
index - child index.
Returns:
child row.

getChildCount

public int getChildCount()
Gets count of children.

Returns:

isOriginal

public boolean isOriginal()
Gets whether the row has original prototype.

Returns:
true if the row represents original row data.

getOriginalRowNumber

public int getOriginalRowNumber()
Gets number of original row.

Returns:

setOriginalRowNumber

public void setOriginalRowNumber(int index)
Sets number of original row.

Parameters:
index - original row number.

getRowData

public java.lang.Object getRowData(int columnIndex)
Gets data from specified row's cell.

Parameters:
columnIndex - index of cell.
Returns:

setRowData

public void setRowData(int columnIndex,
                       java.lang.Object value)
Sets data to specified cell.

Parameters:
columnIndex - index of cell
value - new cell data.

getLevel

public int getLevel()
Gets row level.

Returns:

setGroupFunctionEMPTY

public void setGroupFunctionEMPTY(int columnIndex)
Removes data from specified column.

Parameters:
columnIndex -