org.gcube.portlets.d4sreporting.common.shared
Class Table

java.lang.Object
  extended by org.gcube.portlets.d4sreporting.common.shared.Table
All Implemented Interfaces:
Serializable

public class Table
extends Object
implements Serializable

Table class represent a template component that can be serializable the TableModel class used in the model cannot be serializable

Author:
Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it
See Also:
Serialized Form

Constructor Summary
Table()
          default constructor
Table(int colsNo)
          actual one
Table(int colsNo, ArrayList<ArrayList<TableCell>> table, String title, String description, AttributeArea attrArea)
          only for serialization purposes
 
Method Summary
 boolean addRow(ArrayList<TableCell> row)
          Gets the ArrayList of Strings row in the specified row.
protected  void checkCellBounds(int row, int column)
          Bounds checks that the cell exists at the specified location.
protected  void checkRowBounds(int row)
          Checks that the row is within the correct bounds.
 AttributeArea getAttrArea()
           
 int getCellCount(int row)
           
 int getColsNo()
           
 String getDescription()
           
 ArrayList<TableCell> getRow(int i)
           
 int getRowCount()
           
 ArrayList<ArrayList<TableCell>> getTable()
           
 String getTitle()
           
 TableCell getValue(int row, int column)
          Gets the value in the specified cell.
 void setAttrArea(AttributeArea attrArea)
           
 void setColsNo(int colsNo)
           
 void setDescription(String description)
           
 void setTable(ArrayList<ArrayList<TableCell>> table)
           
 void setTitle(String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Table

public Table()
default constructor


Table

public Table(int colsNo)
actual one

Parameters:
colsNo - the number of columns of the table

Table

public Table(int colsNo,
             ArrayList<ArrayList<TableCell>> table,
             String title,
             String description,
             AttributeArea attrArea)
only for serialization purposes

Parameters:
colsNo -
table -
title -
description -
attrArea -
Method Detail

addRow

public boolean addRow(ArrayList<TableCell> row)
Gets the ArrayList of Strings row in the specified row.

Parameters:
row - the table's row

getValue

public TableCell getValue(int row,
                          int column)
Gets the value in the specified cell.

Parameters:
row - the cell's row
column - the cell's column
Returns:
the String in the specified cell, or null if none is present
Throws:
IndexOutOfBoundsException

checkCellBounds

protected void checkCellBounds(int row,
                               int column)
Bounds checks that the cell exists at the specified location.

Parameters:
row - cell's row
column - cell's column
Throws:
IndexOutOfBoundsException

checkRowBounds

protected void checkRowBounds(int row)
Checks that the row is within the correct bounds.

Parameters:
row - row index to check
Throws:
IndexOutOfBoundsException

getRowCount

public int getRowCount()
Returns:
.

getCellCount

public int getCellCount(int row)
Parameters:
row - .
Returns:
.

getColsNo

public int getColsNo()
Returns:
.

setColsNo

public void setColsNo(int colsNo)
Parameters:
colsNo - .

getRow

public ArrayList<TableCell> getRow(int i)
Parameters:
i -
Returns:

getTable

public ArrayList<ArrayList<TableCell>> getTable()
Returns:
.

setTable

public void setTable(ArrayList<ArrayList<TableCell>> table)
Parameters:
table - .

getTitle

public String getTitle()

setTitle

public void setTitle(String title)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getAttrArea

public AttributeArea getAttrArea()

setAttrArea

public void setAttrArea(AttributeArea attrArea)


Copyright © 2013. All Rights Reserved.