jdbreport.model
Interface Cell

All Superinterfaces:
Cloneable, Serializable
All Known Subinterfaces:
CellObject
All Known Implementing Classes:
NullCell, NullCellObject, ReportCell, TemplateReportCell

public interface Cell
extends Cloneable, Serializable

The interface of the cell

Version:
2.0 15.10.2010
Author:
Andrey Kholmanskih

Nested Class Summary
static class Cell.Type
           
 
Field Summary
static String EMPTY_STRING
           
static long serialVersionUID
           
static String TEXT_HTML
           
static String TEXT_PLAIN
           
 
Method Summary
 void clear()
          Sets all properties by default
 Object clone()
           
 int getColSpan()
          Returns a number of spanned columns for the cell
 String getContentType()
           
 int getExtFlags()
           
 Icon getIcon()
          Deprecated. use getPicture()
 String getImageFormat()
           
 Cell getOwner()
          Returns the owner of the cell, can be null
 Picture getPicture()
          Returns the picture of the cell
 int getRowSpan()
          Returns a number of spanned rows for the cell
 Object getStyleId()
          Key of the CellStyle in the map of the CellStyles
 String getText()
           
 Object getValue()
          Returns the value for the cell
 Cell.Type getValueType()
           
 boolean isChild()
          Returns true if the cell has an owner
 boolean isEditable()
          Default true
 boolean isNotPrint()
          Returns true if the cell is not printed
 boolean isNull()
          Determines if the cell is null
 boolean isScaleIcon()
          Determines whether the icons are scaled
 boolean isSpan()
           
 void setColSpan(int value)
          Sets a number of spanned columns for the cell
 void setEditable(boolean b)
          Sets the editable property, which must be false to disable edit of the cells
 void setExtFlags(int i)
           
 void setIcon(Icon icon)
          Sets an icon to the cell
 void setImage(Image image)
          Sets an icon to the cell
 void setImageFormat(String format)
           
 void setNotPrint(boolean b)
          Sets the notPrint property, which must be true to disable printing of the cells
 void setOwner(Cell cell)
          Sets the owner of the cell
 void setPicture(Picture picture)
          Sets an picture to the cell
 void setRowSpan(int value)
          Sets a number of spanned rows for the cell
 void setScaleIcon(boolean scale)
          Sets a scale of the icon.
 void setStyleId(Object id)
          Sets the CellStyle's id for the cell
 void setValue(Object value)
           
 void setValueType(Cell.Type valueType)
           
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

TEXT_PLAIN

static final String TEXT_PLAIN
See Also:
Constant Field Values

TEXT_HTML

static final String TEXT_HTML
See Also:
Constant Field Values

EMPTY_STRING

static final String EMPTY_STRING
See Also:
Constant Field Values
Method Detail

getValue

Object getValue()
Returns the value for the cell

Returns:
the value Object at the cell

setValue

void setValue(Object value)
Parameters:
value - to assign to cell

getText

String getText()
Returns:
the string value of the cell

getStyleId

Object getStyleId()
Key of the CellStyle in the map of the CellStyles

Returns:
the CellStyle's id

setStyleId

void setStyleId(Object id)
Sets the CellStyle's id for the cell

Parameters:
id - the CellStyle's id

getRowSpan

int getRowSpan()
Returns a number of spanned rows for the cell

Returns:
rowSpan of the cell

setRowSpan

void setRowSpan(int value)
Sets a number of spanned rows for the cell

Parameters:
value - a number of spanned rows

getColSpan

int getColSpan()
Returns a number of spanned columns for the cell

Returns:
colSpan of the cell

setColSpan

void setColSpan(int value)
Sets a number of spanned columns for the cell

Parameters:
value - a number of spanned columns

isChild

boolean isChild()
Returns true if the cell has an owner

Returns:
true if the cell has an owner

isSpan

boolean isSpan()
Returns:
true if the rowSpan or the columnSpan is more than zero

getOwner

Cell getOwner()
Returns the owner of the cell, can be null

Returns:
owner of the cell

setOwner

void setOwner(Cell cell)
Sets the owner of the cell

Parameters:
cell - the owner of the cell, can be null

isNull

boolean isNull()
Determines if the cell is null

Returns:
true if the cell is null

getExtFlags

int getExtFlags()
Returns:
extFlags property

setExtFlags

void setExtFlags(int i)

isNotPrint

boolean isNotPrint()
Returns true if the cell is not printed

Returns:
true if the cell is not printed

setNotPrint

void setNotPrint(boolean b)
Sets the notPrint property, which must be true to disable printing of the cells

Parameters:
b - if true the cell is not printed

clone

Object clone()

setIcon

void setIcon(Icon icon)
Sets an icon to the cell

Parameters:
icon - the cell icon

setImage

void setImage(Image image)
Sets an icon to the cell

Parameters:
image - the cell image
Since:
1.2

getIcon

Icon getIcon()
Deprecated. use getPicture()

Returns the icon of the cell

Returns:
the icon of the cell

getPicture

Picture getPicture()
Returns the picture of the cell

Returns:
the picture of the cell
Since:
2.0

setPicture

void setPicture(Picture picture)
Sets an picture to the cell

Parameters:
picture - the cell picture
Since:
2.0

setScaleIcon

void setScaleIcon(boolean scale)
Sets a scale of the icon. If true, the icon's sizes are set like the cell's sizes

Parameters:
scale - scaleIcon property

isScaleIcon

boolean isScaleIcon()
Determines whether the icons are scaled

Returns:
true if the icon is scaled

setImageFormat

void setImageFormat(String format)
Parameters:
format - the image's format e.g. "bmp", "png", "jpg"

getImageFormat

String getImageFormat()
Returns:
the image's format e.g. "bmp", "png", "jpg"

getContentType

String getContentType()
Returns:
the cell's content e.g. "text/plain" or "text/html"

clear

void clear()
Sets all properties by default


getValueType

Cell.Type getValueType()
Returns:
the type of the cell's value

setValueType

void setValueType(Cell.Type valueType)
Parameters:
valueType - new type of the cell's value

isEditable

boolean isEditable()
Default true

Returns:
editable

setEditable

void setEditable(boolean b)
Sets the editable property, which must be false to disable edit of the cells

Parameters:
b - if true the cell is editable