Class Columns
java.lang.Object
com.webfirmframework.wffweb.css.core.AbstractCssProperty<Columns>
com.webfirmframework.wffweb.css.css3.Columns
- All Implemented Interfaces:
CssProperty
,StateChangeInformer<CssProperty>
,Serializable
,Cloneable
public class Columns
extends AbstractCssProperty<Columns>
implements StateChangeInformer<CssProperty>
columns: auto|column-width column-count|initial|inherit; The columns property is a shorthand property for setting column-width and column-count. Default value: auto auto Inherited: no Animatable: yes, see individual properties. Version: CSS3 JavaScript syntax: object.style.columns="100px 3"
- Since:
- 1.0.0
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPredefinedConstant
(String constant) static boolean
checks the given css value is valid for this class.void
sets as inheritvoid
sets as initialsetColumnCount
(ColumnCount columnCount) setColumnWidth
(ColumnWidth columnWidth) setCssValue
(String cssValue) 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:
-
-
Constructor Details
-
Columns
public Columns()The valueauto auto
will be assigned as the cssValue.- Since:
- 1.0.0
-
Columns
- Parameters:
cssValue
- the css value to set.
-
Columns
- Parameters:
columns
- theColumns
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<Columns>
- 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
-
getColumnWidth
-
getColumnCount
- Returns:
- the columnCount
- Since:
- 1.0.0
-
setColumnWidth
-
setColumnCount
-
stateChanged
- Specified by:
stateChanged
in interfaceStateChangeInformer<CssProperty>
-
addPredefinedConstant
- Since:
- 1.0.0
-