comparison src/com/five_ten_sg/connectbot/transport/TN5250.java @ 45:80dcebe51af2 tn5250

start tn5250 integration
author Carl Byington <carl@five-ten-sg.com>
date Wed, 11 Jun 2014 09:54:18 -0700
parents 6b0f1ece1d91
children 34ce32c4e807
comparison
equal deleted inserted replaced
44:959ebe0247b5 45:80dcebe51af2
61 static final Pattern hostmask; 61 static final Pattern hostmask;
62 static { 62 static {
63 hostmask = Pattern.compile("^([0-9a-z.-]+)(:(\\d+))?$", Pattern.CASE_INSENSITIVE); 63 hostmask = Pattern.compile("^([0-9a-z.-]+)(:(\\d+))?$", Pattern.CASE_INSENSITIVE);
64 } 64 }
65 65
66
67 class vt320x5250 extends vt320 {
68 @Override
69 public void debug(String s) {
70 Log.d(TAG, s);
71 }
72 @Override
73 public void write(byte[] b) {
74 }
75 @Override
76 public void write(int b) {
77 }
78 // bridge.monitor placement of new characters
79 @Override
80 public void putChar(int c, int l, char ch, int attributes) {
81 if (bridge.monitor != null) bridge.monitor.screenChanged(l, c);
82 super.putChar(c, l, ch, attributes);
83 }
84 @Override
85 public void setCursorPosition(int c, int l) {
86 if (bridge.monitor != null) bridge.monitor.cursorMove(l, c);
87 super.setCursorPosition(c, l);
88 }
89 };
90
91
66 class Terminal5250KeyListener extends TerminalKeyListener { 92 class Terminal5250KeyListener extends TerminalKeyListener {
67 93 public TerminalKeyListener(TerminalManager manager,
94 TerminalBridge bridge,
95 vt320 buffer,
96 String encoding) {
97 super(manager, bridge, buffer, encoding);
98 }
68 }; 99 };
69 100
70 public TN5250() { 101 public TN5250() {
71 super(); 102 super();
72 } 103 }
217 // do nothing 248 // do nothing
218 } 249 }
219 250
220 251
221 @Override 252 @Override
253 public vt320 getTransportBuffer() {
254 buffer = new vt320x5250();
255 return super();
256 }
257
258
259 @Override
222 public int getDefaultPort() { 260 public int getDefaultPort() {
223 return DEFAULT_PORT; 261 return DEFAULT_PORT;
224 } 262 }
225 263
226 264