ShapeAppearanceModel.Builder

public final class ShapeAppearanceModel.Builder


Builder to create instances of ShapeAppearanceModels.

Summary

Public constructors

Public methods

ShapeAppearanceModel

Builds an instance of a ShapeAppearanceModel

ShapeAppearanceModel.Builder

Sets all corner sizes.

ShapeAppearanceModel.Builder
setAllCornerSizes(float cornerSize)

Sets the corner size of all four corner treatments to cornerSize.

ShapeAppearanceModel.Builder
setAllCorners(CornerTreatment cornerTreatment)

Sets all corner treatments.

ShapeAppearanceModel.Builder
setAllCorners(@CornerFamily int cornerFamily, float cornerSize)

Sets all corner treatments to CornerTreatments generated from a cornerFamily and cornerSize.

ShapeAppearanceModel.Builder
setAllEdges(EdgeTreatment edgeTreatment)

Sets all edge treatments.

ShapeAppearanceModel.Builder

Sets the edge treatment for the bottom edge.

ShapeAppearanceModel.Builder

Sets the corner treatment for the bottom left corner.

ShapeAppearanceModel.Builder
setBottomLeftCorner(
    @CornerFamily int cornerFamily,
    CornerSize cornerSize
)

Sets the corner treatment for the bottom left corner.

ShapeAppearanceModel.Builder
setBottomLeftCorner(@CornerFamily int cornerFamily, float cornerSize)

Sets the corner treatment for the bottom left corner.

ShapeAppearanceModel.Builder

Sets the bottom left corner size for the current corner.

ShapeAppearanceModel.Builder
setBottomLeftCornerSize(float cornerSize)

Sets the bottom left corner size for the current corner.

ShapeAppearanceModel.Builder

Sets the corner treatment for the bottom right corner.

ShapeAppearanceModel.Builder
setBottomRightCorner(
    @CornerFamily int cornerFamily,
    CornerSize cornerSize
)

Sets the corner treatment for the bottom right corner.

ShapeAppearanceModel.Builder
setBottomRightCorner(@CornerFamily int cornerFamily, float cornerSize)

Sets the corner treatment for the bottom right corner.

ShapeAppearanceModel.Builder

Sets the bottom right corner size for the current corner.

ShapeAppearanceModel.Builder
setBottomRightCornerSize(float cornerSize)

Sets the bottom right corner size for the current corner.

ShapeAppearanceModel.Builder

Sets the edge treatment for the left edge.

ShapeAppearanceModel.Builder

Sets the edge treatment for the right edge.

ShapeAppearanceModel.Builder

Sets the edge treatment for the top edge.

ShapeAppearanceModel.Builder

Sets the corner treatment for the top left corner.

ShapeAppearanceModel.Builder
setTopLeftCorner(@CornerFamily int cornerFamily, CornerSize cornerSize)

Sets the corner treatment for the top left corner.

ShapeAppearanceModel.Builder
setTopLeftCorner(@CornerFamily int cornerFamily, float cornerSize)

Sets the corner treatment for the top left corner.

ShapeAppearanceModel.Builder

Sets the top left corner size for the current corner.

ShapeAppearanceModel.Builder
setTopLeftCornerSize(float cornerSize)

Sets the top left corner size for the current corner.

ShapeAppearanceModel.Builder

Sets the corner treatment for the top right corner.

ShapeAppearanceModel.Builder
setTopRightCorner(@CornerFamily int cornerFamily, CornerSize cornerSize)

Sets the corner treatment for the top right corner.

ShapeAppearanceModel.Builder
setTopRightCorner(@CornerFamily int cornerFamily, float cornerSize)

Sets the corner treatment for the top right corner.

ShapeAppearanceModel.Builder

Sets the top right corner size for the current corner.

ShapeAppearanceModel.Builder
setTopRightCornerSize(float cornerSize)

Sets the top right corner size for the current corner.

Public constructors

Builder

public Builder()

Builder

public Builder(ShapeAppearanceModel other)

Public methods

build

public ShapeAppearanceModel build()

Builds an instance of a ShapeAppearanceModel

setAllCornerSizes

public ShapeAppearanceModel.Builder setAllCornerSizes(CornerSize cornerSize)

Sets all corner sizes.

Parameters
CornerSize cornerSize

the corner size to use for all four corners.

setAllCornerSizes

public ShapeAppearanceModel.Builder setAllCornerSizes(float cornerSize)

Sets the corner size of all four corner treatments to cornerSize.

setAllCorners

public ShapeAppearanceModel.Builder setAllCorners(CornerTreatment cornerTreatment)

Sets all corner treatments.

Parameters
CornerTreatment cornerTreatment

the corner treatment to use for all four corners.

setAllCorners

public ShapeAppearanceModel.Builder setAllCorners(@CornerFamily int cornerFamily, float cornerSize)

Sets all corner treatments to CornerTreatments generated from a cornerFamily and cornerSize.

Parameters
@CornerFamily int cornerFamily

The family to be used to create the CornerTreatments for all four corners. May be one of ROUNDED or CUT.

float cornerSize

The size to be used to create the CornerTreatments for all four corners.

setAllEdges

public ShapeAppearanceModel.Builder setAllEdges(EdgeTreatment edgeTreatment)

Sets all edge treatments.

Parameters
EdgeTreatment edgeTreatment

the edge treatment to use for all four edges.

setBottomEdge

public ShapeAppearanceModel.Builder setBottomEdge(EdgeTreatment bottomEdge)

Sets the edge treatment for the bottom edge.

Parameters
EdgeTreatment bottomEdge

the desired treatment.

setBottomLeftCorner

