KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > wings > template > SLabelPropertyManager


1 /*
2  * $Id: SLabelPropertyManager.java,v 1.3 2004/12/01 07:54:28 hengels Exp $
3  * Copyright 2000,2005 wingS development team.
4  *
5  * This file is part of wingS (http://www.j-wings.org).
6  *
7  * wingS is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License
9  * as published by the Free Software Foundation; either version 2.1
10  * of the License, or (at your option) any later version.
11  *
12  * Please see COPYING for the complete licence.
13  */

14 package org.wings.template;
15
16 import org.wings.SComponent;
17 import org.wings.SLabel;
18 import org.wings.SURLIcon;
19
20 /**
21  * @author <a HREF="mailto:haaf@mercatis.de">Armin Haaf</a>
22  * @version $Revision: 1.3 $
23  */

24 public class SLabelPropertyManager
25         extends SComponentPropertyManager {
26     static final Class JavaDoc[] classes = {SLabel.class};
27
28     public SLabelPropertyManager() {
29     }
30
31     public void setProperty(SComponent comp, String JavaDoc name, String JavaDoc value) {
32         SLabel c = (SLabel) comp;
33         if (name.equals("ICON"))
34             c.setIcon(new SURLIcon(value));
35         else if (name.equals("TEXT"))
36             c.setText(value);
37         else
38             super.setProperty(comp, name, value);
39     }
40
41     public Class JavaDoc[] getSupportedClasses() {
42         return classes;
43     }
44 }
45
46
47
Popular Tags