tn5250j/src/org/tn5250j TN5250jConstants.java,1.49,1.50 ScreenPlanes.java,1.2,1.3 GuiGraphicBuffer.java,1.24,1.25 Screen5250.java,1.70,1.71

"Kenneth J. Pouncey" <[email protected]> Sun, 11 Jul 2004 09:18:01 +0000
Newsgroups gmane.comp.java.tn5250j.cvs
Message-ID <[email protected]>
Update of /cvsroot/tn5250j/tn5250j/src/org/tn5250j
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4741/src/org/tn5250j

Modified Files:
	TN5250jConstants.java ScreenPlanes.java GuiGraphicBuffer.java 
	Screen5250.java 
Log Message:
Take out references to ScreenChar

Index: TN5250jConstants.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/TN5250jConstants.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** TN5250jConstants.java	11 Jul 2004 08:17:28 -0000	1.49
--- TN5250jConstants.java	11 Jul 2004 09:17:58 -0000	1.50
***************
*** 426,428 ****
--- 426,462 ----
     public static final int EXTENDED_5250_NON_DSP   =  0x01;
  
+    public static final int NO_GUI = 0;
+    public static final int UPPER_LEFT = 1;
+    public static final int UPPER = 2;
+    public static final int UPPER_RIGHT = 3;
+    public static final int GUI_LEFT = 4;
+    public static final int GUI_RIGHT = 5;
+    public static final int LOWER_LEFT = 6;
+    public static final int BOTTOM = 7;
+    public static final int LOWER_RIGHT = 8;
+    public static final int FIELD_LEFT = 9;
+    public static final int FIELD_RIGHT = 10;
+    public static final int FIELD_MIDDLE = 11;
+    public static final int FIELD_ONE = 12;
+    public static final int BUTTON_LEFT = 13;
+    public static final int BUTTON_RIGHT = 14;
+    public static final int BUTTON_MIDDLE = 15;
+    public static final int BUTTON_ONE = 16;
+    public static final int BUTTON_LEFT_UP = 17;
+    public static final int BUTTON_RIGHT_UP = 18;
+    public static final int BUTTON_MIDDLE_UP = 19;
+    public static final int BUTTON_ONE_UP = 20;
+    public static final int BUTTON_LEFT_DN = 21;
+    public static final int BUTTON_RIGHT_DN = 22;
+    public static final int BUTTON_MIDDLE_DN = 23;
+    public static final int BUTTON_ONE_DN = 24;
+    public static final int BUTTON_LEFT_EB = 25;
+    public static final int BUTTON_RIGHT_EB = 26;
+    public static final int BUTTON_MIDDLE_EB = 27;
+    public static final int BUTTON_SB_UP = 28;
+    public static final int BUTTON_SB_DN = 29;
+    public static final int BUTTON_SB_GUIDE = 30;
+    public static final int BUTTON_SB_THUMB = 31;
+    public static final int BUTTON_LAST = 31;
+    
  }

Index: ScreenPlanes.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/ScreenPlanes.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ScreenPlanes.java	11 Jul 2004 08:17:28 -0000	1.2
--- ScreenPlanes.java	11 Jul 2004 09:17:58 -0000	1.3
***************
*** 1058,1062 ****
  	
  	               if (hs) {
! 	                  screenGUI[x] = ScreenChar.BUTTON_LEFT;
  	
  	                  int ns = 0;
--- 1058,1062 ----
  	
  	               if (hs) {
! 	                  screenGUI[x] = BUTTON_LEFT;
  	
  	                  int ns = 0;
***************
*** 1068,1072 ****
  	                        ns = 0;
  	                     if (ns <2)
! 	                        screenGUI[x] = ScreenChar.BUTTON_MIDDLE;
  	
  	                  }
--- 1068,1072 ----
  	                        ns = 0;
  	                     if (ns <2)
! 	                        screenGUI[x] = BUTTON_MIDDLE;
  	
  	                  }
***************
*** 1074,1080 ****
  	                  // now lets go back and take out gui's that do not belong
  	                  while (screen[--x] <= ' ') {
! 	                     screenGUI[x] = ScreenChar.NO_GUI;
  	                  }
! 	                  screenGUI[x] = ScreenChar.BUTTON_RIGHT;
  	
  	               }
--- 1074,1080 ----
  	                  // now lets go back and take out gui's that do not belong
  	                  while (screen[--x] <= ' ') {
! 	                     screenGUI[x] = NO_GUI;
  	                  }
! 	                  screenGUI[x] = BUTTON_RIGHT;
  	
  	               }
***************
*** 1085,1089 ****
  	         if (!hs && x > 0 && x < lenScreen - 2 &&
  	               screen[x] == '.' &&
! 	               screenGUI[x] == ScreenChar.NO_GUI &&
  	               (screenExtended[x] & EXTENDED_5250_UNDERLINE) == 0 &&
  	               (screenExtended[x] & EXTENDED_5250_NON_DSP) == 0
--- 1085,1089 ----
  	         if (!hs && x > 0 && x < lenScreen - 2 &&
  	               screen[x] == '.' &&
! 	               screenGUI[x] == NO_GUI &&
  	               (screenExtended[x] & EXTENDED_5250_UNDERLINE) == 0 &&
  	               (screenExtended[x] & EXTENDED_5250_NON_DSP) == 0
***************
*** 1121,1129 ****
  	               }
  	
! 	               screenGUI[++os] = ScreenChar.BUTTON_LEFT;
  	               s.setDirty(os);
  	
  	               while (++os < stop) {
! 	                  screenGUI[os] = ScreenChar.BUTTON_MIDDLE;
  	                  s.setDirty(os);
  	               }
--- 1121,1129 ----
  	               }
  	
