1
16package org.tp23.antinstaller.renderer.text;
17
18import java.io.IOException;
19
20import org.tp23.antinstaller.InstallException;
21import org.tp23.antinstaller.page.Page;
22import org.tp23.antinstaller.page.SplashPage;
23
24public class SplashPageRenderer extends AbstractTextPageRenderer {
25 public SplashPageRenderer() {
26 }
27 public boolean renderPage(Page page) throws InstallException {
28 if (page instanceof SplashPage) {
29 SplashPage sPage = (SplashPage) page;
30 return renderSplashPage(sPage);
31 }
32 else {
33 throw new InstallException("Wrong Renderer in SplashPageRenderer.renderPage");
34 }
35 }
36 private boolean renderSplashPage(SplashPage page) throws InstallException {
37 try {
38 printHeader(page);
39 out.println();
40 out.println(page.getAltText());
41
42 reader.read();
43 return true;
44 }
45 catch (IOException ex) {
46 throw new InstallException("IOException");
47 }
48 }
49}
50