1 58 package org.apache.ecs.rtf; 59 60 import org.apache.ecs.ConcreteElement; 61 62 public class Row extends RTFElement 63 { 64 public static final int TWIPS = 10800; 65 private float TWIPS_USED = 0; 66 67 70 { 71 setElementType("\\trowd"); 72 addElementToRegistry(" "); } 74 75 78 public Row() 79 { 80 } 81 82 85 public int getSize(String width) 86 { System.out.println(width); 87 if(width.endsWith("%")) 88 { 89 width = width.substring(width.length()); 90 } 91 92 int _width = Integer.parseInt(width); 93 TWIPS_USED = ( ( _width/TWIPS ) * TWIPS ) + TWIPS_USED; 94 return (int)TWIPS_USED; 95 } 96 97 100 public String createEndTag() 101 { 102 StringBuffer sb = new StringBuffer (); 103 sb.append("\\row"); sb.append("}"); 105 return(sb.toString()); 106 } 107 } 108 | Popular Tags |