Package com.openhtmltopdf.render
Enum BlockBox.ContentType
- java.lang.Object
-
- java.lang.Enum<BlockBox.ContentType>
-
- com.openhtmltopdf.render.BlockBox.ContentType
-
- All Implemented Interfaces:
Serializable,Comparable<BlockBox.ContentType>
- Enclosing class:
- BlockBox
public static enum BlockBox.ContentType extends Enum<BlockBox.ContentType>
What type of direct child content this block box contains.
NOTE: ABlockBoxcan only contain inline or block content (not both) as direct children. If this constraint is not met by the original document, theBoxBuilderwill insertAnonymousBlockBoxwith inline content.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLOCKThis block box's direct children consist only ofBlockBoxand subclassed objects.EMPTYThis block box is empty but may still have border, etc.INLINEThis block box contains inline content in theBlockBox.getInlineContent()property.UNKNOWNThe box builder has not yet run to create our child boxes.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BlockBox.ContentTypevalueOf(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 onlyLineBoxobjects.
-
BLOCK
public static final BlockBox.ContentType BLOCK
This block box's direct children consist only ofBlockBoxand 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(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
-
-