! 	               screenGUI[++os] = BUTTON_LEFT;
  	               s.setDirty(os);
  	
  	               while (++os < stop) {
! 	                  screenGUI[os] = BUTTON_MIDDLE;
  	                  s.setDirty(os);
  	               }
***************
*** 1131,1138 ****
  	               // now lets go back and take out gui's that do not belong
  	               while (screen[--stop] <= ' ') {
! 	                  screenGUI[stop] = ScreenChar.NO_GUI;
  	                  s.setDirty(stop);
  	               }
! 	               screenGUI[stop] = ScreenChar.BUTTON_RIGHT;
  	               s.setDirty(stop);
  	
--- 1131,1138 ----
  	               // now lets go back and take out gui's that do not belong
  	               while (screen[--stop] <= ' ') {
! 	                  screenGUI[stop] = NO_GUI;
  	                  s.setDirty(stop);
  	               }
! 	               screenGUI[stop] = BUTTON_RIGHT;
  	               s.setDirty(stop);
  	
***************
*** 1143,1147 ****
  	         if (!hs && x > 0 && x < lenScreen - 2 &&
  	               screen[x] == '=' &&
! 	               screenGUI[x] == ScreenChar.NO_GUI &&
  	               (screenExtended[x] & EXTENDED_5250_UNDERLINE) == 0 &&
  	               (screenExtended[x] & EXTENDED_5250_NON_DSP) == 0
--- 1143,1147 ----
  	         if (!hs && x > 0 && x < lenScreen - 2 &&
  	               screen[x] == '=' &&
! 	               screenGUI[x] == NO_GUI &&
  	               (screenExtended[x] & EXTENDED_5250_UNDERLINE) == 0 &&
  	               (screenExtended[x] & EXTENDED_5250_NON_DSP) == 0
***************
*** 1178,1186 ****
  	               }
  	
! 	               screenGUI[++os] = ScreenChar.BUTTON_LEFT;
  	               s.setDirty(os);
  	
  	               while (++os < stop) {
! 	                  screenGUI[os] = ScreenChar.BUTTON_MIDDLE;
  	                  s.setDirty(os);
  	
--- 1178,1186 ----
  	               }
  	
! 	               screenGUI[++os] = BUTTON_LEFT;
  	               s.setDirty(os);
  	
  	               while (++os < stop) {
! 	                  screenGUI[os] = BUTTON_MIDDLE;
  	                  s.setDirty(os);
  	
***************
*** 1189,1197 ****
  	               // now lets go back and take out gui's that do not belong
  	               while (screen[--stop] <= ' ') {
! 	                  screenGUI[stop] = ScreenChar.NO_GUI;
  	                  s.setDirty(stop);
  	
  	               }
! 	               screenGUI[stop] = ScreenChar.BUTTON_RIGHT;
  	               s.setDirty(stop);
  	            }
--- 1189,1197 ----
  	               // now lets go back and take out gui's that do not belong
  	               while (screen[--stop] <= ' ') {
! 	                  screenGUI[stop] = NO_GUI;
  	                  s.setDirty(stop);
  	
  	               }
! 	               screenGUI[stop] = BUTTON_RIGHT;
  	               s.setDirty(stop);
  	            }
***************
*** 1204,1208 ****
  	               screen[x - 1] <= ' ' &&
  	               screen[x - 2] <= ' ' &&
! 	               screenGUI[x] == ScreenChar.NO_GUI &&
  	               (screenExtended[x] & EXTENDED_5250_NON_DSP) == 0
  	            ) {
--- 1204,1208 ----
  	               screen[x - 1] <= ' ' &&
  	               screen[x - 2] <= ' ' &&
! 	               screenGUI[x] == NO_GUI &&
  	               (screenExtended[x] & EXTENDED_5250_NON_DSP) == 0
  	            ) {
***************
*** 1222,1232 ****
  	               hs = true;
  	
! 	               screenGUI[x] = ScreenChar.BUTTON_LEFT_DN;
  	
  	               while (--ms > 0) {
! 	                  screenGUI[++x] = ScreenChar.BUTTON_MIDDLE_DN;
  	
  	               }
! 	               screenGUI[x] = ScreenChar.BUTTON_RIGHT_DN;
  	            }
  	         }
--- 1222,1232 ----
  	               hs = true;
  	
! 	               screenGUI[x] = BUTTON_LEFT_DN;
  	
  	               while (--ms > 0) {
! 	                  screenGUI[++x] = BUTTON_MIDDLE_DN;
  	
  	               }
! 	               screenGUI[x] = BUTTON_RIGHT_DN;
  	            }
  	         }
***************
*** 1237,1241 ****
  	               screen[x - 1]  <= ' ' &&
  	               screen[x - 2] <= ' ' &&
! 	               screenGUI[x] == ScreenChar.NO_GUI &&
  	               (screenExtended[x] & EXTENDED_5250_NON_DSP) == 0
  	            ) {
--- 1237,1241 ----
  	               screen[x - 1]  <= ' ' &&
  	               screen[x - 2] <= ' ' &&
! 	               screenGUI[x] == NO_GUI &&
  	               (screenExtended[x] & EXTENDED_5250_NON_DSP) == 0
  	            ) {
***************
*** 1255,1265 ****
  	               hs = true;
  	
! 	               screenGUI[x] = ScreenChar.BUTTON_LEFT_UP;
  	
  	               while (--bs > 0) {
! 	                  screenGUI[++x] = ScreenChar.BUTTON_MIDDLE_UP;
  	
  	               }
! 	               screenGUI[x] = ScreenChar.BUTTON_RIGHT_UP;
  	            }
  	         }
