com.steadystate.css.dom
Class RGBColorImpl

java.lang.Object
  extended by com.steadystate.css.dom.RGBColorImpl
All Implemented Interfaces:
Serializable, org.w3c.dom.css.RGBColor

public class RGBColorImpl
extends Object
implements org.w3c.dom.css.RGBColor, Serializable

Implementation of RGBColor.

Author:
David Schweinsberg
See Also:
Serialized Form

Constructor Summary
RGBColorImpl()
          Constructor.
RGBColorImpl(org.w3c.css.sac.LexicalUnit lu)
          Constructor that reads the values from the given chain of LexicalUnits.
 
Method Summary
 org.w3c.dom.css.CSSPrimitiveValue getBlue()
          Returns the blue part.
 org.w3c.dom.css.CSSPrimitiveValue getGreen()
          Returns the green part.
 org.w3c.dom.css.CSSPrimitiveValue getRed()
          Returns the red part.
 void setBlue(org.w3c.dom.css.CSSPrimitiveValue blue)
          Sets the blue part to a new value.
 void setGreen(org.w3c.dom.css.CSSPrimitiveValue green)
          Sets the green part to a new value.
 void setRed(org.w3c.dom.css.CSSPrimitiveValue red)
          Sets the red part to a new value.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RGBColorImpl

public RGBColorImpl(org.w3c.css.sac.LexicalUnit lu)
             throws DOMException
Constructor that reads the values from the given chain of LexicalUnits.

Parameters:
lu - the values
Throws:
DOMException - in case of error

RGBColorImpl

public RGBColorImpl()
Constructor. The values for the colors are null.

Method Detail

getRed

public org.w3c.dom.css.CSSPrimitiveValue getRed()
Returns the red part.

Specified by:
getRed in interface org.w3c.dom.css.RGBColor

setRed

public void setRed(org.w3c.dom.css.CSSPrimitiveValue red)
Sets the red part to a new value.

Parameters:
red - the new CSSPrimitiveValue

getGreen

public org.w3c.dom.css.CSSPrimitiveValue getGreen()
Returns the green part.

Specified by:
getGreen in interface org.w3c.dom.css.RGBColor

setGreen

public void setGreen(org.w3c.dom.css.CSSPrimitiveValue green)
Sets the green part to a new value.

Parameters:
green - the new CSSPrimitiveValue

getBlue

public org.w3c.dom.css.CSSPrimitiveValue getBlue()
Returns the blue part.

Specified by:
getBlue in interface org.w3c.dom.css.RGBColor

setBlue

public void setBlue(org.w3c.dom.css.CSSPrimitiveValue blue)
Sets the blue part to a new value.

Parameters:
blue - the new CSSPrimitiveValue

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2013. All rights reserved.