cbowditch    2004/05/26 06:13:01

  Modified:    src/java/org/apache/fop/area Area.java
  Log:
  added protected log member, so child areas can send messages to log
  
  Revision  Changes    Path
  1.3       +17 -8     xml-fop/src/java/org/apache/fop/area/Area.java
  
  Index: Area.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Area.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Area.java 27 Feb 2004 17:41:26 -0000      1.2
  +++ Area.java 26 May 2004 13:13:01 -0000      1.3
  @@ -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.
  @@ -15,7 +15,7 @@
    */
   
   /* $Id$ */
  - 
  +
   package org.apache.fop.area;
   
   import java.io.Serializable;
  @@ -23,6 +23,9 @@
   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 @@
       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 Object getTrait(Object oTraitCode) {
           return (props != null ? props.get(oTraitCode) : null);
       }
  -    
  +
       /**
        * Get a trait from this area as an integer.
        *
  @@ -224,8 +233,8 @@
           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");
           }
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to