--- 1255,1265 ----
  	               hs = true;
  	
! 	               screenGUI[x] = BUTTON_LEFT_UP;
  	
  	               while (--bs > 0) {
! 	                  screenGUI[++x] = BUTTON_MIDDLE_UP;
  	
  	               }
! 	               screenGUI[x] = BUTTON_RIGHT_UP;
  	            }
  	         }
***************
*** 1269,1273 ****
  	               Character.toLowerCase(screen[x]) == 'h' &&
  	               screen[x - 1] <= ' ' &&
! 	               screenGUI[x] == ScreenChar.NO_GUI &&
  	               (screenExtended[x] & EXTENDED_5250_NON_DSP) == 0
  	            ) {
--- 1269,1273 ----
  	               Character.toLowerCase(screen[x]) == 'h' &&
  	               screen[x - 1] <= ' ' &&
! 	               screenGUI[x] == NO_GUI &&
  	               (screenExtended[x] & EXTENDED_5250_NON_DSP) == 0
  	            ) {
***************
*** 1282,1292 ****
  	               hs = true;
  	
! 	               screenGUI[x] = ScreenChar.BUTTON_LEFT_EB;
  	
  	               while (screen[++x] > ' ') {
! 	                  screenGUI[x] = ScreenChar.BUTTON_MIDDLE_EB;
  	
  	               }
! 	               screenGUI[--x] = ScreenChar.BUTTON_RIGHT_EB;
  	            }
  	         }
--- 1282,1292 ----
  	               hs = true;
  	
! 	               screenGUI[x] = BUTTON_LEFT_EB;
  	
  	               while (screen[++x] > ' ') {
! 	                  screenGUI[x] = BUTTON_MIDDLE_EB;
  	
  	               }
! 	               screenGUI[--x] = BUTTON_RIGHT_EB;
  	            }
  	         }
***************
*** 1306,1310 ****
  	//         boolean gui = false;
  	//         for (int j=0; j < 19; j++) {
! 	//            if (screen[pos].whichGui != ScreenChar.NO_GUI)
  	////                  System.out.print(screen[pos].getChar());
  	//
--- 1306,1310 ----
  	//         boolean gui = false;
  	//         for (int j=0; j < 19; j++) {
! 	//            if (screen[pos].whichGui != NO_GUI)
  	////                  System.out.print(screen[pos].getChar());
  	//
***************
*** 1406,1442 ****
  	}
  
-    public static final int NO_GUI = 0;
-    public static final int UPPER_LEFT = 1;
-    public static final int UPPER = 2;
-    public static final int UPPER_RIGHT = 3;
-    public static final int LEFT = 4;
-    public static final int RIGHT = 5;
-    public static final int LOWER_LEFT = 6;
-    public static final int BOTTOM = 7;
-    public static final int LOWER_RIGHT = 8;
-    public static final int FIELD_LEFT = 9;
-    public static final int FIELD_RIGHT = 10;
-    public static final int FIELD_MIDDLE = 11;
-    public static final int FIELD_ONE = 12;
-    public static final int BUTTON_LEFT = 13;
-    public static final int BUTTON_RIGHT = 14;
-    public static final int BUTTON_MIDDLE = 15;
-    public static final int BUTTON_ONE = 16;
-    public static final int BUTTON_LEFT_UP = 17;
-    public static final int BUTTON_RIGHT_UP = 18;
-    public static final int BUTTON_MIDDLE_UP = 19;
-    public static final int BUTTON_ONE_UP = 20;
-    public static final int BUTTON_LEFT_DN = 21;
-    public static final int BUTTON_RIGHT_DN = 22;
-    public static final int BUTTON_MIDDLE_DN = 23;
-    public static final int BUTTON_ONE_DN = 24;
-    public static final int BUTTON_LEFT_EB = 25;
-    public static final int BUTTON_RIGHT_EB = 26;
-    public static final int BUTTON_MIDDLE_EB = 27;
-    public static final int BUTTON_SB_UP = 28;
-    public static final int BUTTON_SB_DN = 29;
-    public static final int BUTTON_SB_GUIDE = 30;
-    public static final int BUTTON_SB_THUMB = 31;
-    public static final int BUTTON_LAST = 31;
- 
  }
\ No newline at end of file
--- 1406,1408 ----

