home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Image;
-
- public class OCdgBill extends OCdg {
- private int desc_index = -1;
- private int last_sub;
- boolean[] simg_status;
- private String[] m_cur_image_loadwhere;
- private Color m_bgcolor;
- private String[] m_imagefile;
- private String[] m_switchfile;
- private int[] m_pic_xcord;
- private int[] m_pic_ycord;
- private int[] m_menu_xcord;
- private int[] m_menu_ycord;
- private int num_images;
- private int[] pic_width;
- private int[] pic_height;
- private Image[] s_picture;
-
- public void DrawApplet() {
- if (this.desc_index >= 0) {
- super.off = ((Component)this).createImage(super.appWidth, super.appHeight);
- super.g_off = super.off.getGraphics();
- super.g_off.setColor(this.m_bgcolor);
- super.g_off.fillRect(0, 0, super.appWidth, super.appHeight);
- ((Component)this).getGraphics();
- ACutil var1 = new ACutil();
- if ((this.s_picture[this.desc_index] = var1.getImage(this.m_imagefile[this.desc_index])) != null) {
- this.simg_status[this.desc_index] = true;
- super.g_off.drawImage(this.s_picture[this.desc_index], 0, 0, this);
- }
-
- }
- }
-
- public OCdgBill() {
- this.m_bgcolor = Color.black;
- }
-
- public void initDefault() {
- String var1 = ((OCdg)this).getParameterDefault("bgcolor");
- if (var1 != null) {
- this.m_bgcolor = occcolor.ConvertColor(var1);
- }
-
- }
-
- public void initSpecifics() {
- this.desc_index = -1;
- boolean var2 = false;
- this.num_images = super.spe_pv.size();
- this.m_imagefile = new String[this.num_images];
- this.m_pic_xcord = new int[this.num_images];
- this.m_pic_ycord = new int[this.num_images];
- this.pic_width = new int[this.num_images];
- this.pic_height = new int[this.num_images];
- this.s_picture = new Image[this.num_images];
- this.simg_status = new boolean[this.num_images];
-
- for(int var5 = 0; var5 < this.num_images; ++var5) {
- String var1 = ((OCdg)this).getParameterSpecific("imagefile", var5);
- if (var1 != null) {
- this.m_imagefile[var5] = new String(var1);
- } else {
- this.m_imagefile[var5] = new String("-1");
- }
-
- var1 = ((OCdg)this).getParameterSpecific("picxy", var5);
- if (var1 != null) {
- int[] var3 = occcord.getIntValues(var1, ",", 2);
- if (var3 != null) {
- this.m_pic_xcord[var5] = var3[0];
- this.m_pic_ycord[var5] = var3[1];
- }
- }
- }
-
- }
-
- public void updateDisplay(int var1) {
- this.desc_index = var1;
- if (!super.first_run) {
- this.DrawApplet();
- ((OCdg)this).drawAppOff();
- ((OCdg)this).paintIt();
- }
-
- }
- }
-