comparison src/org/tn5250j/framework/tn5250/Screen5250.java @ 105:1b5887a3bb1c

setField() needs to dirty the modified screen positions
author Carl Byington <carl@five-ten-sg.com>
date Wed, 18 Jun 2014 10:36:46 -0700
parents d8da9f32074c
children 12425771714d
comparison
equal deleted inserted replaced
104:171e0a977544 105:1b5887a3bb1c
2682 // setCursorOn(); 2682 // setCursorOn();
2683 updateCursorLoc(); 2683 updateCursorLoc();
2684 } 2684 }
2685 2685
2686 /* 2686 /*
2687 * set the content of the field at (l,c) to d 2687 * set the content of the field at (l,c) to data
2688 * if l == -1, set the current field contents to d 2688 * if l == -1, set the current field contents to data
2689 */ 2689 */
2690 public void setField(int l, int c, char [] d) { 2690 public void setField(int l, int c, char [] data) {
2691 ScreenField cf; 2691 ScreenField cf;
2692 if (l >= 0) { 2692 if (l >= 0) {
2693 int position = l * numCols + c; 2693 int position = l * numCols + c;
2694 isInField(position, true); 2694 isInField(position, true);
2695 } 2695 }
2696 if ((d != null) && (d.length > 0)) { 2696 if ((data != null) && (data.length > 0)) {
2697 cf = screenFields.getCurrentField(); 2697 cf = screenFields.getCurrentField();
2698 cf.setString(new String(d)); 2698 cf.setString(new String(data));
2699 lastPos = cf.getStartPos(); 2699 lastPos = cf.getStartPos();
2700 setDirty(lastPos);
2701 setDirty(lastPos + df.getLength());
2700 } 2702 }
2701 updateDirty(); 2703 updateDirty();
2702 } 2704 }
2703 2705
2704 /** 2706 /**