|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjdbreport.design.model.AbstractCellFunction
public abstract class AbstractCellFunction
Constructor Summary | |
---|---|
AbstractCellFunction()
|
Method Summary | |
---|---|
void |
addColumns(int count,
int index)
Adds columns in the report |
void |
addRows(int count,
int index)
Adds rows in the report |
void |
deleteCell(int row,
int column)
Cleans the cell by row and column |
Cell |
getCell()
Returns the current cell |
Cell |
getCell(int row,
int column)
Returns the Cell by row and column |
Dimension |
getCellSize()
Returns the cell's sizes for the current cell, including spanned cells |
Dimension |
getCellSize(int row,
int column)
Returns the cell's sizes for the cell by row and column, including spanned cells |
int |
getColumn()
Returns a number of the current column |
int |
getColumnCount()
Returns columns' count formed during the current time |
int |
getColumnWidth()
Returns the column's width by the column's number |
int |
getColumnWidth(int column)
Returns the column's width by the column's number |
ReportDataSet |
getDataSet(Object key)
Returns the ReportDataSet |
String |
getFontName()
Returns the font's family name of the current cell. |
String |
getFontName(int row,
int column)
Returns the font's family name of the cell by row and column. |
ReportPage |
getReportPage()
Returns ReportPage |
String |
getReportTitle()
Returns the title of the sheet |
int |
getRow()
Returns a number of the current row |
int |
getRowCount()
Returns rows' count formed during the current time |
int |
getRowHeight()
Returns the row's height for the current cell |
int |
getRowHeight(int row)
Returns the row's height by the row's number |
String |
getText()
Returns value of the current cell. |
Object |
getValue()
Returns value of the current cell |
Object |
getVarValue(Object name)
Returns a variable's value by name |
Boolean |
getVarValue(Object name,
Boolean def)
Returns the value of the variable as a Boolean by name |
Double |
getVarValue(Object name,
Double def)
Returns the value of the variable as a Double by name |
Integer |
getVarValue(Object name,
Integer def)
Returns the value of the variable as an Integer by name |
void |
removeColumns(int count,
int index)
Removes columns from the report |
void |
removeRows(int count,
int index)
Removes rows from the report |
void |
runFunction(String functionName)
Runs function by functionName in current cell |
void |
runFunction(String functionName,
int row,
int column)
Runs function in cell by row and column by functionName row and column must be less or equal current row and column |
void |
setBackground(Color color)
Sets background color for the current cell |
void |
setBackground(Color color,
int row,
int column)
Sets background color for the cell by row and column |
void |
setBorder(Border line,
boolean[] positions)
Sets the borders at specified positions for the current cell |
void |
setBorder(Border line,
boolean[] positions,
int row,
int column)
Sets the borders at specified positions for the cell by row and column |
void |
setColumnWidth(int width)
Sets the column's width for the current cell |
void |
setColumnWidth(int width,
int column)
Sets the column's width by the column |
void |
setDataSet(ReportDataSet ds)
|
void |
setDataSet(String alias,
Iterable<?> ds)
|
void |
setDataSet(String alias,
Iterator<?> ds)
|
void |
setDataSet(String alias,
Object ds)
|
void |
setDataSet(String alias,
Object[] ds)
|
void |
setDecimal(int d)
Sets decimal position of the numeric value of the current cell. |
void |
setDecimal(int d,
int row,
int column)
Sets decimal position of the numeric value of the cell's by row and column. |
void |
setFont(String fontName,
int style,
int size)
Sets the font's name, style and size for the current cell. |
void |
setFont(String fontName,
int style,
int size,
int row,
int column)
Sets the font's name, style and size for the cell by row and column. |
void |
setForeground(Color color)
Sets foreground color for the current cell |
void |
setForeground(Color color,
int row,
int column)
Sets foreground color for the cell by row and column |
void |
setFormula(Object value)
Sets value as MathML data to the current cell |
void |
setHorizontalAlignment(int align)
Sets the horizontal alignment for the current cell The horizontal alignment is a constant that may be CellStyle.LEFT, CellStyle.RIGHT, CellStyle.CENTER or CellStyle.JUSTIFY |
void |
setHorizontalAlignment(int align,
int row,
int column)
Sets the horizontal alignment for the cell by row and column The horizontal alignment is a constant that may be CellStyle.LEFT, CellStyle.RIGHT, CellStyle.CENTER or CellStyle.JUSTIFY |
void |
setImage(Object value)
Sets value as Image to the current cell |
void |
setImage(Object value,
String format)
Sets value as Image to the current cell |
void |
setProvider(TemplateBook provider)
|
void |
setProvider(TemplateBook provider,
int row,
int column)
|
void |
setReportTitle(String reportTitle)
Sets the sheet's title |
void |
setRowBreak(int row,
boolean b)
Sets the horizontal break of the page after row |
void |
setRowHeight(int height)
Sets the row's height for the current cell |
void |
setRowHeight(int height,
int row)
Sets the row's height by the row |
void |
setSheetVisible(boolean visible)
|
void |
setStretchPage(boolean stretchPage)
Printing mode that scales the output smaller, if necessary, to fit the report's entire width (and thereby all columns) on each page; Rows are spread across multiple pages as necessary. |
void |
setValue(Object value)
Sets value to the current cell |
void |
setVarValue(Object name,
Object value)
Sets the variable's value |
void |
setVerticalAlignment(int align)
Sets the vertical alignment for the current cell The vertical alignment is a constant that may be CellStyle.TOP, CellStyle.BOTTOM or CellStyle.CENTER |
void |
setVerticalAlignment(int align,
int row,
int column)
Sets the vertical alignment for the cell by row and column The vertical alignment is a constant that may be CellStyle.TOP, CellStyle.BOTTOM or CellStyle.CENTER |
void |
unionCells(int topRow,
int leftColumn,
int bottomRow,
int rightColumn)
Unions cells The first cell of the top-left corner is specified by topRow and leftColumn, the last cell of the bottom-right corner is specified by bottomRow and rightColumn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jdbreport.design.model.CellFunction |
---|
run |
Constructor Detail |
---|
public AbstractCellFunction()
Method Detail |
---|
public void setProvider(TemplateBook provider, int row, int column)
public void addColumns(int count, int index)
CellFunction
addColumns
in interface CellFunction
count
- count columnsindex
- the specified position in this reportpublic void addRows(int count, int index)
CellFunction
addRows
in interface CellFunction
count
- count rowsindex
- the specified position in this reportpublic void deleteCell(int row, int column)
CellFunction
deleteCell
in interface CellFunction
row
- the row's numbercolumn
- the column's numberpublic Dimension getCellSize()
CellFunction
getCellSize
in interface CellFunction
public Dimension getCellSize(int row, int column)
CellFunction
getCellSize
in interface CellFunction
row
- then row's numbercolumn
- the column's number
public int getColumnCount()
CellFunction
getColumnCount
in interface CellFunction
public int getColumnWidth()
CellFunction
getColumnWidth
in interface CellFunction
public int getColumnWidth(int column)
CellFunction
getColumnWidth
in interface CellFunction
column
- the column's number
public String getFontName()
CellFunction
getFontName
in interface CellFunction
public String getFontName(int row, int column)
CellFunction
getFontName
in interface CellFunction
row
- the cell's rowcolumn
- the cell's column
public String getReportTitle()
CellFunction
getReportTitle
in interface CellFunction
public int getRowCount()
CellFunction
getRowCount
in interface CellFunction
public int getRowHeight()
CellFunction
getRowHeight
in interface CellFunction
public int getRowHeight(int row)
CellFunction
getRowHeight
in interface CellFunction
row
- the row's number
public void removeColumns(int count, int index)
CellFunction
removeColumns
in interface CellFunction
count
- count columnsindex
- the index of the first removing columnpublic void removeRows(int count, int index)
CellFunction
removeRows
in interface CellFunction
count
- count rowsindex
- the index of the first removing rowpublic void setBackground(Color color, int row, int column)
CellFunction
setBackground
in interface CellFunction
color
- the new background color for the cellrow
- the cell's rowcolumn
- the cell's columnpublic void setBackground(Color color)
CellFunction
setBackground
in interface CellFunction
color
- the new background color for the current cellpublic void setBorder(Border line, boolean[] positions, int row, int column)
CellFunction
setBorder
in interface CellFunction
line
- the borderpositions
- positions - boolean values, where true sets border, otherwise
does nothing. Position's index can be from Border.LINE_LEFT to
Border.LINE_HMIDDLErow
- the row's numbercolumn
- the column's numberpublic void setBorder(Border line, boolean[] positions)
CellFunction
setBorder
in interface CellFunction
line
- the borderpositions
- boolean values, where true sets border, otherwise does
nothing. Position's index can be from Border.LINE_LEFT to
Border.LINE_HMIDDLEpublic void setColumnWidth(int width, int column)
CellFunction
setColumnWidth
in interface CellFunction
width
- the new column's widthcolumn
- the column's numberpublic void setColumnWidth(int width)
CellFunction
setColumnWidth
in interface CellFunction
width
- the new column's widthpublic void setDecimal(int d, int row, int column)
CellFunction
setDecimal
in interface CellFunction
d
- the new decimal position of the numeric value.row
- the cell's rowcolumn
- the cell's columnpublic void setDecimal(int d)
CellFunction
setDecimal
in interface CellFunction
d
- the new decimal position of the numeric value.public void setFont(String fontName, int style, int size, int row, int column)
CellFunction
setFont
in interface CellFunction
fontName
- the font's namestyle
- the font's style The style argument is an integer bitmask that
may be CellStyle.PLAIN, or a bitwise union of CellStyle.BOLD,
CellStyle.ITALIC, CellStyle.UNDERLINE, CellStyle.STRIKETHROUGHsize
- the font's sizerow
- the cell's rowcolumn
- the cell's columnpublic void setFont(String fontName, int style, int size)
CellFunction
setFont
in interface CellFunction
fontName
- the font's namestyle
- the font's style The style argument is an integer bitmask that
may be CellStyle.PLAIN, or a bitwise union of CellStyle.BOLD,
CellStyle.ITALIC, CellStyle.UNDERLINE, CellStyle.STRIKETHROUGHsize
- the font's sizepublic void setForeground(Color color, int row, int column)
CellFunction
setForeground
in interface CellFunction
color
- the new foreground color for the cellrow
- the cell's rowcolumn
- the cell's columnpublic void setForeground(Color color)
CellFunction
setForeground
in interface CellFunction
color
- the new foreground color for the current cellpublic void setHorizontalAlignment(int align, int row, int column)
CellFunction
setHorizontalAlignment
in interface CellFunction
align
- the new horizontal alignmentrow
- the cell's rowcolumn
- the cell's columnpublic void setHorizontalAlignment(int align)
CellFunction
setHorizontalAlignment
in interface CellFunction
align
- the new horizontal alignment for the current cellpublic void setRowBreak(int row, boolean b)
CellFunction
setRowBreak
in interface CellFunction
row
- the row's numberb
- a boolean value, where true sets the page break and false
remove itpublic void setReportTitle(String reportTitle)
CellFunction
setReportTitle
in interface CellFunction
reportTitle
- new sheet's titlepublic void setRowHeight(int height, int row)
CellFunction
setRowHeight
in interface CellFunction
height
- the new row's heightrow
- the row's numberpublic void setRowHeight(int height)
CellFunction
setRowHeight
in interface CellFunction
height
- the new row's heightpublic void setSheetVisible(boolean visible)
public void setStretchPage(boolean stretchPage)
CellFunction
setStretchPage
in interface CellFunction
stretchPage
- if true sets printing mode in FIT_WIDTH otherwise in NORMALJTable.PrintMode
public void setVerticalAlignment(int align, int row, int column)
CellFunction
setVerticalAlignment
in interface CellFunction
align
- the new vertical alignmentrow
- the cell's rowcolumn
- the cell's columnpublic void setVerticalAlignment(int align)
CellFunction
setVerticalAlignment
in interface CellFunction
align
- the new vertical alignmentpublic void unionCells(int topRow, int leftColumn, int bottomRow, int rightColumn)
CellFunction
unionCells
in interface CellFunction
topRow
- the top row of the unionleftColumn
- the left column of the unionbottomRow
- the bottom row of the unionrightColumn
- the right column of the unionpublic void setProvider(TemplateBook provider)
public Cell getCell()
CellFunction
getCell
in interface CellFunction
public Cell getCell(int row, int column)
CellFunction
getCell
in interface CellFunction
public int getColumn()
CellFunction
getColumn
in interface CellFunction
public ReportDataSet getDataSet(Object key)
CellFunction
getDataSet
in interface CellFunction
key
- the ReportDataSet alias
ReportDataSet
public void setDataSet(ReportDataSet ds)
setDataSet
in interface CellFunction
public void setDataSet(String alias, Iterable<?> ds)
setDataSet
in interface CellFunction
public void setDataSet(String alias, Iterator<?> ds)
setDataSet
in interface CellFunction
public void setDataSet(String alias, Object ds)
setDataSet
in interface CellFunction
public void setDataSet(String alias, Object[] ds)
setDataSet
in interface CellFunction
public int getRow()
CellFunction
getRow
in interface CellFunction
public Object getVarValue(Object name)
CellFunction
getVarValue
in interface CellFunction
name
- the variable's name
public Integer getVarValue(Object name, Integer def)
CellFunction
getVarValue
in interface CellFunction
name
- the variable's namedef
- default value
public Double getVarValue(Object name, Double def)
CellFunction
getVarValue
in interface CellFunction
name
- the variable's namedef
- default value
public Boolean getVarValue(Object name, Boolean def)
CellFunction
getVarValue
in interface CellFunction
name
- the variable's namedef
- default value
public void runFunction(String functionName) throws ReportException
CellFunction
runFunction
in interface CellFunction
functionName
- function name
ReportException
public void runFunction(String functionName, int row, int column) throws ReportException
CellFunction
runFunction
in interface CellFunction
functionName
- the function's namerow
- the row's numbercolumn
- the column's number
ReportException
public void setVarValue(Object name, Object value)
CellFunction
setVarValue
in interface CellFunction
name
- the variable's namevalue
- new variable's valuepublic String getText()
CellFunction
getText
in interface CellFunction
public Object getValue()
CellFunction
getValue
in interface CellFunction
public void setValue(Object value)
CellFunction
setValue
in interface CellFunction
value
- new valuepublic void setImage(Object value)
CellFunction
setImage
in interface CellFunction
value
- Image, Icon, byte[], InputStream, Filepublic void setImage(Object value, String format)
CellFunction
setImage
in interface CellFunction
value
- Image, Icon, byte[], String, InputStream, Fileformat
- image formatpublic ReportPage getReportPage()
CellFunction
getReportPage
in interface CellFunction
public void setFormula(Object value)
CellFunction
setFormula
in interface CellFunction
value
- String , File, Reader, InputStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |