X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTTerminalWindow.java;h=165ab713119dfdf3cb81b6e9e03a2f7a590ebcf7;hb=aa77d68274fff56c0ceca162a687ea70795624ea;hp=89280fd1d4d18d1b0a4ff0c05139dc916bb8c56a;hpb=85c07c5e6db3a5e74f5ba2bd6e7ee2656d5b63a0;p=fanfix.git diff --git a/src/jexer/TTerminalWindow.java b/src/jexer/TTerminalWindow.java index 89280fd..165ab71 100644 --- a/src/jexer/TTerminalWindow.java +++ b/src/jexer/TTerminalWindow.java @@ -202,8 +202,7 @@ public class TTerminalWindow extends TScrollableWindow pb.redirectErrorStream(true); shell = pb.start(); emulator = new ECMA48(deviceType, shell.getInputStream(), - shell.getOutputStream()); - emulator.setListener(this); + shell.getOutputStream(), this); } catch (IOException e) { messageBox("Error", "Error launching shell: " + e.getMessage()); } @@ -349,6 +348,24 @@ public class TTerminalWindow extends TScrollableWindow doRepaint(); } + /** + * Function to call to obtain the display width. + * + * @return the number of columns in the display + */ + public int getDisplayWidth() { + return getWidth() - 2; + } + + /** + * Function to call to obtain the display height. + * + * @return the number of rows in the display + */ + public int getDisplayHeight() { + return getHeight() - 2; + } + /** * Handle window close. */