01: /*
02: * Copyright 2000,2005 wingS development team.
03: *
04: * This file is part of wingS (http://wingsframework.org).
05: *
06: * wingS is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU Lesser General Public License
08: * as published by the Free Software Foundation; either version 2.1
09: * of the License, or (at your option) any later version.
10: *
11: * Please see COPYING for the complete licence.
12: */
13: package org.wings.template.propertymanagers;
14:
15: import org.wings.SComponent;
16: import org.wings.SLabel;
17: import org.wings.SURLIcon;
18: import org.wings.template.propertymanagers.SComponentPropertyManager;
19:
20: /**
21: * @author <a href="mailto:haaf@mercatis.de">Armin Haaf</a>
22: */
23: public class SLabelPropertyManager extends SComponentPropertyManager {
24: static final Class[] classes = { SLabel.class };
25:
26: public SLabelPropertyManager() {
27: }
28:
29: public void setProperty(SComponent comp, String name, String value) {
30: SLabel c = (SLabel) comp;
31: if (name.equals("ICON"))
32: c.setIcon(new SURLIcon(value));
33: else if (name.equals("TEXT"))
34: c.setText(value);
35: else
36: super .setProperty(comp, name, value);
37: }
38:
39: public Class[] getSupportedClasses() {
40: return classes;
41: }
42: }
|