1 package xdoclet.gui.swing;
2
3 import xdoclet.gui.ValueHolder;
4 import xdoclet.gui.ValueHolderFactory;
5
6 import javax.swing.JTextField;
7
8 import java.beans.FeatureDescriptor;
9
10 /***
11 * TODO remove this class?
12 * @author <a href="mailto:aslak.hellesoy at bekk.no">Aslak Hellesøy</a>
13 * @version $Revision: 1.4 $
14 */
15 class SwingValueHolderFactory implements ValueHolderFactory {
16 public ValueHolder createValueHolder(Class parameterClass, FeatureDescriptor featureDescriptor) {
17 return new StringValueHolder();
18 }
19
20 private static class StringValueHolder extends JTextField implements ValueHolder {
21 public Object getValue() {
22 return getText();
23 }
24
25 public void setValue(Object o) {
26 setText(o.toString());
27 }
28 }
29 }
This page was automatically generated by Maven