-
- All Implemented Interfaces:
-
com.patrykandpatrick.vico.core.dimensions.Dimensions
public final class MutableDimensions implements Dimensions
An implementation of Dimensions whose every property is mutable.
-
-
Constructor Summary
Constructors Constructor Description MutableDimensions(Float horizontalDp, Float verticalDp)MutableDimensions(Float startDp, Float topDp, Float endDp, Float bottomDp)
-
Method Summary
Modifier and Type Method Description final FloatgetHorizontalDp()final FloatgetVerticalDp()FloatgetStartDp()The value for the start edge in the dp unit. UnitsetStartDp(Float startDp)The value for the start edge in the dp unit. FloatgetTopDp()The value for the top edge in the dp unit. UnitsetTopDp(Float topDp)The value for the top edge in the dp unit. FloatgetEndDp()The value for the end edge in the dp unit. UnitsetEndDp(Float endDp)The value for the end edge in the dp unit. FloatgetBottomDp()The value for the bottom edge in the dp unit. UnitsetBottomDp(Float bottomDp)The value for the bottom edge in the dp unit. final MutableDimensionsset(Dimensions other)Updates these MutableDimensions to match the provided Dimensions. final MutableDimensionsset(Float all)Sets a common value for each coordinate. final MutableDimensionsset(Float startDp, Float topDp, Float endDp, Float bottomDp)Updates the coordinates to the provided values. final MutableDimensionssetHorizontal(Float valueDp)Evenly distributes the provided measurement between startDp and endDp. final MutableDimensionssetVertical(Float valueDp)Evenly distributes the provided measurement between topDp and bottomDp. final Unitclear()Sets all coordinates to 0. -
-
Method Detail
-
getHorizontalDp
final Float getHorizontalDp()
-
getVerticalDp
final Float getVerticalDp()
-
getStartDp
Float getStartDp()
The value for the start edge in the dp unit.
-
setStartDp
Unit setStartDp(Float startDp)
The value for the start edge in the dp unit.
-
getBottomDp
Float getBottomDp()
The value for the bottom edge in the dp unit.
-
setBottomDp
Unit setBottomDp(Float bottomDp)
The value for the bottom edge in the dp unit.
-
set
final MutableDimensions set(Dimensions other)
Updates these MutableDimensions to match the provided Dimensions.
-
set
final MutableDimensions set(Float all)
Sets a common value for each coordinate.
-
set
final MutableDimensions set(Float startDp, Float topDp, Float endDp, Float bottomDp)
Updates the coordinates to the provided values.
-
setHorizontal
final MutableDimensions setHorizontal(Float valueDp)
-
setVertical
final MutableDimensions setVertical(Float valueDp)
-
-
-
-