Package org.adempiere.impexp
Class GridTabExcelExporter
java.lang.Object
org.adempiere.impexp.AbstractExcelExporter
org.adempiere.impexp.GridTabExcelExporter
- All Implemented Interfaces:
IGridTabExporter
Excel (XLS) Exporter Adapter for GridTab
- Author:
- Teo Sarca, www.arhipac.ro
- FR [ 1943731 ] Window data export functionality
-
Field Summary
Fields inherited from class org.adempiere.impexp.AbstractExcelExporter
colSuppressRepeats, log, m_lang, m_workbook
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
export
(GridTab gridTab, List<GridTab> childs, boolean currentRowOnly, File file, int indxDetailSelected) export gridTab data to fileint
Get Columns Countprotected int
int
getDisplayType
(int row, int col) Get cell display type (seeDisplayType
)getHeaderName
(int col) Get column header nameint
Get Rows CountgetSuggestedFileName
(GridTab gridTab) getValueAt
(int row, int col) Get cell valueboolean
isColumnPrinted
(int col) Check if column is printed (displayed)boolean
isDisplayed
(int row, int col) Check if there is a display logicboolean
isExportableTab
(GridTab gridTab) Check if exported support the export of a child tabboolean
Is the current Row a Function Rowboolean
isPageBreak
(int row, int col) Check if there is a page break on given cellprotected void
setCurrentRow
(int row) Set current rowMethods inherited from class org.adempiere.impexp.AbstractExcelExporter
createHeaderFooter, createParameter, export, export, export, exportToWorkbook, formatPage, getCellFormat, getCtx, getFormCell, getFormRow, getLanguage, getNoOfParameter, isCurrentRowOnly, isForm, isSetFormRowPosition, isSuppressNull, isVisible, setCurrentRowOnly, setFreezePane, setNoOfParameter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.adempiere.base.IGridTabExporter
isAdvanced, isExportChildTabsForCurrentRowOnly, maxDeepOfChildTab
-
Constructor Details
-
GridTabExcelExporter
public GridTabExcelExporter()Default constructor
-
-
Method Details
-
getColumnCount
public int getColumnCount()Description copied from class:AbstractExcelExporter
Get Columns Count- Specified by:
getColumnCount
in classAbstractExcelExporter
- Returns:
- number of columns
-
getDisplayType
public int getDisplayType(int row, int col) Description copied from class:AbstractExcelExporter
Get cell display type (seeDisplayType
)- Specified by:
getDisplayType
in classAbstractExcelExporter
- Parameters:
row
- row indexcol
- column index- Returns:
- display type
-
getHeaderName
Description copied from class:AbstractExcelExporter
Get column header name- Specified by:
getHeaderName
in classAbstractExcelExporter
- Parameters:
col
- column index- Returns:
- header name
-
getRowCount
public int getRowCount()Description copied from class:AbstractExcelExporter
Get Rows Count- Specified by:
getRowCount
in classAbstractExcelExporter
- Returns:
- number of rows
-
getValueAt
Description copied from class:AbstractExcelExporter
Get cell value- Specified by:
getValueAt
in classAbstractExcelExporter
- Parameters:
row
- row indexcol
- column index- Returns:
- cell value
-
isColumnPrinted
public boolean isColumnPrinted(int col) Description copied from class:AbstractExcelExporter
Check if column is printed (displayed)- Specified by:
isColumnPrinted
in classAbstractExcelExporter
- Parameters:
col
- column index- Returns:
- true if is visible
-
isFunctionRow
public boolean isFunctionRow()Description copied from class:AbstractExcelExporter
Is the current Row a Function Row- Specified by:
isFunctionRow
in classAbstractExcelExporter
- Returns:
- true if function row
-
isPageBreak
public boolean isPageBreak(int row, int col) Description copied from class:AbstractExcelExporter
Check if there is a page break on given cell- Specified by:
isPageBreak
in classAbstractExcelExporter
- Parameters:
row
- row indexcol
- column index- Returns:
- true if there is a page break
-
setCurrentRow
protected void setCurrentRow(int row) Description copied from class:AbstractExcelExporter
Set current row- Specified by:
setCurrentRow
in classAbstractExcelExporter
- Parameters:
row
- row index
-
getCurrentRow
protected int getCurrentRow()- Specified by:
getCurrentRow
in classAbstractExcelExporter
- Returns:
- current row index
-
export
public void export(GridTab gridTab, List<GridTab> childs, boolean currentRowOnly, File file, int indxDetailSelected) Description copied from interface:IGridTabExporter
export gridTab data to file- Specified by:
export
in interfaceIGridTabExporter
indxDetailSelected
- index of selected child tab
-
getFileExtension
- Specified by:
getFileExtension
in interfaceIGridTabExporter
- Returns:
- file extension (csv, zip, ect)
-
getFileExtensionLabel
- Specified by:
getFileExtensionLabel
in interfaceIGridTabExporter
- Returns:
- label for file extension
-
getContentType
- Specified by:
getContentType
in interfaceIGridTabExporter
- Returns:
- mime content type
-
getSuggestedFileName
- Specified by:
getSuggestedFileName
in interfaceIGridTabExporter
- Returns:
- suggested file name
-
isExportableTab
Check if exported support the export of a child tab no detail tab is support to export with excel- Specified by:
isExportableTab
in interfaceIGridTabExporter
- Returns:
- true if export is supported, false otherwise
-
isDisplayed
public boolean isDisplayed(int row, int col) Description copied from class:AbstractExcelExporter
Check if there is a display logic- Specified by:
isDisplayed
in classAbstractExcelExporter
- Parameters:
row
- row indexcol
- column index- Returns:
- true if there is no logic or evaluate logic specified in print item
-