com.businessobjects.rebean.wi
Interface Cell

All Superinterfaces:
Alertable, Attachable, Decoration, Position, ReportElement, TreeNode, Unit
All Known Subinterfaces:
FreeCell, ReportCell

public interface Cell
extends ReportElement, Decoration, Attachable, Unit, Alertable

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

The Cell interface represents a single cell in a report.


Method Summary
 boolean avoidPageBreak()
          Returns if there should never be a page break in the element.
 void avoidPageBreak(boolean b)
          Changes if there should never be a page break in the element.
 double estimateMinimalHeight()
          Returns an estimate for the minimal height for this cell, given the current font size and vertical padding, for a single line of text.
 CellContentType getContentType()
          Returns the Cell object's content type.
 double getHeight()
          Returns the height of this cell.
 double getHorizontalPadding()
          Returns the current Cell objects horizontal padding.
 double getVerticalPadding()
          Returns the current Cell objects padding.
 double getWidth()
          Returns the width of this cell.
 boolean isAutoFitHeight()
          Informs wheather the cell's size is determined by its contents or by the values specified with setHeight(double).
 boolean isAutoFitWidth()
          Informs wheather the cell's size is determined by its contents or by the values specified with setWidth(double).
 boolean isShowWhenEmpty()
          Returns true if this cell will be shown when it is empty.
 boolean repeatOnEveryPage()
          Returns true if the Cell is repeated on every page.
 void repeatOnEveryPage(boolean b)
          Set to true for the Cell to be repeated on every page.
 void setAutoFitHeight(boolean autoFit)
          Changes the automatic sizing of the cell.
 void setAutoFitWidth(boolean autoFit)
          Changes the automatic sizing of the cell.
 void setContentType(CellContentType t)
          Change the Cell object's content type.
 void setHeight(double size)
          Changes the cell's height.
 void setHorizontalPadding(double padding)
          Changes the current Cell objects horizontal padding.
 void setShowWhenEmpty(boolean show)
          Set to true for this cell to be shown when it is empty.
 void setVerticalPadding(double padding)
          Changes the current Cell objects vertical padding.
 void setWidth(double size)
          Changes the cell's width.
 
Methods inherited from interface com.businessobjects.rebean.wi.ReportElement
getFather, getID, getReportElement, getReportElement, getReportElementCount
 
Methods inherited from interface com.businessobjects.rebean.wi.TreeNode
getChildAt, getChildCount, getIndex, getParent, isLeaf
 
Methods inherited from interface com.businessobjects.rebean.wi.Decoration
getAlignment, getAttributes, getBackgroundAlignment, getFont, setAlignment, setAttributes, setBackgroundAlignment, setFont
 
Methods inherited from interface com.businessobjects.rebean.wi.Attachable
deleteAttachment, getAttachTo, getHAttachTo, getHorizontalAnchor, getVAttachTo, getVerticalAnchor, setAttachTo, setAttachTo
 
Methods inherited from interface com.businessobjects.rebean.wi.Position
getX, getY, setLocation, setX, setY
 
Methods inherited from interface com.businessobjects.rebean.wi.Unit
getUnit, setUnit
 
Methods inherited from interface com.businessobjects.rebean.wi.Alertable
getAlerters
 

Method Detail

isAutoFitWidth

boolean isAutoFitWidth()

Informs wheather the cell's size is determined by its contents or by the values specified with setWidth(double). When this method returns true, the values specified for width will be ignored.

Note that when true, getWidth will not depend on the content; this is only taken into account when the actual report is rendered.

Returns:
true when the size depends on the contents

isAutoFitHeight

boolean isAutoFitHeight()

Informs wheather the cell's size is determined by its contents or by the values specified with setHeight(double). When this method returns true, the values specified for height will be ignored.

Note that when true, getHeight will not depend on the content; this is only taken into account when the actual report is rendered.

Returns:
true when the size depends on the contents

setAutoFitWidth

void setAutoFitWidth(boolean autoFit)
Changes the automatic sizing of the cell. Before setting autoFit to true, you must set the the cell width to 0 to ensure that the cell width matches its text content size.

Example: Applying autofit to cell

 
 freeCell.setHeight(0);
 freeCell.setWidth(0);
 freeCell.setAutoFitHeight(true);
 freeCell.setAutoFitWidth(true);
 

Parameters:
autoFit - when true, the cell's size will depend on the contents
See Also:
Cell.isAutoFitWidth()