Index: GuiGraphicBuffer.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/GuiGraphicBuffer.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** GuiGraphicBuffer.java	11 Jul 2004 08:17:28 -0000	1.24
--- GuiGraphicBuffer.java	11 Jul 2004 09:17:58 -0000	1.25
***************
*** 548,552 ****
  			while (cols-- >= 0) {
  				if (lc >= 0 && lc < lenScreen) {
- //					drawChar(gg2d,screen.screen[lc],screen.getRow(lc),screen.getCol(lc));
  					drawChar(gg2d,pos++,screen.getRow(lc),screen.getCol(lc));
                 lc++;
--- 548,551 ----
***************
*** 695,732 ****
     }
  
-    public static final int NO_GUI = 0;
-    public static final int UPPER_LEFT = 1;
-    public static final int UPPER = 2;
-    public static final int UPPER_RIGHT = 3;
-    public static final int LEFT = 4;
-    public static final int RIGHT = 5;
-    public static final int LOWER_LEFT = 6;
-    public static final int BOTTOM = 7;
-    public static final int LOWER_RIGHT = 8;
-    public static final int FIELD_LEFT = 9;
-    public static final int FIELD_RIGHT = 10;
-    public static final int FIELD_MIDDLE = 11;
-    public static final int FIELD_ONE = 12;
-    public static final int BUTTON_LEFT = 13;
-    public static final int BUTTON_RIGHT = 14;
-    public static final int BUTTON_MIDDLE = 15;
-    public static final int BUTTON_ONE = 16;
-    public static final int BUTTON_LEFT_UP = 17;
-    public static final int BUTTON_RIGHT_UP = 18;
-    public static final int BUTTON_MIDDLE_UP = 19;
-    public static final int BUTTON_ONE_UP = 20;
-    public static final int BUTTON_LEFT_DN = 21;
-    public static final int BUTTON_RIGHT_DN = 22;
-    public static final int BUTTON_MIDDLE_DN = 23;
-    public static final int BUTTON_ONE_DN = 24;
-    public static final int BUTTON_LEFT_EB = 25;
-    public static final int BUTTON_RIGHT_EB = 26;
-    public static final int BUTTON_MIDDLE_EB = 27;
-    public static final int BUTTON_SB_UP = 28;
-    public static final int BUTTON_SB_DN = 29;
-    public static final int BUTTON_SB_GUIDE = 30;
-    public static final int BUTTON_SB_THUMB = 31;
-    public static final int BUTTON_LAST = 31;
- 
  
     protected Data fillData(int startRow, int startCol, int endRow, int endCol) {
--- 694,697 ----
***************
*** 774,777 ****
--- 739,763 ----
     }
  
+    public final Rectangle modelToView(int row, int col)
+    {
+      return modelToView(row, col, new Rectangle());
+    }
+ 
+    public final Rectangle modelToView(int row, int col, Rectangle r) {
+       int columnWidth = screen.fmWidth;
+       int rowHeight = screen.fmHeight;
+       
+       // right now row and column is 1,1 offset based.  This will need
+       //   to be changed to 0,0 offset based by subtracting 1 from them
+       //   when the screen is being passed this way 
+ //     r.x      =  (col - 1) * columnWidth;
+ //     r.y      =  (row - 1) * rowHeight;
+      r.x      =  col * columnWidth;
+      r.y      =  row * rowHeight;
+      r.width  = columnWidth;
+      r.height = rowHeight;
+      return r;
+    }
+ 
     // Dup Character array for display output
     public static final transient char[] dupChar = {'*'};
***************
*** 790,797 ****
        boolean useGui = whichGui == 0 ? false : true;
  
!       csArea.setRect((s.fmWidth*col),s.fmHeight * row,s.fmWidth,s.fmHeight);
  
!       int x = s.fmWidth * col;
!       int y = s.fmHeight * row;
        int cy = (int)(y + s.fmHeight - (s.lm.getDescent() + s.lm.getLeading()));
  
--- 776,784 ----
        boolean useGui = whichGui == 0 ? false : true;
  
!       csArea = modelToView(row, col, csArea);
!       
  
!       int x = csArea.x;
!       int y = csArea.y;
        int cy = (int)(y + s.fmHeight - (s.lm.getDescent() + s.lm.getLeading()));
  
***************
*** 899,903 ****
                    }
                 break;
