home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 October / DPPCPRO1098.ISO / Hotdog / files / snagpack.exe / WIZINFO.CLASS (.txt) < prev    next >
Encoding:
Java Class File  |  1997-11-21  |  4.6 KB  |  170 lines

  1. import java.awt.Image;
  2. import java.net.MalformedURLException;
  3. import java.net.URL;
  4. import java.util.Hashtable;
  5. import java.util.NoSuchElementException;
  6. import java.util.StringTokenizer;
  7.  
  8. public class wizinfo {
  9.    private static Hashtable functionStore = new Hashtable();
  10.    private Image theImage = null;
  11.    public URL baseURL;
  12.    public String picString;
  13.    private int functions = 1;
  14.    private String destinations = null;
  15.    private String target = new String("_self");
  16.    private int steps = 4;
  17.    private int delay = 0;
  18.    private int repeatRotate = 0;
  19.    // $FF: renamed from: x int
  20.    public int field_0;
  21.    // $FF: renamed from: y int
  22.    public int field_1;
  23.  
  24.    public Image getImageData() {
  25.       return this.theImage;
  26.    }
  27.  
  28.    public void setImageData(Image var1) {
  29.       this.theImage = var1;
  30.    }
  31.  
  32.    public String getFrame() {
  33.       return new String(this.target);
  34.    }
  35.  
  36.    public int getImageDelay() {
  37.       return this.delay;
  38.    }
  39.  
  40.    public void parseFunction(String var1) {
  41.       StringTokenizer var2 = new StringTokenizer(var1, ",");
  42.       int var3 = var2.countTokens();
  43.  
  44.       try {
  45.          if (var3 > 5) {
  46.             String var4 = new String(var2.nextToken().trim());
  47.             int var5 = var4.lastIndexOf("/");
  48.             if (var5 == -1 && var5 != var4.length()) {
  49.                this.baseURL = null;
  50.                this.picString = var4;
  51.             } else {
  52.                try {
  53.                   this.baseURL = new URL(var4.substring(0, var5 + 1));
  54.                   System.out.println("baseURL -" + this.baseURL.toString());
  55.                   this.picString = new String(var4.substring(var5 + 1));
  56.                   System.out.println("image -" + this.picString);
  57.                } catch (MalformedURLException var6) {
  58.                   this.baseURL = null;
  59.                   this.picString = var4;
  60.                }
  61.             }
  62.          } else {
  63.             this.baseURL = null;
  64.             this.picString = "";
  65.          }
  66.  
  67.          this.field_0 = Integer.parseInt(var2.nextToken().trim());
  68.          this.field_1 = Integer.parseInt(var2.nextToken().trim());
  69.          this.functions = this.whichFunction(var2.nextToken().trim());
  70.          this.steps = Integer.parseInt(var2.nextToken().trim());
  71.          this.delay = Integer.parseInt(var2.nextToken().trim());
  72.          if (var2.hasMoreTokens()) {
  73.             this.destinations = var2.nextToken().trim();
  74.             if (var2.hasMoreTokens()) {
  75.                this.target = var2.nextToken().trim();
  76.             }
  77.          }
  78.       } catch (NoSuchElementException var7) {
  79.          System.out.println("Could not determine what to do with - " + var1);
  80.       } catch (Exception var8) {
  81.          System.out.println("param not in proper format - " + var1);
  82.       }
  83.  
  84.    }
  85.  
  86.    public String getDest() {
  87.       return this.destinations == null ? null : new String(this.destinations);
  88.    }
  89.  
  90.    public int getMoveRate() {
  91.       return this.steps;
  92.    }
  93.  
  94.    public int getRepeatNum() {
  95.       return this.repeatRotate;
  96.    }
  97.  
  98.    public void setRepeatNum(int var1) {
  99.       this.repeatRotate = var1;
  100.    }
  101.  
  102.    public int getFunction() {
  103.       return this.functions;
  104.    }
  105.  
  106.    private int whichFunction(String var1) {
  107.       try {
  108.          int var2 = (Integer)functionStore.get(var1);
  109.          return var2;
  110.       } catch (Exception var3) {
  111.          return 1;
  112.       }
  113.    }
  114.  
  115.    public static void setTable() {
  116.       functionStore.put("scrollleft", new Integer(1));
  117.       functionStore.put("scrollright", new Integer(2));
  118.       functionStore.put("scrollup", new Integer(3));
  119.       functionStore.put("scrolldown", new Integer(4));
  120.       functionStore.put("appearremove", new Integer(7));
  121.       functionStore.put("remove", new Integer(8));
  122.       functionStore.put("appear", new Integer(9));
  123.       functionStore.put("rotatevertsmall", new Integer(10));
  124.       functionStore.put("rotatehorzsmall", new Integer(11));
  125.       functionStore.put("rotatevertgrow", new Integer(12));
  126.       functionStore.put("rotatehorzgrow", new Integer(13));
  127.       functionStore.put("growup", new Integer(20));
  128.       functionStore.put("shrinkdown", new Integer(21));
  129.       functionStore.put("squeezeright", new Integer(22));
  130.       functionStore.put("squeezeleft", new Integer(23));
  131.       functionStore.put("imageshrink", new Integer(30));
  132.       functionStore.put("squeeze", new Integer(30));
  133.       functionStore.put("imagegrow", new Integer(31));
  134.       functionStore.put("imagefadein", new Integer(40));
  135.       functionStore.put("imagefadeout", new Integer(41));
  136.       functionStore.put("oscrollleft", new Integer(50));
  137.       functionStore.put("oscrollright", new Integer(51));
  138.       functionStore.put("oscrollup", new Integer(52));
  139.       functionStore.put("oscrolldown", new Integer(53));
  140.       functionStore.put("revealup", new Integer(60));
  141.       functionStore.put("revealdown", new Integer(61));
  142.       functionStore.put("revealleft", new Integer(62));
  143.       functionStore.put("revealright", new Integer(63));
  144.       functionStore.put("revealout", new Integer(64));
  145.       functionStore.put("revealin", new Integer(65));
  146.       functionStore.put("reveallefttop", new Integer(66));
  147.       functionStore.put("revealrighttop", new Integer(67));
  148.       functionStore.put("revealleftbottom", new Integer(68));
  149.       functionStore.put("revealrightbottom", new Integer(69));
  150.       functionStore.put("wipeup", new Integer(70));
  151.       functionStore.put("wipedown", new Integer(71));
  152.       functionStore.put("wipeleft", new Integer(72));
  153.       functionStore.put("wiperight", new Integer(73));
  154.       functionStore.put("wipein", new Integer(74));
  155.       functionStore.put("wipeoutcenter", new Integer(75));
  156.       functionStore.put("fade", new Integer(80));
  157.       functionStore.put("elevatordoor", new Integer(81));
  158.       functionStore.put("checkboard", new Integer(90));
  159.       functionStore.put("doubleslide", new Integer(91));
  160.       functionStore.put("slidingdoor", new Integer(92));
  161.       functionStore.put("trailsleft", new Integer(200));
  162.       functionStore.put("trailsright", new Integer(201));
  163.       functionStore.put("trailsdown", new Integer(202));
  164.       functionStore.put("trailsup", new Integer(203));
  165.       functionStore.put("spiralin", new Integer(204));
  166.       functionStore.put("spiralout", new Integer(205));
  167.       functionStore.put("slider", new Integer(206));
  168.    }
  169. }
  170.