setAutoFitHeight

void setAutoFitHeight(boolean autoFit)
Changes the automatic sizing of the cell. Before setting autoFit to true, you must set the the cell height to 0 to ensure that the cell width matches its text content size.

Example: Applying autofit to cell

 
 freeCell.setHeight(0);
 freeCell.setWidth(0);
 freeCell.setAutoFitHeight(true);
 freeCell.setAutoFitWidth(true);
 

Parameters:
autoFit - when true, the cell's size will depend on the contents
See Also:
Cell.isAutoFitHeight()

getWidth

double getWidth()
Returns the width of this cell. When isAutoFit() == true, this value is of no meaning. The returned value will be in the unity specified in Unit.getUnit().

Returns:
the cell's width

setWidth

void setWidth(double size)
Changes the cell's width. The size will be set using the unity as returned by Unit.getUnit().

Parameters:
size - the new width
See Also:
Cell.isAutoFitWidth()

getHeight

double getHeight()
Returns the height of this cell. When isAutoFit() == true, this value is of no meaning. The returned value will be in the unity specified in Unit.getUnit().

Returns:
the cell's height

setHeight

void setHeight(double size)
Changes the cell's height. The size will be set using the unity as returned by Unit.getUnit().

Parameters:
size - the new height
See Also:
Cell.isAutoFitHeight()

getHorizontalPadding

double getHorizontalPadding()
Returns the current Cell objects horizontal padding.

The default padding is 3 points or 1/24 inch.

Returns:
The horizontal padding of the Cell in the current unit. See Unit.getUnit() for information about the current unit.
Since:
11.5

setHorizontalPadding

void setHorizontalPadding(double padding)
Changes the current Cell objects horizontal padding.

If this value is negative, the default system value of 3 points or 1/24 inch is applied.

Parameters:
padding - The new value for the current Cell objects horizontal padding in the current unit. See Unit.getUnit() for information about the current unit.
Since:
11.5

getVerticalPadding

double getVerticalPadding()
Returns the current Cell objects padding. The default value is 1.5 points, or 1/48 inch.

Returns:
The vertical padding of the Cell in the current unit. See Unit.getUnit() for information about the current unit.
Since:
11.5

setVerticalPadding

void setVerticalPadding(double padding)
Changes the current Cell objects vertical padding. If this value is negative, the default system value of 1.5 points, or 1/48 inch is applied.

Parameters:
padding - The new value for the current Cell objects vertical padding in the current unit. See Unit.getUnit() for information about the current unit.
Since:
11.5

repeatOnEveryPage

boolean repeatOnEveryPage()
Returns true if the Cell is repeated on every page.

Returns:
Returns true if the Cell is repeated on every page.

repeatOnEveryPage

void repeatOnEveryPage(boolean b)
Set to true for the Cell to be repeated on every page.

Parameters:
b - Set to true for the Cell to be repeated on every page.

setShowWhenEmpty

void setShowWhenEmpty(boolean show)
Set to true for this cell to be shown when it is empty.

Note: The default value is true.

Parameters:
show - when false, this cell will not appear in the report when it is empty
Since:
6.5.0

isShowWhenEmpty

boolean isShowWhenEmpty()
Returns true if this cell will be shown when it is empty.

Note: The default value is true.

Returns:
true when this cell will appear in the report when it is empty
Since:
6.5.0

getContentType

CellContentType getContentType()
Returns the Cell object's content type.

Possible types are:

Returns:
a CellContentType object.
Since:
11.5
See Also:
CellContentType

setContentType

void setContentType(CellContentType t)
Change the Cell object's content type.

Possible types are:

Parameters:
t - - CellContentType value.
Since:
11.5
See Also:
CellContentType

estimateMinimalHeight

double estimateMinimalHeight()
Returns an estimate for the minimal height for this cell, given the current font size and vertical padding, for a single line of text.

When used in combination with setAutoFitHeight(true), this method can ensure the cell to have a reasonable minimal height, even when it is empty.

Returns:
The estimated minimal height, in the current unit.
Since:
12.0
See Also:
TableCell.estimateMinimalHeight()

avoidPageBreak

boolean avoidPageBreak()
Returns if there should never be a page break in the element.

Returns:
true when the element should never have a page break in it (when possible)
Since:
12.0

avoidPageBreak

void avoidPageBreak(boolean b)
Changes if there should never be a page break in the element.

Parameters:
b - true when the element should never have a page break in it (when possible)
Since:
12.0