Mercurial > hg > Applications > AliceVNC
annotate src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java @ 5:c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
author | YU |
---|---|
date | Sat, 13 Sep 2014 20:55:48 +0900 |
parents | 9a24e36d8ed7 |
children | 65d989192d63 |
rev | line source |
---|---|
2 | 1 package jp.ac.u_ryukyu.alicevnc; |
2 | |
5
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
3 import java.util.ArrayList; |
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
4 |
2 | 5 import com.glavsoft.exceptions.TransportException; |
4 | 6 import com.glavsoft.rfb.encoding.EncodingType; |
2 | 7 import com.glavsoft.rfb.encoding.decoder.DecodeInfo; |
8 import com.glavsoft.rfb.encoding.decoder.FramebufferUpdateRectangle; | |
9 import com.glavsoft.rfb.encoding.decoder.ZRLEDecoder; | |
10 | |
11 import alice.codesegment.CodeSegment; | |
12 import alice.datasegment.CommandType; | |
13 import alice.datasegment.Receiver; | |
14 | |
15 public class ReceiveUpdateRectangle extends CodeSegment{ | |
16 | |
17 private Receiver info = ids.create(CommandType.PEEK); | |
18 private Receiver info1 = ids.create(CommandType.TAKE); | |
5
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
19 private Receiver info2= ids.create(CommandType.PEEK); |
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
20 |
2 | 21 public ReceiveUpdateRectangle(){ |
22 info.setKey("Holder"); | |
23 info1.setKey("decodeInfo"); | |
5
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
24 info2.setKey("_CLIST"); |
2 | 25 } |
5
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
26 |
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
27 |
2 | 28 public void run() { |
29 ZRLEDecoder decoder = new ZRLEDecoder(); | |
30 RenderAndControllerHolder holder = info.asClass(RenderAndControllerHolder.class); | |
31 DecodeInfo decodeInfo = info1.asClass(DecodeInfo.class); | |
5
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
32 |
2 | 33 try { |
34 decoder.decode(decodeInfo, holder.renderer); | |
4 | 35 FramebufferUpdateRectangle rect = new FramebufferUpdateRectangle( |
36 decodeInfo.x, decodeInfo.y, decodeInfo.width, decodeInfo.height); | |
5
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
37 |
4 | 38 rect.encodingType = EncodingType.byId(decodeInfo.encodingTypeId); |
5
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
39 |
2 | 40 holder.repaintController.repaintBitmap(rect); |
41 } catch (TransportException e) { | |
42 e.printStackTrace(); | |
43 } | |
5
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
44 |
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
45 |
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
46 @SuppressWarnings("unchecked") |
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
47 ArrayList<String> clist = info2.asClass(ArrayList.class); |
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
48 for (String node : clist){ |
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
49 if (!"parent".equals(node)) |
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
50 ods.put(node, "decodeInfo", info1.getVal()); |
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
51 } |
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
52 |
2 | 53 new ReceiveUpdateRectangle(); |
5
c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
YU
parents:
4
diff
changeset
|
54 |
2 | 55 } |
56 | |
57 } |