public class Column extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
Comment |
cellComment |
Integer |
cellStyle
The style of cell
|
Class<?> |
clazz
The cell type
|
int |
colIndex
Specify the column index
|
Comment |
headerComment |
Integer |
headerStyle
The style of header
|
boolean |
hide
Hidden current column
Only set the column to hide, the data will still be written,
you can right-click to "un-hide" to display in file
|
boolean |
ignoreValue
Only export column name and ignore value
|
String |
key
The key of Map or field name of entry
|
String |
name
The header name
|
Column |
next
The next Column point
Support multi header columns
|
NumFmt |
numFmt
Specify the cell number format
|
double |
o |
Column |
prev
The previous Column point
Support multi header columns
|
ConversionProcessor |
processor
The int value conversion
|
int |
realColIndex
The real col-Index used to write
|
boolean |
share
The string value is shared
|
StyleProcessor |
styleProcessor
The style conversion
|
Styles |
styles |
Column |
tail
The tail Column point
Support multi header columns
|
double |
width
The cell width
|
int |
wrapText
Wrap text in a cell
|
| 构造器和说明 |
|---|
Column()
Constructor Column
|
Column(String name)
Constructor Column
|
Column(String name,
Class<?> clazz)
Constructor Column
|
Column(String name,
Class<?> clazz,
boolean share)
Constructor Column
|
Column(String name,
Class<?> clazz,
ConversionProcessor processor)
Constructor Column
|
Column(String name,
Class<?> clazz,
ConversionProcessor processor,
boolean share)
Constructor Column
|
Column(String name,
Class<?> clazz,
int cellStyle)
Constructor Column
|
Column(String name,
Class<?> clazz,
int cellStyle,
boolean share)
Constructor Column
|
Column(String name,
String key)
Constructor Column
|
Column(String name,
String key,
boolean share)
Constructor Column
|
Column(String name,
String key,
Class<?> clazz)
Constructor Column
|
Column(String name,
String key,
Class<?> clazz,
ConversionProcessor processor)
Constructor Column
|
Column(String name,
String key,
ConversionProcessor processor)
Constructor Column
|
Column(String name,
String key,
ConversionProcessor processor,
boolean share)
Constructor Column
|
Column(String name,
String key,
int cellStyle)
Constructor Column
|
Column(String name,
String key,
int cellStyle,
boolean share)
Constructor Column
|
| 限定符和类型 | 方法和说明 |
|---|---|
Column |
addSubColumn(Column column)
Append sub-column at the tail
|
int |
getCellStyle()
Setting the cell styles
|
int |
getCellStyle(Class<?> clazz)
Returns default style based on cell type
|
int |
getCellStyleIndex()
Returns the style index of cell, -1 if not be setting
|
Class<?> |
getClazz()
Returns the cell type
|
int |
getHeaderStyleIndex()
Returns the header style index of cell, -1 if not be setting
|
String |
getName()
Returns the column name
|
NumFmt |
getNumFmt()
Returns the column
NumFmt |
int |
getRealColIndex()
Returns the real col-index(one base)
|
double |
getWidth()
Returns the width of cell
|
Column |
hide()
Hidden current column
|
Column |
ignoreValue()
Ignore value
|
boolean |
isHide()
Returns hide flag
|
boolean |
isIgnoreValue() |
boolean |
isShare()
Setting the cell is shared
|
Column |
setCellStyle(Font font)
Setting the cell styles
|
Column |
setCellStyle(Font font,
Border border)
Setting the cell styles
|
Column |
setCellStyle(Font font,
Border border,
int horizontal)
Setting the cell styles
|
Column |
setCellStyle(Font font,
Fill fill,
Border border)
Setting the cell styles
|
Column |
setCellStyle(Font font,
Fill fill,
Border border,
int horizontal)
Setting the cell styles
|
Column |
setCellStyle(Font font,
Fill fill,
Border border,
int vertical,
int horizontal)
Setting the cell styles
|
Column |
setCellStyle(Font font,
int horizontal)
Setting the cell styles
|
Column |
setCellStyle(int cellStyle)
Setting the cell's style
|
Column |
setCellStyle(NumFmt numFmt,
Font font,
Fill fill,
Border border,
int vertical,
int horizontal)
Setting the cell styles
|
Column |
setClazz(Class<?> clazz)
Setting the cell type
|
Column |
setColIndex(int colIndex)
Settings the x-axis of column in row
|
Column |
setHeaderComment(Comment headerComment)
Setting the header cell comment
|
Column |
setHeaderStyle(int headerStyle)
Setting the header's style
|
Column |
setName(String name)
Setting the column name
|
Column |
setNumFmt(NumFmt numFmt)
Setting a cell format of number or date type
|
Column |
setNumFmt(String code)
Setting a cell format of number or date type
|
Column |
setProcessor(ConversionProcessor processor)
Setting the int value conversion
|
Column |
setShare(boolean share)
Setting cell string value is shared
Shared is only valid for strings, and the converted cell type
is also valid for strings.
|
Column |
setStyleProcessor(StyleProcessor styleProcessor)
Setting the style conversion
|
Column |
setWidth(double width)
Setting the cell's width
|
Column |
setWrapText(boolean wrapText)
Wrap text in a cell
Microsoft Excel can wrap text so it appears on multiple lines in a cell.
|
Column |
show()
Show current column
|
int |
subColumnSize()
Returns the size of sub-column
|
Column[] |
toArray()
Returns an array containing all of the sub-column
|
Column[] |
toArray(Column[] dist)
Returns an array containing all of the sub-column
|
Column |
trimTail()
Trim tail nodes after write
|
public String key
public String name
public Class<?> clazz
public boolean share
public ConversionProcessor processor
public StyleProcessor styleProcessor
public Integer cellStyle
public Integer headerStyle
public double width
public double o
public Styles styles
public Comment headerComment
public Comment cellComment
public NumFmt numFmt
public boolean ignoreValue
public int wrapText
public int colIndex
public Column prev
public Column next
public Column tail
public int realColIndex
public boolean hide
Only set the column to hide, the data will still be written, you can right-click to "un-hide" to display in file
public Column()
public Column(String name)
name - the column namepublic Column(String name, Class<?> clazz)
name - the column nameclazz - the cell typepublic Column(String name, String key)
name - the column namekey - fieldpublic Column(String name, String key, Class<?> clazz)
name - the column namekey - fieldclazz - the cell typepublic Column(String name, Class<?> clazz, ConversionProcessor processor)
name - the column nameclazz - the cell typeprocessor - The int value conversionpublic Column(String name, String key, ConversionProcessor processor)
name - the column namekey - fieldprocessor - The int value conversionpublic Column(String name, Class<?> clazz, boolean share)
name - the column nameclazz - the cell typeshare - true:shared false:inline stringpublic Column(String name, String key, boolean share)
name - the column namekey - filedshare - true:shared false:inline stringpublic Column(String name, Class<?> clazz, ConversionProcessor processor, boolean share)
name - the column nameclazz - the cell typeprocessor - The int value conversionshare - true:shared false:inline stringpublic Column(String name, String key, Class<?> clazz, ConversionProcessor processor)
name - the column namekey - fieldclazz - type of cellprocessor - The int value conversionpublic Column(String name, String key, ConversionProcessor processor, boolean share)
name - the column namekey - fieldprocessor - The int value conversionshare - true:shared false:inline stringpublic Column(String name, Class<?> clazz, int cellStyle)
name - the column nameclazz - the cell typecellStyle - the style of cellpublic Column(String name, String key, int cellStyle)
name - the column namekey - fieldcellStyle - the style of cellpublic Column(String name, Class<?> clazz, int cellStyle, boolean share)
name - the column nameclazz - the cell typecellStyle - the style of cellshare - true:shared false:inline stringpublic Column setWidth(double width)
width - the width valueColumnpublic boolean isShare()
public String getName()
public Column setName(String name)
name - the column nameColumnpublic Class<?> getClazz()
public Column setClazz(Class<?> clazz)
clazz - the cell typeColumnpublic Column setProcessor(ConversionProcessor processor)
processor - The int value conversionColumnpublic Column setStyleProcessor(StyleProcessor styleProcessor)
styleProcessor - The style conversionColumnpublic double getWidth()
public Column setCellStyle(int cellStyle)
cellStyle - the styles valueColumnpublic Column setHeaderStyle(int headerStyle)
headerStyle - the styles valueColumnpublic Column setColIndex(int colIndex)
colIndex - column index (zero base)Columnpublic int getCellStyleIndex()
public int getHeaderStyleIndex()
public Column setCellStyle(Font font)
font - the fontColumnpublic Column setCellStyle(Font font, int horizontal)
font - the fonthorizontal - the horizontal styleColumnpublic Column setCellStyle(Font font, Border border)
font - the fontborder - the border styleColumnpublic Column setCellStyle(Font font, Border border, int horizontal)
font - the fontborder - the border stylehorizontal - the horizontal styleColumnpublic Column setCellStyle(Font font, Fill fill, Border border)
font - the fontfill - the fill styleborder - the border styleColumnpublic Column setCellStyle(Font font, Fill fill, Border border, int horizontal)
font - the fontfill - the fill styleborder - the border stylehorizontal - the horizontal styleColumnpublic Column setCellStyle(Font font, Fill fill, Border border, int vertical, int horizontal)
font - the fontfill - the fill styleborder - the border stylevertical - the vertical stylehorizontal - the horizontal styleColumnpublic Column setCellStyle(NumFmt numFmt, Font font, Fill fill, Border border, int vertical, int horizontal)
numFmt - the number formatfont - the fontfill - the fill styleborder - the border stylevertical - the vertical stylehorizontal - the horizontal styleColumnpublic Column setShare(boolean share)
share - true:shared false:inline stringColumnpublic Column setNumFmt(String code)
code - the format stringColumnpublic int getCellStyle(Class<?> clazz)
clazz - the cell typepublic int getCellStyle()
public boolean isIgnoreValue()
public Column setWrapText(boolean wrapText)
Microsoft Excel can wrap text so it appears on multiple lines in a cell. You can format the cell so the text wraps automatically, or enter a manual line break.
wrapText - set wrapColumn selfpublic Column setHeaderComment(Comment headerComment)
public Column addSubColumn(Column column)
column - a sub-columnColumn selfpublic int subColumnSize()
public Column[] toArray()
public Column[] toArray(Column[] dist)
dist - the array into which the elements of the column are to be storedNullPointerException - if the specified array is nullpublic int getRealColIndex()
public Column trimTail()
public boolean isHide()
Copyright © 2022. All rights reserved.