JIDE 3.5.15

com.jidesoft.hssf
Class HssfTableFormat

java.lang.Object
  extended by com.jidesoft.hssf.HssfTableFormat
All Implemented Interfaces:
Cloneable

public class HssfTableFormat
extends Object
implements Cloneable

HssfTableFormat is a class to store the export properties to a excel sheet.


Constructor Summary
HssfTableFormat()
          Default Constructor.
HssfTableFormat(HssfTableFormat hssfTableFormat)
          Copy Constructor
 
Method Summary
protected  Object clone()
           
 short getBottomBorder()
          Get bottom border style.
 HssfTableUtils.CellValueConverter getCellValueConverter()
          Get the cell value converter to convert the value to string displayed in the target excel sheet.
 StringConverter getColumnNameConverter()
          Get the column name converter to convert the value to string displayed in the target excel sheet.
 int getFirstColumn()
          Get the first column in JTable to be exported to excel sheet.
 int getFirstRow()
          Get the first row in JTable to be exported to excel sheet.
 String getHeader()
          Get the header in the excel sheet.
 short getLeftBorder()
          Get left border style.
 int getNumberOfColumns()
          Get the number of columns in JTable to be exported to excel sheet.
 int getNumberOfRows()
          Get the number of rows in JTable to be exported to excel sheet.
 HssfTableUtils.POICustomizer getPOICustomizer()
          Gets the poi customizer to customize the exported sheet.
 short getRightBorder()
          Get right border style.
 int getStartColumn()
          Get the start column in the excel sheet to be exported to.
 int getStartRow()
          Get the start row in the excel sheet to be exported to.
 short getTopBorder()
          Get top border style.
 boolean isAutoSizeColumns()
          Get the flag indicating if we should auto resize column width during exporting.
 boolean isFreezePanes()
          Get the flag indicating whether to set freeze pane in the target excel sheet for header tables.
 boolean isGroupExpandable()
          Get the flag if the rows should be grouped if there is expandable row in the table.
 boolean isIncludePageNumbers()
          Get the flag indicating whether to include page number in the excel sheet.
 boolean isIncludeTableHeader()
          Get the flag indicating if we should export the table header to excel sheet as well.
 boolean isPrintFitToPage()
          Get the flag indicating whether to set print fit to the page.
 boolean isPrintLandscape()
          Get the flag indicating whether to print in landscape.
 void setAutoSizeColumns(boolean autoSizeColumns)
          Set the flag indicating if we should auto resize column width during exporting.
 void setBottomBorder(short bottomBorder)
          Set bottom border style.
 void setCellValueConverter(HssfTableUtils.CellValueConverter cellValueConverter)
          Set the cell value converter to convert the value to string displayed in the target excel sheet.
 void setColumnNameConverter(StringConverter columnNameConverter)
          Set the column name converter to convert the value to string displayed in the target excel sheet.
 void setFirstColumn(int firstColumn)
          Set the first column in JTable to be exported to excel sheet.
 void setFirstRow(int firstRow)
          Set the first row in JTable to be exported to excel sheet.
 void setFreezePanes(boolean freezePanes)
          Set the flag indicating whether to set freeze pane in the target excel sheet for header tables.
 void setGroupExpandable(boolean groupExpandable)
          Set the flag if the rows should be grouped if there is expandable row in the table.
 void setHeader(String header)
          Set the header in the excel sheet.
 void setIncludePageNumbers(boolean includePageNumbers)
          Set the flag indicating whether to include page number in the excel sheet.
 void setIncludeTableHeader(boolean includeTableHeader)
          Set the flag indicating if we should export the table header to excel sheet as well.
 void setLeftBorder(short leftBorder)
          Set left border style.
 void setNumberOfColumns(int numberOfColumns)
          Set the number of columns in JTable to be exported to excel sheet.
 void setNumberOfRows(int numberOfRows)
          Set the number of rows in JTable to be exported to excel sheet.
 void setPOICustomizer(HssfTableUtils.POICustomizer poiCustomizer)
          Sets the poi customizer to customize the exported sheet.
 void setPrintFitToPage(boolean printFitToPage)
          Set the flag indicating whether to set print fit to the page.
 void setPrintLandscape(boolean printLandscape)
          Set the flag indicating whether to print in landscape.
 void setRightBorder(short rightBorder)
          Set right border style.
 void setStartColumn(int startColumn)
          Set the start column in the excel sheet to be exported to.
 void setStartRow(int startRow)
          Set the start row in the excel sheet to be exported to.
 void setTopBorder(short topBorder)
          Set top border style.
 String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HssfTableFormat

public HssfTableFormat(HssfTableFormat hssfTableFormat)
Copy Constructor

Parameters:
hssfTableFormat - a HssfTableFormat object

HssfTableFormat

public HssfTableFormat()
Default Constructor.

Method Detail

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

getTopBorder

public short getTopBorder()
Get top border style.

Returns:
the top border style.

setTopBorder

public void setTopBorder(short topBorder)
Set top border style.

Parameters:
topBorder - the top border style

getBottomBorder

public short getBottomBorder()
Get bottom border style.

Returns:
the bottom border style.

setBottomBorder

public void setBottomBorder(short bottomBorder)
Set bottom border style.

Parameters:
bottomBorder - the bottom border style

getLeftBorder

public short getLeftBorder()
Get left border style.

Returns:
the left border style.

setLeftBorder

public void setLeftBorder(short leftBorder)
Set left border style.

Parameters:
leftBorder - the left border style

getRightBorder

public short getRightBorder()
Get right border style.

Returns:
the right border style.

setRightBorder

public void setRightBorder(short rightBorder)
Set right border style.

Parameters:
rightBorder - the right border style

isAutoSizeColumns

