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());
}
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.
*/