Package com.webfirmframework.wffweb.css
Class BorderColor
java.lang.Object
com.webfirmframework.wffweb.css.core.AbstractCssProperty<BorderColor>
com.webfirmframework.wffweb.css.BorderColor
- All Implemented Interfaces:
CssProperty
,StateChangeInformer<CssProperty>
,Serializable
,Cloneable
public class BorderColor
extends AbstractCssProperty<BorderColor>
implements StateChangeInformer<CssProperty>
border-color: color|transparent|initial|inherit; The border-color property sets the color of an element's four borders. This property can have from one to four values. Examples: border-color:red green blue pink; top border is red right border is green bottom border is blue left border is pink border-color:red green blue; top border is red right and left borders are green bottom border is blue border-color:red green; top and bottom borders are red right and left borders are green border-color:red; all four borders are red Note: Always declare the border-style property before the border-color property. An element must have borders before you can change the color. Default value: The current color of the element Inherited: no Animatable: yes Version: CSS1 JavaScript syntax: object.style.borderColor="#FF0000 blue"
- Since:
- 1.0.0
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTheinitial
will be set as the valueBorderColor
(BorderColor borderBottomColor) BorderColor
(String cssValue) -
Method Summary
Modifier and TypeMethodDescriptiongetValue()
gets the value,getCssValue
method can also be used to get the same value.boolean
static boolean
void
sets asinherit
void
sets asinitial
void
sets astransparent
void
setBorderColor
(BorderTopColor borderTopColor, BorderRightColor borderRightColor, BorderBottomColor borderBottomColor, BorderLeftColor borderLeftColor) setCssValue
(String cssValue) the color/color code to set.void
stateChanged
(CssProperty stateChangedObject) toString()
Methods inherited from class com.webfirmframework.wffweb.css.core.AbstractCssProperty
clone, getStateChangeInformer, isAlreadyInUse, setAlreadyInUse, setStateChangeInformer, toCssString
-
Field Details
-
INITIAL
- See Also:
-
INHERIT
- See Also:
-
TRANSPARENT
- See Also:
-
-
Constructor Details
-
BorderColor
public BorderColor()Theinitial
will be set as the value -
BorderColor
- Parameters:
cssValue
- the css value to set.
-
BorderColor
- Parameters:
borderBottomColor
- theBorderBottomColor
object from which the cssValue to set.And,null
will throwNullValueException
-
-
Method Details
-
setValue
the color/color code to set. The alternative methodsetCssValue
can also be used.- Parameters:
value
-- Returns:
- the current object
- Since:
- 1.0.0
-
getCssName
- Specified by:
getCssName
in interfaceCssProperty
- Returns:
- the name portion in style, eg
align-content
for stylealign-content: center
.
-
getCssValue
- Specified by:
getCssValue
in interfaceCssProperty
- Returns:
- the value portion in style, eg
center
for stylealign-content: center
.
-
toString
-
getValue
gets the value,getCssValue
method can also be used to get the same value.- Returns:
- the value in String.
- Since:
- 1.0.0
-
setCssValue
- Specified by:
setCssValue
in classAbstractCssProperty<BorderColor>
- Parameters:
cssValue
- the value should be a color/color code, for example#0000ff
.null
is considered as an invalid value and it will throwNullValueException
.And an empty string is also considered as an invalid value and it will throwInvalidValueException
.- Returns:
- the current object.
- Since:
- 1.0.0
-
setAsInitial
public void setAsInitial()sets asinitial
- Since:
- 1.0.0
-
setAsInherit
public void setAsInherit()sets asinherit
- Since:
- 1.0.0
-
setAsTransparent
public void setAsTransparent()sets astransparent
- Since:
- 1.0.0
-
getBorderTopColor
- Returns:
- the borderTopColor
- Since:
- 1.0.0
-
setBorderColor
public void setBorderColor(BorderTopColor borderTopColor, BorderRightColor borderRightColor, BorderBottomColor borderBottomColor, BorderLeftColor borderLeftColor) - Parameters:
borderTopColor
-borderRightColor
-borderBottomColor
-borderLeftColor
-- Since:
- 1.0.0
-
getBorderRightColor
- Returns:
- the borderRightColor
- Since:
- 1.0.0
-
getBorderBottomColor
- Returns:
- the borderBottomColor
- Since:
- 1.0.0
-
getBorderLeftColor
- Returns:
- the borderLeftColor
- Since:
- 1.0.0
-
stateChanged
- Specified by:
stateChanged
in interfaceStateChangeInformer<CssProperty>
-
hasPredefinedConstantValue
public boolean hasPredefinedConstantValue()- Returns:
- true if its cssValue is any of the values
initial, inherit or transparent
. - Since:
- 1.0.0
-
isValid
- Since:
- 1.0.0
-