public abstract class BookContent<D>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
D |
data
A data object that was deserialized from the json object of this content.
|
java.lang.String |
type |
| Constructor and Description |
|---|
BookContent() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
addElements(IElementGroup page,
IGuiElementFactory factory,
BookContent previous,
IGuiElement previousElement,
int pageHeight)
Adds the content to the page by adding a
IGuiElement or at the content to the previous element. |
abstract java.lang.Class<? extends D> |
getDataClass()
The class of the data field.
|
void |
onDeserialization()
Called after the deserialization.
|
public java.lang.String type
@Nullable public D data
@Nullable public abstract java.lang.Class<? extends D> getDataClass()
public void onDeserialization()
public abstract boolean addElements(IElementGroup page, IGuiElementFactory factory, @Nullable BookContent previous, @Nullable IGuiElement previousElement, int pageHeight)
IGuiElement or at the content to the previous element.page - The gui element that represents a book pageprevious - The content of the previous element.previousElement - The element that was previously added to the page.pageHeight - The max height of the current page.