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| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
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) |
public Table()
public Table(int colsNo)
colsNo - the number of columns of the tablepublic boolean addRow(ArrayList<TableCell> row)
row - the table's rowpublic TableCell getValue(int row, int column)
row - the cell's rowcolumn - the cell's columnnull if none is
presentIndexOutOfBoundsExceptionprotected void checkCellBounds(int row,
int column)
row - cell's rowcolumn - cell's columnIndexOutOfBoundsExceptionprotected void checkRowBounds(int row)
row - row index to checkIndexOutOfBoundsExceptionpublic int getRowCount()
public int getCellCount(int row)
row - .public int getColsNo()
public void setColsNo(int colsNo)
colsNo - .public String getTitle()
public void setTitle(String title)
public String getDescription()
public void setDescription(String description)
public AttributeArea getAttrArea()
public void setAttrArea(AttributeArea attrArea)
Copyright © 2016. All Rights Reserved.