com.businessobjects.rebean.wi
Interface TableFormBase

All Superinterfaces:
Representation, Unit
All Known Subinterfaces:
CrossTable, Form, SimpleTable, Table

public interface TableFormBase
extends Representation, Unit

Warning: This interface is no longer functional from the SAP BusinessObjects 4.0 release onwards.

The TableFormBase class provides a common base between forms and tables. This class is used to configure table decoration.

Since:
6.5.0

Method Summary
 java.awt.Color getAlternateColor()
          Returns the background color for alternate rows.
 int getAlternateColorFrequency()
          Returns the frequency with which alternate color rows are displayed.
 Decoration getBodyTableDecoration()
          Returns the default graphical attributes of table background.
 double getCellPadding()
          Deprecated. Each cell now exposes a vertical and horizontal padding, so the preferred way to get the padding is by calling TableCell.getVerticalPadding() and TableCell.getHorizontalPadding().
 double getCellSpacing()
          Returns the size of empty space between all table cells.
 TableCell getTableCell(java.lang.String cellID)
          Returns the table cell with the specified ID, or null when there is no cell with cellID in this table.
 void setAlternateColor(int frequency, java.awt.Color color)
           Sets the alternate row frequency and color.
 void setCellPadding(double padding)
          Sets the default padding for all cells.
 void setCellSpacing(double spacing)
          Changes the size of empty space between all table cells.
 
Methods inherited from interface com.businessobjects.rebean.wi.Representation
getBlock, getType, setType
 
Methods inherited from interface com.businessobjects.rebean.wi.Unit
getUnit, setUnit
 

Method Detail

setAlternateColor

void setAlternateColor(int frequency,
                       java.awt.Color color)

Sets the alternate row frequency and color. Alternate rows are rows that are displayed with a different background color for each frequency appearances.

For a frequency of 0, no alternate rows will be displayed. A frequency of 1 will show all rows in alternate color. Frequency 2 will have one row in alternate color and then one row in normal color. A frequency of 3 will show the first row in alternate color and then two rows in normal color, and so on.

As a general rule, for a given row n, with first row n = 0, the row will be displayed in alternate color if (frequency > 0) && (n % frequency == 0), that is so say, if n is a product of frequency.

Parameters:
frequency - the frequency with which rows of alternate color are displayed
color - the background color to use, or null for the default color
Throws:
java.lang.IllegalArgumentException - when frequency < 0

getAlternateColorFrequency

int getAlternateColorFrequency()
Returns the frequency with which alternate color rows are displayed.

Returns:
the frequency of alternate color rows
See Also:
TableFormBase.setAlternateColor(int, Color)

getAlternateColor

java.awt.Color getAlternateColor()
Returns the background color for alternate rows.

Returns:
the background color for alternate rows
See Also:
TableFormBase.setAlternateColor(int, Color)

getCellPadding

double getCellPadding()
Deprecated. Each cell now exposes a vertical and horizontal padding, so the preferred way to get the padding is by calling TableCell.getVerticalPadding() and TableCell.getHorizontalPadding().

Returns the default padding for all cells.

This method will return the padding for all table cells only if all cells have the same vertical and horizontal padding. If any cell has a different value, this method will return -1.

Returns:
The padding for all cells, or -1 if any cell has a different vertical or horizontal padding.
See Also:
Unit.getUnit()

setCellPadding

void setCellPadding(double padding)
Sets the default padding for all cells. This will apply the given padding to all table cells by calling TableCell.setVerticalPadding(double) and TableCell.setHorizontalPadding(double) on each cell.

Parameters:
padding - The new padding for all cells.
Throws:
java.lang.IllegalArgumentException - Thrown when padding < 0.0.
See Also:
Unit.getUnit()

getCellSpacing

double getCellSpacing()
Returns the size of empty space between all table cells. This is the same size as is used for the table's padding.

Returns:
the cell spacing for this table
See Also:
Unit.getUnit()

setCellSpacing

void setCellSpacing(double spacing)
Changes the size of empty space between all table cells. This is the same size as is used for the table's padding.

Parameters:
spacing - the new cell spacing
Throws:
java.lang.IllegalArgumentException - when spacing < 0.0
See Also:
Unit.getUnit()

getTableCell

TableCell getTableCell(java.lang.String cellID)
Returns the table cell with the specified ID, or null when there is no cell with cellID in this table.

Parameters:
cellID - the cell ID to look for
Returns:
the cell with the specified ID, or null when not found

getBodyTableDecoration

Decoration getBodyTableDecoration()
Returns the default graphical attributes of table background. The table background is the space between the table cells.

Returns:
the default graphical attributes of table background.