Mercurial > 510Connectbot
comparison src/org/tn5250j/framework/tn5250/Screen5250.java @ 307:071eccdff8ea ganymed
fix java formatting
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Jul 2014 14:16:58 -0700 |
parents | 561caa2f7c17 |
children | 29076621bab0 |
comparison
equal
deleted
inserted
replaced
305:d2b303406d63 | 307:071eccdff8ea |
---|---|
1325 // we toggle it | 1325 // we toggle it |
1326 oia.setInsertMode(oia.isInsertMode() ? false : true); | 1326 oia.setInsertMode(oia.isInsertMode() ? false : true); |
1327 break; | 1327 break; |
1328 | 1328 |
1329 case HOME: | 1329 case HOME: |
1330 | |
1330 // position to the home position set | 1331 // position to the home position set |
1331 if (lastPos + numCols + 1 != homePos) { | 1332 if (lastPos + numCols + 1 != homePos) { |
1332 goto_XY(homePos - numCols - 1); | 1333 goto_XY(homePos - numCols - 1); |
1333 isInField(); | 1334 isInField(); |
1334 } | 1335 } |
2659 public void setField(int l, int c, char [] data) { | 2660 public void setField(int l, int c, char [] data) { |
2660 ScreenField cf; | 2661 ScreenField cf; |
2661 | 2662 |
2662 if (l >= 0) { | 2663 if (l >= 0) { |
2663 lastPos = l * numCols + c; | 2664 lastPos = l * numCols + c; |
2665 | |
2664 while (!isInField()) advancePos(); | 2666 while (!isInField()) advancePos(); |
2667 | |
2665 setDirty(lastPos); | 2668 setDirty(lastPos); |
2666 fireCursorChanged(); | 2669 fireCursorChanged(); |
2667 } | 2670 } |
2668 | 2671 |
2669 if ((data != null) && (data.length > 0)) { | 2672 if ((data != null) && (data.length > 0)) { |
2671 cf.setString(new String(data)); | 2674 cf.setString(new String(data)); |
2672 lastPos = cf.getStartPos(); | 2675 lastPos = cf.getStartPos(); |
2673 setDirty(lastPos); | 2676 setDirty(lastPos); |
2674 setDirty(lastPos + cf.getLength()); | 2677 setDirty(lastPos + cf.getLength()); |
2675 lastPos += data.length; | 2678 lastPos += data.length; |
2679 | |
2676 if (!isInField()) { | 2680 if (!isInField()) { |
2677 gotoFieldNext(); | 2681 gotoFieldNext(); |
2678 isInField(); | 2682 isInField(); |
2679 cf = screenFields.getCurrentField(); | 2683 cf = screenFields.getCurrentField(); |
2680 lastPos = cf.getStartPos(); | 2684 lastPos = cf.getStartPos(); |
2681 } | 2685 } |
2686 | |
2682 setDirty(lastPos); | 2687 setDirty(lastPos); |
2683 fireCursorChanged(); | 2688 fireCursorChanged(); |
2684 } | 2689 } |
2685 | 2690 |
2686 updateDirty(); | 2691 updateDirty(); |
3566 * | 3571 * |
3567 * @param i | 3572 * @param i |
3568 */ | 3573 */ |
3569 protected void changePos(int i) { | 3574 protected void changePos(int i) { |
3570 lastPos += i; | 3575 lastPos += i; |
3576 | |
3571 while (lastPos < 0) lastPos += lenScreen; | 3577 while (lastPos < 0) lastPos += lenScreen; |
3578 | |
3572 while (lastPos >= lenScreen) lastPos -= lenScreen; | 3579 while (lastPos >= lenScreen) lastPos -= lenScreen; |
3573 } | 3580 } |
3574 | 3581 |
3575 | 3582 |
3576 protected void goHome() { | 3583 protected void goHome() { |
3743 dirtyScreen.setBounds(0, lenScreen - 1, 0, 0); | 3750 dirtyScreen.setBounds(0, lenScreen - 1, 0, 0); |
3744 updateDirty(); | 3751 updateDirty(); |
3745 } | 3752 } |
3746 | 3753 |
3747 public void onFontSizeChanged(float size) { | 3754 public void onFontSizeChanged(float size) { |
3748 fireScreenChanged(0, 0, numRows-1, numCols-1); | 3755 fireScreenChanged(0, 0, numRows - 1, numCols - 1); |
3749 } | 3756 } |
3750 | 3757 |
3751 /** | 3758 /** |
3752 * repaint part of the screen | 3759 * repaint part of the screen |
3753 * | 3760 * |