Enum Class PageBreakAfter

java.lang.Object
java.lang.Enum<PageBreakAfter>
com.oorian.css.PageBreakAfter
All Implemented Interfaces:
Serializable, Comparable<PageBreakAfter>, Constable

public enum PageBreakAfter extends Enum<PageBreakAfter>
CSS page-break-after property values for print page breaking.

The page-break-after property specifies whether a page break should occur after an element when printing. This property is used to control pagination in printed documents.

Break Values:

  • auto: Automatic page break if needed (default)
  • always: Always insert a page break after
  • avoid: Avoid page break after if possible
  • left: Insert page breaks to start on left page
  • right: Insert page breaks to start on right page

Usage:


 element.setPageBreakAfter(PageBreakAfter.ALWAYS);
 section.setPageBreakAfter(PageBreakAfter.AVOID);
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • AUTO

      public static final PageBreakAfter AUTO
      Automatic page break if needed (default).
    • ALWAYS

      public static final PageBreakAfter ALWAYS
      Always insert a page break after.
    • AVOID

      public static final PageBreakAfter AVOID
      Avoid page break after if possible.
    • LEFT

      public static final PageBreakAfter LEFT
      Insert page breaks to start on left page.
    • INITIAL

      public static final PageBreakAfter INITIAL
      Sets to default value.
    • INHERIT

      public static final PageBreakAfter INHERIT
      Inherits from parent element.
  • Method Details

    • values

      public static PageBreakAfter[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PageBreakAfter valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Returns the CSS value string.
      Returns:
      the CSS value
    • toString

      public String toString()
      Returns the CSS value string.
      Overrides:
      toString in class Enum<PageBreakAfter>
      Returns:
      the CSS value