ViewRenderable.Builder

public static final class ViewRenderable.Builder

Factory class for ViewRenderable

Public Methods

CompletableFuture<ViewRenderable>
build()
Constructs a Renderable with the parameters of the builder.
ViewRenderable.Builder
setHorizontalAlignment(ViewRenderable.HorizontalAlignment horizontalAlignment)
Sets the ViewRenderable.HorizontalAlignment that controls where the ViewRenderable is positioned relative to the Node it is attached to along the x-axis.
B extends Builder<T extends Renderable, B>
setRegistryId(Object registryId)
ViewRenderable.Builder
setSizer(ViewSizer viewSizer)
Set the ViewSizer that controls the size of the built ViewRenderable in the Scene.
B extends Builder<T extends Renderable, B>
B extends Builder<T extends Renderable, B>
setSource(Context context, Callable<InputStream> inputStreamCreator)
B extends Builder<T extends Renderable, B>
setSource(Context context, Uri sourceUri)
B extends Builder<T extends Renderable, B>
setSource(Context context, int resource)
ViewRenderable.Builder
setVerticalAlignment(ViewRenderable.VerticalAlignment verticalAlignment)
Sets the ViewRenderable.VerticalAlignment that controls where the ViewRenderable is positioned relative to the Node it is attached to along the y-axis.
ViewRenderable.Builder
setView(Context context, View view)
ViewRenderable.Builder
setView(Context context, int resourceId)

Protected Methods

void
abstract Class<T extends Renderable>
abstract ResourceRegistry<T extends Renderable>
abstract B extends Builder<T extends Renderable, B>
ViewRenderable

Inherited Methods

Public Methods

public CompletableFuture<ViewRenderable> build ()

Constructs a Renderable with the parameters of the builder.

Returns

public ViewRenderable.Builder setHorizontalAlignment (ViewRenderable.HorizontalAlignment horizontalAlignment)

Sets the ViewRenderable.HorizontalAlignment that controls where the ViewRenderable is positioned relative to the Node it is attached to along the x-axis. The default is CENTER.

Parameters
horizontalAlignment

public B extends Builder<T extends Renderable, B> setRegistryId (Object registryId)

Parameters
registryId

public ViewRenderable.Builder setSizer (ViewSizer viewSizer)

Set the ViewSizer that controls the size of the built ViewRenderable in the Scene.

Parameters
viewSizer

public B extends Builder<T extends Renderable, B> setSource (RenderableDefinition definition)

Parameters
definition

public B extends Builder<T extends Renderable, B> setSource (Context context, Callable<InputStream> inputStreamCreator)

Parameters
context
inputStreamCreator

public B extends Builder<T extends Renderable, B> setSource (Context context, Uri sourceUri)

Parameters
context
sourceUri

public B extends Builder<T extends Renderable, B> setSource (Context context, int resource)

Parameters
context
resource

public ViewRenderable.Builder setVerticalAlignment (ViewRenderable.VerticalAlignment verticalAlignment)

Sets the ViewRenderable.VerticalAlignment that controls where the ViewRenderable is positioned relative to the Node it is attached to along the y-axis. The default is BOTTOM.

Parameters
verticalAlignment

public ViewRenderable.Builder setView (Context context, View view)

Parameters
context
view

public ViewRenderable.Builder setView (Context context, int resourceId)

Parameters
context
resourceId

Protected Methods

protected void checkPreconditions ()

protected abstract Class<T extends Renderable> getRenderableClass ()

protected abstract ResourceRegistry<T extends Renderable> getRenderableRegistry ()

protected abstract B extends Builder<T extends Renderable, B> getSelf ()

protected ViewRenderable makeRenderable ()

Send feedback about...