01: package com.memoire.vainstall.tui;
02:
03: import java.io.*;
04: import com.memoire.vainstall.*;
05:
06: public class TuiReadmeStep extends TuiDefaultStep implements
07: VAReadmeStep {
08: private boolean accepted_ = false;
09:
10: public TuiReadmeStep() {
11: super ();
12: }
13:
14: public void setText(InputStream lic) {
15: TuiWizard.clear();
16: TuiWizard.title();
17: TuiWizard.println(VAGlobals.i18n("TuiReadmeStep_Readme"));
18: TuiWizard.separator();
19: TuiWizard.println("");
20:
21: if (lic == null) {
22: TuiWizard.println(VAGlobals.i18n("TuiReadmeStep_NoReadme"));
23: } else {
24: try {
25: if (!TuiWizard.skip) {
26: LineNumberReader in = new LineNumberReader(
27: new InputStreamReader(lic, "UTF-8"));
28: String line = in.readLine();
29: int n = 3;
30: while (line != null) {
31: line = line.replace('\014', ' ');
32: TuiWizard.println(line);
33: n++;
34: if (n % 21 == 0) {
35: TuiWizard.enter();
36:
37: TuiWizard.clear();
38: TuiWizard.title();
39: TuiWizard.println(VAGlobals
40: .i18n("TuiReadmeStep_Readme"));
41: TuiWizard.separator();
42: TuiWizard.println("");
43: n = 3;
44: }
45: line = in.readLine();
46: }
47: in.close();
48:
49: if (n % 21 != 0) {
50: while (n % 21 != 0) {
51: TuiWizard.println("");
52: n++;
53: }
54: TuiWizard.enter();
55: }
56: }
57:
58: TuiWizard.clear();
59: TuiWizard.title();
60: TuiWizard.println(VAGlobals
61: .i18n("TuiReadmeStep_Readme"));
62: TuiWizard.separator();
63: TuiWizard.println("");
64: TuiWizard.println(VAGlobals
65: .i18n("TuiReadmeStep_Thanks"));
66: for (int i = 5; i < 22; i++)
67: TuiWizard.println("");
68: TuiWizard.info();
69: TuiWizard.println("");//VAGlobals.i18n("TuiReadmeStep_Readme"));
70: } catch (IOException ex) {
71: }
72: }
73: }
74: }
|