Top Description Fields Constructors Methods
org.apache.poi.ss.usermodel

public final Enum PageMargin

extends Enum<PageMargin>
Class Inheritance
Imports
java.util.HashMap, .Map

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

Field Summary

Modifier and TypeField and Description
public static final PageMargin
BOTTOM

Bottom margin, the empty space on the bottom of displayed worksheet data when printing

public static final PageMargin
FOOTER

Footer margin, the empty space between the footer and the bottom of the page when printing

public static final PageMargin
HEADER

Header margin, the empty space between the header and the top of the page when printing

public static final PageMargin
LEFT

Left margin, the empty space on the left of displayed worksheet data when printing

private final short
legacyApiValue

The old API constant value which corresponded to this page margin

private static final Map<Short, PageMargin>
PAGE_MARGIN_BY_LEGACY_API_VALUE

Map relating the old API constant values to their corresponding enumeration value

public static final PageMargin
RIGHT

Right margin, the empty space on the right of displayed worksheet data when printing

public static final PageMargin
TOP

Top margin, the empty space on the top of displayed worksheet data when printing

Constructor Summary

AccessConstructor and Description
private
PageMargin(short
The old API constant value which corresponded to this page margin
legacyApiValue
)

Method Summary

Modifier and TypeMethod and Description
public static PageMargin

Returns:

The PageMargin enumeration which corresponds to the given value, or null if no corresponding value exists
getByShortValue
(short
An old API margin constant value
legacyApiValue
)

Retrieves the enumeration value which corresponds to a legacy API constant value

public short
public static PageMargin
public static PageMargin[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BOTTOMback to summary
public static final PageMargin BOTTOM

Bottom margin, the empty space on the bottom of displayed worksheet data when printing

LEFTback to summary
public static final PageMargin LEFT

Left margin, the empty space on the left of displayed worksheet data when printing

legacyApiValueback to summary
private final short legacyApiValue

The old API constant value which corresponded to this page margin

PAGE_MARGIN_BY_LEGACY_API_VALUEback to summary
private static final Map<Short, PageMargin> PAGE_MARGIN_BY_LEGACY_API_VALUE

Map relating the old API constant values to their corresponding enumeration value

TOPback to summary
public static final PageMargin TOP

Top margin, the empty space on the top of displayed worksheet data when printing

Constructor Detail

PageMarginback to summary
private PageMargin(short legacyApiValue)
Parameters
legacyApiValue:short

The old API constant value which corresponded to this page margin

Method Detail

getByShortValueback to summary
public static PageMargin getByShortValue(short legacyApiValue)

Retrieves the enumeration value which corresponds to a legacy API constant value

Parameters
legacyApiValue:short

An old API margin constant value

Returns:PageMargin

The PageMargin enumeration which corresponds to the given value, or null if no corresponding value exists

getLegacyApiValueback to summary
public short getLegacyApiValue()
valueOfback to summary
public static PageMargin valueOf(String name)
valuesback to summary
public static PageMargin[] values()