public void setR ( final int r ) { if ( r < 0 || r > 255 ) { throw new InvalidValueException ( "r paramater accept values only from 0 to 255." ) ; } this . r = r ; rgba = "rgba(" + r + ", " + g + ", " + b + ", " + a + ")" ; if ( getStateChangeInformer ( ) != null ) { getStateChangeInformer ( ) . stateChanged ( this ) ; } }
to set the red value which is in between 0 to 255 .