Class Terminal

All Implemented Interfaces:
Screen, KeyDown, MouseDown, Resized

public class Terminal extends Container implements Screen, Resized, KeyDown, MouseDown
  • Field Details

    • debug

      public static boolean debug
  • Constructor Details

    • Terminal

      public Terminal(String[] cmd)
      Terminal.
      Parameters:
      cmd - = command with arguments to execute
    • Terminal

      public Terminal(LnxPty pty)
      Terminal. Connect to existing Linux pty.
      Parameters:
      pty - = existing pty interface.
  • Method Details

    • init

      public void init()
      Description copied from class: Component
      Perform any initialization with the client. Containers should call init() on all sub-components.
      Overrides:
      init in class Container
    • disconnect

      public void disconnect()
    • onResized

      public void onResized(Component comp, int width, int height)
      Specified by:
      onResized in interface Resized
    • onKeyDown

      public void onKeyDown(KeyEvent event, Component comp)
      Specified by:
      onKeyDown in interface KeyDown
    • onMouseDown

      public void onMouseDown(MouseEvent me, Component comp)
      Specified by:
      onMouseDown in interface MouseDown
    • flashCursor

      public void flashCursor()
    • updateCursor

      public void updateCursor()
    • input

      public void input(char[] buf, int buflen)
    • print

      public void print(char[] buf)
    • print

      public void print(char[] buf, int buflen)
    • writeArray

      public void writeArray(byte[] tmp)
    • writeArray

      public void writeArray(String txt, char[] buf, int off, int buflen)
    • output

      public void output(char[] buf)
      Specified by:
      output in interface Screen
    • getForeColor

      public int getForeColor()
      Specified by:
      getForeColor in interface Screen
    • getBackColor

      public int getBackColor()
      Specified by:
      getBackColor in interface Screen
      Overrides:
      getBackColor in class Component
    • getsx

      public int getsx()
      Specified by:
      getsx in interface Screen
    • getsy

      public int getsy()
      Specified by:
      getsy in interface Screen
    • getx

      public int getx()
      Specified by:
      getx in interface Screen
    • gety

      public int gety()
      Specified by:
      gety in interface Screen
    • gety1

      public int gety1()
      Specified by:
      gety1 in interface Screen
    • gety2

      public int gety2()
      Specified by:
      gety2 in interface Screen
    • sety1

      public void sety1(int v)
      Specified by:
      sety1 in interface Screen
    • sety2

      public void sety2(int v)
      Specified by:
      sety2 in interface Screen
    • scrollUp

      public void scrollUp(int cnt)
      Specified by:
      scrollUp in interface Screen
    • scrollDown

      public void scrollDown(int cnt)
      Specified by:
      scrollDown in interface Screen
    • delete

      public void delete()
      Specified by:
      delete in interface Screen
    • insert

      public void insert()
      Specified by:
      insert in interface Screen
    • gotoPos

      public void gotoPos(int x, int y)
      Specified by:
      gotoPos in interface Screen
    • setChar

      public void setChar(int x, int y, char ch)
      Specified by:
      setChar in interface Screen
    • setAutoWrap

      public void setAutoWrap(boolean state)
      Specified by:
      setAutoWrap in interface Screen
    • clrscr

      public void clrscr()
      Specified by:
      clrscr in interface Screen
    • setBlinker

      public void setBlinker(boolean state)
      Specified by:
      setBlinker in interface Screen
    • setReverse

      public void setReverse(boolean state)
      Specified by:
      setReverse in interface Screen
    • setForeColor

      public void setForeColor(int newClr)
      Specified by:
      setForeColor in interface Screen
    • setBackColor

      public void setBackColor(int newClr)
      Specified by:
      setBackColor in interface Screen
      Overrides:
      setBackColor in class Component
    • getTermType

      public String getTermType()
      Specified by:
      getTermType in interface Screen
    • main

      public static void main(String[] args)