- int textWidth = 16;
- int textHeight = 20;
- if (getScreen() instanceof SwingTerminal) {
- SwingTerminal terminal = (SwingTerminal) getScreen();
-
- textWidth = terminal.getTextWidth();
- textHeight = terminal.getTextHeight();
- } else if (getScreen() instanceof ECMA48Terminal) {
- ECMA48Terminal terminal = (ECMA48Terminal) getScreen();
- textWidth = terminal.getTextWidth();
- textHeight = terminal.getTextHeight();
- }
- emulator.setTextWidth(textWidth);
- emulator.setTextHeight(textHeight);
+ emulator.setTextWidth(getScreen().getTextWidth());
+ emulator.setTextHeight(getScreen().getTextHeight());