tn5250j/src/org/tn5250j/framework/tn5250 Screen5250.java,1.8,1.9 tnvt.java,1.6,1.7 ScreenField.java,1.3,1.4

"Kenneth J. Pouncey" <[email protected]> Sun, 01 Aug 2004 21:14:32 +0000
Newsgroups gmane.comp.java.tn5250j.cvs
Message-ID <[email protected]>
Update of /cvsroot/tn5250j/tn5250j/src/org/tn5250j/framework/tn5250
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31416/src/org/tn5250j/framework/tn5250

Modified Files:
	Screen5250.java tnvt.java ScreenField.java 
Log Message:
Created new method named getColumns

Index: tnvt.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/framework/tn5250/tnvt.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** tnvt.java	1 Aug 2004 14:36:57 -0000	1.6
--- tnvt.java	1 Aug 2004 21:14:29 -0000	1.7
***************
*** 1265,1269 ****
  
  		int rows = screen52.getRows();
! 		int cols = screen52.getCols();
  		boolean att = false;
  		int off = 0;
--- 1265,1269 ----
  
  		int rows = screen52.getRows();
! 		int cols = screen52.getColumns();
  		boolean att = false;
  		int off = 0;
***************
*** 1316,1320 ****
  
  		sc.write((byte) screen52.getRows()); // store the current size
! 		sc.write((byte) screen52.getCols()); //    ""
  
  		int cp = screen52.getCurrentPos(); // save off current position
--- 1316,1320 ----
  
  		sc.write((byte) screen52.getRows()); // store the current size
! 		sc.write((byte) screen52.getColumns()); //    ""
  
  		int cp = screen52.getCurrentPos(); // save off current position
***************
*** 1326,1330 ****
  
  		int rows = screen52.getRows(); // store the current size
! 		int cols = screen52.getCols(); //    ""
  		byte[] sa = new byte[rows * cols];
  		fillScreenArray(sa, rows, cols);
--- 1326,1330 ----
  
  		int rows = screen52.getRows(); // store the current size
! 		int cols = screen52.getColumns(); //    ""
  		byte[] sa = new byte[rows * cols];
  		fillScreenArray(sa, rows, cols);
***************
*** 1727,1731 ****
  		byte control1 = 0;
  		int saRows = screen52.getRows();
