KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > joshy > html > box > AnonymousBlockBox


1 package org.joshy.html.box;
2
3 import org.w3c.dom.*;
4 import org.joshy.html.*;
5 import java.util.ArrayList JavaDoc;
6 import java.util.List JavaDoc;
7 import org.joshy.u;
8 import org.joshy.html.util.InlineUtil;
9
10 public class AnonymousBlockBox extends BlockBox {
11     public List JavaDoc node_list;
12     public Node last_node;
13
14     public AnonymousBlockBox(Node startNode, Context c) {
15         this.node = startNode.getParentNode();
16         node_list = InlineUtil.getInlineNodeList(startNode,(Element)this.node,c,true);
17         node_list.add(0,startNode);
18         last_node = (Node)node_list.get(node_list.size()-1);
19         /*
20         while(true) {
21             Node sibling = startNode.getNextSibling();
22             if(sibling == null) { break; }
23             if(Layout.isBlockNode(sibling,c)) { break; }
24             u.p("adding sibiling: " + sibling);
25             node_list.add(sibling);
26             startNode = sibling;
27         }
28         */

29
30     }
31
32     public boolean isAnonymous() {
33         return true;
34     }
35
36
37     public String JavaDoc toString() {
38         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
39         sb.append("AnonymousBlockBox:");
40         sb.append(super.toString());
41         return sb.toString();
42     }
43
44 }
45
Popular Tags