Class Width

    • Constructor Detail

      • Width

        public Width​()
        the value will be set as 100%
        Since:
        1.0.0
      • Width

        public Width​(java.lang.String value)
        eg:- 100%
        Since:
        1.1.4
      • Width

        public Width​(float value,
                     CssLengthUnit cssLengthUnit)
        Parameters:
        value -
        cssLengthUnit -
        Since:
        1.1.4
      • Width

        public Width​(int percent)
        Parameters:
        percent - the percentage value to set.
        Since:
        1.1.4
      • Width

        public Width​(float percent)
        Parameters:
        percent - the percentage value to set.
        Since:
        1.0.0
      • Width

        public Width​(int value,
                     CssLengthUnit cssLengthUnit)
        Parameters:
        value - the value to set
        cssLengthUnit - the unit for the value.
        Since:
        1.0.0
      • Width

        public Width​(int value,
                     LengthUnit lengthUnit)
        Parameters:
        value - the value to set
        lengthUnit - The length unit. It may be an enum class which implements LengthUnit interface. the unit for the value.
        Since:
        1.0.0
    • Method Detail

      • init

        protected void init​()
      • setPercent

        public void setPercent​(float percent)
        Parameters:
        percent - the percent to set
        Since:
        1.0.0
      • setValue

        public Width setValue​(int value,
                              CssLengthUnit cssLengthUnit)
        Parameters:
        value - the value to set
        cssLengthUnit - the unit for the value. return the current object will be returned.
        Since:
        1.0.0
      • setValue

        public Width setValue​(int value,
                              LengthUnit lengthUnit)
        Parameters:
        value - the value to set
        lengthUnit - the unit for the value. It may be an enum class which implements LengthUnit interface. return the current object will be returned.
        Since:
        1.0.0
      • setValue

        public Width setValue​(float value,
                              CssLengthUnit cssLengthUnit)
        Parameters:
        value - the value to set
        cssLengthUnit - the unit for the value. return the current object will be returned.
        Since:
        1.0.0
      • setValue

        public Width setValue​(float value,
                              LengthUnit lengthUnit)
        Parameters:
        value - the value to set
        lengthUnit - the unit for the value. return the current object will be returned.
        Since:
        1.0.0
      • getValue

        public float getValue​()
        Returns:
        the value in float.
        Since:
        1.0.0
      • getUnit

        public LengthUnit getUnit​()
        Returns:
        the unit for the value.
        Since:
        1.0.0