From 4a4411bed3a85a4aba3f2eca8c7e488f83105191 Mon Sep 17 00:00:00 2001 From: Chris Bowditch Date: Wed, 26 May 2004 13:13:01 +0000 Subject: [PATCH] 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 --- src/java/org/apache/fop/area/Area.java | 25 +++++++++++++++++-------- 1 file 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 @@ -123,6 +126,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. * @@ -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"); } } -- 2.39.5