home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Java / CoolMap / COOLMAP.CLA (.txt) < prev    next >
Encoding:
Java Class File  |  1996-09-17  |  25.8 KB  |  1,020 lines

  1. import java.applet.Applet;
  2. import java.awt.BorderLayout;
  3. import java.awt.Button;
  4. import java.awt.Checkbox;
  5. import java.awt.CheckboxGroup;
  6. import java.awt.Color;
  7. import java.awt.Component;
  8. import java.awt.Container;
  9. import java.awt.Dimension;
  10. import java.awt.Event;
  11. import java.awt.FlowLayout;
  12. import java.awt.Font;
  13. import java.awt.Frame;
  14. import java.awt.Graphics;
  15. import java.awt.GridLayout;
  16. import java.awt.Image;
  17. import java.awt.Label;
  18. import java.awt.Panel;
  19. import java.awt.Rectangle;
  20. import java.awt.TextArea;
  21. import java.awt.TextField;
  22. import java.awt.Window;
  23. import java.awt.image.ImageObserver;
  24. import java.net.MalformedURLException;
  25. import java.net.URL;
  26.  
  27. public class coolmap extends Applet implements Runnable {
  28.    Thread timer;
  29.    imgarea mapImageArea;
  30.    Rectangle mapArea;
  31.    int maxStates = 2;
  32.    Image imgStaticOffScreen;
  33.    Image imgBackground;
  34.    Image imgForeground;
  35.    Graphics gcOff;
  36.    Graphics gcOn;
  37.    Dimension dimOffScreen;
  38.    boolean bInitComplete = false;
  39.    Button borderButton;
  40.    Button saveButton;
  41.    Button resetButton;
  42.    Button delButton;
  43.    Button selButton;
  44.    Button getResultButton;
  45.    Button readmeButton;
  46.    Button adButton;
  47.    CheckboxGroup theMode = new CheckboxGroup();
  48.    Checkbox[] modeBox;
  49.    CheckboxGroup audioMode;
  50.    Checkbox[] audioOption;
  51.    CheckboxGroup openMode;
  52.    Checkbox[] openOption;
  53.    CheckboxGroup hotMode;
  54.    Checkbox[] hotOption;
  55.    CheckboxGroup tipsMode;
  56.    Checkbox[] tipsOption;
  57.    String[] borderButtonLabel;
  58.    TextField getHint;
  59.    TextField getURL;
  60.    TextField getAU;
  61.    TextField getImageName;
  62.    TextArea getResult;
  63.    Label resultLabel;
  64.    String deskArrange;
  65.    int animateCount;
  66.    boolean readmeDone;
  67.    String mode;
  68.    Image mapImage;
  69.    int mapMode;
  70.    int editState;
  71.    int currentPoint;
  72.    String imageName;
  73.    public common m_common;
  74.    int doItOnce;
  75.    int countRun;
  76.    int instructionID;
  77.    String mmm;
  78.    String myAd;
  79.    int adCount;
  80.    int adCountMax;
  81.    int hotStyle;
  82.    int tipsOn;
  83.    int imageWidth;
  84.    int imageHeigth;
  85.    int AdButtonHeight;
  86.  
  87.    public void init() {
  88.       this.m_common = new common(this);
  89.       this.m_common.releaseLevel = this.m_common.TheAdware;
  90.       this.m_common.Name = "TheAdware";
  91.       this.m_common.iniCommon();
  92.       if (this.m_common.releaseLevel == this.m_common.TheAdware) {
  93.          this.m_common.disableLevel = 1;
  94.       }
  95.  
  96.       int var2 = ((Component)this).size().width;
  97.       int var3 = ((Component)this).size().height;
  98.       this.borderButtonLabel[0] = "Specify  Hot Arear  Border";
  99.       this.borderButtonLabel[1] = "Cancel Editing Border";
  100.       String var1 = ((Applet)this).getParameter("mode");
  101.       this.mode = var1 != null ? var1 : "design";
  102.       var1 = ((Applet)this).getParameter("imageWidth");
  103.       this.imageWidth = var1 == null ? 350 : Integer.valueOf(var1);
  104.       var1 = ((Applet)this).getParameter("imageHeigth");
  105.       this.imageHeigth = var1 == null ? 300 : Integer.valueOf(var1);
  106.       var1 = ((Applet)this).getParameter("tipsOn");
  107.       this.tipsOn = var1 == null ? 1 : Integer.valueOf(var1);
  108.       var1 = ((Applet)this).getParameter("imageLeft");
  109.       int var4 = var1 == null ? 0 : Integer.valueOf(var1);
  110.       var1 = ((Applet)this).getParameter("imageTop");
  111.       int var5 = var1 == null ? 0 : Integer.valueOf(var1);
  112.       var1 = ((Applet)this).getParameter("AdButtonHeight");
  113.       int var6 = var1 == null ? 30 : Integer.valueOf(var1);
  114.       this.mapArea = new Rectangle();
  115.       if (this.mode.equalsIgnoreCase("map")) {
  116.          if (this.m_common.releaseLevel == this.m_common.TheAdware) {
  117.             this.mapArea.reshape(var4, var5, ((Component)this).size().width, ((Component)this).size().height - var6);
  118.          } else {
  119.             this.mapArea.reshape(var4, var5, ((Component)this).size().width, ((Component)this).size().height);
  120.          }
  121.       } else {
  122.          var1 = ((Applet)this).getParameter("appletWidth");
  123.          int var7 = var1 == null ? this.imageWidth : Integer.valueOf(var1);
  124.          var1 = ((Applet)this).getParameter("appletHeigth");
  125.          int var8 = var1 == null ? this.imageHeigth : Integer.valueOf(var1);
  126.          this.mapArea.reshape(var4, var5, var7, var8);
  127.       }
  128.  
  129.       this.mapImageArea = new imgarea(this, this.mapArea);
  130.       var1 = ((Applet)this).getParameter("deskArrange");
  131.       this.deskArrange = var1 != null ? var1 : "TopBottom";
  132.       var1 = ((Applet)this).getParameter("hintWidth");
  133.       this.mapImageArea.hintWidth = var1 == null ? 90 : Integer.valueOf(var1);
  134.       var1 = ((Applet)this).getParameter("fontHeight");
  135.       this.mapImageArea.fontHeight = var1 == null ? 10 : Integer.valueOf(var1);
  136.       var1 = ((Applet)this).getParameter("hotStyle");
  137.       this.hotStyle = var1 == null ? 1 : Integer.valueOf(var1);
  138.       this.imageName = ((Applet)this).getParameter("mapImage");
  139.       if (this.imageName != null) {
  140.          if (this.m_common.whichBase == 0) {
  141.             this.mapImage = ((Applet)this).getImage(((Applet)this).getDocumentBase(), this.imageName);
  142.          } else {
  143.             this.mapImage = ((Applet)this).getImage(((Applet)this).getCodeBase(), this.imageName);
  144.          }
  145.       }
  146.  
  147.       this.m_common.tracker.addImage(this.mapImage, 1);
  148.  
  149.       try {
  150.          this.m_common.tracker.waitForAll();
  151.       } catch (InterruptedException var10) {
  152.          return;
  153.       }
  154.  
  155.       this.iniMain();
  156.       this.maintainStaticImages();
  157.       this.copyOfftoOn();
  158.       this.m_common.homeURL = "http://www.coolshare.com";
  159.  
  160.       try {
  161.          this.m_common.uhomeURL = new URL(this.m_common.homeURL);
  162.       } catch (MalformedURLException var9) {
  163.          this.m_common.uhomeURL = null;
  164.       }
  165.  
  166.       if (this.m_common.releaseLevel != this.m_common.TheShareware) {
  167.          if (this.m_common.releaseLevel == this.m_common.TheAdware) {
  168.             this.adCountMax = this.m_common.aboutMe.length();
  169.             this.myAd = "";
  170.  
  171.             for(int var23 = 0; var23 < this.adCountMax; ++var23) {
  172.                String var10001 = this.myAd;
  173.                this.myAd = var10001 + " ";
  174.             }
  175.  
  176.             String var25 = this.myAd;
  177.             this.myAd = var25 + "  Image map made easy!  FREE to place in your page !! ";
  178.             var25 = this.myAd;
  179.             this.myAd = var25 + "This is a COOL Java image map applet with a built-in Design Center where you can ";
  180.             var25 = this.myAd;
  181.             this.myAd = var25 + "specify Hot Areas visibly.  The Design Center will generate HTML code ";
  182.             var25 = this.myAd;
  183.             this.myAd = var25 + "that calls this image map applet when you finish all the Hot Areas. Click Here! ";
  184.             var25 = this.myAd;
  185.             this.myAd = var25 + "You are welcome to place this COOL map in your page for FREE!! More and BETTER ";
  186.             var25 = this.myAd;
  187.             this.myAd = var25 + "Java applets and the best screen savers are available over there! ";
  188.             var25 = this.myAd;
  189.             this.myAd = var25 + "Click to get them!! This button will not appear in the shareware version.";
  190.  
  191.             for(int var24 = 0; var24 < this.adCountMax; ++var24) {
  192.                var25 = this.myAd;
  193.                this.myAd = var25 + " ";
  194.             }
  195.          } else if (this.m_common.releaseLevel > this.m_common.TheShareware || this.m_common.releaseLevel < this.m_common.TheAdware) {
  196.             this.m_common.TheStatus = this.m_common.aboutMe;
  197.          }
  198.       }
  199.  
  200.       this.bInitComplete = true;
  201.    }
  202.  
  203.    public void start() {
  204.       this.mapImageArea.makeStatic = 0;
  205.       this.timer = new Thread(this);
  206.       this.timer.setPriority(1);
  207.       this.timer.start();
  208.    }
  209.  
  210.    public void stop() {
  211.       if (this.timer != null) {
  212.          this.timer.stop();
  213.          this.timer = null;
  214.       }
  215.  
  216.    }
  217.  
  218.    public boolean mouseExit(Event var1, int var2, int var3) {
  219.       return true;
  220.    }
  221.  
  222.    public boolean mouseEnter(Event var1, int var2, int var3) {
  223.       return true;
  224.    }
  225.  
  226.    public void run() {
  227.       this.m_common.maintainBK();
  228.       this.maintainStaticImages();
  229.       this.gcOff.drawImage(this.m_common.bufBK, 0, 0, this);
  230.       this.gcOff.drawImage(this.mapImage, this.mapArea.x, this.mapArea.y, this);
  231.       this.copyOfftoOn();
  232.       if (!this.mode.equalsIgnoreCase("design")) {
  233.          if (this.m_common.releaseLevel == this.m_common.TheAdware) {
  234.             this.adCount = 0;
  235.          }
  236.  
  237.          while(this.timer != null) {
  238.             if (this.mapImageArea.selHotAreaIndex >= 0) {
  239.                if (this.mapImageArea.HotAreas[this.mapImageArea.selHotAreaIndex].auSource != null && common.soundOff > 0) {
  240.                   this.mapImageArea.HotAreas[this.mapImageArea.selHotAreaIndex].auSource.stop();
  241.                }
  242.  
  243.                this.update_hotare_tips();
  244.             }
  245.  
  246.             Thread.yield();
  247.  
  248.             try {
  249.                Thread.sleep(200L);
  250.             } catch (InterruptedException var2) {
  251.             }
  252.  
  253.             if (this.m_common.releaseLevel == this.m_common.TheAdware) {
  254.                ++this.adCount;
  255.                if (this.adCount + this.adCountMax > this.myAd.length() - 2) {
  256.                   this.adCount = 0;
  257.                }
  258.  
  259.                this.adButton.setLabel(this.myAd.substring(this.adCount, this.adCount + this.adCountMax));
  260.             }
  261.  
  262.             if (this.m_common.showAdCount >= this.m_common.showAd) {
  263.                this.m_common.showAdCount = 0;
  264.                if (this.m_common.disableLevel > 0) {
  265.                   ((Applet)this).showStatus(this.m_common.aboutMe);
  266.                }
  267.             } else {
  268.                ++this.m_common.showAdCount;
  269.             }
  270.  
  271.             if (this.m_common.delayLoadAudio > -2) {
  272.                if (this.m_common.delayLoadAudio <= 0) {
  273.                   if (this.m_common.delayLoadAudio == 0) {
  274.                      this.mapImageArea.loadAudioFiles();
  275.                      this.m_common.loadHideSound();
  276.                      this.m_common.delayLoadAudio = -100;
  277.                   }
  278.                } else {
  279.                   --this.m_common.delayLoadAudio;
  280.                }
  281.             }
  282.          }
  283.  
  284.       } else {
  285.          this.update_applet();
  286.  
  287.          while(this.timer != null) {
  288.             Thread.yield();
  289.  
  290.             try {
  291.                Thread.sleep(1000L);
  292.             } catch (InterruptedException var1) {
  293.             }
  294.  
  295.             if (this.mapImageArea.selHotAreaIndex >= 0) {
  296.                if (this.mapImageArea.HotAreas[this.mapImageArea.selHotAreaIndex].auSource != null && common.soundOff > 0) {
  297.                   this.mapImageArea.HotAreas[this.mapImageArea.selHotAreaIndex].auSource.stop();
  298.                }
  299.  
  300.                if (this.mapMode == 0) {
  301.                   if (this.countRun == 0) {
  302.                      this.countRun = 1;
  303.                      this.mapImageArea.paintHotArea(this.gcOn, false, Color.black);
  304.                   } else {
  305.                      this.countRun = 0;
  306.                      this.mapImageArea.paintHotArea(this.gcOn, false, Color.yellow);
  307.                   }
  308.                } else {
  309.                   this.update_hotare_tips();
  310.                }
  311.             }
  312.  
  313.             if (!this.readmeDone) {
  314.                if (this.readmeButton.getLabel().equals("Read Me First!!")) {
  315.                   this.readmeButton.setLabel("Read   Me   First!!");
  316.                } else if (this.readmeButton.getLabel().equals("Read   Me   First!!")) {
  317.                   this.readmeButton.setLabel("Read Me First!!");
  318.                }
  319.             }
  320.          }
  321.  
  322.       }
  323.    }
  324.  
  325.    public void update_hotare_tips() {
  326.       if (this.hotStyle != 0 || this.tipsOn != 0) {
  327.          if (this.tipsOn == 1) {
  328.             this.gcOff.drawImage(this.m_common.bufBK, 0, 0, this);
  329.             this.gcOff.drawImage(this.mapImage, this.mapArea.x, this.mapArea.y, this);
  330.          }
  331.  
  332.          if (this.hotStyle > 0) {
  333.             if (this.tipsOn == 1) {
  334.                if (this.countRun == 0) {
  335.                   this.countRun = 1;
  336.                   this.mapImageArea.paintHotArea(this.gcOff, false, Color.black);
  337.                } else {
  338.                   this.countRun = 0;
  339.                   this.mapImageArea.paintHotArea(this.gcOff, false, Color.yellow);
  340.                }
  341.             } else if (this.countRun == 0) {
  342.                this.countRun = 1;
  343.                this.mapImageArea.paintHotArea(this.gcOn, false, Color.black);
  344.             } else {
  345.                this.countRun = 0;
  346.                this.mapImageArea.paintHotArea(this.gcOn, false, Color.yellow);
  347.             }
  348.          }
  349.  
  350.          if (this.tipsOn == 1) {
  351.             this.gcOff.setFont(new Font("TimesRoman", 1, this.mapImageArea.fontHeight));
  352.             this.mapImageArea.paintTips(this.gcOff, true);
  353.             this.copyOfftoOn();
  354.          }
  355.  
  356.       }
  357.    }
  358.  
  359.    public String getRoundString(int var1, String var2) {
  360.       String var3 = "";
  361.       if (this.animateCount >= var1) {
  362.          return this.animateCount < var2.length() ? var2.substring(this.animateCount - var1, this.animateCount) : var2.substring(this.animateCount - var1, var2.length()) + var2.substring(0, this.animateCount - var2.length());
  363.       } else {
  364.          for(int var4 = 0; var4 < var1 - this.animateCount; ++var4) {
  365.             var3 = var3 + " ";
  366.          }
  367.  
  368.          return var3 + var2.substring(0, var1 - this.animateCount);
  369.       }
  370.    }
  371.  
  372.    public void update_applet() {
  373.       if (!this.mode.equalsIgnoreCase("map")) {
  374.          if (this.mapImageArea.iMaxHotArea >= 0 && this.mapImageArea.selHotAreaIndex >= 0 && this.mapMode == 0) {
  375.             this.delButton.enable();
  376.          } else {
  377.             this.delButton.disable();
  378.          }
  379.  
  380.          if (this.mapMode != 0) {
  381.             this.borderButton.disable();
  382.          } else {
  383.             this.borderButton.enable();
  384.          }
  385.  
  386.          if (this.mapMode == 0 && (this.mapImageArea.iMaxHotArea >= 0 || this.editState != 0) && (this.editState != 0 || this.mapImageArea.selHotAreaIndex >= 0)) {
  387.             this.saveButton.enable();
  388.          } else {
  389.             this.saveButton.disable();
  390.          }
  391.  
  392.          if (this.mapMode == 0 && this.mapImageArea.iMaxHotArea >= 0) {
  393.             this.selButton.enable();
  394.          } else {
  395.             this.selButton.disable();
  396.          }
  397.  
  398.          if (this.mapImageArea.iMaxHotArea >= 0 && this.mapMode == 0) {
  399.             this.getResultButton.enable();
  400.          } else {
  401.             this.getResultButton.disable();
  402.          }
  403.  
  404.          this.hotMode.setCurrent(this.hotOption[this.hotStyle]);
  405.          this.tipsMode.setCurrent(this.tipsOption[this.tipsOn]);
  406.          if (this.mapImageArea.iMaxHotArea >= 0 && this.mapMode != 1) {
  407.             this.resetButton.enable();
  408.          } else {
  409.             this.resetButton.disable();
  410.          }
  411.  
  412.          this.theMode.setCurrent(this.modeBox[this.mapMode]);
  413.          this.borderButton.setLabel(this.borderButtonLabel[this.editState]);
  414.          if (!this.resetButton.getLabel().equals("Remove All Hot Areas")) {
  415.             this.saveButton.setLabel("Save Selected Hot Area");
  416.             this.resetButton.setLabel("Remove All Hot Areas");
  417.             this.delButton.setLabel("Delete Selected Hot Area");
  418.             this.selButton.setLabel("Select An Existing Area");
  419.             this.getResultButton.setLabel("Generate HTML Script");
  420.             this.readmeButton.setLabel("Read Me First!!");
  421.          }
  422.  
  423.          if (this.editState == 0) {
  424.             this.saveButton.setLabel("Save Selected Hot Area");
  425.          } else {
  426.             this.saveButton.setLabel("Save Editing Hot Area");
  427.          }
  428.  
  429.          if (this.mapMode == 0 && this.mapImageArea.selHotAreaIndex >= 0 && this.mapImageArea.selHotAreaIndex < this.mapImageArea.maxNumArea - 1) {
  430.             this.getHint.setText(this.mapImageArea.HotAreas[this.mapImageArea.selHotAreaIndex].szHint);
  431.             this.getURL.setText(this.mapImageArea.HotAreas[this.mapImageArea.selHotAreaIndex].szURLDescription);
  432.             this.getAU.setText(this.mapImageArea.HotAreas[this.mapImageArea.selHotAreaIndex].auSourceName);
  433.          }
  434.  
  435.          this.getImageName.setText(this.imageName);
  436.  
  437.          for(int var1 = 0; var1 < 2; ++var1) {
  438.             if (this.mapMode != 0) {
  439.                this.audioOption[var1].disable();
  440.                this.openOption[var1].disable();
  441.             } else {
  442.                this.audioOption[var1].enable();
  443.                this.openOption[var1].enable();
  444.             }
  445.          }
  446.  
  447.          if (this.mapMode == 0 && (this.mapImageArea.selHotAreaIndex >= 0 || this.editState != 0)) {
  448.             this.getURL.enable();
  449.             this.getAU.enable();
  450.             this.getImageName.enable();
  451.             this.getHint.enable();
  452.          } else {
  453.             this.getURL.disable();
  454.             this.getAU.disable();
  455.             this.getImageName.disable();
  456.             this.getHint.disable();
  457.          }
  458.  
  459.          this.update_instruction();
  460.          if (this.m_common.disableLevel == 2) {
  461.             this.getURL.disable();
  462.          }
  463.  
  464.       }
  465.    }
  466.  
  467.    public void update_instruction() {
  468.       String var1;
  469.       if (!this.readmeDone) {
  470.          var1 = "Please click at button label \"Read Me First\" to see the instructions\n before editing image map.\n\n";
  471.       } else {
  472.          var1 = "The result HTML script will be dislay here after you click at the button\n";
  473.          var1 = var1 + "labeled \"Generate HTML Script\". You can copy and paste the content\n";
  474.          var1 = var1 + "in this field to your page: CoolMap is ready to go!! \nEasy and quickly done!!\n\n";
  475.       }
  476.  
  477.       switch (this.instructionID) {
  478.          case 0:
  479.             var1 = this.generateResult();
  480.             break;
  481.          case 1:
  482.             if (this.m_common.disableLevel == 2) {
  483.                if (this.m_common.releaseLevel == this.m_common.TheDemo) {
  484.                   var1 = var1 + "You can not change the URL in this demo version.  That is, if you click\n";
  485.                   var1 = var1 + "at any Hot Area in the map, Mark Qian's Home Page will be opened so \n";
  486.                   var1 = var1 + "that you can download the Adware version(FREE) and shareware version\n";
  487.                   var1 = var1 + "of CoolMap and more exciting Java applet, best screen savers over there.\n";
  488.                } else {
  489.                   var1 = var1 + "To remove the button above imagemap, you need to register the shareware \n";
  490.                   var1 = var1 + "version of CoolMap.\n";
  491.                }
  492.             }
  493.             break;
  494.          case 2:
  495.             var1 = "You can click at a Hot Area directly to select it.";
  496.             break;
  497.          case 3:
  498.             var1 = "To specify a border for a Hot Area, you need to\n";
  499.             var1 = var1 + " 1).  Point your mouse cursor to a point where you like to use as the first point of the hot area. Press left \n";
  500.             var1 = var1 + "      mouse button and drag to the second point. Then release mouse button.\n";
  501.             var1 = var1 + " 2).  Click at next point.\n";
  502.             var1 = var1 + " 3).  Repeat step 2 until you finished all the points which limit the hot area.\n\n";
  503.             var1 = var1 + "Click at button labeled \"Read Me\" to see the details about how to \n";
  504.             var1 = var1 + "create a Hot Area.";
  505.          case 4:
  506.          case 5:
  507.          case 6:
  508.          case 7:
  509.       }
  510.  
  511.       this.getResult.setText(var1);
  512.    }
  513.  
  514.    public boolean handleEvent(Event var1) {
  515.       switch (var1.id) {
  516.          case 1001:
  517.             if (var1.target == this.borderButton) {
  518.                if (this.editState == 1) {
  519.                   this.editState = 0;
  520.                   this.currentPoint = 0;
  521.                   this.m_common.setTheCursor(0);
  522.                } else {
  523.                   this.editState = 1;
  524.                   this.m_common.setTheCursor(1);
  525.                   this.mapImageArea.preHotAreaIndex = -1;
  526.                   this.mapImageArea.selHotAreaIndex = -1;
  527.                   this.currentPoint = 0;
  528.                   this.instructionID = 3;
  529.                }
  530.  
  531.                this.mapImageArea.paint(this.gcOn);
  532.             } else if (var1.target == this.saveButton) {
  533.                if (this.editState == 1 && this.currentPoint > 2) {
  534.                   this.getHotArea();
  535.                } else {
  536.                   this.updateHotArea(this.mapImageArea.selHotAreaIndex);
  537.                }
  538.  
  539.                this.editState = 0;
  540.                this.currentPoint = 0;
  541.                this.mapImageArea.paint(this.gcOn);
  542.                this.m_common.setTheCursor(0);
  543.             } else if (var1.target == this.modeBox[0]) {
  544.                this.mapMode = 0;
  545.                this.currentPoint = 0;
  546.                this.editState = 0;
  547.                this.mapImageArea.makeStatic = 0;
  548.                this.update_applet();
  549.                this.mapImageArea.paint(this.gcOn);
  550.                this.m_common.setTheCursor(0);
  551.             } else if (var1.target == this.modeBox[1]) {
  552.                this.m_common.setTheCursor(3);
  553.                this.mapMode = 1;
  554.                this.editState = 0;
  555.                this.update_applet();
  556.                this.doLoadAudio();
  557.                this.update_applet();
  558.                this.mapImageArea.paint(this.gcOn);
  559.                this.m_common.setTheCursor(0);
  560.             } else if (var1.target != this.hotOption[0] && var1.target != this.hotOption[1]) {
  561.                if (var1.target != this.tipsOption[0] && var1.target != this.tipsOption[1]) {
  562.                   if (var1.target == this.delButton) {
  563.                      if (this.mapImageArea.selHotAreaIndex >= 0 && this.mapImageArea.selHotAreaIndex <= this.mapImageArea.iMaxHotArea) {
  564.                         this.mapMode = 0;
  565.                         this.editState = 0;
  566.                         this.mapImageArea.HotAreas[this.mapImageArea.selHotAreaIndex].bUsed = false;
  567.                         this.mapImageArea.preHotAreaIndex = -1;
  568.                         this.mapImageArea.selHotAreaIndex = -1;
  569.                         this.mapImageArea.updateHotList();
  570.                         this.mapImageArea.paint(this.gcOn);
  571.                      }
  572.                   } else if (var1.target == this.selButton) {
  573.                      this.editState = 0;
  574.                      if (this.mapImageArea.iMaxHotArea >= 0) {
  575.                         ++this.mapImageArea.preHotAreaIndex;
  576.                         if (++this.mapImageArea.selHotAreaIndex > this.mapImageArea.iMaxHotArea) {
  577.                            this.mapImageArea.selHotAreaIndex = 0;
  578.                            this.mapImageArea.preHotAreaIndex = this.mapImageArea.iMaxHotArea;
  579.                         }
  580.  
  581.                         this.mapImageArea.paint(this.gcOn);
  582.                      }
  583.  
  584.                      this.instructionID = 2;
  585.                   } else if (var1.target == this.resetButton) {
  586.                      this.mapMode = 0;
  587.                      this.editState = 0;
  588.                      this.mapImageArea.preHotAreaIndex = -1;
  589.                      this.mapImageArea.selHotAreaIndex = -1;
  590.                      this.currentPoint = 0;
  591.                      this.mapImageArea.iMaxHotArea = -1;
  592.                      this.mapImageArea.paint(this.gcOn);
  593.                   } else if (var1.target == this.getResultButton) {
  594.                      this.m_common.setTheCursor(3);
  595.                      this.editState = 0;
  596.                      this.instructionID = 0;
  597.                      this.getResult.setText("CoolMap is generating HTML script. Please wait...");
  598.                      this.imageName = this.getImageName.getText();
  599.                      this.resultLabel.setText("Result HTML Script:        (Copy and paste the content below to your page)");
  600.                      this.m_common.setTheCursor(0);
  601.                   } else if (var1.target == this.adButton) {
  602.                      if (this.m_common.uhomeURL != null) {
  603.                         ((Applet)this).getAppletContext().showDocument(this.m_common.uhomeURL);
  604.                      }
  605.                   } else if (var1.target == this.readmeButton) {
  606.                      String var2 = "    CoolMap is a Java applet written by Mark Qian. It is COOL because it comes with a design \n";
  607.                      var2 = var2 + "center which makes image map design and maintenance visible.  What you see here is \n";
  608.                      var2 = var2 + "the Design Mode.  An image map consists of a series of hot areas where tooltips will be\n";
  609.                      var2 = var2 + "poped up to descibe to details about that area when mouse cursor is moved over.  A sound will \n";
  610.                      var2 = var2 + "also be played when mouse is moved over a particular hot area.  The corresponding URL will\n";
  611.                      var2 = var2 + "be opened when clicking at a hot area.\n";
  612.                      var2 = var2 + "   To use CoolMap's Design Center to generate HTML script which calls CoolMap for you with your hot areas,\n";
  613.                      var2 = var2 + "you need to\n\n";
  614.                      var2 = var2 + " 1).  Set parameter mode in you HTML script that call CoolMap to Design. Then run the script with a browser\n";
  615.                      var2 = var2 + "      (You have done this).\n";
  616.                      var2 = var2 + " 2).  Select the Edit mode in Mode section.\n";
  617.                      var2 = var2 + " 3).  Point your mouse cursor to a point where you like to use as the first point of the hot area. Press left \n";
  618.                      var2 = var2 + "      mouse button and drag to the second point. Then release mouse button.\n";
  619.                      var2 = var2 + " 4).  Click at next point.\n";
  620.                      var2 = var2 + " 5).  Repeat step 4 until you finished all the points which limit the hot area.\n";
  621.                      var2 = var2 + " 6).  Edit content of tooltips.\n";
  622.                      var2 = var2 + " 7).  Edit URL address. This URL will be opened when the hot area is clicked.\n";
  623.                      var2 = var2 + " 8).  Select an audio file for the hot area.  This audio file will be played when mouse cursor moves over the hot area.\n";
  624.                      var2 = var2 + " 9).  Click at button label 'Save Current Hot Area'.\n";
  625.                      var2 = var2 + " 10). Click at button label 'Generate HTML Script'.\n";
  626.                      var2 = var2 + " 11). Select the content in the text area at the bottom label 'HTML Script'(this field is label 'Instructions' before \n";
  627.                      var2 = var2 + "      you click at button label 'Generate HTML Script') using mouse\n";
  628.                      var2 = var2 + " 12). Select Edit and Copy from the pull-down manu of broser to copy the HTML script to clipboard.\n";
  629.                      var2 = var2 + " 13). Paste the content of clipboard to an empty text file named, say test.htm.  Then browse test.htm with your browser.\n";
  630.                      var2 = var2 + "      If you see what you want, insert the HTML script to your page.\n\n";
  631.                      var2 = var2 + "  Done!!  Easy and quickly done!!";
  632.                      Frame var3 = new Frame();
  633.                      ((Container)this).add(var3);
  634.                      readme var4 = new readme(var3, this, " Instructions To Create A Image Map Using CoolMap", false, var2);
  635.                      ((Component)var4).resize(700, 400);
  636.                      ((Window)var4).show();
  637.                      this.readmeDone = true;
  638.                      this.readmeButton.setLabel("Read Me");
  639.                   }
  640.                } else if (this.tipsMode.getCurrent() == this.tipsOption[0]) {
  641.                   this.tipsOn = 0;
  642.                } else if (this.tipsMode.getCurrent() == this.tipsOption[1]) {
  643.                   this.tipsOn = 1;
  644.                }
  645.             } else if (this.hotMode.getCurrent() == this.hotOption[0]) {
  646.                this.hotStyle = 0;
  647.             } else if (this.hotMode.getCurrent() == this.hotOption[1]) {
  648.                this.hotStyle = 1;
  649.             }
  650.  
  651.             this.update_applet();
  652.             return true;
  653.          default:
  654.             return false;
  655.       }
  656.    }
  657.  
  658.    public void doLoadAudio() {
  659.       this.mapImageArea.makeStatic = 1;
  660.       this.mapImageArea.hintX = 100;
  661.       this.mapImageArea.hintY = 100;
  662.       this.mapImageArea.szHintText = "CoolMap is fetching audio files.  Please wait...";
  663.       this.mapImageArea.parseHint();
  664.       this.mapImageArea.paint(this.gcOn);
  665.       this.mapImageArea.loadAudioFiles();
  666.       this.mapImageArea.makeStatic = 0;
  667.       this.mapImageArea.setNewHintText((String)null);
  668.       this.doItOnce = 1;
  669.       this.mapImageArea.paint(this.gcOn);
  670.       this.doItOnce = 0;
  671.       Event var1 = new Event(this, 2434L, 505, 20, 20, 2, 1);
  672.       ((Component)this).postEvent(var1);
  673.    }
  674.  
  675.    public String generateResult() {
  676.       if (this.mapImageArea.iMaxHotArea < 0) {
  677.          return "";
  678.       } else {
  679.          String var1 = "";
  680.          var1 = var1 + "<HTML>\n";
  681.          var1 = var1 + "<HEAD><TITLE> Test coolmap </TITLE> </HEAD>\n";
  682.          var1 = var1 + "<BODY BGCOLOR=\"#BCBCBC\">\n";
  683.          if (this.m_common.releaseLevel == this.m_common.TheAdware) {
  684.             var1 = var1 + "<applet code=\"coolmap.class\"  width=" + this.mapImageArea.size().width + " height=" + (this.mapImageArea.size().height + this.AdButtonHeight) + ">\n";
  685.          } else {
  686.             var1 = var1 + "<applet code=\"coolmap.class\"  width=" + this.mapImageArea.size().width + " height=" + this.mapImageArea.size().height + ">\n";
  687.          }
  688.  
  689.          var1 = var1 + "<param name=mode       value=\"map\">\n";
  690.          var1 = var1 + "<param name=imageTop       value=\"" + this.mapArea.y + "\">\n";
  691.          var1 = var1 + "<param name=imageLeft       value=\"" + this.mapArea.x + "\">\n";
  692.          var1 = var1 + "<param name=imageWidth       value=\"" + this.imageWidth + "\">\n";
  693.          var1 = var1 + "<param name=imageHeigth       value=\"" + this.imageHeigth + "\">\n";
  694.          var1 = var1 + "<param name=hintWidth       value=\"" + this.mapImageArea.hintWidth + "\">\n";
  695.          var1 = var1 + "<param name=fontHeight       value=\"" + this.mapImageArea.fontHeight + "\">\n";
  696.          var1 = var1 + "<param name=mapImage       value=\"" + this.imageName + "\">\n";
  697.          var1 = var1 + "<param name=background       value=\"" + this.m_common.background + "\">\n";
  698.          var1 = var1 + "<param name=bgcolor       value=\"" + this.m_common.bgcolor + "\">\n";
  699.          var1 = var1 + "<param name=hotStyle       value=\"" + this.hotStyle + "\">\n";
  700.          var1 = var1 + "<param name=tipsOn       value=\"" + this.tipsOn + "\">\n";
  701.  
  702.          for(int var2 = 0; var2 <= this.mapImageArea.iMaxHotArea; ++var2) {
  703.             var1 = var1 + "<param name=hot_area" + (var2 + 1);
  704.             var1 = var1 + "  value=\"" + this.mapImageArea.HotAreas[var2].szURLDescription;
  705.             var1 = var1 + "#" + this.mapImageArea.HotAreas[var2].auSourceName;
  706.             var1 = var1 + "#" + this.mapImageArea.HotAreas[var2].audioMode;
  707.             var1 = var1 + "#" + this.mapImageArea.HotAreas[var2].openMode;
  708.             if (this.mapImageArea.HotAreas[var2].openMode == 0) {
  709.                var1 = var1 + "#No_Title";
  710.             } else {
  711.                var1 = var1 + "#" + this.mapImageArea.HotAreas[var2].szFrame;
  712.             }
  713.  
  714.             for(int var3 = 0; var3 < this.mapImageArea.HotAreas[var2].polyMyArea.npoints; ++var3) {
  715.                var1 = var1 + "#" + this.mapImageArea.HotAreas[var2].polyMyArea.xpoints[var3];
  716.                var1 = var1 + "#" + this.mapImageArea.HotAreas[var2].polyMyArea.ypoints[var3];
  717.             }
  718.  
  719.             if (this.mapImageArea.HotAreas[var2].szHint != null && !this.mapImageArea.HotAreas[var2].szHint.equals("")) {
  720.                var1 = var1 + "#" + this.mapImageArea.HotAreas[var2].szHint + "\">\n";
  721.             } else {
  722.                var1 = var1 + "#No tooltips\">\n";
  723.             }
  724.          }
  725.  
  726.          var1 = var1 + "</applet>\n";
  727.          var1 = var1 + "</BODY>\n";
  728.          var1 = var1 + "</HTML>\n";
  729.          return var1;
  730.       }
  731.    }
  732.  
  733.    public void testHotArea() {
  734.       if (this.mapImageArea.iMaxHotArea >= 0) {
  735.          String var1 = "iMaxHotArea=" + this.mapImageArea.iMaxHotArea + "\n";
  736.  
  737.          for(int var2 = 0; var2 <= this.mapImageArea.iMaxHotArea; ++var2) {
  738.             var1 = var1 + "Hint: " + this.mapImageArea.HotAreas[var2].szHint + "\n";
  739.             var1 = var1 + "URL: " + this.mapImageArea.HotAreas[var2].szURLDescription + "\n";
  740.  
  741.             for(int var3 = 0; var3 < this.mapImageArea.HotAreas[var2].polyMyArea.npoints; ++var3) {
  742.                var1 = var1 + this.mapImageArea.HotAreas[var2].polyMyArea.xpoints[var3] + "-" + this.mapImageArea.HotAreas[var2].polyMyArea.ypoints[var3] + ", ";
  743.             }
  744.  
  745.             var1 = var1 + "\n";
  746.          }
  747.  
  748.          this.getResult.setText(var1);
  749.       }
  750.    }
  751.  
  752.    public void getHotArea() {
  753.       ++this.mapImageArea.iMaxHotArea;
  754.       this.mapImageArea.HotAreas[this.mapImageArea.iMaxHotArea] = new hintpot();
  755.  
  756.       for(int var1 = 0; var1 < this.currentPoint; ++var1) {
  757.          this.mapImageArea.HotAreas[this.mapImageArea.iMaxHotArea].polyMyArea.addPoint(this.mapImageArea.hotPointX[var1], this.mapImageArea.hotPointY[var1]);
  758.          this.mapImageArea.HotAreas[this.mapImageArea.iMaxHotArea].m_parent = this.mapImageArea;
  759.       }
  760.  
  761.       this.updateHotArea(this.mapImageArea.iMaxHotArea);
  762.       this.mapImageArea.selHotAreaIndex = this.mapImageArea.iMaxHotArea;
  763.    }
  764.  
  765.    public void updateHotArea(int var1) {
  766.       if (var1 >= 0 && var1 <= this.mapImageArea.iMaxHotArea) {
  767.          this.mapImageArea.HotAreas[var1].szHint = this.getHint.getText();
  768.          this.mapImageArea.HotAreas[var1].szURLDescription = this.getURL.getText();
  769.          this.mapImageArea.HotAreas[var1].auSourceName = this.getAU.getText();
  770.          if (this.audioMode.getCurrent() == this.audioOption[0]) {
  771.             this.mapImageArea.HotAreas[var1].audioMode = 0;
  772.          } else {
  773.             this.mapImageArea.HotAreas[var1].audioMode = 1;
  774.          }
  775.  
  776.          if (this.openMode.getCurrent() == this.openOption[0]) {
  777.             this.mapImageArea.HotAreas[var1].openMode = 0;
  778.          } else {
  779.             this.mapImageArea.HotAreas[var1].openMode = 1;
  780.          }
  781.  
  782.          if (this.mapImageArea.HotAreas[var1].szURLDescription != null) {
  783.             try {
  784.                this.mapImageArea.HotAreas[var1].uURL = new URL(this.mapImageArea.HotAreas[var1].szURLDescription);
  785.             } catch (MalformedURLException var2) {
  786.                this.mapImageArea.HotAreas[var1].uURL = null;
  787.             }
  788.          }
  789.       }
  790.    }
  791.  
  792.    public void iniMain() {
  793.       ((Component)this).setBackground(Color.lightGray);
  794.       ((Component)this).setFont(new Font("Helvetica", 0, 12));
  795.       if (this.mode.equalsIgnoreCase("map")) {
  796.          ((Container)this).setLayout(new BorderLayout());
  797.          if (this.m_common.releaseLevel == this.m_common.TheAdware) {
  798.             this.adButton = new Button("Click here to place it in your page for FREE");
  799.             ((Container)this).add("North", this.adButton);
  800.             ((Container)this).add("South", this.mapImageArea);
  801.          } else {
  802.             ((Container)this).add("North", this.mapImageArea);
  803.          }
  804.  
  805.          this.mapMode = 1;
  806.       } else {
  807.          if (!this.deskArrange.equalsIgnoreCase("LeftRight")) {
  808.             ((Container)this).setLayout(new BorderLayout());
  809.          }
  810.  
  811.          Panel var1 = new Panel();
  812.          ((Container)var1).setLayout(new BorderLayout());
  813.          Panel var2 = new Panel();
  814.          ((Container)var2).setLayout(new GridLayout(0, 1, 0, 0));
  815.          Panel var3 = new Panel();
  816.          ((Container)var3).setLayout(new FlowLayout());
  817.          this.modeBox[0] = new Checkbox("Edit", this.theMode, false);
  818.          this.modeBox[1] = new Checkbox("Test", this.theMode, false);
  819.          ((Container)var3).add(new Label("Mode:"));
  820.          ((Container)var3).add(this.modeBox[0]);
  821.          ((Container)var3).add(this.modeBox[1]);
  822.          Panel var4 = new Panel();
  823.          ((Container)var4).setLayout(new FlowLayout());
  824.          this.audioOption[0] = new Checkbox("Play when mouse over", this.audioMode, true);
  825.          this.audioOption[1] = new Checkbox("Play when cick", this.audioMode, false);
  826.          ((Container)var4).add(new Label("Audio Mode:"));
  827.          ((Container)var4).add(new Label("     "));
  828.          ((Container)var4).add(this.audioOption[0]);
  829.          ((Container)var4).add(new Label("       "));
  830.          ((Container)var4).add(this.audioOption[1]);
  831.          Panel var5 = new Panel();
  832.          ((Container)var5).setLayout(new FlowLayout());
  833.          this.openOption[0] = new Checkbox("URL in original Window", this.openMode, true);
  834.          this.openOption[1] = new Checkbox("URL in new Window", this.openMode, false);
  835.          ((Container)var5).add(new Label("URL Open Mode:"));
  836.          ((Container)var5).add(new Label("      "));
  837.          ((Container)var5).add(this.openOption[0]);
  838.          ((Container)var5).add(new Label("      "));
  839.          ((Container)var5).add(this.openOption[1]);
  840.          Panel var6 = new Panel();
  841.          ((Container)var6).setLayout(new FlowLayout());
  842.          this.hotOption[0] = new Checkbox("Not show border", this.hotMode, true);
  843.          this.hotOption[1] = new Checkbox("Flash border", this.hotMode, false);
  844.          ((Container)var6).add(new Label("Hot Area Border Mode:"));
  845.          ((Container)var6).add(new Label("      "));
  846.          ((Container)var6).add(this.hotOption[0]);
  847.          ((Container)var6).add(new Label("      "));
  848.          ((Container)var6).add(this.hotOption[1]);
  849.          Panel var7 = new Panel();
  850.          ((Container)var7).setLayout(new FlowLayout());
  851.          this.tipsOption[0] = new Checkbox("Not show tooltips", this.tipsMode, true);
  852.          this.tipsOption[1] = new Checkbox("Show tooltips", this.tipsMode, false);
  853.          ((Container)var7).add(new Label("Tooltips Mode:"));
  854.          ((Container)var7).add(new Label("      "));
  855.          ((Container)var7).add(this.tipsOption[0]);
  856.          ((Container)var7).add(new Label("      "));
  857.          ((Container)var7).add(this.tipsOption[1]);
  858.          Panel var8 = new Panel();
  859.          ((Container)var8).setLayout(new FlowLayout());
  860.          ((Container)var8).add(new Label("      "));
  861.          ((Container)var8).add(new Label("      "));
  862.          ((Container)var8).add(new Label("      "));
  863.          ((Container)var2).add(var4);
  864.          ((Container)var2).add(var5);
  865.          ((Container)var2).add(var6);
  866.          ((Container)var2).add(var7);
  867.          this.borderButton = new Button(this.borderButtonLabel[this.editState]);
  868.          this.saveButton = new Button("Delete Selected Hot Area");
  869.          this.resetButton = new Button("Delete Selected Hot Area");
  870.          this.delButton = new Button("Delete Selected Hot Area");
  871.          this.selButton = new Button("Delete Selected Hot Area");
  872.          this.getResultButton = new Button("Delete Selected Hot Area");
  873.          this.readmeButton = new Button("Delete Selected Hot Area");
  874.          Panel var9 = new Panel();
  875.          ((Container)var9).setLayout(new GridLayout(0, 2, 4, 5));
  876.          ((Container)var9).add(var3);
  877.          ((Container)var9).add(new Label(""));
  878.          ((Container)var9).add(this.selButton);
  879.          ((Container)var9).add(this.borderButton);
  880.          ((Container)var9).add(this.delButton);
  881.          ((Container)var9).add(this.saveButton);
  882.          ((Container)var9).add(this.resetButton);
  883.          ((Container)var9).add(this.getResultButton);
  884.          ((Container)var9).add(this.readmeButton);
  885.          Panel var10 = new Panel();
  886.          ((Container)var10).setLayout(new BorderLayout());
  887.          this.getHint = new TextField("Enter your tooltip text here", 45);
  888.          this.getURL = new TextField("http://", 45);
  889.          this.getAU = new TextField("LAUGH.AU", 45);
  890.          this.getImageName = new TextField(this.imageName, 45);
  891.          this.resultLabel = new Label("Instructions: ");
  892.          this.getResult = new TextArea("This field is used to display instructions and HTML results", 5, 20);
  893.          Panel var11 = new Panel();
  894.          Panel var12 = new Panel();
  895.          Panel var13 = new Panel();
  896.          Panel var14 = new Panel();
  897.          Panel var15 = new Panel();
  898.          Panel var16 = new Panel();
  899.          ((Container)var11).setLayout(new GridLayout(0, 1, 2, 2));
  900.          ((Container)var12).setLayout(new BorderLayout());
  901.          ((Container)var13).setLayout(new BorderLayout());
  902.          ((Container)var14).setLayout(new BorderLayout());
  903.          ((Container)var15).setLayout(new BorderLayout());
  904.          ((Container)var16).setLayout(new BorderLayout());
  905.          ((Container)var12).add("North", new Label("Content of Tooltips:"));
  906.          ((Container)var12).add("South", this.getHint);
  907.          ((Container)var13).add("North", new Label("URL:"));
  908.          ((Container)var13).add("South", this.getURL);
  909.          ((Container)var14).add("North", new Label("Audio File:"));
  910.          ((Container)var14).add("South", this.getAU);
  911.          ((Container)var15).add("North", new Label("Imagemap File:"));
  912.          ((Container)var15).add("South", this.getImageName);
  913.          ((Container)var16).add("North", this.resultLabel);
  914.          ((Container)var16).add("South", this.getResult);
  915.          ((Container)var11).add(var12);
  916.          ((Container)var11).add(var13);
  917.          ((Container)var11).add(var14);
  918.          ((Container)var11).add(var15);
  919.          ((Container)var10).add("North", var11);
  920.          ((Container)var10).add("South", var16);
  921.          Panel var17 = new Panel();
  922.          ((Container)var17).setLayout(new BorderLayout());
  923.          ((Container)var17).add("North", var9);
  924.          ((Container)var17).add("South", var2);
  925.          ((Container)var1).add("North", var17);
  926.          ((Container)var1).add("South", var10);
  927.          if (this.deskArrange.equalsIgnoreCase("LeftRight")) {
  928.             ((Container)this).add(this.mapImageArea);
  929.             ((Container)this).add(new Label("   "));
  930.             ((Container)this).add(var1);
  931.          } else {
  932.             ((Container)this).add("North", this.mapImageArea);
  933.             ((Container)this).add("South", var1);
  934.          }
  935.       }
  936.    }
  937.  
  938.    private void maintainOffScreenGC() {
  939.       Dimension var1 = ((Component)this).size();
  940.       if (this.imgStaticOffScreen == null || var1.width != this.dimOffScreen.width || var1.height != this.dimOffScreen.height || this.gcOff == null) {
  941.          this.imgStaticOffScreen = ((Component)this).createImage(var1.width, var1.height);
  942.          this.dimOffScreen = var1;
  943.          this.gcOff = this.imgStaticOffScreen.getGraphics();
  944.          this.gcOff.setColor(Color.lightGray);
  945.          this.gcOff.fillRect(0, 0, this.dimOffScreen.width, this.dimOffScreen.height);
  946.       }
  947.  
  948.    }
  949.  
  950.    public void maintainStaticImages() {
  951.       this.maintainOffScreenGC();
  952.       this.gcOff.drawImage(this.m_common.bufBK, 0, 0, this);
  953.       this.gcOff.drawImage(this.mapImage, this.mapArea.x, this.mapArea.y, this);
  954.       this.mapImageArea.paintHotArea(this.gcOff, true, Color.black);
  955.    }
  956.  
  957.    public void copyOfftoOn() {
  958.       this.mapImageArea.getGraphics().drawImage(this.imgStaticOffScreen, 0, 0, (ImageObserver)null);
  959.    }
  960.  
  961.    Color getColorFromParam(String var1, Color var2) {
  962.       byte var7 = 0;
  963.       String var3;
  964.       if ((var3 = ((Applet)this).getParameter(var1)) == null) {
  965.          return var2;
  966.       } else {
  967.          if (var3.startsWith("#")) {
  968.             var7 = 1;
  969.          }
  970.  
  971.          int var4;
  972.          int var5;
  973.          int var6;
  974.          try {
  975.             var4 = Integer.parseInt(var3.substring(var7, 2 + var7), 16);
  976.             var6 = Integer.parseInt(var3.substring(2 + var7, 4 + var7), 16);
  977.             var5 = Integer.parseInt(var3.substring(4 + var7, 6 + var7), 16);
  978.          } catch (Exception var8) {
  979.             return var2;
  980.          }
  981.  
  982.          return new Color(var4, var6, var5);
  983.       }
  984.    }
  985.  
  986.    public void paint(Graphics var1) {
  987.       this.bInitComplete = true;
  988.       if (this.bInitComplete) {
  989.          this.maintainStaticImages();
  990.          this.copyOfftoOn();
  991.       }
  992.  
  993.    }
  994.  
  995.    public void debug(String var1) {
  996.       System.out.println(var1);
  997.    }
  998.  
  999.    public coolmap() {
  1000.       this.modeBox = new Checkbox[this.maxStates];
  1001.       this.audioMode = new CheckboxGroup();
  1002.       this.audioOption = new Checkbox[2];
  1003.       this.openMode = new CheckboxGroup();
  1004.       this.openOption = new Checkbox[2];
  1005.       this.hotMode = new CheckboxGroup();
  1006.       this.hotOption = new Checkbox[2];
  1007.       this.tipsMode = new CheckboxGroup();
  1008.       this.tipsOption = new Checkbox[2];
  1009.       this.borderButtonLabel = new String[this.maxStates];
  1010.       this.deskArrange = "TopBottom";
  1011.       this.readmeDone = false;
  1012.       this.mode = "design";
  1013.       this.instructionID = 1;
  1014.       this.adCountMax = 200;
  1015.       this.hotStyle = 1;
  1016.       this.tipsOn = 1;
  1017.       this.AdButtonHeight = 30;
  1018.    }
  1019. }
  1020.