home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Frame;
-
- class Monolog {
- static Transcript Transcript = null;
- Transcript transcript;
- static boolean useTranscript = true;
- String lastOutput = "";
- static boolean start;
- static String transcriptTitle = BrowserOptions.getString("Transcript");
- String pendingText;
-
- public void output(String var1) {
- this.lastOutput = this.lastOutput + var1;
- this.transcript.output(var1);
- }
-
- public String getText() {
- return this.lastOutput;
- }
-
- Monolog(Frame var1, String var2) {
- this.init(var1, var2, true);
- }
-
- Monolog(Frame var1, String var2, boolean var3) {
- this.init(var1, var2, var3);
- }
-
- void show() {
- if (this.pendingText != null) {
- if (start) {
- this.transcript.output("\n");
- }
-
- start = true;
- this.transcript.output(this.pendingText + "\n");
- this.pendingText = null;
- }
-
- this.transcript.show();
- }
-
- boolean useTranscript() {
- return BrowserOptions.transcript;
- }
-
- void close() {
- if (Transcript != this.transcript) {
- this.transcript.close();
- }
-
- }
-
- void dispose(Transcript var1) {
- if (Transcript == var1) {
- Transcript = null;
- start = false;
- }
-
- }
-
- public static String transcriptTitle() {
- return transcriptTitle;
- }
-
- void init(Frame var1, String var2, boolean var3) {
- if (this.useTranscript()) {
- if (Transcript == null) {
- Transcript = new Transcript(new Frame(), transcriptTitle, this);
- }
-
- this.transcript = Transcript;
- if (var3) {
- if (start) {
- this.transcript.output("\n");
- }
-
- start = true;
- this.transcript.output(var2 + "\n");
- } else {
- this.pendingText = var2;
- }
- } else {
- this.transcript = new Transcript(var1, var2, this);
- }
-
- if (var3) {
- this.transcript.show();
- }
-
- }
-
- static Transcript Transcript() {
- return Transcript;
- }
- }
-