|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.inet.report.ReportComponent
com.inet.report.Element
com.inet.report.CrossTab
public class CrossTab
This class represents a cross table that has been or should be drawn in a report. A cross table is a report to summarize and visualize data in a compact form with rows and columns, so you can
better compare data. Use this class to get or set properties. You can create and add a new cross table element with Section.addCrossTab(int, int, SummaryField) method in class
Section. The last Argument of the method is the field the cross table needs at least. To add more summarize fields use the methods appendSummaryField(SummaryField). To add
a row or a column use methods appendColumn(Field) and appendRow(Field).
This class is part of the RDC.
Section.addCrossTab(int,int,SummaryField),
Section.remove(Element),
Section.getElements(),
Section.getElementsV(),
CrossTabCell,
CrossTabColumn,
CrossTabRow,
Serialized Form| Field Summary |
|---|
| Fields inherited from class com.inet.report.Element |
|---|
BOX, CHART, CROSSTAB, CROSSTABCELL, CROSSTABCOLUMN, CROSSTABROW, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, JAVABEAN, LINE, PARAGRAPH, PICTURE, SIGNATURE, SUBREPORT, TEXT, TEXTPART |
| Fields inherited from interface com.inet.report.BorderProperties |
|---|
LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_DOUBLE, LINE_STYLE_SINGLE, NO_LINE |
| Fields inherited from interface com.inet.report.GeneralProperties |
|---|
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT |
| Method Summary | |
|---|---|
SummaryField |
addSummaryField(Field sourceField,
int operation)
Create a summary field to be used for this crosstab. |
CrossTabColumn |
appendColumn(Field f)
Use this method to add a new column based on the field f to this crosstab. |
CrossTabRow |
appendRow(Field f)
Use this method to add a new row based on the field f to this crosstab |
void |
appendSummaryField(Field summaryField,
int operation)
Append a summary that should be visible in the crosstab. |
void |
appendSummaryField(SummaryField summaryField)
Append a summary that should be visible in the crosstab. |
void |
dropColumn(int index)
Removes the i-th column of the crosstab. |
void |
dropRow(int index)
Removes the i-th row of the crosstab. |
void |
dropSummaryField(int index)
Removes the ith summary field in from the crosstab. |
CrossTabCell |
getCell(int idx)
Returns the i-th cell of the crosstab. |
int |
getCellCount()
Returns the number of cells of the crosstab. |
CrossTabColumn |
getColumn(int i)
Returns the i-th column of the crosstab. |
int |
getColumnCount()
Returns the number of column of the crosstab. |
int |
getColumnGrandTotalColor()
Returns the value of the property 'column grand total color'. |
FormulaField |
getColumnGrandTotalColorFormula()
Returns the formula for the property 'column grand total color'. |
boolean |
getColumnTotalOnLeft()
Returns whether Column Total should be on left ( true) or not (false). |
FormulaField |
getColumnTotalOnLeftFormula()
Returns the formula for the property 'total column on left'. |
CrossTabGridLineFormat[] |
getCrossTabGridLineFormat()
Returns the gridline format of the crosstab. |
CrossTabDescriptionSection |
getDescriptionSection()
Gets the description section of the crosstab. |
boolean |
getIndentRowLabel()
Returns whether the row label should be indent ( true) or not (false). |
int |
getIndentRowLabelSize()
Returns the size of indentation of the row label in twips. |
boolean |
getKeepColumnsTogether()
Returns the value of the property "Keep Columns Together". |
java.util.List |
getPropertyFormulas()
Returns a list with all property formulas that are set for this report element. |
boolean |
getRepeatRowLabels()
Returns whether row labels should be repeated ( true) or not (false). |
CrossTabRow |
getRow(int i)
Returns the i-th row of the crosstab. |
int |
getRowCount()
Returns the number of rows of the crosstab. |
int |
getRowGrandTotalColor()
Returns the background color of the grand total row as ABGR, i.e. 0x000000FF for red. |
FormulaField |
getRowGrandTotalColorFormula()
Returns the formula of the background color of the grand total row as ABGR, i.e. 0x000000FF for red. |
boolean |
getRowTotalOnTop()
Returns whether Row Total should be on top ( true) or not (false). |
FormulaField |
getRowTotalOnTopFormula()
Returns the formula for the property 'row total on top'. |
boolean |
getShowCellMargins()
Returns whether cell margins should be shown ( true) or not (false). |
boolean |
getShowGrid()
Returns if the crosstab gridlines are enabled or disabled. |
SummaryField |
getSummaryField(int i)
Returns the i-th summary fields of the crosstab. |
int |
getSummaryFieldsCount()
Returns the number of summary fields of the crosstab. |
boolean |
getSuppressColumnGrandTotals()
Returns the value of the property 'suppress column grand'. |
FormulaField |
getSuppressColumnGrandTotalsFormula()
Returns the formula for the property 'suppress column grand'. |
boolean |
getSuppressEmptyColumns()
Returns whether empty columns should be suppressed ( true) or not (false). |
FormulaField |
getSuppressEmptyColumnsFormula()
Returns the formula for the property 'suppress empty columns'. |
boolean |
getSuppressEmptyRows()
Returns whether empty rows should be suppressed ( true) or not (false). |
FormulaField |
getSuppressEmptyRowsFormula()
Returns the formula for the property 'suppress empty rows'. |
boolean |
getSuppressRowGrandTotals()
Returns the value the property 'suppress row grand totals'. |
FormulaField |
getSuppressRowGrandTotalsFormula()
Returns the formula for the property 'suppress row grand'. |
boolean |
getWrapEnabled()
Returns the behavior of small crosstabs if they do not fit the page. |
void |
setColumnGrandTotalColor(int columnGrandTotalColor)
Sets the background color of the grand total column, that is the last column in cross table. |
void |
setColumnGrandTotalColorFormula(FormulaField newFormula)
Sets the formula of background color of the grand total column, that is the last column in cross table. |
void |
setColumnTotalOnLeft(boolean value)
Sets whether Column Total should be drawn on left side ( true) or not (false). |
void |
setColumnTotalOnLeftFormula(FormulaField newFormula)
Sets the formula for the property 'total column on left'. |
void |
setCrossTabGridLineFormat(CrossTabGridLineFormat[] gridLines)
Sets the gridline format of the crosstab. |
void |
setHeight(int height)
This element can not be resized. |
void |
setIndentRowLabel(boolean indentRowLabel)
Sets whether the row label should be indent ( true) or not (false). |
void |
setIndentRowLabelSize(int indentRowLabelSize)
Sets the size of indentation of the row label for the crosstab's indent row label mode. |
void |
setKeepColumnsTogether(boolean keepColumnsTogether)
Returns the value of the property "Keep Columns Together". |
void |
setRepeatRowLabels(boolean repeatRowLabels)
Sets whether Row Labels should be repeated ( true) or not (false). |
void |
setRowGrandTotalColor(int rowGrandTotalColor)
Sets the background color of the grand total row, the last row in the cross table. |
void |
setRowGrandTotalColorFormula(FormulaField newFormula)
Sets the formula of the background color of the grand total row, the last row in the cross table. |
void |
setRowTotalOnTop(boolean value)
Use this method to move the total row to the top of the crosstab. |
void |
setRowTotalOnTopFormula(FormulaField newFormula)
Sets the formula for the property 'total row an top'. |
void |
setShowCellMargins(boolean showCellMargins)
Sets whether cell margins should be shown ( true) or not (false). |
void |
setShowGrid(boolean showGrid)
Switch the crosstab gridlines on or off with this method. |
void |
setSuppressColumnGrandTotals(boolean suppressColumnGrand)
Sets the value of the property 'suppress column grand'. |
void |
setSuppressColumnGrandTotalsFormula(FormulaField newFormula)
Sets the formula for the property 'suppress column grand'. |
void |
setSuppressEmptyColumns(boolean suppressEmptyColumns)
Sets whether empty columns should be suppressed ( true) or not (false). |
void |
setSuppressEmptyColumnsFormula(FormulaField newFormula)
Sets the formula for the property 'suppress empty rows'. |
void |
setSuppressEmptyRows(boolean suppressEmptyRows)
Sets whether empty rows should be suppressed ( true) or not (false). |
void |
setSuppressEmptyRowsFormula(FormulaField newFormula)
Sets the formula for the property 'suppress empty rows'. |
void |
setSuppressRowGrandTotals(boolean suppressRowGrandTotals)
Sets the value of the property 'suppress row grand totals'. |
void |
setSuppressRowGrandTotalsFormula(FormulaField newFormula)
Sets the formula for the property 'suppress row grand'. |
void |
setWidth(int width)
This element can not be resized. |
void |
setWrapEnabled(boolean value)
Use this method to set the behavior of small crosstabs if they do not fit the page. |
void |
setX(int x)
Sets the x position of the left upper corner of the crosstab in the report. |
void |
setY(int y)
Sets the y position of the left upper corner of the crosstab in the report. |
void |
validateObject()
Validates the object by update the crosstab listeners. |
| Methods inherited from class com.inet.report.ReportComponent |
|---|
getBackColor, getBackColorFormula, getHeight, getKeepTogetherFormula, getSuppressFormula, getType, getWidth, getX, getY, isKeepTogether, isSuppress, setBackColor, setBackColorFormula, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula |
| Methods inherited from interface com.inet.report.HyperlinkProperties |
|---|
getHyperlinkUrl, getHyperlinkUrlFormula, setHyperlinkUrl, setHyperlinkUrlFormula |
| Methods inherited from interface com.inet.report.BorderProperties |
|---|
getBackColor, getBackColorFormula, setBackColor, setBackColorFormula |
| Methods inherited from interface com.inet.report.GeneralProperties |
|---|
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula |
| Methods inherited from interface com.inet.report.parser.NodeParser |
|---|
isDOMParser, parseDOM, parseElement, parseEndElement, parseText |
| Method Detail |
|---|
public CrossTabDescriptionSection getDescriptionSection()
public void dropColumn(int index)
throws ReportException
getColumnCount().
index - Index of the column.
java.lang.IllegalArgumentException - if index is negative.
ReportException - if index is 0 (grand total).
public void dropRow(int index)
throws ReportException
getRowCount().
index - Index of the row.
java.lang.IllegalArgumentException - if index is negative.
ReportException - if index is 0 (grand total).public void setWidth(int width)
setWidth in class ReportComponentwidth - Setting the width of the Crosstab has no effect.public void setHeight(int height)
setHeight in class ReportComponentheight - Setting the height of the Crosstab has no effect.public CrossTabRow getRow(int i)
getRowCount().
i - 0-based index which specifies the column.
public CrossTabColumn getColumn(int i)
getColumnCount().
i - 0-based index which specifies the column.
public CrossTabCell getCell(int idx)
getCellCount().
idx - 0-based index which specifies the cell.
public int getRowCount()
public int getColumnCount()
public int getCellCount()
public SummaryField getSummaryField(int i)
i - The 0-based index of the required field.
appendSummaryField(SummaryField).public int getSummaryFieldsCount()
public void setColumnGrandTotalColor(int columnGrandTotalColor)
columnGrandTotalColor - the new ABGR value of the column grand total color.
java.lang.IllegalArgumentException - if columnGrandTotalColor is less than CoderXML.COLOR_NO_COLOR (-1)RDC.toCcColor(Color),
RDC.toJavaColor(int)public int getColumnGrandTotalColor()
setColumnGrandTotalColor(int)public void setColumnGrandTotalColorFormula(FormulaField newFormula)
newFormula - the new ABGR value of the column grand total color.RDC.toCcColor(Color),
RDC.toJavaColor(int)public FormulaField getColumnGrandTotalColorFormula()
FormulaField The formula for the property 'column grand total color'.public void setShowGrid(boolean showGrid)
showGrid - true if the crosstab gridlines should be displayed, else false.getShowGrid()public boolean getShowGrid()
setShowGrid(boolean)public void setSuppressRowGrandTotals(boolean suppressRowGrandTotals)
suppressRowGrandTotals - true if the property should be set, else false.public boolean getSuppressRowGrandTotals()
true if the property has been set, else false.setSuppressRowGrandTotals(boolean)public void setSuppressRowGrandTotalsFormula(FormulaField newFormula)
newFormula - The new formula for the property 'suppress empty rows'.public FormulaField getSuppressRowGrandTotalsFormula()
FormulaField The formula for the property 'suppress empty columns'.public void setSuppressColumnGrandTotals(boolean suppressColumnGrand)
suppressColumnGrand - true if the property should be set, else false.public boolean getSuppressColumnGrandTotals()
true if the property has been set, else false.setSuppressColumnGrandTotals(boolean)public void setSuppressColumnGrandTotalsFormula(FormulaField newFormula)
newFormula - The new formula for the property 'suppress empty rows'.public FormulaField getSuppressColumnGrandTotalsFormula()
FormulaField The formula for the property 'suppress empty columns'.public void setRowGrandTotalColor(int rowGrandTotalColor)
rowGrandTotalColor - the new ABGR value of the grand total background color.
java.lang.IllegalArgumentException - if columnGrandTotalColor is less than CoderXML.COLOR_NO_COLOR (-1)RDC.toCcColor(Color),
RDC.toJavaColor(int)public int getRowGrandTotalColor()
setRowGrandTotalColor(int),
RDC.toCcColor(Color),
RDC.toJavaColor(int)public void setRowGrandTotalColorFormula(FormulaField newFormula)
newFormula - the new ABGR value of the grand total background color.RDC.toCcColor(Color),
RDC.toJavaColor(int)public FormulaField getRowGrandTotalColorFormula()
setRowGrandTotalColor(int),
RDC.toCcColor(Color),
RDC.toJavaColor(int)public boolean getColumnTotalOnLeft()
true) or not (false).
public void setColumnTotalOnLeft(boolean value)
true) or not (false).
value - The value of the property 'Column total on left'public void setColumnTotalOnLeftFormula(FormulaField newFormula)
newFormula - The new formula for the property 'suppress empty rows'.public FormulaField getColumnTotalOnLeftFormula()
FormulaField The formula for the property 'suppress empty columns'.public void setRowTotalOnTop(boolean value)
true) or not (false).
value - The value of the property 'Row total on top'public boolean getRowTotalOnTop()
true) or not (false).
public void setRowTotalOnTopFormula(FormulaField newFormula)
newFormula - The new formula for the property 'suppress empty rows'.public FormulaField getRowTotalOnTopFormula()
FormulaField The formula for the property 'suppress empty columns'.public void setRepeatRowLabels(boolean repeatRowLabels)
true) or not (false).
repeatRowLabels - The value of the property 'repeat row labels'public boolean getRepeatRowLabels()
true) or not (false).
public boolean getSuppressEmptyColumns()
true) or not (false).
public void setSuppressEmptyColumns(boolean suppressEmptyColumns)
true) or not (false). Sets the suppressEmptyColumns.
suppressEmptyColumns - The suppressEmptyColumns to setpublic void setSuppressEmptyColumnsFormula(FormulaField newFormula)
newFormula - The new formula for the property 'suppress empty rows'.public FormulaField getSuppressEmptyColumnsFormula()
FormulaField The formula for the property 'suppress empty columns'.public boolean getSuppressEmptyRows()
true) or not (false).
public void setSuppressEmptyRows(boolean suppressEmptyRows)
true) or not (false).
suppressEmptyRows - The suppressEmptyRows to setpublic void setSuppressEmptyRowsFormula(FormulaField newFormula)
newFormula - The new formula for the property 'suppress empty rows'.public FormulaField getSuppressEmptyRowsFormula()
FormulaField The formula for the property 'suppress empty rows'.public boolean getShowCellMargins()
true) or not (false).
public void setShowCellMargins(boolean showCellMargins)
true) or not (false). This will resize all elements of the crosstab to fit the cell by considering the margins.
showCellMargins - The showCellMargins to setpublic void setKeepColumnsTogether(boolean keepColumnsTogether)
keepColumnsTogether - true if the columns should not be split accross page boundaries.public boolean getKeepColumnsTogether()
public void setWrapEnabled(boolean value)
value - If true the crosstab will be wrapped and the second part will be put below the first.public boolean getWrapEnabled()
public boolean getIndentRowLabel()
true) or not (false).
public void setIndentRowLabel(boolean indentRowLabel)
true) or not (false).
indentRowLabel - The indentRowLabel to setpublic int getIndentRowLabelSize()
public void setIndentRowLabelSize(int indentRowLabelSize)
indentRowLabelSize - The indentRowLabelSize to set in twips.
java.lang.IllegalArgumentException - if indentRowLabelSize is negativepublic CrossTabColumn appendColumn(Field f)
f - A formula or database-field to append at the end of the crosstab column.
public CrossTabRow appendRow(Field f)
f - A formula or database-field to append at the end of the crosstab rows.
public SummaryField addSummaryField(Field sourceField,
int operation)
throws ReportException
sourceField - The field that should be used for the summary operationoperation - The summary operation (see class SummaryField).
ReportException - If the summary operation is invalid.
public void appendSummaryField(Field summaryField,
int operation)
throws ReportException
summaryField - The field that should be used for the summary operation.operation - The summary operation (SummaryField).
ReportException - if the summary operation is invalid.SummaryField
public void appendSummaryField(SummaryField summaryField)
throws java.lang.NullPointerException
summaryField - The summary field obtained by #addSummaryField(SummaryField)
java.lang.NullPointerException - if f is null.public CrossTabGridLineFormat[] getCrossTabGridLineFormat()
public void setCrossTabGridLineFormat(CrossTabGridLineFormat[] gridLines)
gridLines - The grid line format array obtained from #getCrossTabGridLineFormat().
java.lang.IllegalArgumentException - if the gridLines can not be cloned.
public void dropSummaryField(int index)
throws ReportException
index - Index of the summary field.
java.lang.IllegalArgumentException - in case the index is negative.
ReportException - if crosstab has no summary field or index is out of bounds.public void setX(int x)
setX in class ReportComponentx - The x position in twips.
java.lang.IllegalArgumentException - if x is negativepublic void setY(int y)
setY in class ReportComponenty - The y position in twips.
java.lang.IllegalArgumentException - if y is negativepublic java.util.List getPropertyFormulas()
getPropertyFormulas in class Element
public void validateObject()
throws java.io.InvalidObjectException
java.io.InvalidObjectException - If the object cannot validate itself.
|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||