1 51 package org.apache.fop.extensions; 52 53 import org.apache.fop.apps.FOPException; 54 import org.apache.fop.fo.*; 55 56 57 62 public class Label extends ExtensionObj { 63 private StringBuffer textBuffer; 64 65 public static class Maker extends FObj.Maker { 66 public FObj make(FObj parent, PropertyList propertyList, 67 String systemId, int line, int column) 68 throws FOPException { 69 return new Label(parent, propertyList, systemId, line, column); 70 } 71 72 } 73 74 public static FObj.Maker maker() { 75 return new Label.Maker(); 76 } 77 78 public Label(FObj parent, PropertyList propertyList, 79 String systemId, int line, int column) { 80 super(parent, propertyList, systemId, line, column); 81 } 82 83 protected void addCharacters(char data[], int start, int length) { 84 if (textBuffer==null) { 85 textBuffer = new StringBuffer (); 86 } 87 textBuffer.append(data,start,length); 88 } 89 90 public String toString() { 91 if (textBuffer != null) { 92 return textBuffer.toString(); 93 } else { 94 return null; 95 } 96 } 97 98 public String getName() { 99 return "fop:label"; 100 } 101 102 } 103 | Popular Tags |