Package overit.geocall.basic.ui.xlsx
Class XlsxTableView
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.basic.ui.xlsx.XlsxComponent
overit.geocall.basic.ui.xlsx.XlsxContainer
overit.geocall.basic.ui.xlsx.XlsxTableView
- All Implemented Interfaces:
Serializable,XlsxElement,Identified
- Direct Known Subclasses:
XlsxDBStatementView
This class extends
This class represent an Excel working sheet as a table which is. There can be more working sheets, in that case they must have different name and label, the title is optional.
It manages to representa DBView in an Excel sheet.
XlsxContainer and implements Identified and implements XlsxElement.This class represent an Excel working sheet as a table which is. There can be more working sheets, in that case they must have different name and label, the title is optional.
It manages to representa DBView in an Excel sheet.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected String[]protected int[]protected intprotected int[]protected booleanprotected DBViewprotected intprotected ArrayListprotected booleanprotected Booleanprotected intprotected intprotected intprotected Stringprotected intprotected booleanprotected intprotected intprotected Stringprotected intprotected booleanprotected booleanFields inherited from class overit.geocall.basic.ui.xlsx.XlsxComponent
_align, _cellFormat, _cellFormatClass, _font, _format, _valign, _warning -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddBreakFunctions(ArrayList ar, Object[] fields, org.apache.poi.ss.usermodel.Sheet sheet, int breakRow, int row, int col, int breakFieldPos) protected intprotected intaddCells(int startRow, int startCol, DBView dbv, org.apache.poi.ss.usermodel.Sheet sheet, boolean append) addNewColumn(String columnType, XlsxDocument xlsDoc) Add a new column type (passed by parameter) as child of this instance.protected voidaddTestata(org.apache.poi.ss.usermodel.Sheet sheet, int row) protected voidaddTotali(int startRow, int endRow, org.apache.poi.ss.usermodel.Sheet sheet) protected voidautoSize(org.apache.poi.ss.usermodel.Sheet sheet) protected voidcustomSize(org.apache.poi.ss.usermodel.Sheet sheet) intGets the char span of a row.voidgetContent(org.apache.poi.ss.usermodel.Sheet sheet, int startRow, int startCol) Gets the Data View of the sheet.intSets the default start row.protected ArrayListorg.apache.poi.xssf.usermodel.XSSFColorGets the header font color in use.booleanGets the head title of the table.Returns theIdentityassociated to the componentintGets the number of liner per row.getName()Gets the name of tbe instance.intintintGets the height of the rows.intGets the start column.intGets the start row.Gets the title's font.intGets the font size use on the title's text.booleanGets if the sheet's title is wrapped or not.Gets the column's position, from his name.booleanGets if the title has the bold format.booleanGets if the table has the column or the row (or both) that represent totals values, or not.voidinitChilds(DBView dbv) voidSets if Table must have horizontal autoSize enabled or not.voidSets if you want title with the bold format or not.voidDefine the break columns.voidSets the char span of a row.protected voidsetColumnSizing(org.apache.poi.ss.usermodel.Sheet sheet, int posCell) voidSets if Table must have a custom size or not.voidsetDataView(Object dbview) Sets the DataView into the active sheet.voidSets the font colore on the header's text.voidSets the head title of the table.voidsetIdentity(Identity identity) Sets theIdentityto the componentvoidSets the number of lines per rows.voidSets the name for the instance.voidSets the height of the rows.voidsetStartCol(int col) voidSets the start column of the table.voidsetStartRow(int row) Sets the start row.voidSets the start row.voidSets the title's font.voidSets the font size of the title.voidSets if you want to wrap the sheet's title or not.voidSets if Table must have vertical autoSize enabled or not.Methods inherited from class overit.geocall.basic.ui.xlsx.XlsxComponent
getAlign, getBgColor, getBoolean, getBorder, getBorder, getBorder, getBorderColor, getBorderStyle, getCellFormat, getCellStyle, getChildIterator, getChildSize, getColor, getColor, getComment, getDefault, getDocument, getFont, getFontSize, getKey, getLabel, getRegistryName, getSheet, getStyleName, getVAlign, getWarning, hasFontSize, initCellFormat, initChilds, isBold, isEnabled, isForcedBoldState, isForcedFontSize, isHidden, isLocked, isShrinkToFit, isWrap, onInit, setALIGN, setBGCOLOR, setBOLD, setBorder, setBORDER, setBorderColor, setBORDERCOLORRGB, setBorderStyle, setBORDERSTYLE, setCellFormat, setCELLFORMATCLASS, setCellStyle, setCOLOR, setCOMMENT, setDEFAULT, setENABLED, setFONT, setFONTSIZE, setFORMAT, setHIDDEN, setKEY, setLabel, setLABEL, setLOCKED, setREGISTRYNAME, setSheet, setSHRINKTOFIT, setSTYLENAME, setUseBGColor, setUSEBGCOLOR, setUSEDECIMALSPERCENTAGE, setUseHeadColor, setUSEHEADCOLOR, setVALIGN, setWRAP, useBGColor, useDecimalsPercentage, useHeaderColorMethods inherited from class overit.geocall.platform.ui.UINode
addChild, addChildText, getChildren, getNodeId, getParent, getRoot, getSchema, setNodeId, setParent, setSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.basic.ui.xlsx.XlsxElement
getWarning
-
Field Details
-
_name
-
_dbv
-
_lastRow
protected int _lastRow -
_lastCol
protected int _lastCol -
_startRow
protected int _startRow -
_startCol
protected int _startCol -
_defaultStartRow
protected int _defaultStartRow -
_vAutoSize
protected boolean _vAutoSize -
_titleFontSize
protected int _titleFontSize -
_titleFont
-
_charSpan
protected int _charSpan -
_columnSize
protected int[] _columnSize -
_enabledChild
-
_showTitles
protected boolean _showTitles -
_boldTitles
protected boolean _boldTitles -
_haveTotal
-
_titleWrap
protected boolean _titleWrap -
_autoSize
protected boolean _autoSize -
_customSize
protected boolean _customSize -
_rowHeight
protected int _rowHeight -
_lines4Row
protected int _lines4Row -
_forcedLines4Row
protected boolean _forcedLines4Row -
_breakColumns
-
_breakColumnsPos
protected int[] _breakColumnsPos
-
-
Constructor Details
-
XlsxTableView
public XlsxTableView()
-
-
Method Details
-
getIdentity
Description copied from interface:IdentifiedReturns theIdentityassociated to the component- Specified by:
getIdentityin interfaceIdentified- Overrides:
getIdentityin classXlsxComponent- Returns:
- The Identity of the user currently logged in the application
-
setIdentity
Description copied from interface:IdentifiedSets theIdentityto the component- Specified by:
setIdentityin interfaceIdentified- Overrides:
setIdentityin classXlsxComponent- Parameters:
identity- The Identity that must be associated to the component
-
setHEADTITLES
Sets the head title of the table.- Parameters:
s- The title to set.
-
getHeadTitles
public boolean getHeadTitles()Gets the head title of the table.- Returns:
- The head title of the table.
-
setBOLDTITLES
Sets if you want title with the bold format or not.- Parameters:
s-'true' or '1'if you want to add bold format to the title,'false' or '0'otherwise.
-
hasBoldTitles
public boolean hasBoldTitles()Gets if the title has the bold format.- Returns:
trueif title has the bold format,falseotherwise.
-
setHEADERFONTCOLOR
Sets the font colore on the header's text.- Parameters:
s- The color to set.
-
getHeaderFontColor
public org.apache.poi.xssf.usermodel.XSSFColor getHeaderFontColor()Gets the header font color in use.- Returns:
- The header font
XSSFColor.
-
setROWHEIGHT
Sets the height of the rows.- Parameters:
h- The height to set.
-
getRowHeight
public int getRowHeight()Gets the height of the rows.- Returns:
- The height of the rows.
-
setLINES4ROW
Sets the number of lines per rows.- Parameters:
l- The number line to set.
-
getLines4Row
public int getLines4Row()Gets the number of liner per row.- Returns:
- The number of liner per row.
-
setAUTOSIZE
Sets if Table must have horizontal autoSize enabled or not.- Parameters:
s-'true' or '1'if the horizontal autosize must be enabled,'false' or '0'otherwise.
-
setCUSTOMSIZE
Sets if Table must have a custom size or not.- Parameters:
s-'true' or '1'if the table allows custom size,'false' or '0'otherwise.
-
setSTARTCOL
Sets the start column of the table.- Parameters:
s- The column to set.
-
setStartCol
public void setStartCol(int col) -
getDeafultStartRow
public int getDeafultStartRow()Sets the default start row.- Returns:
- The default start row.
-
setTITLEWRAP
Sets if you want to wrap the sheet's title or not.- Parameters:
s- "1" if you want to wrap the title, "0" otherwise.
-
getTitleWrap
public boolean getTitleWrap()Gets if the sheet's title is wrapped or not.- Returns:
trueif the title is wrapped,falseotherwise.
-
setTITLEFONTSIZE
Sets the font size of the title.- Parameters:
s- The size to set.
-
getTitleFontSize
public int getTitleFontSize()Gets the font size use on the title's text.- Returns:
- The font size used.
-
setTITLEFONT
Sets the title's font.- Parameters:
s- The font to set.
-
getTitleFont
Gets the title's font.- Returns:
- The title's font.
-
setVAUTOSIZE
Sets if Table must have vertical autoSize enabled or not.- Parameters:
s-'true' or '1'if the vertical autosize must be enabled,'false' or '0'otherwise.
-
setCHARSPAN
Sets the char span of a row.- Parameters:
s- The span to set
-
getCharSpan
public int getCharSpan()Gets the char span of a row.- Returns:
- The char span of a row.
-
setSTARTROW
Sets the start row.- Parameters:
s- The start row to set.
-
setStartRow
public void setStartRow(int row) Sets the start row.- Parameters:
row- The start row to set.
-
setBREAKCOLUMNS
Define the break columns.- Parameters:
s- The String with the list of the break columns separated by comma.
-
setNAME
Description copied from class:XlsxComponentSets the name for the instance.- Overrides:
setNAMEin classXlsxComponent- Parameters:
s- The name to set.
-
getName
Description copied from class:XlsxComponentGets the name of tbe instance.- Specified by:
getNamein interfaceXlsxElement- Overrides:
getNamein classXlsxComponent- Returns:
- The name of the instance.
-
getStartRow
public int getStartRow()Gets the start row.- Returns:
- The start row.
-
getStartCol
public int getStartCol()Gets the start column.- Returns:
- The start column.
-
getContent
public void getContent(org.apache.poi.ss.usermodel.Sheet sheet, int startRow, int startCol) throws Exception - Specified by:
getContentin interfaceXlsxElement- Throws:
Exception
-
setDataView
Sets the DataView into the active sheet.- Parameters:
dbview- The DataView to set.
-
getDataView
Gets the Data View of the sheet.- Returns:
- The
DBViewwith the Data View of the sheet.
-
haveTotal
public boolean haveTotal()Gets if the table has the column or the row (or both) that represent totals values, or not.- Returns:
trueif the table has the total end column or row,falseotherwise.
-
getEnabledChild
-
initChilds
-
addTestata
protected void addTestata(org.apache.poi.ss.usermodel.Sheet sheet, int row) -
addCells
protected int addCells(int startRow, int startCol, DBView dbv, org.apache.poi.ss.usermodel.Sheet sheet) throws Exception - Throws:
Exception
-
addCells
protected int addCells(int startRow, int startCol, DBView dbv, org.apache.poi.ss.usermodel.Sheet sheet, boolean append) throws Exception - Throws:
Exception
-
setColumnSizing
protected void setColumnSizing(org.apache.poi.ss.usermodel.Sheet sheet, int posCell) -
addTotali
protected void addTotali(int startRow, int endRow, org.apache.poi.ss.usermodel.Sheet sheet) -
autoSize
protected void autoSize(org.apache.poi.ss.usermodel.Sheet sheet) -
customSize
protected void customSize(org.apache.poi.ss.usermodel.Sheet sheet) -
getOccupationCol
public int getOccupationCol()- Specified by:
getOccupationColin interfaceXlsxElement
-
getOccupationRow
public int getOccupationRow()- Specified by:
getOccupationRowin interfaceXlsxElement
-
addBreakFunctions
-
addNewColumn
Add a new column type (passed by parameter) as child of this instance.- Parameters:
columnType- The type of the new columnxlsDoc- The doc from which retrieve the schema for the column- Returns:
- a new
XlsxColumntype (passed by parameter) as child of this instance.
-
getXlsxColumnPosByName
Gets the column's position, from his name.- Parameters:
s- The name of the column to retrieve- Returns:
- The column's position.
-