public ShapeAppearanceModel.Builder setBottomLeftCorner(CornerTreatment bottomLeftCorner)

Sets the corner treatment for the bottom left corner.

Parameters
CornerTreatment bottomLeftCorner

the desired treatment.

setBottomLeftCorner

public ShapeAppearanceModel.Builder setBottomLeftCorner(
    @CornerFamily int cornerFamily,
    CornerSize cornerSize
)

Sets the corner treatment for the bottom left corner.

Parameters
@CornerFamily int cornerFamily

the family to use to create the corner treatment

CornerSize cornerSize

the CornerSize to use for the corner

setBottomLeftCorner

public ShapeAppearanceModel.Builder setBottomLeftCorner(@CornerFamily int cornerFamily, float cornerSize)

Sets the corner treatment for the bottom left corner.

Parameters
@CornerFamily int cornerFamily

the family to use to create the corner treatment

float cornerSize

the size to use for the corner

setBottomLeftCornerSize

public ShapeAppearanceModel.Builder setBottomLeftCornerSize(CornerSize cornerSize)

Sets the bottom left corner size for the current corner.

setBottomLeftCornerSize

public ShapeAppearanceModel.Builder setBottomLeftCornerSize(float cornerSize)

Sets the bottom left corner size for the current corner.

setBottomRightCorner

public ShapeAppearanceModel.Builder setBottomRightCorner(CornerTreatment bottomRightCorner)

Sets the corner treatment for the bottom right corner.

Parameters
CornerTreatment bottomRightCorner

the desired treatment.

setBottomRightCorner

public ShapeAppearanceModel.Builder setBottomRightCorner(
    @CornerFamily int cornerFamily,
    CornerSize cornerSize
)

Sets the corner treatment for the bottom right corner.

Parameters
@CornerFamily int cornerFamily

the family to use to create the corner treatment

CornerSize cornerSize

the CornerSize to use for the corner

setBottomRightCorner

public ShapeAppearanceModel.Builder setBottomRightCorner(@CornerFamily int cornerFamily, float cornerSize)

Sets the corner treatment for the bottom right corner.

Parameters
@CornerFamily int cornerFamily

the family to use to create the corner treatment

float cornerSize

the size to use for the corner

setBottomRightCornerSize

public ShapeAppearanceModel.Builder setBottomRightCornerSize(CornerSize cornerSize)

Sets the bottom right corner size for the current corner.

setBottomRightCornerSize

public ShapeAppearanceModel.Builder setBottomRightCornerSize(float cornerSize)

Sets the bottom right corner size for the current corner.

setLeftEdge

public ShapeAppearanceModel.Builder setLeftEdge(EdgeTreatment leftEdge)

Sets the edge treatment for the left edge.

Parameters
EdgeTreatment leftEdge

the desired treatment.

setRightEdge

public ShapeAppearanceModel.Builder setRightEdge(EdgeTreatment rightEdge)

Sets the edge treatment for the right edge.

Parameters
EdgeTreatment rightEdge

the desired treatment.

setTopEdge

public ShapeAppearanceModel.Builder setTopEdge(EdgeTreatment topEdge)

Sets the edge treatment for the top edge.

Parameters
EdgeTreatment topEdge

the desired treatment.

setTopLeftCorner

public ShapeAppearanceModel.Builder setTopLeftCorner(CornerTreatment topLeftCorner)

Sets the corner treatment for the top left corner.

Parameters
CornerTreatment topLeftCorner

the desired treatment.

setTopLeftCorner

public ShapeAppearanceModel.Builder setTopLeftCorner(@CornerFamily int cornerFamily, CornerSize cornerSize)

Sets the corner treatment for the top left corner.

Parameters
@CornerFamily int cornerFamily

the family to use to create the corner treatment

CornerSize cornerSize

the CornerSize to use for the corner

setTopLeftCorner

public ShapeAppearanceModel.Builder setTopLeftCorner(@CornerFamily int cornerFamily, float cornerSize)

Sets the corner treatment for the top left corner.

Parameters
@CornerFamily int cornerFamily

the family to use to create the corner treatment

float cornerSize

the size to use for the corner

setTopLeftCornerSize

public ShapeAppearanceModel.Builder setTopLeftCornerSize(CornerSize cornerSize)

Sets the top left corner size for the current corner.

setTopLeftCornerSize

public ShapeAppearanceModel.Builder setTopLeftCornerSize(float cornerSize)

Sets the top left corner size for the current corner.

setTopRightCorner

public ShapeAppearanceModel.Builder setTopRightCorner(CornerTreatment topRightCorner)

Sets the corner treatment for the top right corner.

Parameters
CornerTreatment topRightCorner

the desired treatment.

setTopRightCorner

public ShapeAppearanceModel.Builder setTopRightCorner(@CornerFamily int cornerFamily, CornerSize cornerSize)

Sets the corner treatment for the top right corner.

Parameters
@CornerFamily int cornerFamily

the family to use to create the corner treatment

CornerSize cornerSize

the CornerSize to use for the corner

setTopRightCorner

public ShapeAppearanceModel.Builder setTopRightCorner(@CornerFamily int cornerFamily, float cornerSize)

Sets the corner treatment for the top right corner.

Parameters
@CornerFamily int cornerFamily

the family to use to create the corner treatment

float cornerSize

the size to use for the corner

setTopRightCornerSize

public ShapeAppearanceModel.Builder setTopRightCornerSize(CornerSize cornerSize)

Sets the top right corner size for the current corner.

setTopRightCornerSize

public ShapeAppearanceModel.Builder setTopRightCornerSize(float cornerSize)

Sets the top right corner size for the current corner.