All Packages  This Package  Class Hierarchy  Class Search  Index

Class bmsi.fsp.PScreen
java.lang.Object
   |
   +----java.io.Writer
           |
           +----bmsi.fsp.PScreen

  Summary

public class  PScreen
     extends java.io.Writer
{
          // Constructors 1
     public PScreen(String, Socket) throws IOException;

          // Methods 15
     public void beep(int) throws IOException;
     public void close() throws IOException;
     public void copyArea(int, int, int, int, int, int);
     public void fill(int, int, int, int, char) throws IOException;
     public void flush() throws IOException;
     public int getCols();
     public Keyboard getKeyboard();
     public int getRows();
     public TermInfo getTermInfo();
     public void repaint(int, int, int, int);
     public void setAttr(char) throws IOException;
     public void setBufPos(int, int) throws IOException;
     public void setTerm(String) throws IOException;
     public void write(char[], int, int) throws IOException;
     public void write(int, int, int, String, char) throws IOException;

          // Inner Classes 1
     class PScreen.ScreenOutput
}

A physical TUI screen on an ASCII terminal. Communication with each screen is carried out by means of an InputStream and an OutputStream. A terminal type is used to lookup a TermInfo object to provide the byte strings which control various terminal functions and are sent by function keys on the terminal.

Author:
Stuart D. Gathman Copyright (C) 2000 Business Management Systems, Inc.




  Constructors

· PScreen

Summary  |  Top

   public PScreen(String term, 
                  Socket sock)  throws IOException


  Methods

· write

Summary  |  Top
   public void write(char[] buf, 
                     int pos, 
                     int len)  throws IOException
Overrides:
write in class Writer


· flush

Summary  |  Top
   public void flush()  throws IOException
Overrides:
flush in class Writer


· setTerm

Summary  |  Top
   public void setTerm(String term)  throws IOException


· getRows

Summary  |  Top
   public int getRows() 


· getCols

Summary  |  Top
   public int getCols() 


· fill

Summary  |  Top
   public void fill(int x, 
                    int y, 
                    int w, 
                    int h, 
                    char c)  throws IOException


· copyArea

Summary  |  Top
   public void copyArea(int x, 
                        int y, 
                        int w, 
                        int h, 
                        int dx, 
                        int dy) 

Copy an area of the screen to another position. Any insert/delete capabilities of the terminal are used to make this as efficient as possible. However, at a minimum the area left behind will need to be repainted. If the terminal has no insert/delete functions at all, the entire target area will need to be repainted as well. Most terminals will need some repainting because, for instance, they can insert/delete full lines, but not partial lines.



· repaint

Summary  |  Top
   public void repaint(int x, 
                       int y, 
                       int w, 
                       int h) 


· setBufPos

Summary  |  Top
   public void setBufPos(int x, 
                         int y)  throws IOException


· setAttr

Summary  |  Top
   public void setAttr(char ch)  throws IOException

Set text attributes. There is no indication in terminfo of which attributes are cumulative. We assume that attributes defined with "enter_*_mode" and "exit_*_mode" are cumulative, whereas sgr is not. In addition, cookies are never cumulative. Terminfo doesn't tell us which attributes are cookies, but we will assume that if magic_cookie_glitch >= 0, then all attributes set with sgr are cookies. We make a bit mask of cookie attributes available to the caller. sgr is assumed to set any attributes not set with an enter_*_mode command. I.e., we try to use enter_*_mode first.

sgr0 must be defined to turn off any enter_*_mode attributes that have no corresponding exit_*_mode command. sgr0 should turn off *all* such cumulative attributes, but should not affect sgr.

Like AT&T, we keep track of the current mode attributes in CUR sgr_mode and only output the changes in vidattr(). Unlike AT&T, we can output cookies by setting A_MODIFIED. FIXME: no cookie support yet.



· write

Summary  |  Top
   public void write(int x, 
                     int y, 
                     int w, 
                     String s, 
                     char attr)  throws IOException


· beep

Summary  |  Top
   public void beep(int type)  throws IOException


· getTermInfo

Summary  |  Top
   public TermInfo getTermInfo() 


· getKeyboard

Summary  |  Top
   public Keyboard getKeyboard() 


· close

Summary  |  Top
   public void close()  throws IOException
Overrides:
close in class Writer


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7