+ /**
+ * Get the width of a character cell in pixels.
+ *
+ * @return the width in pixels of a character cell
+ */
+ public int getTextWidth() {
+ int textWidth = 16;
+ for (Screen screen: screens) {
+ int newTextWidth = textWidth;
+ if (screen instanceof MultiScreen) {
+ newTextWidth = ((MultiScreen) screen).getTextWidth();
+ } else if (screen instanceof ECMA48Terminal) {
+ newTextWidth = ((ECMA48Terminal) screen).getTextWidth();
+ } else if (screen instanceof SwingTerminal) {
+ newTextWidth = ((SwingTerminal) screen).getTextWidth();
+ }
+ if (newTextWidth < textWidth) {
+ textWidth = newTextWidth;
+ }
+ }
+ return textWidth;
+ }
+
+ /**
+ * Get the height of a character cell in pixels.
+ *
+ * @return the height in pixels of a character cell
+ */
+ public int getTextHeight() {
+ int textHeight = 20;
+ for (Screen screen: screens) {
+ int newTextHeight = textHeight;
+ if (screen instanceof MultiScreen) {
+ newTextHeight = ((MultiScreen) screen).getTextHeight();
+ } else if (screen instanceof ECMA48Terminal) {
+ newTextHeight = ((ECMA48Terminal) screen).getTextHeight();
+ } else if (screen instanceof SwingTerminal) {
+ newTextHeight = ((SwingTerminal) screen).getTextHeight();
+ }
+ if (newTextHeight < textHeight) {
+ textHeight = newTextHeight;
+ }
+ }
+ return textHeight;
+ }
+