01: package fr.aliacom.form.swt.maker;
02:
03: import org.eclipse.swt.widgets.Composite;
04: import org.w3c.dom.Element;
05:
06: import fr.aliacom.form.common.FormLoader;
07: import fr.aliacom.form.common.IFormComponent;
08: import fr.aliacom.form.common.OutlookBarLoader;
09: import fr.aliacom.form.swt.BuilderFactory;
10: import fr.aliacom.form.swt.SWTBuilder;
11: import fr.aliacom.form.swt.ui.SWTOutlookBar;
12:
13: /**
14: * @author tom
15: *
16: * (C) 2001, 2002 Thomas Cataldo
17: */
18: public class OutlookBarBuilder extends SWTBuilder {
19:
20: /**
21: * @see fr.aliacom.form.swt.SWTBuilder#build(org.w3c.dom.Element, fr.aliacom.form.common.IFormComponent, fr.aliacom.form.common.FormLoader, fr.aliacom.form.swt.BuilderFactory)
22: */
23: public IFormComponent build(Element elem, IFormComponent parent,
24: FormLoader loader, BuilderFactory factory) {
25: SWTOutlookBar bar = new SWTOutlookBar((Composite) parent
26: .getNativeWidget());
27: if (elem.hasAttribute("rootNode")) {
28: loader.addLoader(elem.getAttribute("rootNode"),
29: new OutlookBarLoader(bar));
30: } else {
31: buildChildren(elem, bar, loader, factory);
32: }
33:
34: return bar;
35: }
36:
37: }
|