Mercurial > 510Connectbot
comparison src/org/tn5250j/framework/Tn5250jEvent.java @ 3:e8d2a24e85c6 tn5250
adding tn5250 files
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 22 May 2014 12:11:10 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:a01665cb683d | 3:e8d2a24e85c6 |
---|---|
1 /**Copyright (C) 2004 Seagull Software | |
2 * | |
3 * This library is free software; you can redistribute it and/or | |
4 * modify it under the terms of the GNU Lesser General Public | |
5 * License as published by the Free Software Foundation; either | |
6 * version 2.1 of the License, or (at your option) any later version. | |
7 * | |
8 * This library is distributed in the hope that it will be useful, | |
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 * Lesser General Public License for more details. | |
12 * | |
13 * You should have received a copy of the GNU Lesser General Public | |
14 * License along with this library; if not, write to the Free Software | |
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
16 * | |
17 *@author bvansomeren (bvansomeren@seagull.nl) | |
18 */ | |
19 package org.tn5250j.framework; | |
20 | |
21 //import org.tn5250j.Screen5250; | |
22 import org.tn5250j.framework.tn5250.Screen5250; | |
23 import org.tn5250j.framework.tn5250.ScreenFields; | |
24 //import org.tn5250j.ScreenFields; | |
25 | |
26 public class Tn5250jEvent { | |
27 | |
28 private Screen5250 screen; | |
29 private char[] data; | |
30 private ScreenFields fields; | |
31 | |
32 public Tn5250jEvent() { | |
33 screen = null; | |
34 } | |
35 | |
36 public Tn5250jEvent(Screen5250 newscreen) { | |
37 screen = newscreen; | |
38 // Object[] original = (Object[])screen.getCharacters(); | |
39 // data = new ScreenChar[original.length]; | |
40 // System.arraycopy(original, 0, data, 0, original.length); | |
41 | |
42 // changed by Kenneth - This should be replaced with a call to | |
43 // getPlane method of screen object when they are implemented. These | |
44 // new methods will also do the array copy. | |
45 char[] original = screen.getCharacters(); | |
46 data = new char[original.length]; | |
47 System.arraycopy(original, 0, data, 0, original.length); | |
48 this.fields = newscreen.getScreenFields(); | |
49 } | |
50 | |
51 public char[] getData() { | |
52 return data; | |
53 } | |
54 | |
55 public Screen5250 getScreen() { | |
56 return screen; | |
57 } | |
58 | |
59 public ScreenFields getFields() { | |
60 return this.fields; | |
61 } | |
62 } |