!                case LEFT:
                    if (sChar[0] == ':') {
                       if (s.isUsingGuiInterface()) {
--- 886,890 ----
                    }
                 break;
!                case GUI_LEFT:
                    if (sChar[0] == ':') {
                       if (s.isUsingGuiInterface()) {
***************
*** 923,927 ****
                    }
                 break;
!                case RIGHT:
                    if (sChar[0] == ':') {
                       if (s.isUsingGuiInterface()) {
--- 910,914 ----
                    }
                 break;
!                case GUI_RIGHT:
                    if (sChar[0] == ':') {
                       if (s.isUsingGuiInterface()) {

Index: Screen5250.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/Screen5250.java,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** Screen5250.java	11 Jul 2004 08:17:28 -0000	1.70
--- Screen5250.java	11 Jul 2004 09:17:58 -0000	1.71
***************
*** 47,52 ****
  		ActionListener {
  
- //	ScreenChar[] screen;
- 	private ScreenChar[] errorLine;
  	private ScreenFields screenFields;
  	private int errorLineNum;
--- 47,50 ----
***************
*** 1205,1218 ****
  
  			// lets check for hot spots
! 			if (g >= ScreenChar.BUTTON_LEFT && g <= ScreenChar.BUTTON_LAST) {
  				StringBuffer aid = new StringBuffer();
  				boolean aidFlag = true;
  				switch (g) {
! 				case ScreenChar.BUTTON_RIGHT:
! 				case ScreenChar.BUTTON_MIDDLE:
! //					while (screen[--pos].getWhichGUI() != ScreenChar.BUTTON_LEFT) {
! 					while (planes.getWhichGUI(--pos) != ScreenChar.BUTTON_LEFT) {
  					}
! 				case ScreenChar.BUTTON_LEFT:
  //					if (screen[pos].getChar() == 'F') {
  					if (planes.getChar(pos) == 'F') {
--- 1203,1216 ----
  
  			// lets check for hot spots
! 			if (g >= BUTTON_LEFT && g <= BUTTON_LAST) {
  				StringBuffer aid = new StringBuffer();
  				boolean aidFlag = true;
  				switch (g) {
! 				case BUTTON_RIGHT:
! 				case BUTTON_MIDDLE:
! //					while (screen[--pos].getWhichGUI() != BUTTON_LEFT) {
! 					while (planes.getWhichGUI(--pos) != BUTTON_LEFT) {
  					}
! 				case BUTTON_LEFT:
  //					if (screen[pos].getChar() == 'F') {
  					if (planes.getChar(pos) == 'F') {
***************
*** 1247,1275 ****
  					switch (g) {
  
! 					case ScreenChar.BUTTON_LEFT_UP:
! 					case ScreenChar.BUTTON_MIDDLE_UP:
! 					case ScreenChar.BUTTON_RIGHT_UP:
! 					case ScreenChar.BUTTON_ONE_UP:
! 					case ScreenChar.BUTTON_SB_UP:
! 					case ScreenChar.BUTTON_SB_GUIDE:
  						gui.sendAidKey(tnvt.AID_ROLL_UP);
  						break;
  
! 					case ScreenChar.BUTTON_LEFT_DN:
! 					case ScreenChar.BUTTON_MIDDLE_DN:
! 					case ScreenChar.BUTTON_RIGHT_DN:
! 					case ScreenChar.BUTTON_ONE_DN:
! 					case ScreenChar.BUTTON_SB_DN:
! 					case ScreenChar.BUTTON_SB_THUMB:
  
  						gui.sendAidKey(tnvt.AID_ROLL_DOWN);
  						break;
! 					case ScreenChar.BUTTON_LEFT_EB:
! 					case ScreenChar.BUTTON_MIDDLE_EB:
! 					case ScreenChar.BUTTON_RIGHT_EB:
  						StringBuffer eb = new StringBuffer();
! 						while (planes.getWhichGUI(pos--) != ScreenChar.BUTTON_LEFT_EB)
  							;
! 						while (planes.getWhichGUI(pos++) != ScreenChar.BUTTON_RIGHT_EB) {
  							eb.append(planes.getChar(pos));
  						}
--- 1245,1273 ----
  					switch (g) {
  
! 					case BUTTON_LEFT_UP:
! 					case BUTTON_MIDDLE_UP:
! 					case BUTTON_RIGHT_UP:
! 					case BUTTON_ONE_UP:
! 					case BUTTON_SB_UP:
! 					case BUTTON_SB_GUIDE:
  						gui.sendAidKey(tnvt.AID_ROLL_UP);
  						break;
  
! 					case BUTTON_LEFT_DN:
! 					case BUTTON_MIDDLE_DN:
! 					case BUTTON_RIGHT_DN:
! 					case BUTTON_ONE_DN:
! 					case BUTTON_SB_DN:
! 					case BUTTON_SB_THUMB:
  
  						gui.sendAidKey(tnvt.AID_ROLL_DOWN);
  						break;
! 					case BUTTON_LEFT_EB:
! 					case BUTTON_MIDDLE_EB:
! 					case BUTTON_RIGHT_EB:
  						StringBuffer eb = new StringBuffer();
! 						while (planes.getWhichGUI(pos--) != BUTTON_LEFT_EB)
  							;
! 						while (planes.getWhichGUI(pos++) != BUTTON_RIGHT_EB) {
  							eb.append(planes.getChar(pos));
  						}
***************
*** 3764,3769 ****
  		planes.setScreenCharAndAttr(lastPos, (char) ul, colorAttr, false);
  		if (gui) {
! //			screen[lastPos].setUseGUI(ScreenChar.UPPER_LEFT);
! 			planes.setUseGUI(lastPos, ScreenChar.UPPER_LEFT);
  		}
  		setDirty(lastPos);
--- 3762,3767 ----
  		planes.setScreenCharAndAttr(lastPos, (char) ul, colorAttr, false);
  		if (gui) {
! //			screen[lastPos].setUseGUI(UPPER_LEFT);
! 			planes.setUseGUI(lastPos, UPPER_LEFT);
  		}
  		setDirty(lastPos);
***************
*** 3777,3782 ****
  			planes.setScreenCharAndAttr(lastPos, (char) upper, colorAttr, false);
  			if (gui) {
! //				screen[lastPos].setUseGUI(ScreenChar.UPPER);
! 				planes.setUseGUI(lastPos,ScreenChar.UPPER);
  			}
  			setDirty(lastPos);
--- 3775,3780 ----
  			planes.setScreenCharAndAttr(lastPos, (char) upper, colorAttr, false);
  			if (gui) {
! //				screen[lastPos].setUseGUI(UPPER);
! 				planes.setUseGUI(lastPos,UPPER);
  			}
  			setDirty(lastPos);
***************
*** 3789,3794 ****
  
  		if (gui) {
! //			screen[lastPos].setUseGUI(ScreenChar.UPPER_RIGHT);
! 			planes.setUseGUI(lastPos, ScreenChar.UPPER_RIGHT);
  		}
  		setDirty(lastPos);
--- 3787,3792 ----
  
  		if (gui) {
! //			screen[lastPos].setUseGUI(UPPER_RIGHT);
! 			planes.setUseGUI(lastPos, UPPER_RIGHT);
  		}
  		setDirty(lastPos);
***************
*** 3816,3821 ****
  
  			if (gui) {
! //				screen[lastPos].setUseGUI(ScreenChar.LEFT);
! 				planes.setUseGUI(lastPos,ScreenChar.LEFT);
  			}
  			setDirty(lastPos);
--- 3814,3819 ----
  
  			if (gui) {
! //				screen[lastPos].setUseGUI(LEFT);
! 				planes.setUseGUI(lastPos,GUI_LEFT);
  			}
  			setDirty(lastPos);
***************
*** 3827,3832 ****
  //				screen[lastPos].setCharAndAttr(initChar, initAttr, true);
  				planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true);
! //				screen[lastPos].setUseGUI(ScreenChar.NO_GUI);
! 				planes.setUseGUI(lastPos,ScreenChar.NO_GUI);
  				setDirty(lastPos);
  				advancePos();
--- 3825,3830 ----
  //				screen[lastPos].setCharAndAttr(initChar, initAttr, true);
  				planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true);
! //				screen[lastPos].setUseGUI(NO_GUI);
! 				planes.setUseGUI(lastPos,NO_GUI);
  				setDirty(lastPos);
  				advancePos();
***************
*** 3837,3842 ****
  			planes.setScreenCharAndAttr(lastPos,(char) right, colorAttr, false);
  			if (gui) {
! //				screen[lastPos].setUseGUI(ScreenChar.RIGHT);
! 				planes.setUseGUI(lastPos,ScreenChar.RIGHT);
  			}
  			setDirty(lastPos);
--- 3835,3840 ----
  			planes.setScreenCharAndAttr(lastPos,(char) right, colorAttr, false);
  			if (gui) {
! //				screen[lastPos].setUseGUI(RIGHT);
! 				planes.setUseGUI(lastPos,GUI_RIGHT);
  			}
  			setDirty(lastPos);
***************
*** 3861,3866 ****
  		planes.setScreenCharAndAttr(lastPos,(char) ll, colorAttr, false);
  		if (gui) {
! //			screen[lastPos].setUseGUI(ScreenChar.LOWER_LEFT);
! 			planes.setUseGUI(lastPos,ScreenChar.LOWER_LEFT);
  		}
  		setDirty(lastPos);
--- 3859,3864 ----
  		planes.setScreenCharAndAttr(lastPos,(char) ll, colorAttr, false);
  		if (gui) {
! //			screen[lastPos].setUseGUI(LOWER_LEFT);
! 			planes.setUseGUI(lastPos,LOWER_LEFT);
  		}
  		setDirty(lastPos);
***************
*** 3873,3878 ****
  			planes.setScreenCharAndAttr(lastPos,(char) bottom, colorAttr, false);
  			if (gui) {
! //				screen[lastPos].setUseGUI(ScreenChar.BOTTOM);
! 				planes.setUseGUI(lastPos,ScreenChar.BOTTOM);
  			}
  			setDirty(lastPos);
--- 3871,3876 ----
  			planes.setScreenCharAndAttr(lastPos,(char) bottom, colorAttr, false);
  			if (gui) {
! //				screen[lastPos].setUseGUI(BOTTOM);
! 				planes.setUseGUI(lastPos,BOTTOM);
  			}
  			setDirty(lastPos);
***************
*** 3884,3889 ****
  		planes.setScreenCharAndAttr(lastPos, (char) lr, colorAttr, false);
  		if (gui) {
! //			screen[lastPos].setUseGUI(ScreenChar.LOWER_RIGHT);
! 			planes.setUseGUI(lastPos,ScreenChar.LOWER_RIGHT);
  		}
  		setDirty(lastPos);
--- 3882,3887 ----
  		planes.setScreenCharAndAttr(lastPos, (char) lr, colorAttr, false);
  		if (gui) {
! //			screen[lastPos].setUseGUI(LOWER_RIGHT);
! 			planes.setUseGUI(lastPos,LOWER_RIGHT);
  		}
  		setDirty(lastPos);
***************
*** 3928,3934 ****
  		//      System.out.println(thumbPos);
  //		screen[sp].setCharAndAttr(' ', 32, false);
! //		screen[sp].setUseGUI(ScreenChar.BUTTON_SB_UP);
  		planes.setScreenCharAndAttr(sp,' ', 32, false);
! 		planes.setUseGUI(sp,ScreenChar.BUTTON_SB_UP);
  
  		int ctr = 0;
--- 3926,3932 ----
  		//      System.out.println(thumbPos);
  //		screen[sp].setCharAndAttr(' ', 32, false);
! //		screen[sp].setUseGUI(BUTTON_SB_UP);
  		planes.setScreenCharAndAttr(sp,' ', 32, false);
! 		planes.setUseGUI(sp,BUTTON_SB_UP);
  
  		int ctr = 0;
***************
*** 3938,3946 ****
  			planes.setScreenCharAndAttr(sp,' ', 32, false);
  			if (ctr == thumbPos)
! //				screen[sp].setUseGUI(ScreenChar.BUTTON_SB_THUMB);
! 				planes.setUseGUI(sp,ScreenChar.BUTTON_SB_THUMB);
  			else
! //				screen[sp].setUseGUI(ScreenChar.BUTTON_SB_GUIDE);
! 				planes.setUseGUI(sp, ScreenChar.BUTTON_SB_GUIDE);
  			ctr++;
  		}
--- 3936,3944 ----
  			planes.setScreenCharAndAttr(sp,' ', 32, false);
  			if (ctr == thumbPos)
! //				screen[sp].setUseGUI(BUTTON_SB_THUMB);
! 				planes.setUseGUI(sp,BUTTON_SB_THUMB);
  			else
! //				screen[sp].setUseGUI(BUTTON_SB_GUIDE);
! 				planes.setUseGUI(sp, BUTTON_SB_GUIDE);
  			ctr++;
  		}
***************
*** 3948,3955 ****
  
  //		screen[sp].setCharAndAttr(' ', 32, false);
! //		screen[sp].setUseGUI(ScreenChar.BUTTON_SB_DN);
  
  		planes.setScreenCharAndAttr(sp, ' ', 32, false);
! 		planes.setUseGUI(sp, ScreenChar.BUTTON_SB_DN);
  	}
  
--- 3946,3953 ----
  
  //		screen[sp].setCharAndAttr(' ', 32, false);
! //		screen[sp].setUseGUI(BUTTON_SB_DN);
  
  		planes.setScreenCharAndAttr(sp, ' ', 32, false);
! 		planes.setUseGUI(sp, BUTTON_SB_DN);
  	}
  
***************
*** 3999,4005 ****
  		for (int x = 0; x < len; x++) {
  //			screen[pos].setChar(title.charAt(x));
! //			screen[pos++].setUseGUI(ScreenChar.NO_GUI);
  			planes.setChar(pos, title.charAt(x));
! 			planes.setUseGUI(pos++, ScreenChar.NO_GUI);
  
  		}
--- 3997,4003 ----
  		for (int x = 0; x < len; x++) {
  //			screen[pos].setChar(title.charAt(x));
! //			screen[pos++].setUseGUI(NO_GUI);
  			planes.setChar(pos, title.charAt(x));
! 			planes.setUseGUI(pos++, NO_GUI);
  
  		}
***************
*** 4134,4139 ****
  
  				if (gui) {
! //					screen[lastPos].setUseGUI(ScreenChar.FIELD_MIDDLE);
! 					planes.setUseGUI(lastPos,ScreenChar.FIELD_MIDDLE);
  				}
  
--- 4132,4137 ----
  
  				if (gui) {
! //					screen[lastPos].setUseGUI(FIELD_MIDDLE);
! 					planes.setUseGUI(lastPos,FIELD_MIDDLE);
  				}
  
***************
*** 4144,4163 ****
  			if (gui)
  				if (len > 1) {
! //					screen[sf.startPos()].setUseGUI(ScreenChar.FIELD_LEFT);
! 					planes.setUseGUI(sf.startPos(), ScreenChar.FIELD_LEFT);
  //					if (lastPos > 0)
! //						screen[lastPos - 1].setUseGUI(ScreenChar.FIELD_RIGHT);
  //					else
! //						screen[lastPos].setUseGUI(ScreenChar.FIELD_RIGHT);
  
  					if (lastPos > 0)
! 						planes.setUseGUI(lastPos - 1, ScreenChar.FIELD_RIGHT);
  					else
! 						planes.setUseGUI(lastPos,ScreenChar.FIELD_RIGHT);
  
  				}
              else {
! //					screen[lastPos - 1].setUseGUI(ScreenChar.FIELD_ONE);
! 					planes.setUseGUI(lastPos - 1,ScreenChar.FIELD_ONE);
              }
  
--- 4142,4161 ----
  			if (gui)
  				if (len > 1) {
! //					screen[sf.startPos()].setUseGUI(FIELD_LEFT);
! 					planes.setUseGUI(sf.startPos(), FIELD_LEFT);
  //					if (lastPos > 0)
! //						screen[lastPos - 1].setUseGUI(FIELD_RIGHT);
  //					else
! //						screen[lastPos].setUseGUI(FIELD_RIGHT);
  
  					if (lastPos > 0)
! 						planes.setUseGUI(lastPos - 1, FIELD_RIGHT);
  					else
! 						planes.setUseGUI(lastPos,FIELD_RIGHT);
  
  				}
              else {
! //					screen[lastPos - 1].setUseGUI(FIELD_ONE);
! 					planes.setUseGUI(lastPos - 1,FIELD_ONE);
              }
  
***************
*** 4253,4257 ****
  	//
  	//               if (gui)
! 	//                  screen[lastPos].setUseGUI(ScreenChar.FIELD_MIDDLE);
  	//
  	//               advancePos();
--- 4251,4255 ----
  	//
  	//               if (gui)
! 	//                  screen[lastPos].setUseGUI(FIELD_MIDDLE);
  	//
  	//               advancePos();
***************
*** 4261,4273 ****
  	//            if (gui)
  	//               if (len > 1) {
! 	//                  screen[sf.startPos()].setUseGUI(ScreenChar.FIELD_LEFT);
  	//                  if (lastPos > 0)
! 	//                     screen[lastPos-1].setUseGUI(ScreenChar.FIELD_RIGHT);
  	//                  else
! 	//                     screen[lastPos].setUseGUI(ScreenChar.FIELD_RIGHT);
  	//
  	//               }
  	//               else
! 	//                  screen[lastPos-1].setUseGUI(ScreenChar.FIELD_ONE);
  	//
  	//            setEndingAttr(initAttr);
--- 4259,4271 ----
  	//            if (gui)
  	//               if (len > 1) {
! 	//                  screen[sf.startPos()].setUseGUI(FIELD_LEFT);
  	//                  if (lastPos > 0)
! 	//                     screen[lastPos-1].setUseGUI(FIELD_RIGHT);
  	//                  else
! 	//                     screen[lastPos].setUseGUI(FIELD_RIGHT);
  	//
  	//               }
  	//               else
! 	//                  screen[lastPos-1].setUseGUI(FIELD_ONE);
  	//
  	//            setEndingAttr(initAttr);
***************
*** 4323,4339 ****
  
  						if (guiInterface && f) {
! //							screen[pos].setUseGUI(ScreenChar.FIELD_LEFT);
! 							planes.setUseGUI(pos,ScreenChar.FIELD_LEFT);
  							f = false;
  						} else {
  
! //							screen[pos].setUseGUI(ScreenChar.FIELD_MIDDLE);
! 							planes.setUseGUI(pos,ScreenChar.FIELD_MIDDLE);
  
  						}
  
  						if (guiInterface && l == 0) {
! //							screen[pos].setUseGUI(ScreenChar.FIELD_RIGHT);
! 							planes.setUseGUI(pos,ScreenChar.FIELD_RIGHT);
  						}
  
--- 4321,4337 ----
  
  						if (guiInterface && f) {
! //							screen[pos].setUseGUI(FIELD_LEFT);
! 							planes.setUseGUI(pos,FIELD_LEFT);
  							f = false;
  						} else {
  
! //							screen[pos].setUseGUI(FIELD_MIDDLE);
! 							planes.setUseGUI(pos,FIELD_MIDDLE);
  
  						}
  
  						if (guiInterface && l == 0) {
! //							screen[pos].setUseGUI(FIELD_RIGHT);
! 							planes.setUseGUI(pos,FIELD_RIGHT);
  						}
  
***************
*** 4341,4346 ****
  					}
  				} else {
! //					screen[pos].setUseGUI(ScreenChar.FIELD_ONE);
! 					planes.setUseGUI(pos,ScreenChar.FIELD_ONE);
  				}
  			}
--- 4339,4344 ----
  					}
  				} else {
! //					screen[pos].setUseGUI(FIELD_ONE);
! 					planes.setUseGUI(pos,FIELD_ONE);
  				}
  			}
***************
*** 4453,4458 ****
  			setDirty(lastPos);
  			if (guiInterface && !isInField(lastPos, false)) {
! //				screen[lastPos].setUseGUI(ScreenChar.NO_GUI);
! 				planes.setUseGUI(lastPos, ScreenChar.NO_GUI);
  			}
  			advancePos();
--- 4451,4456 ----
  			setDirty(lastPos);
  			if (guiInterface && !isInField(lastPos, false)) {
! //				screen[lastPos].setUseGUI(NO_GUI);
! 				planes.setUseGUI(lastPos, NO_GUI);
  			}
  			advancePos();
***************
*** 4507,4515 ****
  			if (guiInterface && !isInField(lastPos, false)) {
  //				int g = screen[lastPos].whichGui;
! //				if (g >= ScreenChar.FIELD_LEFT && g <= ScreenChar.FIELD_ONE)
! //					screen[lastPos].setUseGUI(ScreenChar.NO_GUI);
  				int g = planes.getWhichGUI(lastPos);
! 				if (g >= ScreenChar.FIELD_LEFT && g <= ScreenChar.FIELD_ONE)
! 					planes.setUseGUI(lastPos,ScreenChar.NO_GUI);
  			}
  			setDirty(lastPos);
--- 4505,4513 ----
  			if (guiInterface && !isInField(lastPos, false)) {
  //				int g = screen[lastPos].whichGui;
! //				if (g >= FIELD_LEFT && g <= FIELD_ONE)
! //					screen[lastPos].setUseGUI(NO_GUI);
  				int g = planes.getWhichGUI(lastPos);
! 				if (g >= FIELD_LEFT && g <= FIELD_ONE)
! 					planes.setUseGUI(lastPos,NO_GUI);
  			}
  			setDirty(lastPos);
***************
*** 4820,4825 ****
  		for (int x = 0; x < lenScreen; x++) {
  			//         screen[x].setCharAndAttr(' ',initAttr,false);
! //			screen[x].setUseGUI(ScreenChar.NO_GUI);
!          planes.setUseGUI(x,ScreenChar.NO_GUI);
  		}
  		dirty.setBounds(tArea.getBounds());
--- 4818,4823 ----
  		for (int x = 0; x < lenScreen; x++) {
  			//         screen[x].setCharAndAttr(' ',initAttr,false);
! //			screen[x].setUseGUI(NO_GUI);
!          planes.setUseGUI(x,NO_GUI);
  		}
  		dirty.setBounds(tArea.getBounds());
***************
*** 4835,4841 ****
  		for (int x = 0; x < lenScreen; x++) {
  //			screen[x].setCharAndAttr(' ', initAttr, false);
! //			screen[x].setUseGUI(ScreenChar.NO_GUI);
  			planes.setScreenCharAndAttr(x,' ', initAttr, false);
! 			planes.setUseGUI(x, ScreenChar.NO_GUI);
  		}
  		dirty.setBounds(tArea.getBounds());
--- 4833,4839 ----
  		for (int x = 0; x < lenScreen; x++) {
  //			screen[x].setCharAndAttr(' ', initAttr, false);
! //			screen[x].setUseGUI(NO_GUI);
  			planes.setScreenCharAndAttr(x,' ', initAttr, false);
! 			planes.setUseGUI(x, NO_GUI);
  		}
  		dirty.setBounds(tArea.getBounds());



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com