Package com.openhtmltopdf.render
Enum BlockBox.ContentType
- java.lang.Object
-
- java.lang.Enum<BlockBox.ContentType>
-
- com.openhtmltopdf.render.BlockBox.ContentType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<BlockBox.ContentType>
- Enclosing class:
- BlockBox
public static enum BlockBox.ContentType extends java.lang.Enum<BlockBox.ContentType>
What type of direct child content this block box contains.
NOTE: ABlockBox
can only contain inline or block content (not both) as direct children. If this constraint is not met by the original document, theBoxBuilder
will insertAnonymousBlockBox
with inline content.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLOCK
This block box's direct children consist only ofBlockBox
and subclassed objects.EMPTY
This block box is empty but may still have border, etc.INLINE
This block box contains inline content in theBlockBox.getInlineContent()
property.UNKNOWN
The box builder has not yet run to create our child boxes.
-
Constructor Summary
Constructors Modifier Constructor Description private
ContentType()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BlockBox.ContentType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static BlockBox.ContentType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final BlockBox.ContentType UNKNOWN
The box builder has not yet run to create our child boxes. The box builder can be run withBlockBox.ensureChildren(LayoutContext)
.
-
INLINE
public static final BlockBox.ContentType INLINE
This block box contains inline content in theBlockBox.getInlineContent()
property. If it has also been laid out it will contain children inBox.getChildren()
and associated methods. Children will be onlyLineBox
objects.
-
BLOCK
public static final BlockBox.ContentType BLOCK
This block box's direct children consist only ofBlockBox
and subclassed objects. The methodBlockBox.setInlineContent(List)
must not be used with block content.
-
EMPTY
public static final BlockBox.ContentType EMPTY
This block box is empty but may still have border, etc.
-
-
Method Detail
-
values
public static BlockBox.ContentType[] 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 (BlockBox.ContentType c : BlockBox.ContentType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BlockBox.ContentType valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-