TPTP 4.6.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.report.core.internal
Class DTable

java.lang.Object
  extended by org.eclipse.tptp.platform.report.core.internal.DItem
      extended by org.eclipse.tptp.platform.report.core.internal.DItemContainer
          extended by org.eclipse.tptp.platform.report.core.internal.DTable
All Implemented Interfaces:
IDItem, IDObject, IDParagraphItem, IDSizeableItem

Deprecated. As of TPTP 4.5.0, use the TPTP Business Intelligence and Reporting Tools (BIRT) reporting infrastructure (org.eclipse.tptp.platform.report.birt).

public class DTable
extends DItemContainer
implements IDSizeableItem, IDParagraphItem

A table is defined by rows and cells: it contains rows and each row contains cells.

Exemple:
DTable tab = new DTable(1,false);
DRow r[2];
r[0]=new DRow();
r[1]=new DRow();
DCell c1 = new DCell(), c2= new DCell();
r[0].addChild(c1);
r[0].insertChild(c2, c1);
c1.addChild(new DText("cell 0,0"));
c2.addChild(new DText("cell 0,1"));
c1 = new DCell();
c2 = new DCell();
r[1].addChild(c1);
r[1].insertChild(c2, c1);
c1.addChild(new DText("cell 1,0"));
c2.addChild(new DText("cell 1,1"));

This exemple creates a table with 2 rows and 2 cells:
_______________
| cell 0,0 | cell 0,1 |
|______________ |
| cell 1,0 | cell 1,1 |
|______________ |

By default each column has the same size. You can set a width restriction for each by using the method setColumnWidth of the DTable. This method has one parameter that is a float table. For each column you can set a float value that indicates the percent size of the column of the document's width.

Exemple:
float cols[2]={0.25,0.75};
tab.setColumnWidth(cols);

Result:
25.0 and 75.0 values represent respectively 25% for the first column and 75% for the second.
________________________________
| cell 0,0 .. | cell 0,1................................|
|_______________________________|
| cell 1,0 .. | cell 1,1 ...............................|
|_______________________________|

See Also:
DRow, DCell

Constructor Summary
DTable()
          Deprecated. Creates a DTable.
DTable(int b)
          Deprecated. Creates a DTable with border line size of 'b' pixels and a size policy or not.
 
Method Summary
 int getBorder()
          Deprecated. Access method for the border property.
 int getColumnCount()
          Deprecated. Returns the real number of columns.
 float[] getColumnWidth()
          Deprecated. Access method for the columnWidth property.
 float getHeightScale()
          Deprecated. Access method for the heightScale property.
 int getRowCount()
          Deprecated. Returns the real number of lines.
 float getWidthScale()
          Deprecated. Access method for the widthScale property.
 void setBorder(int aBorder)
          Deprecated. Sets the value of the border property.
 void setColumnWidth(float[] aColumnWidth)
          Deprecated. Sets the value of the columnWidth property.
 void setHeightScale(float aHeightScale)
          Deprecated. Sets the value of the heightScale property.
 void setWidthScale(float aWidthScale)
          Deprecated. Sets the value of the widthScale property.
 
Methods inherited from class org.eclipse.tptp.platform.report.core.internal.DItemContainer
clear, getChildCount, getChildOfClass, getChildPosition, getChildrenOfClass, getFirstChild, getLastChild, insertChild, isContainer, removeChild
 
Methods inherited from class org.eclipse.tptp.platform.report.core.internal.DItem
addChild, getAppliedStyle, getIterator, getNext, getParent, getRoot, getStyle, setNext, setParent, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.tptp.platform.report.core.internal.IDItem
addChild, clear, getAppliedStyle, getChildCount, getChildPosition, getFirstChild, getIterator, getLastChild, getNext, getParent, getRoot, getStyle, insertChild, isContainer, removeChild, setNext, setParent, setStyle
 
Methods inherited from interface org.eclipse.tptp.platform.report.core.internal.IDItem
addChild, clear, getAppliedStyle, getChildCount, getChildPosition, getFirstChild, getIterator, getLastChild, getNext, getParent, getRoot, getStyle, insertChild, isContainer, removeChild, setNext, setParent, setStyle
 

Constructor Detail

DTable

public DTable(int b)
Deprecated. 
Creates a DTable with border line size of 'b' pixels and a size policy or not.

Parameters:
b - size of the border line

DTable

public DTable()
Deprecated. 
Creates a DTable.

Method Detail

getBorder

public int getBorder()
Deprecated. 
Access method for the border property.

Returns:
the current value of the border property

setBorder

public void setBorder(int aBorder)
Deprecated. 
Sets the value of the border property.

Parameters:
aBorder - the new value of the border property

getWidthScale

public float getWidthScale()
Deprecated. 
Access method for the widthScale property.

Specified by:
getWidthScale in interface IDSizeableItem
Returns:
the current value of the widthScale property

setWidthScale

public void setWidthScale(float aWidthScale)
Deprecated. 
Sets the value of the widthScale property.

Specified by:
setWidthScale in interface IDSizeableItem
Parameters:
aWidthScale - the new value of the widthScale property

getHeightScale

public float getHeightScale()
Deprecated. 
Access method for the heightScale property.

Specified by:
getHeightScale in interface IDSizeableItem
Returns:
the current value of the heightScale property

setHeightScale

public void setHeightScale(float aHeightScale)
Deprecated. 
Sets the value of the heightScale property.

Specified by:
setHeightScale in interface IDSizeableItem
Parameters:
aHeightScale - the new value of the heightScale property

getColumnWidth

public float[] getColumnWidth()
Deprecated. 
Access method for the columnWidth property.

Returns:
the current value of the columnWidth property

setColumnWidth

public void setColumnWidth(float[] aColumnWidth)
Deprecated. 
Sets the value of the columnWidth property.

Parameters:
aColumnWidth - the new value of the columnWidth property

getColumnCount

public int getColumnCount()
Deprecated. 
Returns the real number of columns.


getRowCount

public int getRowCount()
Deprecated. 
Returns the real number of lines.


TPTP 4.6.0 Platform Project
Internal API Specification