aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/util
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-07-16 09:10:02 +0000
committerJeremias Maerki <jeremias@apache.org>2008-07-16 09:10:02 +0000
commitb11934f81509eafde584354e41981a656c3d4d39 (patch)
tree878c56ee5db1fa989ebb9fff4fbd56fb377c9964 /src/java/org/apache/fop/util
parent8e94b3ad33854852846b6333e09e7cd38a2cc5e0 (diff)
downloadxmlgraphics-fop-b11934f81509eafde584354e41981a656c3d4d39.tar.gz
xmlgraphics-fop-b11934f81509eafde584354e41981a656c3d4d39.zip
Renamed "iform" package to "intermediate" (iform was too cryptic for my taste)
Changed IFRenderer to work against the IFPainter interface. Started IFPainter implementations for the IF format (IFSerializer), SVG 1.1 and SVG Print. They currently support very simple FOs only (like examples/fo/basic/simple.fo). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@677204 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/util')
-rw-r--r--src/java/org/apache/fop/util/DelegatingContentHandler.java130
1 files changed, 41 insertions, 89 deletions
diff --git a/src/java/org/apache/fop/util/DelegatingContentHandler.java b/src/java/org/apache/fop/util/DelegatingContentHandler.java
index 0b371483f..ff712a82b 100644
--- a/src/java/org/apache/fop/util/DelegatingContentHandler.java
+++ b/src/java/org/apache/fop/util/DelegatingContentHandler.java
@@ -38,9 +38,8 @@ import org.xml.sax.ext.LexicalHandler;
* <p>
* The ContentHandler is the only instance that is required. All others (DTDHandler,
* EntityResolver, LexicalHandler and ErrorHandler) may be ignored.
- *
*/
-public class DelegatingContentHandler
+public class DelegatingContentHandler
implements EntityResolver, DTDHandler, ContentHandler, LexicalHandler, ErrorHandler {
private ContentHandler delegate;
@@ -48,7 +47,7 @@ public class DelegatingContentHandler
private DTDHandler dtdHandler;
private LexicalHandler lexicalHandler;
private ErrorHandler errorHandler;
-
+
/**
* Main constructor.
*/
@@ -62,7 +61,7 @@ public class DelegatingContentHandler
public ContentHandler getDelegateContentHandler() {
return this.delegate;
}
-
+
/**
* Sets the delegate ContentHandler that all events are forwarded to.
* @param handler the delegate instance
@@ -70,7 +69,7 @@ public class DelegatingContentHandler
public void setDelegateContentHandler(ContentHandler handler) {
this.delegate = handler;
}
-
+
/**
* Sets the delegate EntityResolver.
* @param resolver the delegate instance
@@ -78,7 +77,7 @@ public class DelegatingContentHandler
public void setDelegateEntityResolver(EntityResolver resolver) {
this.entityResolver = resolver;
}
-
+
/**
* Sets the delegate DTDHandler.
* @param handler the delegate instance
@@ -86,7 +85,7 @@ public class DelegatingContentHandler
public void setDelegateDTDHandler(DTDHandler handler) {
this.dtdHandler = handler;
}
-
+
/**
* Sets the delegate LexicalHandler.
* @param handler the delegate instance
@@ -94,7 +93,7 @@ public class DelegatingContentHandler
public void setDelegateLexicalHandler(LexicalHandler handler) {
this.lexicalHandler = handler;
}
-
+
/**
* Sets the delegate ErrorHandler.
* @param handler the delegate instance
@@ -102,13 +101,12 @@ public class DelegatingContentHandler
public void setDelegateErrorHandler(ErrorHandler handler) {
this.errorHandler = handler;
}
-
+
// ==== EntityResolver
-
- /**
- * {@inheritDoc}
- */
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
+
+ /** {@inheritDoc} */
+ public InputSource resolveEntity(String publicId, String systemId)
+ throws SAXException, IOException {
if (entityResolver != null) {
return entityResolver.resolveEntity(publicId, systemId);
} else {
@@ -118,19 +116,15 @@ public class DelegatingContentHandler
// ==== DTDHandler
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void notationDecl(String name, String publicId, String systemId) throws SAXException {
if (dtdHandler != null) {
dtdHandler.notationDecl(name, publicId, systemId);
}
}
- /**
- * {@inheritDoc}
- */
- public void unparsedEntityDecl(String name, String publicId, String systemId,
+ /** {@inheritDoc} */
+ public void unparsedEntityDecl(String name, String publicId, String systemId,
String notationName) throws SAXException {
if (dtdHandler != null) {
dtdHandler.unparsedEntityDecl(name, publicId, systemId, notationName);
@@ -138,174 +132,132 @@ public class DelegatingContentHandler
}
// ==== ContentHandler
-
- /**
- * {@inheritDoc}
- */
+
+ /** {@inheritDoc} */
public void setDocumentLocator(Locator locator) {
delegate.setDocumentLocator(locator);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void startDocument() throws SAXException {
delegate.startDocument();
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void endDocument() throws SAXException {
delegate.endDocument();
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void startPrefixMapping(String prefix, String uri) throws SAXException {
delegate.startPrefixMapping(prefix, uri);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void endPrefixMapping(String prefix) throws SAXException {
delegate.endPrefixMapping(prefix);
}
- /**
- * {@inheritDoc}
- */
- public void startElement(String uri, String localName, String qName,
+ /** {@inheritDoc} */
+ public void startElement(String uri, String localName, String qName,
Attributes atts) throws SAXException {
delegate.startElement(uri, localName, qName, atts);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void endElement(String uri, String localName, String qName) throws SAXException {
delegate.endElement(uri, localName, qName);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void characters(char[] ch, int start, int length) throws SAXException {
delegate.characters(ch, start, length);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
delegate.ignorableWhitespace(ch, start, length);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void processingInstruction(String target, String data) throws SAXException {
delegate.processingInstruction(target, data);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void skippedEntity(String name) throws SAXException {
delegate.skippedEntity(name);
}
// ==== LexicalHandler
-
- /**
- * {@inheritDoc}
- */
+
+ /** {@inheritDoc} */
public void startDTD(String name, String publicId, String systemId) throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.startDTD(name, publicId, systemId);
}
-
+
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void endDTD() throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.endDTD();
}
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void startEntity(String name) throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.startEntity(name);
}
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void endEntity(String name) throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.endEntity(name);
}
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void startCDATA() throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.startCDATA();
}
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void endCDATA() throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.endCDATA();
}
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void comment(char[] ch, int start, int length) throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.comment(ch, start, length);
}
}
-
+
// ==== ErrorHandler
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void warning(SAXParseException exception) throws SAXException {
if (errorHandler != null) {
errorHandler.warning(exception);
}
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void error(SAXParseException exception) throws SAXException {
if (errorHandler != null) {
errorHandler.error(exception);
}
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void fatalError(SAXParseException exception) throws SAXException {
if (errorHandler != null) {
errorHandler.fatalError(exception);