+ /**
+ * Drawing offset for y.
+ */
+ private int offsetY;
+
+ /**
+ * Ignore anything drawn right of clipRight.
+ */
+ private int clipRight;
+
+ /**
+ * Ignore anything drawn below clipBottom.
+ */
+ private int clipBottom;
+
+ /**
+ * Ignore anything drawn left of clipLeft.
+ */
+ private int clipLeft;
+
+ /**
+ * Ignore anything drawn above clipTop.
+ */
+ private int clipTop;
+
+ /**
+ * The physical screen last sent out on flush().
+ */
+ protected Cell [][] physical;
+
+ /**
+ * The logical screen being rendered to.
+ */
+ protected Cell [][] logical;
+
+ /**
+ * Set if the user explicitly wants to redraw everything starting with a
+ * ECMATerminal.clearAll().
+ */
+ protected boolean reallyCleared;
+
+ /**
+ * If true, the cursor is visible and should be placed onscreen at
+ * (cursorX, cursorY) during a call to flushPhysical().
+ */
+ protected boolean cursorVisible;
+
+ /**
+ * Cursor X position if visible.
+ */
+ protected int cursorX;
+
+ /**
+ * Cursor Y position if visible.
+ */
+ protected int cursorY;
+
+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * Public constructor. Sets everything to not-bold, white-on-black.
+ */
+ protected LogicalScreen() {
+ offsetX = 0;
+ offsetY = 0;
+ width = 80;
+ height = 24;
+ logical = null;
+ physical = null;
+ reallocate(width, height);
+ }
+
+ // ------------------------------------------------------------------------
+ // Screen -----------------------------------------------------------------
+ // ------------------------------------------------------------------------
+