Enum Class PageBreakBefore

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

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

The page-break-before property specifies whether a page break should occur before 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 before
  • avoid: Avoid page break before if possible
  • left: Insert page breaks to start on left page
  • right: Insert page breaks to start on right page

Usage:


 element.setPageBreakBefore(PageBreakBefore.ALWAYS);
 chapter.setPageBreakBefore(PageBreakBefore.RIGHT);
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • AUTO

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

      public static final PageBreakBefore ALWAYS
      Always insert a page break before.
    • AVOID

      public static final PageBreakBefore AVOID
      Avoid page break before if possible.
    • LEFT

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

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

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

    • values

      public static PageBreakBefore[] 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 PageBreakBefore 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<PageBreakBefore>
      Returns:
      the CSS value