Module wicket.bootstrap.core
Interface ICssClassNameModifier
- All Superinterfaces:
IClusterable,Serializable
- All Known Implementing Classes:
FormType,IconType,LabelType,TableContextType,Width
#### Description
The
ICssClassNameModifier provides an interface to abstract
the styling of a component and the rendering of the class attribute.
#### Usage
This interface can be used with a Enum:
```java
public enum Color implements ICssClassNameModifier {
Red, Blue;
public CssClassNameAppender newCssClassNameModifier() {
return new CssClassNameAppender(name());
}
}
public MyColoredComponent extends Component {
public MyColoredComponent(String id, Color color) {
super(id);
add(color.newCssClassNameModifier());
}
}
```-
Method Summary
-
Method Details
-
newCssClassNameModifier
AttributeModifier newCssClassNameModifier()- Returns:
- a
AttributeModifierwhich contains the css class name
-