Package org.apache.poi.ss.usermodel
Enum PageMargin
- java.lang.Object
-
- java.lang.Enum<PageMargin>
-
- org.apache.poi.ss.usermodel.PageMargin
-
- All Implemented Interfaces:
Serializable
,Comparable<PageMargin>
public enum PageMargin extends Enum<PageMargin>
Enumeration which represents the various margins which are present within an Excel worksheetPage 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
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOTTOM
Bottom margin, the empty space on the bottom of displayed worksheet data when printingFOOTER
Footer margin, the empty space between the footer and the bottom of the page when printingHEADER
Header margin, the empty space between the header and the top of the page when printingLEFT
Left margin, the empty space on the left of displayed worksheet data when printingRIGHT
Right margin, the empty space on the right of displayed worksheet data when printingTOP
Top margin, the empty space on the top of displayed worksheet data when printing
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PageMargin
getByShortValue(short legacyApiValue)
Retrieves the enumeration value which corresponds to a legacy API constant valueshort
getLegacyApiValue()
static PageMargin
valueOf(String name)
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.
-
-
-
Enum Constant Detail
-
LEFT
public static final PageMargin LEFT
Left margin, the empty space on the left of displayed worksheet data when printing
-
RIGHT
public static final PageMargin RIGHT
Right margin, the empty space on the right of displayed worksheet data when printing
-
TOP
public static final PageMargin TOP
Top margin, the empty space on the top of displayed worksheet data when printing
-
BOTTOM
public static final PageMargin BOTTOM
Bottom margin, the empty space on the bottom of displayed worksheet data when printing
-
HEADER
public static final PageMargin HEADER
Header margin, the empty space between the header and the top of the page when printing
-
FOOTER
public static final PageMargin FOOTER
Footer margin, the empty space between the footer and the bottom of the page when printing
-
-
Method Detail
-
values
public static PageMargin[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PageMargin c : PageMargin.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PageMargin valueOf(String name)
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
public static PageMargin getByShortValue(short legacyApiValue)
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
-
-