KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > joshy > html > forms > FormLayout


1 package org.joshy.html.forms;
2
3 import java.util.*;
4 import java.awt.Dimension JavaDoc;
5 import java.awt.Point JavaDoc;
6 import javax.swing.JComponent JavaDoc;
7 import org.joshy.u;
8 import org.joshy.html.box.Box;
9 import org.joshy.html.*;
10 import org.w3c.dom.*;
11
12 public class FormLayout extends Layout {
13     
14     public FormLayout() {
15     }
16     
17     public Box createBox(Context c, Node node) {
18         FormBox form = new FormBox();
19         form.node = node;
20         return form;
21     }
22     
23     public Box layout(Context c, Element elem) {
24         FormBox form = (FormBox)createBox(c,elem);
25         layoutChildren(c, form);
26         return form;
27     }
28     
29     public Box layoutChildren(Context c, Box box) {
30         u.p("calling layout on the children with the box: " + box);
31         return super.layoutChildren(c,box);
32     }
33
34     public void paint(Context c, Box box) {
35         paintChildren(c,box);
36     }
37     public void paintChildren(Context c, Box box) {
38         u.p("calling paint on the children : " + box);
39         super.paintChildren(c, box);
40     }
41     
42 }
43
Popular Tags