public class CssClasses extends Object
| Constructor and Description |
|---|
CssClasses() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(String... values)
Adds multiple class names.
|
boolean |
hasChanged()
Returns true if the state has changed since last being reset.
|
boolean |
isEmpty()
Returns true if no classes are present.
|
CssClasses |
parse(String value)
Parses a space-delimited list of class names.
|
boolean |
remove(String... values)
Removes multiple class names.
|
boolean |
toggle(String yesValue,
String noValue,
boolean condition)
Toggles the presence of two mutually exclusive classes based on a condition.
|
String |
toString() |
String |
toString(boolean clearChanged)
Returns a space-delimited list of classes.
|
public CssClasses parse(String value)
value - Space-delimited list of class names.public boolean add(String... values)
values - Class names to be added.public boolean remove(String... values)
values - Class names to be removed.public boolean toggle(String yesValue, String noValue, boolean condition)
yesValue - Classes to be added if the condition is true, or removed if false.noValue - Classes to be added if the condition is false, or removed if true.condition - The condition value.public boolean hasChanged()
public boolean isEmpty()
public String toString(boolean clearChanged)
clearChanged - If true, clear the changed flag.Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.