Package com.webfirmframework.wffweb.css
Class BorderWidth
java.lang.Object
com.webfirmframework.wffweb.css.core.AbstractCssProperty<BorderWidth>
com.webfirmframework.wffweb.css.BorderWidth
- All Implemented Interfaces:
 CssProperty,StateChangeInformer<CssProperty>,Serializable,Cloneable
public class BorderWidth
extends AbstractCssProperty<BorderWidth>
implements StateChangeInformer<CssProperty>
 border-width: medium|thin|thick|length|initial|inherit;
 The border-width property sets the width of an element's four borders. This property can have from one to four values.
 Examples:
     border-width:thin medium thick 10px;
         top border is thin
         right border is medium
         bottom border is thick
         left border is 10px
     border-width:thin medium thick;
         top border is thin
         right and left borders are medium
         bottom border is thick
     border-width:thin medium;
         top and bottom borders are thin
         right and left borders are medium
     border-width:thin;
         all four borders are thin
 Note: Always declare the border-style property before the border-width property. An element must have borders before you can set the width.
 - Since:
 - 1.0.0
 - See Also:
 
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionThemediumwill be set as the valueBorderWidth(float percent) BorderWidth(float value, CssLengthUnit cssLengthUnit) BorderWidth(BorderWidth borderBottomWidth) BorderWidth(String cssValue)  - 
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic booleanvalidates if the given cssValue is valid for this class.voidsets asinheritvoidsets asinitialvoidsets asmedium.voidsets asthick.voidsets asthin.voidsetBorderWidth(BorderTopWidth borderTopWidth, BorderRightWidth borderRightWidth, BorderBottomWidth borderBottomWidth, BorderLeftWidth borderLeftWidth) sets the top, right, bottom and left width inBorderWidth.setCssValue(String cssValue) voidsetPercent(float percent) setValue(float value, CssLengthUnit cssLengthUnit) voidstateChanged(CssProperty stateChangedObject) toString()Methods inherited from class com.webfirmframework.wffweb.css.core.AbstractCssProperty
clone, getStateChangeInformer, isAlreadyInUse, setAlreadyInUse, setStateChangeInformer, toCssString 
- 
Field Details
- 
MEDIUM
- See Also:
 
 - 
THIN
- See Also:
 
 - 
THICK
- See Also:
 
 - 
INITIAL
- See Also:
 
 - 
INHERIT
- See Also:
 
 
 - 
 - 
Constructor Details
- 
BorderWidth
public BorderWidth()Themediumwill be set as the value - 
BorderWidth
- Parameters:
 cssValue- the css value to set.
 - 
BorderWidth
- Parameters:
 borderBottomWidth- theBorderBottomWidthobject from which the cssValue to set.And,nullwill throwNullValueException
 - 
BorderWidth
public BorderWidth(float percent) - Parameters:
 percent- the percentage value to set. The cssLengthUnit will automatically set to %.- Since:
 - 1.0.0
 
 - 
BorderWidth
- Parameters:
 value-cssLengthUnit-
 
 - 
 - 
Method Details
- 
setValue
- Parameters:
 value-cssLengthUnit-- Returns:
 - the current object
 - Since:
 - 1.0.0
 
 - 
setPercent
public void setPercent(float percent) - Parameters:
 percent- the percent to set- Since:
 - 1.0.0
 
 - 
getCssName
- Specified by:
 getCssNamein interfaceCssProperty- Returns:
 - the name portion in style, eg 
align-contentfor stylealign-content: center. 
 - 
getCssValue
- Specified by:
 getCssValuein interfaceCssProperty- Returns:
 - the value portion in style, eg 
centerfor stylealign-content: center. 
 - 
toString
 - 
setCssValue
- Specified by:
 setCssValuein classAbstractCssProperty<BorderWidth>- Parameters:
 cssValue- the value should be in the format of55pxor95%.nullis considered as an invalid value and it will throwNullValueException.- 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
 
 - 
setAsMedium
public void setAsMedium()sets asmedium.- Since:
 - 1.0.0
 
 - 
setAsThin
public void setAsThin()sets asthin.- Since:
 - 1.0.0
 
 - 
setAsThick
public void setAsThick()sets asthick.- Since:
 - 1.0.0
 
 - 
setBorderWidth
public void setBorderWidth(BorderTopWidth borderTopWidth, BorderRightWidth borderRightWidth, BorderBottomWidth borderBottomWidth, BorderLeftWidth borderLeftWidth) sets the top, right, bottom and left width inBorderWidth. If the given argument is already used by another object, then the existing/cloned object will be used. And throwsNullValueExceptionif any of the given argument is null.- Parameters:
 borderTopWidth-borderRightWidth-borderBottomWidth-borderLeftWidth-- Since:
 - 1.0.0
 
 - 
getBorderTopWidth
- Returns:
 - the borderTopWidth
 - Since:
 - 1.0.0
 
 - 
getBorderRightWidth
- Returns:
 - the borderRightWidth
 - Since:
 - 1.0.0
 
 - 
getBorderBottomWidth
- Returns:
 - the borderBottomWidth
 - Since:
 - 1.0.0
 
 - 
getBorderLeftWidth
- Returns:
 - the borderLeftWidth
 - Since:
 - 1.0.0
 
 - 
stateChanged
- Specified by:
 stateChangedin interfaceStateChangeInformer<CssProperty>
 - 
isValid
validates if the given cssValue is valid for this class.- Parameters:
 cssValue- the value to check.- Returns:
 - true if valid and false if invalid.
 - Since:
 - 1.0.0
 
 - 
hasPredefinedConstantValue
public boolean hasPredefinedConstantValue()- Returns:
 - true if its cssValue is any of the values
         
initial or inherit. - Since:
 - 1.0.0
 
 
 -