1 package org.joshy.html.box; 2 3 import org.w3c.dom.Node ; 4 import java.awt.Font ; 5 6 public class InlineBox extends Box{ 7 public BlockBox sub_block = null; 10 public boolean replaced = false; 11 12 public boolean break_after = false; 14 public boolean break_before = false; 15 16 public boolean underline = false; 18 public boolean strikethrough = false; 19 public boolean overline = false; 20 21 public int baseline; 23 public int lineheight; 24 public boolean vset = false; 25 public boolean top_align = false; 26 public boolean bottom_align = false; 27 public boolean is_break = false; 28 29 public int start_index = -1; 31 public int end_index = -1; 32 public String text; 33 34 public String getSubstring() { 35 String txt = text.substring(start_index,end_index); 36 return txt; 37 } 38 39 private Font font; 40 public void setFont(Font font) { 41 this.font = font; 42 } 43 public Font getFont() { 44 return font; 45 } 46 47 public String getText() { 48 return this.text; 49 } 50 public void setText(String text) { 51 this.text = text; 52 } 53 54 public String toString() { 55 return "InlineBox text = \"" + getText() + 56 "\" bnds = " + x + "," + y + " - " + width + "x"+height + 57 " start = " + this.start_index + " end = " + this.end_index + 58 " baseline = " + this.baseline + " vset = " + this.vset; 59 } 60 } 61 62 | Popular Tags |