01: /*
02: * Created on 2 Nov 2006
03: */
04: package uk.org.ponder.rsf.components.decorators;
05:
06: import java.util.Map;
07:
08: /** A decorator that will apply CSS styles directly to the rendered element.
09: * In HTML, this will be rendered as the "style" attribute.
10: *
11: * @author Antranig Basman (antranig@caret.cam.ac.uk)
12: *
13: */
14:
15: public class UICSSDecorator implements UIDecorator {
16: public Map stylemap;
17:
18: public UICSSDecorator() {
19: }
20:
21: /**
22: * @param stylemap A map of Strings to Strings, where the key is the CSS
23: * style name and the value is its value. For example,
24: * <code>stylemap.put("text-indent", "5em");</code>
25: *
26: */
27: public UICSSDecorator(Map stylemap) {
28: this.stylemap = stylemap;
29: }
30: }
|