public static final class TileEntity.Builder
extends java.lang.Object
TileEntity objects holding the tile content.| 构造器 | 说明 |
|---|---|
Builder() |
Constructor.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
TileEntity.Builder |
addAnimationData(TileAnimationData data) |
Adds a
TileAnimationData object to this tile. |
TileEntity |
build() |
Builds a
TileEntity object. |
TileEntity.Builder |
setComponentProvider(ohos.agp.components.ComponentProvider component,
ohos.app.Context context) |
Sets the
ComponentProvider for this tile. |
TileEntity.Builder |
setUpdateDelay(long delay) |
Sets the delay in updating this tile.
|
public TileEntity.Builder setComponentProvider(ohos.agp.components.ComponentProvider component, ohos.app.Context context)
ComponentProvider for this tile.component - Indicates the ComponentProvider to set.context - Indicates the context object of the caller.public TileEntity.Builder setUpdateDelay(long delay)
After the delay elapses, TileAbility#onStatusChanged(TileStatus) is invoked with
TileStatus#TILE_UPDATE
passed from the TileAbility.
delay - Indicates the delay to set.public TileEntity.Builder addAnimationData(TileAnimationData data)
TileAnimationData object to this tile.
Before using this method, you need to call TileAnimationData.Builder#build() to build a
TileAnimationData object.
data - Indicates the TileAnimationData object to add.public TileEntity build()
TileEntity object.TileEntity object.