Package com.webfirmframework.wffweb.css
Class Border
java.lang.Object
com.webfirmframework.wffweb.css.core.AbstractCssProperty<Border>
com.webfirmframework.wffweb.css.Border
- All Implemented Interfaces:
CssProperty
,StateChangeInformer<Bean>
,Serializable
,Cloneable
border: border-width border-style border-color|initial|inherit; The border shorthand property sets all the border properties in one declaration. The properties that can be set, are (in order): border-width, border-style, and border-color. It does not matter if one of the values above are missing, e.g. border:solid #ff0000; is allowed.
- Since:
- 1.0.0
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checks the given css value is valid for this class.void
sets as inheritvoid
sets as initialsetBorderColorCssValues
(BorderColorCssValues borderColorCssValues) setBorderStyle
(BorderStyle borderStyle) to set the border style.setBorderWidthValue
(String borderWidthValue) setCssValue
(String cssValue) void
stateChanged
(Bean 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:
-
-
Constructor Details
-
Border
public Border()The valuemedium none #000000
will be assigned as the cssValue.- Since:
- 1.0.0
-
Border
- Parameters:
cssValue
- the css value to set.
-
Border
- Parameters:
border
- theborder
object from which the cssValue to set.And,null
will throwNullValueException
-
-
Method Details
-
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
-
setCssValue
- Specified by:
setCssValue
in classAbstractCssProperty<Border>
- Parameters:
cssValue
- the value should be in the format of55px
or95%
.null
is considered as an invalid value and it will throwNullValueException
.- Returns:
- the current object.
- Since:
- 1.0.0
-
isValid
checks the given css value is valid for this class. It does't do a strict validation.- Parameters:
cssValue
-- Returns:
- Since:
- 1.0.0
-
setAsInitial
public void setAsInitial()sets as initial- Since:
- 1.0.0
-
setAsInherit
public void setAsInherit()sets as inherit- Since:
- 1.0.0
-
getBorderColorCssValues
- Returns:
- the
BorderStyle
object or null if there is not. - Since:
- 1.0.0
-
getBorderStyle
- Returns:
- the
BorderStyle
object or null if there is not. - Since:
- 1.0.0
-
setBorderWidthValue
- Parameters:
borderWidthValue
-- Returns:
- the current object..
- Since:
- 1.0.0
-
setBorderStyle
to set the border style.- Parameters:
borderStyle
-- Returns:
- the current object.
- Since:
- 1.0.0
-
setBorderColorCssValues
- Parameters:
borderColorCssValues
- to set the border color.- Returns:
- the current object
- Since:
- 1.0.0
-
getBorderWidthValue
- Returns:
- the borderWidthValue
- Since:
- 1.0.0
-
stateChanged
- Specified by:
stateChanged
in interfaceStateChangeInformer<Bean>
-