comparison src/com/five_ten_sg/connectbot/transport/TN5250.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 8a6c7c7ffe0d
children
comparison
equal deleted inserted replaced
305:d2b303406d63 307:071eccdff8ea
161 // monitor simulating key depress 161 // monitor simulating key depress
162 @Override 162 @Override
163 public void keyDepressed(int keyCode, char keyChar, int modifiers) { 163 public void keyDepressed(int keyCode, char keyChar, int modifiers) {
164 if (mnemonics.containsKey(keyCode)) { 164 if (mnemonics.containsKey(keyCode)) {
165 String s = mnemonics.get(keyCode); 165 String s = mnemonics.get(keyCode);
166
166 if (s != "") screen52.sendKeys(s); 167 if (s != "") screen52.sendKeys(s);
167 } 168 }
168 } 169 }
169 170
170 // terminal key listener found special key, send notification to monitor 171 // terminal key listener found special key, send notification to monitor
175 176
176 // terminal key listener sending to local screen 177 // terminal key listener sending to local screen
177 @Override 178 @Override
178 public void write(byte[] b) { 179 public void write(byte[] b) {
179 screen52.sendKeys(new String(b)); 180 screen52.sendKeys(new String(b));
181
180 if (bridge.monitor != null) bridge.monitor.testMoved(); 182 if (bridge.monitor != null) bridge.monitor.testMoved();
181 } 183 }
182 @Override 184 @Override
183 public void write(int b) { 185 public void write(int b) {
184 if (controls.containsKey(b)) keyPressed(controls.get(b), ' ', 0); 186 if (controls.containsKey(b)) keyPressed(controls.get(b), ' ', 0);
185 else screen52.sendKeys(new String(new byte[] {(byte)b})); 187 else screen52.sendKeys(new String(new byte[] {(byte)b}));
188
186 if (bridge.monitor != null) bridge.monitor.testMoved(); 189 if (bridge.monitor != null) bridge.monitor.testMoved();
187 } 190 }
188 @Override 191 @Override
189 public void keyPressed(int keyCode, char keyChar, int modifiers) { 192 public void keyPressed(int keyCode, char keyChar, int modifiers) {
190 keyDepressed(keyCode, keyChar, modifiers); 193 keyDepressed(keyCode, keyChar, modifiers);
194
191 if (bridge.monitor != null) bridge.monitor.testMoved(); 195 if (bridge.monitor != null) bridge.monitor.testMoved();
192 } 196 }
193 197
194 // 5250 writing to the screen 198 // 5250 writing to the screen
195 // test for changed screen contents 199 // test for changed screen contents
279 handler = new tnvt(screen52, true, true, bridge, manager); 283 handler = new tnvt(screen52, true, true, bridge, manager);
280 screen52.setVT(handler); 284 screen52.setVT(handler);
281 screen52.setBuffer(buffer); 285 screen52.setBuffer(buffer);
282 bridge.addFontSizeChangedListener(screen52); 286 bridge.addFontSizeChangedListener(screen52);
283 connected = handler.connect(host, homeDirectory, buffer); 287 connected = handler.connect(host, homeDirectory, buffer);
288
284 if (connected) bridge.onConnected(); 289 if (connected) bridge.onConnected();
285 } 290 }
286 291
287 292
288 /** 293 /**
433 String nickname = uri.getFragment(); 438 String nickname = uri.getFragment();
434 439
435 if (nickname == null || nickname.length() == 0) { 440 if (nickname == null || nickname.length() == 0) {
436 nickname = getDefaultNickname(host.getUsername(), host.getHostname(), host.getPort()); 441 nickname = getDefaultNickname(host.getUsername(), host.getHostname(), host.getPort());
437 } 442 }
443
438 host.setNickname(nickname); 444 host.setNickname(nickname);
439
440 return host; 445 return host;
441 } 446 }
442 447
443 448
444 public String getFormatHint(Context context) { 449 public String getFormatHint(Context context) {