Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1568 | - | 1 | package dongfang.mkt.ui.offscreendisplay; |
2 | |||
3 | import java.awt.BorderLayout; |
||
4 | |||
5 | import javax.swing.JPanel; |
||
6 | |||
7 | import dongfang.mkt.frames.OSDDataResponseFrame; |
||
8 | |||
9 | public class SimpleOSDView extends JPanel implements OSDDataConsumer { |
||
10 | |||
11 | MapImageView map = new MapImageView(); |
||
12 | VariousInfoPane info = new VariousInfoPane(); |
||
13 | |||
14 | final static int width = 1440; |
||
15 | final static int height = 977; |
||
16 | |||
17 | final static int mapwidth = 1132; |
||
18 | final static int infowidth = width - mapwidth; |
||
19 | |||
20 | /* |
||
21 | * private static final int MAPWIDTH = (int)(1132); |
||
22 | private static final int MAPHEIGHT = (int)(977); |
||
23 | */ |
||
24 | |||
25 | public void init() { |
||
26 | setSize(width, height); |
||
27 | setLayout(new BorderLayout()); |
||
28 | map.init(); |
||
29 | add(map, BorderLayout.CENTER); |
||
30 | info.init(); |
||
31 | info.setSize(infowidth, height); |
||
32 | add(info, BorderLayout.EAST); |
||
33 | } |
||
34 | |||
35 | public void update(OSDDataResponseFrame data, long timestamp) { |
||
36 | map.update(data, timestamp); |
||
37 | info.update(data, timestamp); |
||
38 | } |
||
39 | |||
40 | public void setThatWidth() { |
||
41 | info.setWidth(infowidth); |
||
42 | } |
||
43 | } |