リスト3 WindowComponent.java

 1 package com.netpotlet.xul.component;
 2
 3 import java.util.ArrayList;
 4 import java.util.List;
 5
 6 import javax.faces.component.UIComponent;
 7 import javax.faces.component.UIViewRoot;
 8
 9 import com.netpotlet.xul.element.RNSContext;
10 import com.netpotlet.xul.element.XulStartWindow;
11
12 public class WindowComponent extends UIViewRoot implements CoveComponent {
13     private List children = new ArrayList();
14     private String title;
15     private RNSContext rNSContext_;
16
17     public WindowComponent(XulStartWindow window) {
18         super();
19         setViewId("root");
20         setId(window.getId());
21         title = window.getTitleAsString();
22         rNSContext_ =
23             new RNSContext(
24                 window,
25                 "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
26     }
27
28     public List getChildren() {
29         return children;
30     }
31
32     public void addChild(UIComponent component) {
33         children.add(component);
34     }
35
36     public String getTitle() {
37         return title;
38     }
39
40     public RNSContext getRNSContext() {
41         return rNSContext_;
42     }
43
44     public String getFamily() {
45         return "Window";
46     }
47 }