public interface ICssClassNameProvider
extends org.apache.wicket.util.io.IClusterable
ICssClassNameProvider provides an interface to abstract
the styling of a component and the rendering of the class attribute.
This interface can be used with a Enum:
public enum Color implements {
Red, Blue;
public String cssClassName() {
return name().toLowerCase();
}
}
public MyColoredComponent extends Component {
public MyColoredComponent(String id, Color color) {
super(id);
add(new CssClassNameAppender(color.cssClassName()));
}
}
| Modifier and Type | Method and Description |
|---|---|
String |
cssClassName() |
String cssClassName()
Copyright © 2013 agilecoders.de. All Rights Reserved.