Class Flex
java.lang.Object
com.webfirmframework.wffweb.css.core.AbstractCssProperty<Flex>
com.webfirmframework.wffweb.css.css3.Flex
- All Implemented Interfaces:
 CssProperty,StateChangeInformer<CssProperty>,Serializable,Cloneable
flex: flex-grow flex-shrink flex-basis|auto|initial|inherit; The flex property specifies the length of the item, relative to the rest of the flexible items inside the same container. The flex property is a shorthand for the flex-grow, flex-shrink, and the flex-basis properties. Note: If the element is not a flexible item, the flex property has no effect. Default value: 0 1 auto Inherited: no Animatable: yes Version: CSS3 JavaScript syntax: object.style.flex="1" The undefined value for flex-grow, flex-shrink and flex-basis in flex property is 1, 1 and 0% respectively.
- Since:
 - 1.0.0
 - See Also:
 
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPredefinedConstant(String constant) static booleanchecks the given css value is valid for this class.voidsets as autovoidsets as inheritvoidsets as initialsetCssValue(String cssValue) setFlexBasis(FlexBasis flexBasis) setFlexGrow(FlexGrow flexGrow) setFlexShrink(FlexShrink flexShrink) voidstateChanged(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:
 
 - 
AUTO
- See Also:
 
 
 - 
 - 
Constructor Details
- 
Flex
public Flex()The value0 1 autowill be assigned as the cssValue.- Since:
 - 1.0.0
 
 - 
Flex
- Parameters:
 cssValue- the css value to set.
 - 
Flex
- Parameters:
 flex- theFlexobject from which the cssValue to set.And,nullwill throwNullValueException
 
 - 
 - 
Method Details
- 
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<Flex>- Parameters:
 cssValue- the value should be in the format of1 1 autoor1 1 15px.nullis 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
 
 - 
setAsAuto
public void setAsAuto()sets as auto- Since:
 - 1.0.0
 
 - 
getFlexBasis
 - 
getFlexShrink
 - 
getFlexGrow
 - 
setFlexGrow
 - 
setFlexShrink
 - 
setFlexBasis
 - 
stateChanged
- Specified by:
 stateChangedin interfaceStateChangeInformer<CssProperty>
 - 
addPredefinedConstant
- Since:
 - 1.0.0
 
 
 -