01: /*
02: * Copyright 2005 Paul Hinds
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: package org.tp23.antinstaller.renderer.text;
17:
18: import java.io.IOException;
19: import java.io.PrintStream;
20:
21: import org.tp23.antinstaller.InstallException;
22: import org.tp23.antinstaller.page.Page;
23: import org.tp23.antinstaller.renderer.AntOutputRenderer;
24:
25: public class ProgressPageRenderer extends AbstractTextPageRenderer
26: implements AntOutputRenderer {
27:
28: public ProgressPageRenderer() {
29: }
30:
31: /**
32: * getErr
33: *
34: * @return PrintStream
35: */
36: public PrintStream getErr() {
37: return System.err;
38: }
39:
40: /**
41: * getOut
42: *
43: * @return PrintStream
44: */
45: public PrintStream getOut() {
46: return System.out;
47: }
48:
49: /**
50: * renderPage
51: *
52: * @param page Page
53: * @return boolean
54: */
55: public boolean renderPage(Page page) throws InstallException {
56: try {
57: printHeader(page);
58: } catch (IOException ex) {
59: throw new InstallException("Can not print header");// not very likely!!
60: }
61: return true;
62: }
63: }
|