Class ClassAttribute
java.lang.Object
com.webfirmframework.wffweb.tag.core.AbstractTagBase
com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute
com.webfirmframework.wffweb.tag.html.attribute.core.AbstractValueSetAttribute
com.webfirmframework.wffweb.tag.html.attribute.global.ClassAttribute
- All Implemented Interfaces:
TagBase
,GlobalAttributable
,Serializable
,Cloneable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionClassAttribute
(String classNames) one or more class names separated by space.ClassAttribute
(String... classNames) one or more class name separated by space or as an array of class names. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllClassNames
(Collection<String> classNames) adds the given class names in the class attributevoid
addClassNames
(String... classNames) adds the given class names.void
addNewClassNames
(String... classNames) removed all current class names and adds the given class names.NB:- every time it returns anew LinkedHashSet
object and changes to this set object will not have any affect on thisClassAttribute
object.protected void
init()
invokes only once per objectvoid
removeAllClassNames
(Collection<String> classNames) removes all class names from the class attributevoid
removeClassName
(String className) removes the given class namevoid
void
sets the value for this attributeMethods inherited from class com.webfirmframework.wffweb.tag.html.attribute.core.AbstractValueSetAttribute
addAllToAttributeValueSet, contains, containsAll, replaceAllInAttributeValueSet, replaceAllInAttributeValueSet, setAttributeValue, setAttributeValue
Methods inherited from class com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute
addAllToAttributeValueMap, addAllToAttributeValueSet, addAllToAttributeValueSet, addToAttributeValueMap, addToAttributeValueSet, addValueChangeListener, beforePrintStructure, beforePrintStructureCompressedByIndex, beforeWffPrintStructure, getAttributeName, 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, 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
-
ClassAttribute
public ClassAttribute() -
ClassAttribute
one or more class names separated by space.- Parameters:
classNames
-- Since:
- 3.0.2
-
ClassAttribute
one or more class name separated by space or as an array of class names.- Parameters:
classNames
-
-
-
Method Details
-
init
protected void init()invokes only once per object- Since:
- 1.0.0
-
addClassNames
adds the given class names.- Parameters:
classNames
- one or more class names separated by space or as an array of class names.- Since:
- 1.0.0
-
addNewClassNames
removed all current class names and adds the given class names.- Parameters:
classNames
- one or more class names separated by space or an array of class names.- Since:
- 1.0.0
-
addAllClassNames
adds the given class names in the class attribute- Parameters:
classNames
-- Since:
- 1.0.0
-
removeAllClassNames
removes all class names from the class attribute- Parameters:
classNames
- the class names to remove- Since:
- 1.0.0
-
removeClassName
removes the given class name- Parameters:
className
- the class name to remove- Since:
- 1.0.0
-
getAttributeValue
- Overrides:
getAttributeValue
in classAbstractValueSetAttribute
- Returns:
- the value string of class names
- Since:
- 2.1.9
-
getClassNames
NB:- every time it returns anew LinkedHashSet
object and changes to this set object will not have any affect on thisClassAttribute
object.- Returns:
- the set of class names it contained.
- Since:
- 2.1.9
-
setValue
sets the value for this attribute- Parameters:
value
- the value for the attribute.- Since:
- 2.1.15
-
setValue
-