Mercurial > 510Connectbot
comparison src/org/tn5250j/framework/tn5250/Screen5250.java @ 152:695d0206eedb
cleanup some obsolete code
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 23 Jun 2014 08:46:13 -0700 |
parents | 8754f293f2fd |
children | 97848d5dd28f |
comparison
equal
deleted
inserted
replaced
151:026f5b85bd63 | 152:695d0206eedb |
---|---|
94 private ScreenOIA oia; | 94 private ScreenOIA oia; |
95 | 95 |
96 // screen planes | 96 // screen planes |
97 protected ScreenPlanes planes; | 97 protected ScreenPlanes planes; |
98 | 98 |
99 //Added by Barry | |
100 private StringBuffer keybuf; | |
101 | |
102 | 99 |
103 | 100 |
104 public Screen5250() { | 101 public Screen5250() { |
105 //Added by Barry | |
106 this.keybuf = new StringBuffer(); | |
107 | |
108 try { | 102 try { |
109 jbInit(); | 103 jbInit(); |
110 } | 104 } |
111 catch (Exception ex) { | 105 catch (Exception ex) { |
112 Log.w(TAG, "In constructor: ", ex); | 106 Log.w(TAG, "In constructor: ", ex); |
611 if (cursorActive) { | 605 if (cursorActive) { |
612 fireCursorChanged(); | 606 fireCursorChanged(); |
613 } | 607 } |
614 } | 608 } |
615 | 609 |
616 //Added by Barry | |
617 public String getKeys() { | |
618 String result = this.keybuf.toString(); | |
619 this.keybuf = new StringBuffer(); | |
620 return result; | |
621 } | |
622 | |
623 /** | 610 /** |
624 * The sendKeys method sends a string of keys to the virtual screen. This | 611 * The sendKeys method sends a string of keys to the virtual screen. This |
625 * method acts as if keystrokes were being typed from the keyboard. The | 612 * method acts as if keystrokes were being typed from the keyboard. The |
626 * keystrokes will be sent to the location given. The string being passed | 613 * keystrokes will be sent to the location given. The string being passed |
627 * can also contain mnemonic values such as [enter] enter key,[tab] tab key, | 614 * can also contain mnemonic values such as [enter] enter key,[tab] tab key, |
922 * @see #sendAid | 909 * @see #sendAid |
923 * | 910 * |
924 */ | 911 */ |
925 | 912 |
926 public synchronized void sendKeys(String text) { | 913 public synchronized void sendKeys(String text) { |
927 this.keybuf.append(text); | |
928 | |
929 if (isStatusErrorCode() && !resetRequired) { | 914 if (isStatusErrorCode() && !resetRequired) { |
930 setCursorActive(false); | 915 setCursorActive(false); |
931 simulateMnemonic(getMnemonicValue("[reset]")); | 916 simulateMnemonic(getMnemonicValue("[reset]")); |
932 setCursorActive(true); | 917 setCursorActive(true); |
933 } | 918 } |
957 if (oia.isKeysBuffered()) { | 942 if (oia.isKeysBuffered()) { |
958 if (bufferedKeys != null) { | 943 if (bufferedKeys != null) { |
959 text = bufferedKeys + text; | 944 text = bufferedKeys + text; |
960 } | 945 } |
961 | 946 |
962 // if (text.length() == 0) { | |
963 oia.setKeysBuffered(false); | 947 oia.setKeysBuffered(false); |
964 // } | |
965 bufferedKeys = null; | 948 bufferedKeys = null; |
966 } | 949 } |
967 | 950 |
968 // check to see if position is in a field and if it is then change | 951 // check to see if position is in a field and if it is then change |
969 // current field to that field | 952 // current field to that field |
970 isInField(lastPos, true); | 953 isInField(lastPos, true); |
971 | 954 |
972 if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { | 955 if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { |
973 // setCursorOff2(); | |
974 setCursorActive(false); | 956 setCursorActive(false); |
975 simulateKeyStroke(text.charAt(0)); | 957 simulateKeyStroke(text.charAt(0)); |
976 setCursorActive(true); | 958 setCursorActive(true); |
977 // setCursorOn2(); | |
978 // System.out.println(" text one"); | |
979 } | 959 } |
980 else { | 960 else { |
981 strokenizer.setKeyStrokes(text); | 961 strokenizer.setKeyStrokes(text); |
982 String s; | 962 String s; |
983 boolean done = false; | 963 boolean done = false; |