01: package org.osbl.client.wings.form.layouter;
02:
03: import org.osbl.client.wings.form.ComponentProvider;
04:
05: import org.wings.*;
06:
07: /**
08: * Place an editor component obtained from the ComponentProvider.
09: */
10: public class CustomEditor extends Editor {
11: String name;
12:
13: /**
14: * Construct a custom editor component placement description.
15: * @param name the name of the custom component
16: */
17: public CustomEditor(String name) {
18: this .name = name;
19: }
20:
21: /**
22: * Construct an editor component placement description.
23: * @param weight how much of the available vertical space should the line span
24: * @param name the name of the custom component
25: */
26: public CustomEditor(double weight, String name) {
27: super (weight);
28: this .name = name;
29: }
30:
31: protected SComponent component(ComponentProvider componentProvider) {
32: return componentProvider.getCustomComponent(name);
33: }
34: }
|