! 		int saCols = screen52.getCols();
  
  		try {
--- 1727,1731 ----
  		byte control1 = 0;
  		int saRows = screen52.getRows();
! 		int saCols = screen52.getColumns();
  
  		try {
***************
*** 1760,1764 ****
  						// a little intelligence here I hope
  						if (row == 1 && col == 2 && toRow == screen52.getRows()
! 								&& toCol == screen52.getCols())
  
  							screen52.clearScreen();
--- 1760,1764 ----
  						// a little intelligence here I hope
  						if (row == 1 && col == 2 && toRow == screen52.getRows()
! 								&& toCol == screen52.getColumns())
  
  							screen52.clearScreen();
***************
*** 1770,1775 ****
  							}
  
! 							int times = ((toRow * screen52.getCols()) + toCol)
! 									- ((row * screen52.getCols()) + col);
  							while (times-- >= 0) {
  								screen52.setChar(repeat);
--- 1770,1775 ----
  							}
  
! 							int times = ((toRow * screen52.getColumns()) + toCol)
! 									- ((row * screen52.getColumns()) + col);
  							while (times-- >= 0) {
  								screen52.setChar(repeat);
***************
*** 1802,1811 ****
  					if (EArow == 1 && EAcol == 2
  							&& toEARow == screen52.getRows()
! 							&& toEACol == screen52.getCols())
  
  						screen52.clearScreen();
  					else {
! 						int times = ((toEARow * screen52.getCols()) + toEACol)
! 								- ((EArow * screen52.getCols()) + EAcol);
  						while (times-- >= 0) {
  							screen52.setChar(EAAttr);
--- 1802,1811 ----
  					if (EArow == 1 && EAcol == 2
  							&& toEARow == screen52.getRows()
! 							&& toEACol == screen52.getColumns())
  
  						screen52.clearScreen();
  					else {
! 						int times = ((toEARow * screen52.getColumns()) + toEACol)
! 								- ((EArow * screen52.getColumns()) + EAcol);
  						while (times-- >= 0) {
  							screen52.setChar(EAAttr);
***************
*** 1830,1834 ****
  					// make sure it is in bounds
  					if (saRow >= 0 && saRow <= screen52.getRows() && saCol >= 0
! 							&& saCol <= screen52.getCols()) {
  						screen52.setCursor(saRow, saCol); // now set screen
  														// position for output
--- 1830,1834 ----
  					// make sure it is in bounds
  					if (saRow >= 0 && saRow <= screen52.getRows() && saCol >= 0
! 							&& saCol <= screen52.getColumns()) {
  						screen52.setCursor(saRow, saCol); // now set screen
  														// position for output

Index: ScreenField.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/framework/tn5250/ScreenField.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ScreenField.java	1 Aug 2004 12:14:22 -0000	1.3
--- ScreenField.java	1 Aug 2004 21:14:29 -0000	1.4
***************
*** 52,56 ****
  //      startRow = row;
  //      startCol = col;
!       startPos = (row * s.getCols()) + col;
        endPos = startPos + length -1;
        cursorProg = 0;
--- 52,56 ----
  //      startRow = row;
  //      startCol = col;
!       startPos = (row * s.getColumns()) + col;
        endPos = startPos + length -1;
        cursorProg = 0;
***************
*** 155,164 ****
     public int getCursorRow() {
  
!       return cursorPos / s.getCols();
     }
  
     public int getCursorCol() {
  
!       return cursorPos % s.getCols();
     }
  
--- 155,164 ----
     public int getCursorRow() {
  
!       return cursorPos / s.getColumns();
     }
  
     public int getCursorCol() {
  
!       return cursorPos % s.getColumns();
     }
  
***************
*** 176,180 ****
        int x = length;
        text.setLength(x);
!       int nc = s.getCols();
        while (x-- > 0) {
  
--- 176,180 ----
        int x = length;
        text.setLength(x);
!       int nc = s.getColumns();
        while (x-- > 0) {
  
***************
*** 398,402 ****
     protected int getKeyPos(int row1, int col1) {
  
!       int x = ((row1 * s.getCols()) + col1);
        int y = x - startPos();
        cursorPos = x;
--- 398,402 ----
     protected int getKeyPos(int row1, int col1) {
  
!       int x = ((row1 * s.getColumns()) + col1);
        int y = x - startPos();
        cursorPos = x;
***************
*** 438,442 ****
     public int startRow() {
  
!       return startPos / s.getCols();
  
     }
--- 438,442 ----
     public int startRow() {
  
!       return startPos / s.getColumns();
  
     }
***************
*** 449,453 ****
     public int startCol() {
  
!       return startPos % s.getCols();
  
     }
--- 449,453 ----
     public int startCol() {
  
!       return startPos % s.getColumns();
  
     }

Index: Screen5250.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Screen5250.java	1 Aug 2004 12:34:24 -0000	1.8
--- Screen5250.java	1 Aug 2004 21:14:29 -0000	1.9
***************
*** 2092,2096 ****
  		//         return 1;
  
! 		int col = pos % (getCols());
  		if (col > 0)
  			return col;
--- 2092,2096 ----
  		//         return 1;
  
! 		int col = pos % (getColumns());
  		if (col > 0)
  			return col;
***************
*** 2340,2344 ****
  	 * @return number of columns
  	 */
! 	public int getCols() {
  
  		return numCols;
--- 2340,2344 ----
  	 * @return number of columns
  	 */
! 	public int getColumns() {
  
  		return numCols;
***************
*** 3128,3132 ****
  		StringBuffer sb = new StringBuffer();
  		char[] s = getScreenAsChars();
! 		int c = getCols();
  		int l = getRows() * c;
  		int col = 0;
--- 3128,3132 ----
  		StringBuffer sb = new StringBuffer();
  		char[] s = getScreenAsChars();
! 		int c = getColumns();
  		int l = getRows() * c;
  		int col = 0;



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com