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.STextArea;
17: import org.wings.template.propertymanagers.SComponentPropertyManager;
18:
19: /**
20: * @author <a href="mailto:haaf@mercatis.de">Armin Haaf</a>
21: */
22: public class STextAreaPropertyManager extends SComponentPropertyManager {
23: static final Class[] classes = { STextArea.class };
24:
25: public STextAreaPropertyManager() {
26: }
27:
28: public void setProperty(SComponent comp, String name, String value) {
29: STextArea c = (STextArea) comp;
30: if (name.equals("COLS"))
31: c.setColumns(Integer.parseInt(value));
32: else if (name.equals("ROWS"))
33: c.setRows(Integer.parseInt(value));
34: else
35: super .setProperty(comp, name, value);
36: }
37:
38: public Class[] getSupportedClasses() {
39: return classes;
40: }
41: }
|