}
/**
- * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+ * @see org.apache.fop.fo.FONode#processNode
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ public void processNode(String elementName, Locator locator,
+ Attributes attlist) throws FOPException {
+ super.processNode(elementName, locator, attlist);
createBasicDocument();
}
}
/**
- * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+ * @see org.apache.fop.fo.FONode#processNode
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ public void processNode(String elementName, Locator locator,
+ Attributes attlist) throws FOPException {
+ super.processNode(elementName, locator, attlist);
createBasicDocument();
}
throw new IllegalStateException("Driver already initialized");
}
treeBuilder = new FOTreeBuilder();
- treeBuilder.setUserAgent(getUserAgent());
}
/**
foInputHandler.setLogger(getLogger());
- treeBuilder.setUserAgent(getUserAgent());
treeBuilder.setFOInputHandler(foInputHandler);
treeBuilder.setFOTreeControl(currentDocument);
*
*/
public abstract class FONode {
+
/** Parent FO node */
protected FONode parent;
+
/** Name of the node */
protected String name;
}
/**
- * Sets the name of the node.
- * @param str the name
+ * Returns the user agent for the node.
+ * @return FOUserAgent
*/
- public void setName(String str) {
- name = str;
+ public FOUserAgent getUserAgent() {
+ return getFOTreeControl().getDriver().getUserAgent();
}
- /**
- * Sets the name of the node.
- * @param str the name
- */
- public void setLocation(Locator locator) {
- // do nothing by default
- }
-
/**
* Returns the logger for the node.
* @return the logger
}
/**
- * Returns the user agent for the node.
- * @return FOUserAgent
- */
- public FOUserAgent getUserAgent() {
- return getFOTreeControl().getDriver().getUserAgent();
- }
-
- /**
- * Do something with the attributes for this element
+ * Initialize the node with its name, location information, and attributes
+ * The attributes must be used immediately as the sax attributes
+ * will be altered for the next element.
+ * @param elementName element name (e.g., "fo:block")
+ * @param locator Locator object (ignored by default)
* @param attlist Collection of attributes passed to us from the parser.
* @throws FOPException for errors or inconsistencies in the attributes
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
+ */
+ public void processNode(String elementName, Locator locator, Attributes attlist) throws FOPException {
+ this.name = elementName;
}
/**
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.fop.apps.FOPException;
-import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.fo.ElementMapping.Maker;
import org.apache.fop.fo.pagination.Root;
import org.xml.sax.Attributes;
protected Set namespaces = new java.util.HashSet();
/**
- * Current formatting object being handled
+ * The root of the formatting object tree
*/
- protected FONode currentFObj = null;
+ protected Root rootFObj = null;
/**
- * The root of the formatting object tree
+ * Current formatting object being handled
*/
- protected Root rootFObj = null;
+ protected FONode currentFObj = null;
/**
* The class that handles formatting and rendering to a stream
*/
private FOInputHandler foInputHandler;
- private FOUserAgent userAgent;
-
/** The FOTreeControl object managing the FO Tree that is being built */
private FOTreeControl foTreeControl;
- /** The SAX locator object maneging the line and column counters */
+ /** The SAX locator object managing the line and column counters */
private Locator locator;
/**
setupDefaultMappings();
}
- private Log getLogger() {
- return log;
- }
-
- /**
- * Sets the user agent
- * @param ua the user agent
- */
- public void setUserAgent(FOUserAgent ua) {
- userAgent = ua;
- }
-
- private FOUserAgent getUserAgent() {
- return userAgent;
- }
-
/**
* Sets the FO Tree Control for this object
* @param fotc FOTreeControl instance
try {
addElementMapping(str);
} catch (IllegalArgumentException e) {
- getLogger().warn("Error while adding element mapping", e);
+ log.warn("Error while adding element mapping", e);
}
}
}
}
- /**
- * SAX Handler for the end of an element
- * @see org.xml.sax.ContentHandler#endElement(String, String, String)
- */
- public void endElement(String uri, String localName, String rawName)
- throws SAXException {
- currentFObj.end();
- currentFObj = currentFObj.getParent();
- }
-
/**
* SAX Handler for the start of the document
* @see org.xml.sax.ContentHandler#startDocument()
*/
public void startDocument() throws SAXException {
rootFObj = null; // allows FOTreeBuilder to be reused
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("Building formatting object tree");
+ if (log.isDebugEnabled()) {
+ log.debug("Building formatting object tree");
}
foInputHandler.startDocument();
}
public void endDocument() throws SAXException {
rootFObj = null;
currentFObj = null;
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("Parsing of document complete");
+ if (log.isDebugEnabled()) {
+ log.debug("Parsing of document complete");
}
foInputHandler.endDocument();
}
*/
public void startElement(String namespaceURI, String localName, String rawName,
Attributes attlist) throws SAXException {
- /* the formatting object started */
- FONode fobj;
+
+ /* the node found in the FO document */
+ FONode foNode;
/* the maker for the formatting object started */
ElementMapping.Maker fobjMaker = findFOMaker(namespaceURI, localName);
// System.out.println("found a " + fobjMaker.toString());
try {
- fobj = fobjMaker.make(currentFObj);
- fobj.setName(localName);
- fobj.setLocation(locator);
- fobj.handleAttrs(attlist);
+ foNode = fobjMaker.make(currentFObj);
+ foNode.processNode(localName, locator, attlist);
} catch (FOPException e) {
throw new SAXException(e);
}
if (rootFObj == null) {
- if (!fobj.getName().equals("fo:root")) {
+ if (!foNode.getName().equals("fo:root")) {
throw new SAXException(new FOPException("Root element must"
+ " be fo:root, not "
- + fobj.getName()));
+ + foNode.getName()));
}
- rootFObj = (Root)fobj;
+ rootFObj = (Root) foNode;
rootFObj.setFOTreeControl(foTreeControl);
} else {
- currentFObj.addChild(fobj);
+ currentFObj.addChild(foNode);
}
- currentFObj = fobj;
+ currentFObj = foNode;
+ }
+
+ /**
+ * SAX Handler for the end of an element
+ * @see org.xml.sax.ContentHandler#endElement(String, String, String)
+ */
+ public void endElement(String uri, String localName, String rawName)
+ throws SAXException {
+ currentFObj.end();
+ currentFObj = currentFObj.getParent();
}
/**
}
if (fobjMaker == null) {
- if (getLogger().isWarnEnabled()) {
- getLogger().warn("Unknown formatting object " + namespaceURI + "^" + localName);
+ if (log.isWarnEnabled()) {
+ log.warn("Unknown formatting object " + namespaceURI + "^" + localName);
}
if (namespaces.contains(namespaceURI.intern())) {
// fall back
}
String serviceFile = "META-INF/services/" + cls.getName();
- // getLogger().debug("File: " + serviceFile);
+ // log.debug("File: " + serviceFile);
List lst = (List)providerMap.get(serviceFile);
if (lst != null) {
while (e.hasMoreElements()) {
try {
java.net.URL u = (java.net.URL)e.nextElement();
- //getLogger().debug("URL: " + u);
+ //log.debug("URL: " + u);
InputStream is = u.openStream();
Reader r = new InputStreamReader(is, "UTF-8");
line = br.readLine();
continue;
}
- // getLogger().debug("Line: " + line);
+ // log.debug("Line: " + line);
// Try and load the class
// Object obj = cl.loadClass(line).newInstance();
*/
protected Map layoutDimension = null;
+ /** Marks input file containing this object **/
+ public String systemId;
+
+ /** Marks line number of this object in the input file **/
+ public int line;
+
+ /** Marks column number of this object in the input file **/
+ public int column;
+
/**
* Create a new formatting object.
* All formatting object classes extend this class.
}
}
- /** Marks input file containing this object **/
- public String systemId;
- /** Marks line number of this object in the input file **/
- public int line;
- /** Marks column number of this object in the input file **/
- public int column;
-
/**
- * Set the name of this element.
- * The prepends "fo:" to the name to indicate it is in the fo namespace.
- *
- * @param str the xml element name
+ * @see org.apache.fop.fo.FONode#processNode
*/
- public void setName(String str) {
- name = "fo:" + str;
- }
+ public void processNode(String elementName, Locator locator,
+ Attributes attlist) throws FOPException {
+ name = "fo:" + elementName;
- public void setLocation(Locator locator) {
if (locator != null) {
line = locator.getLineNumber();
column = locator.getColumnNumber();
systemId = locator.getSystemId();
}
+
+ addProperties(attlist);
}
-
+
/**
- * Handle the attributes for this element.
- * The attributes must be used immediately as the sax attributes
- * will be altered for the next element.
+ * Set properties for this FO based on node attributes
* @param attlist Collection of attributes passed to us from the parser.
- * @throws FOPException for invalid FO data
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
+ protected void addProperties(Attributes attlist) throws FOPException {
FObj parentFO = findNearestAncestorFObj();
PropertyList parentPropertyList = null;
if (parentFO != null) {
}
/**
+ * Set the name of this element.
+ * The prepends "fo:" to the name to indicate it is in the fo namespace.
+ *
+ * @param str the xml element name
+ */
+ public void setName(String str) {
+ name = "fo:" + str;
+ }
+
+ public void setLocation(Locator locator) {
+ if (locator != null) {
+ line = locator.getLineNumber();
+ column = locator.getColumnNumber();
+ systemId = locator.getSystemId();
+ }
+ }
+
+ /**
* Find the nearest parent, grandparent, etc. FONode that is also an FObj
* @return FObj the nearest ancestor FONode that is an FObj
*/
// XML
import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
// FOP
import org.apache.fop.apps.FOPException;
}
/**
- * Process the attributes for this element.
- * @param attlist the attribute list for this element returned by the SAX
- * parser
- * @throws FOPException for invalid attributes
+ * @see org.apache.fop.fo.FONode#processNode
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ public void processNode(String elementName, Locator locator,
+ Attributes attlist) throws FOPException {
+ super.processNode(elementName, locator, attlist);
init();
}
// temp reference for attributes
private Attributes attr = null;
+
/** DOM element representing this node */
protected Element element;
+
/** DOM document containing this node */
protected Document doc;
}
/**
- * @param str name of the element
- */
- public void setName(String str) {
- name = str;
- }
-
- /**
- * Store the attributes for this element
- * @param attlist Collection of attributes passed to us from the parser.
- * @throws FOPException for errors in the attributes
+ * @see org.apache.fop.fo.FONode#processNode
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
+ public void processNode(String elementName, Locator locator, Attributes attlist) throws FOPException {
+ name = elementName;
attr = attlist;
}
}
/**
- * The attribues on the outline object are the internal and external
+ * The attributes on the outline object are the internal and external
* destination. One of these is required.
*
- * @param attlist the attribute list
- * @throws FOPException a fop exception if there is an error
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
+ protected void addProperties(Attributes attlist) throws FOPException {
internalDestination =
attlist.getValue("internal-destination");
externalDestination =
import org.w3c.dom.Element;
import org.w3c.dom.svg.SVGDocument;
import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
import org.apache.batik.bridge.UnitProcessor;
import org.apache.batik.util.SVGConstants;
}
/**
- * Handle the xml attributes from SAX.
- * @param attlist the attribute list
- * @throws FOPException not thrown from here
+ * @see org.apache.fop.fo.FONode#processNode
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ public void processNode(String elementName, Locator locator,
+ Attributes attlist) throws FOPException {
+ super.processNode(elementName, locator, attlist);
init();
}
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addProperties
+ */
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
+ getFOTreeControl().getFOInputHandler().startLink(this);
+ }
+
public void setup() {
String destination;
int linkType;
fotv.serveBasicLink(this);
}
- /**
- * @see org.apache.fop.fo.FObj#handleAttrs
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
- getFOTreeControl().getFOInputHandler().startLink(this);
- }
-
/**
* @see org.apache.fop.fo.FONode#end
*/
}
/**
- * @see org.apache.fop.fo.FObj#handleAttrs
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
this.span = this.propertyList.get(PR_SPAN).getEnum();
this.wsTreatment =
this.propertyList.get(PR_WHITE_SPACE_TREATMENT).getEnum();
}
/**
- * @see org.apache.fop.fo.FObj#handleAttrs
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
this.span = this.propertyList.get(PR_SPAN).getEnum();
setupID();
}
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addProperties
+ */
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
+ getFOTreeControl().getFOInputHandler().image(this);
+ }
+
/**
* Setup this image.
* This gets the sizes for the image and the dimensions and clipping.
return placement;
}
- /**
- * @see org.apache.fop.fo.FObj#handleAttrs
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
- getFOTreeControl().getFOInputHandler().image(this);
- }
}
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addProperties
+ */
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
+ getFOTreeControl().getFOInputHandler().startFootnote(this);
+ }
+
/**
* @param child child FONode to be added to this object
*/
fotv.serveFootnote(this);
}
- /**
- * @see org.apache.fop.fo.FObj#handleAttrs
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
- getFOTreeControl().getFOInputHandler().startFootnote(this);
- }
-
protected void end() {
super.end();
-
getFOTreeControl().getFOInputHandler().endFootnote(this);
}
}
super(parent);
}
- public void acceptVisitor(FOTreeVisitor fotv) {
- fotv.serveFootnoteBody(this);
- }
-
/**
- * @see org.apache.fop.fo.FObj#handleAttrs
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
getFOTreeControl().getFOInputHandler().startFootnoteBody(this);
}
+ public void acceptVisitor(FOTreeVisitor fotv) {
+ fotv.serveFootnoteBody(this);
+ }
+
protected void end() {
super.end();
}
/**
- * @see org.apache.fop.fo.FObj#handleAttrs
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
if (parent.getName().equals("fo:flow")) {
throw new FOPException("inline formatting objects cannot"
}
/**
- * @see org.apache.fop.fo.FObj#handleAttrs
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
// Common Border, Padding, and Background Properties
CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
CommonBackground bProps = propMgr.getBackgroundProps();
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addProperties
+ */
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
+ getFOTreeControl().getFOInputHandler().startList(this);
+ }
+
private void setup() throws FOPException {
// Common Accessibility Properties
fotv.serveListBlock(this);
}
- /**
- * @see org.apache.fop.fo.FObj#handleAttrs
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
- getFOTreeControl().getFOInputHandler().startList(this);
- }
-
protected void end() {
super.end();
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addProperties
+ */
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
+ getFOTreeControl().getFOInputHandler().startListItem(this);
+ }
+
private void setup() {
// Common Accessibility Properties
fotv.serveListItem(this);
}
- /**
- * @see org.apache.fop.fo.FObj#handleAttrs
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
- getFOTreeControl().getFOInputHandler().startListItem(this);
- }
-
protected void end() {
super.end();
-
getFOTreeControl().getFOInputHandler().endListItem(this);
}
}
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addProperties
+ */
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
+ getFOTreeControl().getFOInputHandler().startListLabel();
+ }
+
private void setup() {
// Common Accessibility Properties
fotv.serveListItemLabel(this);
}
- /**
- * @see org.apache.fop.fo.FObj#handleAttrs
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
- getFOTreeControl().getFOInputHandler().startListLabel();
- }
-
protected void end() {
super.end();
}
/**
- * Handle the attributes for this marker.
- * This gets the marker-class-name and attempts to add itself
- * to the parent formatting object.
- *
- * @param attlist the attribute list
- * @throws FOPException if there is an exception
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
this.markerClassName =
this.propertyList.get(PR_MARKER_CLASS_NAME).getString();
}
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addProperties
+ */
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
+ setup();
+ getFOTreeControl().getFOInputHandler().startPageNumber(this);
+ }
+
public void setup() {
// Common Accessibility Properties
fotv.servePageNumber(this);
}
- /**
- * @see org.apache.fop.fo.FObj#handleAttrs
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
- setup();
-
- getFOTreeControl().getFOInputHandler().startPageNumber(this);
- }
-
protected void end() {
getFOTreeControl().getFOInputHandler().endPageNumber(this);
}
}
/**
- * Handle the attributes for the retrieve-marker.
- *
- * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
this.retrieveClassName =
this.propertyList.get(PR_RETRIEVE_CLASS_NAME).getString();
this.retrievePosition =
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addProperties
+ */
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
+ setupID();
+ getFOTreeControl().getFOInputHandler().startTable(this);
+ }
+
/**
* Overrides FObj.
* @param child FONode child object to be added
fotv.serveTable(this);
}
- /**
- * @see org.apache.fop.fo.FObj#handleAttrs
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
- setupID();
-
- getFOTreeControl().getFOInputHandler().startTable(this);
- }
-
protected void end() {
getFOTreeControl().getFOInputHandler().endTable(this);
}
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addProperties
+ */
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
+ setupID();
+ getFOTreeControl().getFOInputHandler().startBody(this);
+ }
+
private void setup() throws FOPException {
// Common Accessibility Properties
CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
fotv.serveTableBody(this);
}
- /**
- * @see org.apache.fop.fo.FObj#handleAttrs
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
- setupID();
-
- getFOTreeControl().getFOInputHandler().startBody(this);
- }
-
protected void end() {
getFOTreeControl().getFOInputHandler().endBody(this);
}
}
/**
- * Overriden from FObj.
- * @param attlist Collection of attributes passed to us from the parser.
- * @throws FOPException for FO errors
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
doSetup(); // init some basic property values
-
getFOTreeControl().getFOInputHandler().startCell(this);
}
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addProperties
+ */
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
+ initialize(); // init some basic property values
+ getFOTreeControl().getFOInputHandler().startColumn(this);
+ }
+
/**
* @return Length object containing column width
*/
fotv.serveTableColumn(this);
}
- /**
- * Overriden from FObj.
- * @param attlist Collection of attributes passed to us from the parser.
- * @throws FOPException for FO errors
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
- initialize(); // init some basic property values
-
- getFOTreeControl().getFOInputHandler().startColumn(this);
- }
-
protected void end() {
getFOTreeControl().getFOInputHandler().endColumn(this);
}
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addProperties
+ */
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
+ setupID();
+ getFOTreeControl().getFOInputHandler().startRow(this);
+ }
+
/**
* @return keepWithPrevious
*/
fotv.serveTableRow(this);
}
- /**
- * @see org.apache.fop.fo.FObj#handleAttrs
- */
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
- setupID();
-
- getFOTreeControl().getFOInputHandler().startRow(this);
- }
-
protected void end() {
getFOTreeControl().getFOInputHandler().endRow(this);
}
}
/**
- * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
if (getProperty(PR_MASTER_REFERENCE) != null) {
setMasterName(getProperty(PR_MASTER_REFERENCE).getString());
}
}
/**
- * @see org.apache.fop.fo.FObj#handleAttrs
- * @param attlist Collection of attributes passed to us from the parser.
- * @throws FOPException if parent is not a page-sequence object
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
if (parent.getName().equals("fo:page-sequence")) {
this.pageSequence = (PageSequence) parent;
} else {
}
/**
- * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
if (parent.getName().equals("fo:root")) {
Root root = (Root)parent;
}
/**
- * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
if (getProperty(PR_MASTER_REFERENCE) != null) {
this.masterName = getProperty(PR_MASTER_REFERENCE).getString();
}
}
/**
- * Handle the attributes for this xml element.
- * For the page sequence this gets all the appropriate properties
- * for dealing with the page sequence.
- *
- * @param attlist the attribute list
- * @throws FOPException if there is an error with the properties
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
if (parent.getName().equals("fo:root")) {
this.root = (Root)parent;
// this.root.addPageSequence(this);
}
/**
- * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
subSequenceSpecifiers = new java.util.ArrayList();
-
if (parent.getName().equals("fo:layout-master-set")) {
this.layoutMasterSet = (LayoutMasterSet)parent;
masterName = this.propertyList.get(Constants.PR_MASTER_NAME).getString();
}
/**
- * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
// regions may have name, or default
if (null == this.propertyList.get(PR_REGION_NAME)) {
}
/**
- * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
conditionalPageMasterRefs = new ArrayList();
if (parent.getName().equals("fo:page-sequence-master")) {
}
/**
- * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
-
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
String mr = getProperty(PR_MAXIMUM_REPEATS).getString();
if (mr.equals("no-limit")) {
this.maximumRepeats = INFINITE;
}
/**
- * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+ * @see org.apache.fop.fo.FObj#addProperties
*/
- public void handleAttrs(Attributes attlist) throws FOPException {
- super.handleAttrs(attlist);
+ protected void addProperties(Attributes attlist) throws FOPException {
+ super.addProperties(attlist);
if (parent.getName().equals("fo:layout-master-set")) {
LayoutMasterSet layoutMasterSet = (LayoutMasterSet)parent;