Package org.apache.poi.ss.usermodel
Enum PageMargin
- All Implemented Interfaces:
Serializable
,Comparable<PageMargin>
,java.lang.constant.Constable
Enumeration which represents the various margins which are present within an
Excel worksheet
Page margins are relevant when printing worksheets, and define the amount of empty space on the edges of each printed page
- Since:
- POI 5.2.3
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionBottom margin, the empty space on the bottom of displayed worksheet data when printingFooter margin, the empty space between the footer and the bottom of the page when printingHeader margin, the empty space between the header and the top of the page when printingLeft margin, the empty space on the left of displayed worksheet data when printingRight margin, the empty space on the right of displayed worksheet data when printingTop margin, the empty space on the top of displayed worksheet data when printing -
Method Summary
Modifier and TypeMethodDescriptionstatic PageMargin
getByShortValue
(short legacyApiValue) Retrieves the enumeration value which corresponds to a legacy API constant valueshort
static PageMargin
Returns the enum constant of this type with the specified name.static PageMargin[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
LEFT
Left margin, the empty space on the left of displayed worksheet data when printing -
RIGHT
Right margin, the empty space on the right of displayed worksheet data when printing -
TOP
Top margin, the empty space on the top of displayed worksheet data when printing -
BOTTOM
Bottom margin, the empty space on the bottom of displayed worksheet data when printing -
HEADER
Header margin, the empty space between the header and the top of the page when printing -
FOOTER
Footer margin, the empty space between the footer and the bottom of the page when printing
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getLegacyApiValue
public short getLegacyApiValue() -
getByShortValue
Retrieves the enumeration value which corresponds to a legacy API constant value- Parameters:
legacyApiValue
- An old API margin constant value- Returns:
- The PageMargin enumeration which corresponds to the given value, or null if no corresponding value exists
-