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 | |
B extends Builder<T extends Renderable, B> | |
B extends Builder<T extends Renderable, B> | |
B extends Builder<T extends Renderable, B> | |
B extends Builder<T extends Renderable, B> | |
B extends Builder<T extends Renderable, B> | |
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 | |
ViewRenderable.Builder |
Protected Methods
void | |
abstract Class<T extends Renderable> | |
abstract ResourceRegistry<T extends Renderable> | |
abstract B extends Builder<T extends Renderable, B> |
getSelf()
|
ViewRenderable |
Inherited Methods
Public Methods
public CompletableFuture<ViewRenderable> build ()
Constructs a Renderable
with the parameters of the builder.
Returns
- the constructed
Renderable
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)
Build a Renderable
from a RenderableDefinition
.
Parameters
definition |
---|
public B extends Builder<T extends Renderable, B> setSource (Context context, Uri sourceUri, boolean enableCaching)
Parameters
context | |
---|---|
sourceUri | |
enableCaching |
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, int resourceId)
Parameters
context | |
---|---|
resourceId |