public boolean isAutoSizeColumns()
Get the flag indicating if we should auto resize column width during exporting.

Returns:
true if need auto resize. Otherwise false.

setAutoSizeColumns

public void setAutoSizeColumns(boolean autoSizeColumns)
Set the flag indicating if we should auto resize column width during exporting.

Parameters:
autoSizeColumns - the flag

getFirstRow

public int getFirstRow()
Get the first row in JTable to be exported to excel sheet.

Returns:
the first row.

setFirstRow

public void setFirstRow(int firstRow)
Set the first row in JTable to be exported to excel sheet.

Parameters:
firstRow - the first row

getFirstColumn

public int getFirstColumn()
Get the first column in JTable to be exported to excel sheet.

Returns:
the first column.

setFirstColumn

public void setFirstColumn(int firstColumn)
Set the first column in JTable to be exported to excel sheet.

Parameters:
firstColumn - the first column

getNumberOfRows

public int getNumberOfRows()
Get the number of rows in JTable to be exported to excel sheet.

Returns:
the number of rows.

setNumberOfRows

public void setNumberOfRows(int numberOfRows)
Set the number of rows in JTable to be exported to excel sheet.

Parameters:
numberOfRows - the number of rows

getNumberOfColumns

public int getNumberOfColumns()
Get the number of columns in JTable to be exported to excel sheet.

Returns:
the number of columns.

setNumberOfColumns

public void setNumberOfColumns(int numberOfColumns)
Set the number of columns in JTable to be exported to excel sheet.

Parameters:
numberOfColumns - the number of columns

getStartRow

public int getStartRow()
Get the start row in the excel sheet to be exported to.

Returns:
the start row.

setStartRow

public void setStartRow(int startRow)
Set the start row in the excel sheet to be exported to.

Parameters:
startRow - the start row

getStartColumn

public int getStartColumn()
Get the start column in the excel sheet to be exported to.

Returns:
the start column.

setStartColumn

public void setStartColumn(int startColumn)
Set the start column in the excel sheet to be exported to.

Parameters:
startColumn - the start column

isIncludeTableHeader

public boolean isIncludeTableHeader()
Get the flag indicating if we should export the table header to excel sheet as well.

Returns:
true if need export the table header. Otherwise false.

setIncludeTableHeader

public void setIncludeTableHeader(boolean includeTableHeader)
Set the flag indicating if we should export the table header to excel sheet as well.

Parameters:
includeTableHeader - the flag

getCellValueConverter

public HssfTableUtils.CellValueConverter getCellValueConverter()
Get the cell value converter to convert the value to string displayed in the target excel sheet.

Returns:
the cell value converter.

setCellValueConverter

public void setCellValueConverter(HssfTableUtils.CellValueConverter cellValueConverter)
Set the cell value converter to convert the value to string displayed in the target excel sheet.

Parameters:
cellValueConverter - the cell value converter

getPOICustomizer

public HssfTableUtils.POICustomizer getPOICustomizer()
Gets the poi customizer to customize the exported sheet.

Returns:
the poi customizer.

setPOICustomizer

public void setPOICustomizer(HssfTableUtils.POICustomizer poiCustomizer)
Sets the poi customizer to customize the exported sheet.

Parameters:
poiCustomizer - the poi customizer

getColumnNameConverter

public StringConverter getColumnNameConverter()
Get the column name converter to convert the value to string displayed in the target excel sheet.

Returns:
the column name converter.

setColumnNameConverter

public void setColumnNameConverter(StringConverter columnNameConverter)
Set the column name converter to convert the value to string displayed in the target excel sheet.

Parameters:
columnNameConverter - the column name converter

isPrintLandscape

public boolean isPrintLandscape()
Get the flag indicating whether to print in landscape.

Returns:
true if need print in landscape. Otherwise false.

setPrintLandscape

public void setPrintLandscape(boolean printLandscape)
Set the flag indicating whether to print in landscape.

Parameters:
printLandscape - the flag

isIncludePageNumbers

public boolean isIncludePageNumbers()
Get the flag indicating whether to include page number in the excel sheet.

Returns:
true if need include page number. Otherwise false.

setIncludePageNumbers

public void setIncludePageNumbers(boolean includePageNumbers)
Set the flag indicating whether to include page number in the excel sheet.

Parameters:
includePageNumbers - the flag

isPrintFitToPage

public boolean isPrintFitToPage()
Get the flag indicating whether to set print fit to the page.

Returns:
true if need set print fit to the page. Otherwise false.

setPrintFitToPage

public void setPrintFitToPage(boolean printFitToPage)
Set the flag indicating whether to set print fit to the page.

Parameters:
printFitToPage - the flag

isFreezePanes

public boolean isFreezePanes()
Get the flag indicating whether to set freeze pane in the target excel sheet for header tables.

Returns:
true if need set freeze pane for header tables. Otherwise false.

setFreezePanes

public void setFreezePanes(boolean freezePanes)
Set the flag indicating whether to set freeze pane in the target excel sheet for header tables.

Parameters:
freezePanes - the flag

getHeader

public String getHeader()
Get the header in the excel sheet.

Returns:
the header.

setHeader

public void setHeader(String header)
Set the header in the excel sheet.

Parameters:
header - the header.

isGroupExpandable

public boolean isGroupExpandable()
Get the flag if the rows should be grouped if there is expandable row in the table.

Returns:
true if group required. Otherwise false.
See Also:
setGroupExpandable(boolean)

setGroupExpandable

public void setGroupExpandable(boolean groupExpandable)
Set the flag if the rows should be grouped if there is expandable row in the table.

The default value is true.

Parameters:
groupExpandable - the flag

toString

public String toString()
Constructs a String with all attributes in name = value format.

Overrides:
toString in class Object
Returns:
a String representation of this object.

JIDE 3.5.15