Class Width
java.lang.Object
com.webfirmframework.wffweb.tag.core.AbstractTagBase
com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute
com.webfirmframework.wffweb.tag.html.attribute.Width
- All Implemented Interfaces:
TagBase
,RectAttributable
,InputAttributable
,Serializable
,Cloneable
This is a width attribute.
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
ConstructorDescriptionWidth()
the value will be set as100%
Width
(float percent) Width
(float value, CssLengthUnit cssLengthUnit) Width
(int percent) Width
(int value, LengthUnit lengthUnit) Width
(int value, CssLengthUnit cssLengthUnit) eg:-100%
-
Method Summary
Modifier and TypeMethodDescriptiongetUnit()
float
getValue()
protected void
init()
void
setPercent
(float percent) setValue
(float value, LengthUnit lengthUnit) setValue
(float value, CssLengthUnit cssLengthUnit) setValue
(int value, LengthUnit lengthUnit) setValue
(int value, CssLengthUnit cssLengthUnit) Methods inherited from class com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute
addAllToAttributeValueMap, addAllToAttributeValueSet, addAllToAttributeValueSet, addToAttributeValueMap, addToAttributeValueSet, addValueChangeListener, beforePrintStructure, beforePrintStructureCompressedByIndex, beforeWffPrintStructure, getAttributeName, getAttributeValue, getAttributeValueMap, getAttributeValueSet, getBinaryStructureCompressedByIndex, getBinaryStructureCompressedByIndex, getCharset, getOwnerTag, getOwnerTags, getPrintStructure, getPrintStructure, getReadLocks, getValueChangeListeners, getWffPrintStructure, getWriteLocks, lockAndGetReadLocks, lockAndGetReadLocksWithAttrLock, lockAndGetWriteLocks, lockAndGetWriteLocksWithAttrLock, removeAllFromAttributeValueMap, removeAllFromAttributeValueSet, removeAllFromAttributeValueSet, removeFromAttributeValueMap, removeFromAttributeValueMap, removeFromAttributeValueMapByKeys, removeFromAttributeValueSet, removeValueChangeListener, replaceAllInAttributeValueSet, replaceAllInAttributeValueSet, setAttributeName, setAttributeValue, setAttributeValue, setAttributeValueMap, setAttributeValueSet, setCharset, setModified, setModifiedLockless, setOwnerTag, setPreIndexedAttribute, toCompressedBytesByIndex, toCompressedBytesByIndex, toHtmlString, toHtmlString, toHtmlString, toHtmlString, toHtmlString, toHtmlString, toString, toWffString, unsetOwnerTag
Methods inherited from class com.webfirmframework.wffweb.tag.core.AbstractTagBase
equals, getData, hashCode, isModified, isRebuild, setData, setRebuild
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.webfirmframework.wffweb.tag.core.TagBase
toHtmlString, toHtmlString, toHtmlString, toHtmlString, toHtmlString, toHtmlString, toString
-
Constructor Details
-
Width
public Width()the value will be set as100%
- Since:
- 1.0.0
-
Width
eg:-100%
- Since:
- 1.1.4
-
Width
- Parameters:
value
-cssLengthUnit
-- Since:
- 1.1.4
-
Width
public Width(int percent) - Parameters:
percent
- the percentage value to set.- Since:
- 1.1.4
-
Width
public Width(float percent) - Parameters:
percent
- the percentage value to set.- Since:
- 1.0.0
-
Width
- Parameters:
value
- the value to setcssLengthUnit
- the unit for the value.- Since:
- 1.0.0
-
Width
- Parameters:
value
- the value to setlengthUnit
- The length unit. It may be an enum class which implementsLengthUnit
interface. the unit for the value.- Since:
- 1.0.0
-
-
Method Details
-
init
protected void init() -
setPercent
public void setPercent(float percent) - Parameters:
percent
- the percent to set- Since:
- 1.0.0
-
setValue
- Parameters:
value
- the value to setcssLengthUnit
- the unit for the value. return the current object will be returned.- Since:
- 1.0.0
-
setValue
- Parameters:
value
- the value to setlengthUnit
- the unit for the value. It may be an enum class which implementsLengthUnit
interface. return the current object will be returned.- Since:
- 1.0.0
-
setValue
- Parameters:
value
- the value to setcssLengthUnit
- the unit for the value. return the current object will be returned.- Since:
- 1.0.0
-
setValue
- Parameters:
value
- the value to setlengthUnit
- the unit for the value. return the current object will be returned.- Since:
- 1.0.0
-
getValue
public float getValue()- Returns:
- the value in float.
- Since:
- 1.0.0
-
getUnit
- Returns:
- the unit for the value.
- Since:
- 1.0.0
-