home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2002 June / INTERNET92.ISO / pc / software / windows / building / visual_dhtml / visualdhtmlwin9x_nt.exe / OCdgBill.___ (.txt) < prev    next >
Encoding:
Java Class File  |  2001-10-19  |  2.3 KB  |  92 lines

  1. import java.awt.Color;
  2. import java.awt.Component;
  3. import java.awt.Image;
  4.  
  5. public class OCdgBill extends OCdg {
  6.    private int desc_index = -1;
  7.    private int last_sub;
  8.    boolean[] simg_status;
  9.    private String[] m_cur_image_loadwhere;
  10.    private Color m_bgcolor;
  11.    private String[] m_imagefile;
  12.    private String[] m_switchfile;
  13.    private int[] m_pic_xcord;
  14.    private int[] m_pic_ycord;
  15.    private int[] m_menu_xcord;
  16.    private int[] m_menu_ycord;
  17.    private int num_images;
  18.    private int[] pic_width;
  19.    private int[] pic_height;
  20.    private Image[] s_picture;
  21.  
  22.    public void DrawApplet() {
  23.       if (this.desc_index >= 0) {
  24.          super.off = ((Component)this).createImage(super.appWidth, super.appHeight);
  25.          super.g_off = super.off.getGraphics();
  26.          super.g_off.setColor(this.m_bgcolor);
  27.          super.g_off.fillRect(0, 0, super.appWidth, super.appHeight);
  28.          ((Component)this).getGraphics();
  29.          ACutil var1 = new ACutil();
  30.          if ((this.s_picture[this.desc_index] = var1.getImage(this.m_imagefile[this.desc_index])) != null) {
  31.             this.simg_status[this.desc_index] = true;
  32.             super.g_off.drawImage(this.s_picture[this.desc_index], 0, 0, this);
  33.          }
  34.  
  35.       }
  36.    }
  37.  
  38.    public OCdgBill() {
  39.       this.m_bgcolor = Color.black;
  40.    }
  41.  
  42.    public void initDefault() {
  43.       String var1 = ((OCdg)this).getParameterDefault("bgcolor");
  44.       if (var1 != null) {
  45.          this.m_bgcolor = occcolor.ConvertColor(var1);
  46.       }
  47.  
  48.    }
  49.  
  50.    public void initSpecifics() {
  51.       this.desc_index = -1;
  52.       boolean var2 = false;
  53.       this.num_images = super.spe_pv.size();
  54.       this.m_imagefile = new String[this.num_images];
  55.       this.m_pic_xcord = new int[this.num_images];
  56.       this.m_pic_ycord = new int[this.num_images];
  57.       this.pic_width = new int[this.num_images];
  58.       this.pic_height = new int[this.num_images];
  59.       this.s_picture = new Image[this.num_images];
  60.       this.simg_status = new boolean[this.num_images];
  61.  
  62.       for(int var5 = 0; var5 < this.num_images; ++var5) {
  63.          String var1 = ((OCdg)this).getParameterSpecific("imagefile", var5);
  64.          if (var1 != null) {
  65.             this.m_imagefile[var5] = new String(var1);
  66.          } else {
  67.             this.m_imagefile[var5] = new String("-1");
  68.          }
  69.  
  70.          var1 = ((OCdg)this).getParameterSpecific("picxy", var5);
  71.          if (var1 != null) {
  72.             int[] var3 = occcord.getIntValues(var1, ",", 2);
  73.             if (var3 != null) {
  74.                this.m_pic_xcord[var5] = var3[0];
  75.                this.m_pic_ycord[var5] = var3[1];
  76.             }
  77.          }
  78.       }
  79.  
  80.    }
  81.  
  82.    public void updateDisplay(int var1) {
  83.       this.desc_index = var1;
  84.       if (!super.first_run) {
  85.          this.DrawApplet();
  86.          ((OCdg)this).drawAppOff();
  87.          ((OCdg)this).paintIt();
  88.       }
  89.  
  90.    }
  91. }
  92.