at.knowcenter.wag.egov.egiz.table
Class Table

java.lang.Object
  extended by at.knowcenter.wag.egov.egiz.table.Table
All Implemented Interfaces:
Serializable

public class Table
extends Object
implements Serializable

This class implements an abstract table definition. The table contains table rows and the table rows contains the table entries. A table can be styled and a relative column width can be set.

Author:
wlackner
See Also:
Style, Entry, Serialized Form

Constructor Summary
Table(String name)
          The table constructor init by a table name.
 
Method Summary
 void addRow(String rowNumber, ArrayList row)
          Add a comlete table row to the current table.
 float[] getColsRelativeWith()
          The width of the columns are relative to each other.
 int getMaxCols()
           
 String getName()
           
 ArrayList getRows()
          This method returns a sorted row list beginning with the row number 1.
 Style getStyle()
           
 float getWidth()
           
 void setColsRelativeWith(float[] cols)
          The width of the columns are relative to each other.
 void setStyle(Style style)
           
 void setWidth(float width)
           
 String toString()
          The toString method, used for tests or debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Table

public Table(String name)
The table constructor init by a table name.

Parameters:
name - the name for the table.
Method Detail

getColsRelativeWith

public float[] getColsRelativeWith()
The width of the columns are relative to each other. This means the values are summarized and divided into portions of columns used.
Example: [1,4] means the second column is four times wider than the first column.

Returns:
Returns the relative width of the columns

setColsRelativeWith

public void setColsRelativeWith(float[] cols)
The width of the columns are relative to each other. This means the values are summarized and divided into portions of columns used.
Example: [10,90] means the first colum consumes 10% and the second column consumes 90% of the table width.
The relative width of the columns to set.


getStyle

public Style getStyle()
Returns:
Returns the style.

setStyle

public void setStyle(Style style)
Parameters:
style - The style to set.

getWidth

public float getWidth()
Returns:
Returns the width.

setWidth

public void setWidth(float width)
Parameters:
width - The width to set.

getMaxCols

public int getMaxCols()
Returns:
Returns the maxCols.

getName

public String getName()
Returns:
Returns the name.

getRows

public ArrayList getRows()
This method returns a sorted row list beginning with the row number 1. The entrys in a row also stored in a ArrayList.

Returns:
Returns the sorted (by row number) table rows.

addRow

public void addRow(String rowNumber,
                   ArrayList row)
Add a comlete table row to the current table. Be carefull usding the correct row number because no check is done if a row with the given row number does exist! In that case the stored row would be replaced!

Parameters:
rowNumber - the row number to store the row entries
row - the entry list to store

toString

public String toString()
The toString method, used for tests or debugging.

Overrides:
toString in class Object


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.