+ // ------------------------------------------------------------------------
+ // MultiScreen ------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * Add a screen to the list.
+ *
+ * @param screen the screen to add
+ */
+ public void addScreen(final Screen screen) {
+ screens.add(screen);
+ }
+
+ /**
+ * Remove a screen from the list.
+ *
+ * @param screen the screen to remove
+ */
+ public void removeScreen(final Screen screen) {
+ if (screens.size() > 1) {
+ screens.remove(screen);
+ }
+ }
+
+ /**
+ * 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 = 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 = screen.getTextHeight();
+ if (newTextHeight < textHeight) {
+ textHeight = newTextHeight;
+ }
+ }
+ return textHeight;
+ }
+
+ /**
+ * Invert the cell color at a position, including both halves of a
+ * double-width cell.
+ *
+ * @param x column position
+ * @param y row position
+ */
+ public void invertCell(final int x, final int y) {
+ for (Screen screen: screens) {
+ screen.invertCell(x, y);
+ }
+ }
+
+ /**
+ * Invert the cell color at a position.
+ *
+ * @param x column position
+ * @param y row position
+ * @param onlyThisCell if true, only invert this cell, otherwise invert
+ * both halves of a double-width cell if necessary
+ */
+ public void invertCell(final int x, final int y,
+ final boolean onlyThisCell) {
+
+ for (Screen screen: screens) {
+ screen.invertCell(x, y, onlyThisCell);
+ }
+ }
+