1 51 package org.apache.fop.layout.inline; 52 53 import org.apache.fop.layout.inline.WordArea; 54 import org.apache.fop.layout.FontState; 55 import org.apache.fop.datatypes.IDReferences; 56 57 public class PageNumberInlineArea extends WordArea { 58 private String pageNumberId = null; 59 60 public PageNumberInlineArea(FontState fontState, float red, float green, 61 float blue, String refid, int width) { 62 super(fontState, red, green, blue, "?", width); 63 this.pageNumberId = refid; 64 } 65 66 public void resolve(IDReferences idReferences) { 67 text = idReferences.getPageNumber(pageNumberId); 68 if (text == null) { 69 text = ""; 70 } 71 } 72 } 73 | Popular Tags |