Class RgbCssValue

java.lang.Object
com.webfirmframework.wffweb.data.AbstractBean<RgbCssValue>
com.webfirmframework.wffweb.css.RgbCssValue
All Implemented Interfaces:
Bean, Serializable, Cloneable

public class RgbCssValue extends AbstractBean<RgbCssValue>
Since:
1.0.0
See Also:
  • Constructor Details

    • RgbCssValue

      public RgbCssValue()
    • RgbCssValue

      public RgbCssValue(String rgbCssValue)
      Parameters:
      rgbCssValue - eg:- rgb(15, 55, 155)
    • RgbCssValue

      public RgbCssValue(RgbCssValue rgbCssValue)
    • RgbCssValue

      public RgbCssValue(int r, int g, int b)
      Parameters:
      r - red value. accepts values only from 0 to 255.
      g - green value. accepts values only from 0 to 255.
      b - blue value. accepts values only from 0 to 255.
  • Method Details

    • setRgb

      public void setRgb(String rgb)
      Parameters:
      rgb - eg:- rgb(15, 55, 155)
      Since:
      1.0.0
    • getR

      public int getR()
    • setR

      public void setR(int r)
    • getG

      public int getG()
    • setG

      public void setG(int g)
    • getB

      public int getB()
    • setB

      public void setB(int b)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getValue

      public String getValue()
      Returns:
      the print format of these values as a css value.
      Since:
      1.0.0
    • isValid

      public static boolean isValid(String rgbString)
      Parameters:
      rgbString - eg:- rgb(25, 155, 55)
      Returns:
      true if valid and false for invalid.
      Since:
      1.0.0