1 22 23 27 28 package org.netbeans.lib.terminalemulator; 29 30 class State { 31 public int rows; 32 33 public int firstx; 35 public int firsty; 36 37 public BCoord cursor = new BCoord(); 39 40 public void adjust(int amount) { 41 firstx += amount; 42 if (firstx < 0) 43 firstx = 0; 44 45 cursor.row += amount; 46 if (cursor.row < 0) 47 cursor.row = 0; 48 } 49 50 public int attr; 52 53 public boolean overstrike = true; 56 57 58 62 public void saveCursor() { 63 saved_cursor = (BCoord) cursor.clone(); 64 } 65 public void restoreCursor() { 66 if (saved_cursor != null) { 67 cursor = saved_cursor; 68 saved_cursor = null; 69 } 70 } 71 private BCoord saved_cursor = null; 72 } 73 | Popular Tags |