public static enum WriteExcelTempletFile.AlignmentType extends Enum<WriteExcelTempletFile.AlignmentType>
文件名:WriteExcelTempletFile.java
用途: 枚举单元格的对齐方式(水平对齐方式和垂直对齐方式),并可通过get方法,返回在poi中对应的对齐方式枚举
编码时间:2021年5月22日下午3:48:50
修改时间:2021年5月22日下午3:48:50
Enum Constant and Description |
---|
HORIZONTAL_LEFT
水平左对齐
|
HORIZONTAL_MIDDLE
水平居中对齐
|
HORIZONTAL_RIGHT
水平右对齐
|
VERTICAL_BOTTOM
垂直底部对齐
|
VERTICAL_CENTER
垂直居中对齐
|
VERTICAL_TOP
垂直顶部对齐
|
Modifier and Type | Method and Description |
---|---|
static WriteExcelTempletFile.AlignmentType |
getAlignmentType(short code)
根据枚举的编码,识别枚举,并进行返回
|
static WriteExcelTempletFile.AlignmentType |
getAlignmentType(String name)
用于根据枚举名称,识别枚举,并进行返回
|
short |
getCode()
用于返回当前枚举的编码值
|
org.apache.poi.ss.usermodel.HorizontalAlignment |
getHorizontal()
返回在POI中的水平对齐方式
HorizontalAlignment 枚举 |
String |
getName()
返回枚举的名称
|
org.apache.poi.ss.usermodel.VerticalAlignment |
getVertical()
返回在POI中的垂直对齐方式
VerticalAlignment 枚举 |
static WriteExcelTempletFile.AlignmentType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static WriteExcelTempletFile.AlignmentType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WriteExcelTempletFile.AlignmentType HORIZONTAL_LEFT
public static final WriteExcelTempletFile.AlignmentType HORIZONTAL_RIGHT
public static final WriteExcelTempletFile.AlignmentType HORIZONTAL_MIDDLE
public static final WriteExcelTempletFile.AlignmentType VERTICAL_TOP
public static final WriteExcelTempletFile.AlignmentType VERTICAL_BOTTOM
public static final WriteExcelTempletFile.AlignmentType VERTICAL_CENTER
public static WriteExcelTempletFile.AlignmentType[] values()
for (WriteExcelTempletFile.AlignmentType c : WriteExcelTempletFile.AlignmentType.values()) System.out.println(c);
public static WriteExcelTempletFile.AlignmentType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic org.apache.poi.ss.usermodel.HorizontalAlignment getHorizontal()
HorizontalAlignment
枚举
若枚举为设置垂直对齐方式,则该方法返回null
public short getCode()
public org.apache.poi.ss.usermodel.VerticalAlignment getVertical()
VerticalAlignment
枚举
若枚举为设置水平对齐方式,则该方法返回null
public String getName()
public static WriteExcelTempletFile.AlignmentType getAlignmentType(short code)
若无法查到与之匹配的编码,则返回null
code
- 枚举编码public static WriteExcelTempletFile.AlignmentType getAlignmentType(String name)
若无法查到与之匹配的编码,则返回null
name
- 枚举名称Copyright © 2024. All rights reserved.