KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > elementprocessor > impl > poi > hssf > elements > EPFooter


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements;
18
19 import java.io.IOException JavaDoc;
20
21 /**
22  * No-op implementation of ElementProcessor to handle the "Footer" tag
23  *
24  * This element has three attributes: Left, Middle, and Top, and no
25  * contents.
26  *
27  * @author Marc Johnson (marc_johnson27591@hotmail.com)
28  * @version CVS $Id: EPFooter.java 37191 2004-08-30 10:15:06Z antonio $
29  */

30 public class EPFooter extends BaseElementProcessor {
31     private String JavaDoc _left;
32     private String JavaDoc _middle;
33     private String JavaDoc _right;
34     private static final String JavaDoc _left_attribute = "Left";
35     private static final String JavaDoc _middle_attribute = "Middle";
36     private static final String JavaDoc _right_attribute = "Right";
37
38     /**
39      * constructor
40      */

41     public EPFooter() {
42         super(null);
43         _left = null;
44         _middle = null;
45         _right = null;
46     }
47
48     /**
49      * @return the left string
50      */

51     public String JavaDoc getLeft() {
52         if (_left == null) {
53             _left = getValue(_left_attribute);
54             if (_left == null) {
55                 _left = "";
56             }
57         }
58         return _left;
59     }
60
61     /**
62      * @return the middle string
63      */

64     public String JavaDoc getMiddle() {
65         if (_middle == null) {
66             _middle = getValue(_middle_attribute);
67             if (_middle == null) {
68                 _middle = "";
69             }
70         }
71         return _middle;
72     }
73
74     /**
75      * @return the right string
76      */

77     public String JavaDoc getRight() {
78         if (_right == null) {
79             _right = getValue(_right_attribute);
80             if (_right == null) {
81                 _right = "";
82             }
83         }
84         return _right;
85     }
86     
87     /**
88      * Setup the text to be printed at the bottom of every page
89      * @exception IOException
90      */

91     public void endProcessing() throws IOException JavaDoc{
92         this.getSheet().setFooter(getLeft(), getMiddle(), getRight());
93     }
94 } // end public class EPFooter
95
Popular Tags