Blame |
Last modification |
View Log
| RSS feed
package dongfang.mkt.ui.offscreendisplay;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import dongfang.mkt.frames.OSDDataResponseFrame;
public class SimpleOSDView
extends JPanel implements OSDDataConsumer
{
MapImageView map =
new MapImageView
();
VariousInfoPane info =
new VariousInfoPane
();
final static int width =
1440;
final static int height =
977;
final static int mapwidth =
1132;
final static int infowidth = width - mapwidth
;
/*
* private static final int MAPWIDTH = (int)(1132);
private static final int MAPHEIGHT = (int)(977);
*/
public void init
() {
setSize
(width, height
);
setLayout
(new BorderLayout());
map.
init();
add
(map,
BorderLayout.
CENTER);
info.
init();
info.
setSize(infowidth, height
);
add
(info,
BorderLayout.
EAST);
}
public void update
(OSDDataResponseFrame data,
long timestamp
) {
map.
update(data, timestamp
);
info.
update(data, timestamp
);
}
public void setThatWidth
() {
info.
setWidth(infowidth
);
}
}