org.keridwen.modelling.reporting.data
Class DefaultReportDataTextArray

java.lang.Object
  extended by org.keridwen.modelling.reporting.data.DefaultReportDataTextArray
All Implemented Interfaces:
ReportData

public class DefaultReportDataTextArray
extends Object
implements ReportData

Default class for 2 dimensional string array.

Author:
pierre

Constructor Summary
DefaultReportDataTextArray(ArrayList<ArrayList<String>> array)
          Default class for 2 dimensional string array.
DefaultReportDataTextArray(ArrayList<ArrayList<String>> array, String atitle)
          Default class for 2 dimensional string array.
DefaultReportDataTextArray(int rows, int columns)
          Default class for 2 dimensional string array.
 
Method Summary
 void addInLastRow(String text)
          Adds the string in the last existing row of the array.
 void addInNewRow(String text)
          Creates a new row and adds a String text in it.
 ArrayList<ArrayList<String>> getArray()
           
 String getString(int row, int column)
          Returns the pointed string in the array, or null if out of bounds.
 String getTitle()
           
 void setArray(ArrayList<ArrayList<String>> array)
           
 void setTitle(String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultReportDataTextArray

public DefaultReportDataTextArray(int rows,
                                  int columns)
Default class for 2 dimensional string array.

Parameters:
rows - number of rows to allocate
columns - number of columns to allocate

DefaultReportDataTextArray

public DefaultReportDataTextArray(ArrayList<ArrayList<String>> array)
Default class for 2 dimensional string array.

Parameters:
array -

DefaultReportDataTextArray

public DefaultReportDataTextArray(ArrayList<ArrayList<String>> array,
                                  String atitle)
Default class for 2 dimensional string array.

Parameters:
array -
Method Detail

addInLastRow

public void addInLastRow(String text)
Adds the string in the last existing row of the array. If there are no rows, creates one.

Parameters:
text - text to add

addInNewRow

public void addInNewRow(String text)
Creates a new row and adds a String text in it.

Parameters:
text - text to add

getString

public String getString(int row,
                        int column)
Returns the pointed string in the array, or null if out of bounds.

Parameters:
row - row of the string
column - column of the string
Returns:
the pointed string in the array.

getArray

public ArrayList<ArrayList<String>> getArray()
Returns:
the array

setArray

public void setArray(ArrayList<ArrayList<String>> array)
Parameters:
array - the array to set

getTitle

public String getTitle()
Returns:
the title

setTitle

public void setTitle(String title)
Parameters:
title - the title to set


Copyright © 2012-2013 Artenum. All Rights Reserved.