Package 

Class Insets

  • All Implemented Interfaces:
    com.patrykandpatrick.vico.core.chart.insets.HorizontalInsets

    
    public final class Insets
     implements HorizontalInsets
                        

    Used to store the insets requested by ChartInsetters.

    • Constructor Detail

      • Insets

        Insets(Float start, Float top, Float end, Float bottom)
        Parameters:
        start - the start inset.
        top - the top inset.
        end - the end inset.
        bottom - the bottom inset.
    • Method Detail

      • 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 all)

        Sets a common size for all four insets.

      • set

         Unit set(Float start, Float end)

        Updates the sizes of the start inset and the end inset.

      • 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)

        Sets the sizes of the start inset and the end inset. value represents the sum of the two insets’ sizes, meaning the size of either inset will be half of value.

      • setVertical

         final Insets setVertical(Float value)

        Sets the sizes of the top inset and the bottom inset. value represents the sum of the two insets’ sizes, meaning the size of either inset will be half of 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)

        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.

      • 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.

      • clear

         final Unit clear()

        Sets the size of each of the four insets to zero.