Back to index

wims  3.65+svn20090927
SystemViewer.java
Go to the documentation of this file.
00001 package rene.viewer;
00002 
00003 import java.awt.BorderLayout;
00004 import java.awt.Color;
00005 import java.awt.Font;
00006 import java.awt.TextArea;
00007 import java.io.PrintWriter;
00008 
00009 public class SystemViewer extends Viewer
00010 {   TextArea T;
00011     public SystemViewer ()
00012     {   super("dummy");
00013         setLayout(new BorderLayout());
00014         add("Center",T=new TextArea());
00015     }
00016     public void appendLine (String s)
00017     {   T.append(s+"\n");
00018     }
00019        public void appendLine (String s, Color c)
00020        {      appendLine(s);
00021        }
00022     public void append (String s)
00023     {   T.append(s);
00024     }
00025     public void append (String s, Color c)
00026     {   append(s);
00027     }
00028     public void setText (String s)
00029     {   T.setText(s);
00030     }
00031        public void doUpdate (boolean showlast)
00032        {      T.repaint();
00033        }
00034     public void setFont (Font s)
00035     {  T.setFont(s);
00036     }
00037     public void save (PrintWriter fo)
00038     {   fo.print(T.getText());
00039        fo.flush();
00040     }
00041 }