diff options
author | Chris Bowditch <cbowditch@apache.org> | 2004-05-26 13:13:01 +0000 |
---|---|---|
committer | Chris Bowditch <cbowditch@apache.org> | 2004-05-26 13:13:01 +0000 |
commit | 4a4411bed3a85a4aba3f2eca8c7e488f83105191 (patch) | |
tree | d8849a67a11729f05b6c2a8ae5257fcd5f025b14 /src/java/org/apache | |
parent | 429e1ffc007884bf7662539e4d8f202c998fd8b2 (diff) | |
download | xmlgraphics-fop-4a4411bed3a85a4aba3f2eca8c7e488f83105191.tar.gz xmlgraphics-fop-4a4411bed3a85a4aba3f2eca8c7e488f83105191.zip |
added protected log member, so child areas can send messages to log
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197634 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/fop/area/Area.java | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/area/Area.java b/src/java/org/apache/fop/area/Area.java index 81092fe1b..7a0f8d25a 100644 --- a/src/java/org/apache/fop/area/Area.java +++ b/src/java/org/apache/fop/area/Area.java @@ -1,12 +1,12 @@ /* * Copyright 1999-2004 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -14,8 +14,8 @@ * limitations under the License. */ -/* $Id$ */ - +/* $Id: Area.java,v 1.2 2004/02/27 17:41:26 jeremias Exp $ */ + package org.apache.fop.area; import java.io.Serializable; @@ -23,6 +23,9 @@ import java.io.Serializable; import java.util.Map; import java.util.HashMap; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + // If the area appears more than once in the output // or if the area has external data it is cached // to keep track of it and to minimize rendered output @@ -124,6 +127,12 @@ public class Area implements Serializable { protected HashMap props = null; /** + * logging instance + */ + protected static Log log = LogFactory.getLog(Area.class); + + + /** * Get the area class of this area. * * @return the area class @@ -212,7 +221,7 @@ public class Area implements Serializable { public Object getTrait(Object oTraitCode) { return (props != null ? props.get(oTraitCode) : null); } - + /** * Get a trait from this area as an integer. * @@ -224,8 +233,8 @@ public class Area implements Serializable { if (obj instanceof Integer) { return ((Integer)obj).intValue(); } else { - throw new IllegalArgumentException("Trait " - + oTraitCode.getClass().getName() + throw new IllegalArgumentException("Trait " + + oTraitCode.getClass().getName() + " could not be converted to an integer"); } } |