-
- All Implemented Interfaces:
-
com.patrykandpatrick.vico.core.chart.insets.HorizontalInsets
public final class Insets implements HorizontalInsets
Used to store the insets requested by ChartInsetters.
-
-
Method Summary
Modifier and Type Method Description final FloatgetHorizontal()final FloatgetVertical()final FloatgetStart()final UnitsetStart(Float start)final FloatgetTop()final UnitsetTop(Float top)final FloatgetEnd()final UnitsetEnd(Float end)final FloatgetBottom()final UnitsetBottom(Float bottom)final Insetsset(Insets other)Updates the size of each of the four insets to match the size of its corresponding inset from the provided Insets instance. final Insetsset(Float all)Sets a common size for all four insets. final Insetsset(Float start, Float top, Float end, Float bottom)Updates the size of each of the four insets individually. Unitset(Float start, Float end)Updates the sizes of the start inset and the end inset. final FloatgetLeft(Boolean isLtr)Returns the size of the left inset, taking into account the layout direction. final FloatgetRight(Boolean isLtr)Returns the size of the right inset, taking into account the layout direction. final InsetssetHorizontal(Float value)Sets the sizes of the start inset and the end inset. final InsetssetVertical(Float value)Sets the sizes of the top inset and the bottom inset. UnitsetValuesIfGreater(Float start, Float end)For the start and end insets, updates the value of the inset to the corresponding provided value if the provided value is greater than the current value. final UnitsetValuesIfGreater(Insets other)For each of the four insets, updates the size of the inset to the size of the corresponding inset from the provided Insets instance if the size of the corresponding inset from the provided Insets instance is greater. final UnitsetAllIfGreater(Float start, Float top, Float end, Float bottom)For each of the four insets, updates the size of the inset to the corresponding provided value if the corresponding provided value is greater. final Unitclear()Sets the size of each of the four insets to zero. -
-
Method Detail
-
getHorizontal
final Float getHorizontal()
-
getVertical
final Float getVertical()
-
set
final Insets set(Insets other)
Updates the size of each of the four insets to match the size of its corresponding inset from the provided Insets instance.
-
set
final Insets set(Float start, Float top, Float end, Float bottom)
Updates the size of each of the four insets individually.
-
getLeft
final Float getLeft(Boolean isLtr)
Returns the size of the left inset, taking into account the layout direction.
- Parameters:
isLtr- whether the layout is left-to-right.
-
getRight
final Float getRight(Boolean isLtr)
Returns the size of the right inset, taking into account the layout direction.
- Parameters:
isLtr- whether the layout is left-to-right.
-
setHorizontal
final Insets setHorizontal(Float value)
-
setVertical
final Insets setVertical(Float value)
-
setValuesIfGreater
Unit setValuesIfGreater(Float start, Float end)
For the start and end insets, updates the value of the inset to the corresponding provided value if the provided value is greater than the current value.
-
setValuesIfGreater
final Unit setValuesIfGreater(Insets other)
-
setAllIfGreater
final Unit setAllIfGreater(Float start, Float top, Float end, Float bottom)
For each of the four insets, updates the size of the inset to the corresponding provided value if the corresponding provided value is greater.
-
-
-
-