home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VCafe / ddetour.bin / Plane.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-03-19  |  2.2 KB  |  59 lines

  1. import java.applet.Applet;
  2. import java.awt.Color;
  3. import java.awt.Component;
  4. import java.awt.Container;
  5. import java.awt.Font;
  6. import java.awt.LayoutManager;
  7. import java.beans.PropertyVetoException;
  8. import java.net.MalformedURLException;
  9. import java.net.URL;
  10. import symantec.itools.lang.Context;
  11. import symantec.itools.multimedia.Animator;
  12. import symantec.itools.net.RelativeURL;
  13.  
  14. public class Plane extends Applet {
  15.    Animator animatorPlane;
  16.  
  17.    public void addNotify() {
  18.       super.addNotify();
  19.       Context.setDocumentBase(((Applet)this).getDocumentBase());
  20.       ((Container)this).setLayout((LayoutManager)null);
  21.       ((Component)this).setSize(515, 75);
  22.       ((Component)this).setFont(new Font("Dialog", 0, 12));
  23.       ((Component)this).setForeground(new Color(0));
  24.       ((Component)this).setBackground(new Color(16777215));
  25.       this.animatorPlane = new Animator();
  26.       this.animatorPlane.setPreviewMode(true);
  27.  
  28.       try {
  29.          this.animatorPlane.setDelay(300);
  30.       } catch (PropertyVetoException var4) {
  31.       }
  32.  
  33.       try {
  34.          URL[] tempURL = new URL[15];
  35.          tempURL[0] = RelativeURL.getURL("Images/plane01.gif");
  36.          tempURL[1] = RelativeURL.getURL("Images/plane02.gif");
  37.          tempURL[2] = RelativeURL.getURL("Images/plane03.gif");
  38.          tempURL[3] = RelativeURL.getURL("Images/plane04.gif");
  39.          tempURL[4] = RelativeURL.getURL("Images/plane05.gif");
  40.          tempURL[5] = RelativeURL.getURL("Images/plane06.gif");
  41.          tempURL[6] = RelativeURL.getURL("Images/plane07.gif");
  42.          tempURL[7] = RelativeURL.getURL("Images/plane08.gif");
  43.          tempURL[8] = RelativeURL.getURL("Images/plane09.gif");
  44.          tempURL[9] = RelativeURL.getURL("Images/plane10.gif");
  45.          tempURL[10] = RelativeURL.getURL("Images/plane11.gif");
  46.          tempURL[11] = RelativeURL.getURL("Images/plane12.gif");
  47.          tempURL[12] = RelativeURL.getURL("Images/plane13.gif");
  48.          tempURL[13] = RelativeURL.getURL("Images/plane14.gif");
  49.          tempURL[14] = RelativeURL.getURL("Images/plane15.gif");
  50.          this.animatorPlane.setImageList(tempURL);
  51.       } catch (MalformedURLException var2) {
  52.       } catch (PropertyVetoException var3) {
  53.       }
  54.  
  55.       this.animatorPlane.setBounds(193, 2, 128, 71);
  56.       ((Container)this).add(this.animatorPlane);
  57.    }
  58. }
  59.