1 17 18 19 20 package org.apache.fop.render.ps.extensions; 21 22 import org.apache.fop.apps.FOPException; 23 import org.apache.fop.fo.Constants; 24 import org.apache.fop.fo.FONode; 25 import org.apache.fop.fo.ValidationException; 26 27 30 public class PSPageSetupCodeElement extends AbstractPSExtensionObject { 31 32 36 public PSPageSetupCodeElement(FONode parent) { 37 super(parent); 38 } 39 40 41 protected void startOfNode() throws FOPException { 42 super.startOfNode(); 43 if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) { 44 throw new ValidationException(getName() + " must be a child of fo:simple-page-master."); 45 } 46 } 47 48 49 public String getLocalName() { 50 return "ps-page-setup-code"; 51 } 52 53 } 54 | Popular Tags |