1 package org.joshy.html; 2 3 import org.joshy.html.box.*; 4 import org.joshy.u; 5 import org.w3c.dom.*; 6 7 public class AnonymousBoxLayout extends InlineLayout { 8 public AnonymousBoxLayout() { 9 } 10 private Element parent; 11 private Node text; 12 13 public Box createBox(Context c, Node node) { 17 AnonymousBlockBox block = new AnonymousBlockBox(text,c); 18 return block; 19 } 20 public void prepareBox(Box box, Context c) { 21 22 box.border = new Border(); 23 box.padding = new Border(); 24 box.margin = new Border(); 25 26 } 27 28 public Box layout(Context c, Element parent, Node text) { 29 this.parent = parent; 30 this.text = text; 31 Box box = super.layout(c,parent); 33 return box; 35 } 36 public Box layoutChildren(Context c, Box box) { 37 return super.layoutChildren(c,box); 39 } 41 42 } 43 | Popular Tags |