home *** CD-ROM | disk | FTP | other *** search
- import java.applet.Applet;
- import java.awt.BorderLayout;
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Event;
- import java.awt.Font;
- import java.awt.FontMetrics;
- import java.awt.Graphics;
- import java.awt.Image;
- import java.awt.MediaTracker;
- import java.awt.image.ImageObserver;
- import java.net.MalformedURLException;
- import java.net.URL;
-
- public final class TOC extends Applet implements Runnable, ImageObserver {
- public String scriptFile;
- public TOCScript script;
- public TOCTreeItem TOCAnchor;
- public TOCTreeItem itemSelected;
- public TOCTreeItem helpItem;
- public TOCScrollItem helpScroll;
- public TOCTreeItem soundItem;
- public boolean fSoundPlayed;
- public int helpCounter;
- public int soundCounter;
- public int xOff;
- public int yOff;
- public int xIndent;
- public String standardfont;
- public int standardfontsize;
- public Font standardF;
- public FontMetrics standardFM;
- public String helpfont;
- public int helpfontsize;
- public Font helpF;
- public FontMetrics helpFM;
- public Color bgC;
- public Color bgCInfo;
- public Color textC;
- public Color textCInfo;
- public Color reversC;
- public Color lineC;
- public Color plusC;
- public Image imgBackground;
- public Image imgBackgroundLoad;
- public URL bgImage;
- public Image imgSelection;
- public Image imgSelectionLoad;
- public URL selImage;
- // $FF: renamed from: Õ java.lang.Thread
- private Thread field_0;
- public boolean fRepaint;
- // $FF: renamed from: ├╡ boolean
- private boolean field_1;
- public MediaTracker tracker;
- public TOCScroller Scroller;
- public TOCInfo Info;
- public TOCFrame frame;
- public boolean fVertScroll;
- public boolean fHorzScroll;
- public boolean fScriptToLoad = true;
- public boolean fShowLoading = true;
- // $FF: renamed from: ├╢ java.net.URL
- private URL field_2;
- // $FF: renamed from: ├╕ java.net.URL
- private URL field_3;
- public boolean asWindow;
- // $FF: renamed from: ├╣ java.lang.String
- private String field_4 = new String("Table of Contents");
- public int windowX;
- public int windowY;
- public int windowWidth;
- public int windowHeight;
- // $FF: renamed from: ├║ boolean
- private boolean field_5;
- // $FF: renamed from: ├╗ int
- private int field_6;
- public boolean fLicense;
- public boolean fInitDone;
- // $FF: renamed from: ├╝ java.lang.String
- private String field_7 = new String(" §a\"b$c%d&e/f(g)h=i?j,k.l-m_n:o;p#[0]123456789q~r+s*t\\u|v<w>x{y}z ");
- public int infoHeight;
- public TOCScrollRun ScrollRun;
- // $FF: renamed from: ├╜ boolean
- private boolean field_8;
- public TOCScrollItem genericScroll;
- public String genScrollFile;
- public int iID = 10;
- public int yInfoBase;
- public boolean fUpdate;
- public boolean fPaint;
- public long lReload;
- public long lStart;
- public boolean fCompTOCScript;
-
- public void stop() {
- if (this.field_0 != null) {
- this.field_0.stop();
- this.field_0 = null;
- if (this.ScrollRun != null) {
- this.ScrollRun.stop();
- this.ScrollRun = null;
- }
- }
-
- if (this.frame != null) {
- Event var1 = new Event(this.frame, 201, (Object)null);
- this.frame.postEvent(var1);
- this.frame = null;
- }
-
- if (this.itemSelected != null) {
- this.field_3 = this.itemSelected.url;
- } else {
- this.field_3 = null;
- }
- }
-
- // $FF: renamed from: ├╡ () void
- private final void method_0() {
- this.frame = new TOCFrame(this.field_4, this);
- this.frame.show();
- this.frame.move(this.windowX, this.windowY);
- this.frame.resize(this.windowWidth, this.windowHeight);
- if (this.infoHeight > 0) {
- this.field_8 = true;
- }
-
- this.fRepaint = true;
- }
-
- public synchronized boolean mouseClicked(int var1, int var2, TOCTreeItem var3) {
- if (this.Scroller.Canvas.fCalculating) {
- return true;
- } else {
- for(boolean var4 = false; var3 != null; var3 = var3.next) {
- if (var3.child != null && var2 >= var3.Symboly1 && var2 <= var3.Symboly2 && var1 >= var3.Symbolx1 && var1 <= var3.Symbolx2) {
- boolean var5 = this.subitemSelected(var3.child);
- if (var5) {
- this.selectItem(var3);
- if (var3.url != null) {
- if (var3.target.length() > 0) {
- ((Applet)this).getAppletContext().showDocument(var3.url, var3.target);
- } else {
- ((Applet)this).getAppletContext().showDocument(var3.url);
- }
- }
- }
-
- var3.isExpanded = !var3.isExpanded;
- return true;
- }
-
- if (var2 >= var3.Texty1 && var2 <= var3.Texty2 && var1 >= var3.Textx1 && var1 <= var3.Textx2) {
- this.selectItem(var3);
- if (var3.url != null) {
- if (var3.target.length() > 0) {
- ((Applet)this).getAppletContext().showDocument(var3.url, var3.target);
- } else {
- ((Applet)this).getAppletContext().showDocument(var3.url);
- }
- }
-
- return true;
- }
-
- if (var3.child != null && var3.isExpanded) {
- var4 = this.mouseClicked(var1, var2, var3.child);
- if (var4) {
- return true;
- }
- }
- }
-
- return false;
- }
- }
-
- public final void selectItem(TOCTreeItem var1) {
- if (this.itemSelected != null) {
- this.itemSelected.isSelected = false;
- }
-
- var1.isSelected = true;
- this.itemSelected = var1;
- if (var1.isAutoExpand && var1.child != null) {
- var1.isExpanded = true;
- }
-
- for(TOCTreeItem var2 = var1.parent; var2 != null; var2 = var2.parent) {
- var2.isExpanded = true;
- }
-
- if (Math.min(var1.Texty1, var1.Symboly1) < 0 || Math.max(var1.Texty2, var1.Symboly2) > ((Component)this).size().height) {
- while(this.Scroller.Canvas.fCalculating) {
- this.wait(1);
- }
-
- this.Scroller.Canvas.fCalculating = true;
- this.Scroller.Canvas.paintTree((Graphics)null, this.TOCAnchor, 0, true);
- this.Scroller.Canvas.fCalculating = false;
- this.Scroller.hMax = this.Scroller.Canvas.yMax;
- }
-
- int var3 = this.Scroller.hMax + this.yOff - this.Scroller.Canvas.size().height;
- int var4 = Math.max(var1.Texty2, var1.Symboly2) - this.Scroller.Canvas.size().height + this.yOff;
- if (Math.min(var1.Texty1, var1.Symboly1) < 0) {
- this.Scroller.yScroll = Math.max(1, this.Scroller.yScroll + Math.min(var1.Texty1, var1.Symboly1) - this.yOff);
- this.Scroller.yScroll = Math.min(this.Scroller.yScroll, var3);
- this.fRepaint = true;
- } else {
- if (var4 > 0) {
- TOCScroller var10000 = this.Scroller;
- var10000.yScroll += var4;
- this.Scroller.yScroll = Math.min(this.Scroller.yScroll, var3);
- this.fRepaint = true;
- }
-
- }
- }
-
- public void selectItem(String var1, boolean var2) {
- if (this.asWindow) {
- this.wait(500);
- if (this.frame != null) {
- if (!this.frame.isVisible()) {
- this.frame.show();
- }
- } else {
- this.field_5 = true;
- }
- }
-
- TOCTreeItem var3 = this.TOCAnchor;
-
- while(var3 != null) {
- if (var3.fct != 0) {
- var3 = var3.nextLine;
- } else {
- if (var3.url != null) {
- String var5 = var3.url.toExternalForm();
- boolean var9 = true;
-
- while(var9) {
- int var7 = var5.indexOf("..");
- if (var7 != -1) {
- int var6 = var7 - 2;
- if (var6 >= 0) {
- for(char var8 = var5.charAt(var6); var8 != '/' && var8 != '\\' && var6 > 0; var8 = var5.charAt(var6)) {
- --var6;
- }
-
- var5 = var5.substring(0, var6) + var5.substring(var7 + 2);
- } else {
- var9 = false;
- }
- } else {
- var9 = false;
- }
- }
-
- var5 = var5.replace('\\', '/');
- String var4 = var1.replace('\\', '/');
- if (var5.startsWith(var4)) {
- if (var2 && var3.child != null) {
- var3.isExpanded = true;
- }
-
- if (!var3.isSelected) {
- this.selectItem(var3);
- }
- break;
- }
- }
-
- var3 = var3.nextLine;
- }
- }
-
- this.fRepaint = true;
- }
-
- // $FF: renamed from: ├╢ (java.lang.String, int) int
- private final int method_1(String var1, int var2) {
- int var4 = var2;
- String var3;
- if ((var3 = ((Applet)this).getParameter(var1)) != null) {
- var3 = var3.trim();
-
- try {
- var4 = Integer.valueOf(var3);
- } catch (NumberFormatException var5) {
- var4 = var2;
- }
- }
-
- return var4;
- }
-
- public synchronized boolean mouseMoved(int var1, int var2, TOCTreeItem var3) {
- if (this.Scroller.Canvas.fCalculating) {
- return true;
- } else {
- boolean var4 = false;
-
- TOCTreeItem var5;
- for(var5 = var3; var3 != null; var3 = var3.next) {
- if (var2 >= var3.Texty1 && var2 <= var3.Texty2 && var1 >= var3.Textx1 && var1 <= var3.Textx2) {
- if (var3.helpText.length() > 0) {
- this.helpItem = var3;
- } else {
- this.helpItem = null;
- }
-
- if (var3.soundClip != null) {
- this.soundItem = var3;
- } else {
- this.soundItem = null;
- }
-
- if (var3.url != null) {
- ((Applet)this).getAppletContext().showStatus(var3.url.toExternalForm());
- }
-
- var4 = true;
- break;
- }
-
- if (var3.child != null && var3.isExpanded) {
- var4 = this.mouseMoved(var1, var2, var3.child);
- if (var4) {
- break;
- }
- }
- }
-
- if (var5 == this.TOCAnchor && !var4) {
- this.helpItem = null;
- this.soundItem = null;
- ((Applet)this).getAppletContext().showStatus("");
- }
-
- return var4;
- }
- }
-
- // $FF: renamed from: ├╕ (java.lang.String) java.awt.Color
- private final Color method_2(String var1) {
- Color var2 = null;
- String var3;
- if ((var3 = ((Applet)this).getParameter(var1)) != null) {
- var2 = this.ColorFromRGB(var3.trim());
- }
-
- return var2;
- }
-
- public void paint(Graphics var1) {
- int var2 = 200;
- if (this.asWindow) {
- if (this.frame != null) {
- this.frame.fUpdate = true;
- this.frame.repaint();
-
- while(this.frame.fUpdate) {
- --var2;
- if (var2 <= 0) {
- break;
- }
-
- this.wait(1);
- }
-
- this.frame.fUpdate = false;
- }
- } else {
- this.Scroller.fUpdate = true;
- this.Scroller.repaint();
-
- while(this.Scroller.fUpdate) {
- --var2;
- if (var2 <= 0) {
- break;
- }
-
- this.wait(1);
- }
-
- this.Scroller.fUpdate = false;
- }
-
- this.fPaint = false;
- }
-
- public final void wait(int var1) {
- try {
- Thread.sleep((long)var1);
- } catch (InterruptedException var2) {
- }
- }
-
- public final Color ColorFromRGB(String var1) {
- Object var2 = null;
-
- try {
- int var4 = Integer.valueOf(var1.substring(0, var1.indexOf(",")));
- if (var4 < 0) {
- var4 = 0;
- }
-
- if (var4 > 255) {
- var4 = 255;
- }
-
- String var3 = var1.substring(var1.indexOf(",") + 1);
- int var5 = Integer.valueOf(var3.substring(0, var3.indexOf(",")));
- if (var5 < 0) {
- var5 = 0;
- }
-
- if (var5 > 255) {
- var5 = 255;
- }
-
- var3 = var3.substring(var3.indexOf(",") + 1);
- int var6 = Integer.valueOf(var3);
- if (var6 < 0) {
- var6 = 0;
- }
-
- if (var6 > 255) {
- var6 = 255;
- }
-
- var8 = new Color(var4, var5, var6);
- } catch (NumberFormatException var7) {
- var8 = null;
- }
-
- return var8;
- }
-
- public final Image TOCCreateImage(int var1, int var2) {
- Object var3 = null;
- Image var5 = ((Component)this).createImage(var1, var2);
- boolean var4 = ((Component)this).prepareImage(var5, this);
- if (!var4) {
- while((((Component)this).checkImage(var5, this) & 224) == 0) {
- this.wait(1);
- }
- }
-
- return var5;
- }
-
- public void update(Graphics var1) {
- if (!this.fScriptToLoad) {
- this.Scroller.setScrollbars();
- }
-
- int var2 = 200;
- this.fPaint = true;
- this.paint(var1);
-
- while(this.fPaint) {
- --var2;
- if (var2 <= 0) {
- break;
- }
-
- this.wait(1);
- }
-
- this.fPaint = false;
- ((Component)this).getToolkit().sync();
- this.fUpdate = false;
- }
-
- public final boolean subitemSelected(TOCTreeItem var1) {
- boolean var2;
- for(var2 = false; var1 != null; var1 = var1.next) {
- if (var1.isSelected) {
- var2 = true;
- break;
- }
-
- if (var1.child != null) {
- var2 = this.subitemSelected(var1.child);
- }
-
- if (var2) {
- break;
- }
- }
-
- return var2;
- }
-
- public final void TOCDrawImage(Graphics var1, Image var2, int var3, int var4, ImageObserver var5) {
- if (var1 != null && var2 != null) {
- var1.drawImage(var2, var3, var4, var5);
- }
- }
-
- public final void getInfo() {
- if (this.genScrollFile != null) {
- TOCTreeItem var1 = new TOCTreeItem();
- TOCScrollScript var2 = new TOCScrollScript(((Applet)this).getDocumentBase(), this.genScrollFile, this, var1, true);
- var2.start();
-
- while(!var2.fDone) {
- this.wait(500);
- }
-
- this.genericScroll = var1.scroll;
- }
-
- if (this.script == null) {
- this.script = new TOCScript(((Applet)this).getDocumentBase(), this.scriptFile, this);
- if (this.script.ok == -1) {
- this.stop();
- }
-
- this.TOCAnchor = this.script.start;
- TOCTreeItem var3 = this.TOCAnchor;
-
- while(var3 != null) {
- if (var3.fct != 0) {
- var3 = var3.nextLine;
- } else {
- if (var3.imageName != null) {
- var3.imageLoad = ((Applet)this).getImage(((Applet)this).getDocumentBase(), var3.imageName);
- this.tracker.addImage(var3.imageLoad, var3.id);
- }
-
- if (var3.imageOpenName != null) {
- var3.imageOpenLoad = ((Applet)this).getImage(((Applet)this).getDocumentBase(), var3.imageOpenName);
- this.tracker.addImage(var3.imageOpenLoad, var3.id + 1);
- }
-
- if (var3.sound != null) {
- var3.soundClip = ((Applet)this).getAudioClip(((Applet)this).getDocumentBase(), var3.sound);
- }
-
- if (var3.isSelected) {
- this.itemSelected = var3;
- }
-
- var3 = var3.nextLine;
- }
- }
- }
-
- if (this.asWindow && this.frame != null && this.script.menuStart != null) {
- this.frame.createMenu();
- this.fRepaint = true;
- }
-
- if (!this.fShowLoading && this.field_3 != null) {
- this.selectItem(this.field_3.toExternalForm(), false);
- }
-
- this.fScriptToLoad = false;
- }
-
- public void start() {
- this.helpItem = null;
- this.helpScroll = null;
- this.soundItem = null;
- this.fSoundPlayed = false;
- if (this.asWindow) {
- if (this.frame == null) {
- this.field_5 = true;
- } else {
- this.frame.show();
- this.frame.move(this.windowX, this.windowY);
- this.frame.resize(this.windowWidth, this.windowHeight);
- }
- }
-
- if (this.field_2 == null || ((Applet)this).getDocumentBase().toExternalForm() != this.field_2.toExternalForm()) {
- if (this.field_2 != null) {
- this.fShowLoading = false;
- }
-
- this.field_2 = ((Applet)this).getDocumentBase();
- }
-
- if (this.field_0 == null) {
- this.field_0 = new Thread(this);
- this.field_0.start();
- if (this.infoHeight > 0) {
- this.ScrollRun = new TOCScrollRun(this);
- this.ScrollRun.start();
- }
- }
-
- this.fRepaint = true;
- }
-
- public String getAppletInfo() {
- return "TOC.java, 4.2, (c) by Stefan Ruettinger";
- }
-
- public final URL getURL(String var1) {
- URL var2 = null;
- boolean var3 = true;
-
- try {
- var2 = new URL(var1);
- } catch (MalformedURLException var5) {
- var3 = false;
- }
-
- if (!var3) {
- try {
- var2 = new URL(((Applet)this).getDocumentBase(), var1);
- } catch (MalformedURLException var4) {
- var2 = null;
- }
- }
-
- return var2;
- }
-
- // $FF: renamed from: ├╣ () int
- private int method_3() {
- if ((this.scriptFile = ((Applet)this).getParameter("script")) == null) {
- return -1;
- } else {
- String var1;
- if ((var1 = ((Applet)this).getParameter("standardfont")) != null) {
- var1 = var1.trim();
- this.standardfont = var1.substring(0, var1.indexOf(","));
- var1 = var1.substring(var1.indexOf(",") + 1);
-
- try {
- this.standardfontsize = new Integer(var1);
- } catch (NumberFormatException var8) {
- this.standardfontsize = 14;
- }
- } else {
- this.standardfont = new String("TimesRoman");
- this.standardfontsize = 14;
- }
-
- if ((var1 = ((Applet)this).getParameter("helpfont")) != null) {
- var1 = var1.trim();
- this.helpfont = var1.substring(0, var1.indexOf(","));
- var1 = var1.substring(var1.indexOf(",") + 1);
-
- try {
- this.helpfontsize = new Integer(var1);
- } catch (NumberFormatException var7) {
- this.helpfontsize = 10;
- }
- } else {
- this.helpfont = new String("TimesRoman");
- this.helpfontsize = 10;
- }
-
- this.xIndent = this.method_1("xindent", 12);
- this.xOff = this.method_1("xoffset", 5);
- this.yOff = this.method_1("yoffset", 5) + 2;
- this.fVertScroll = true;
- if ((var1 = ((Applet)this).getParameter("vscroll")) != null) {
- var1 = var1.trim();
- if (var1.equals("NO")) {
- this.fVertScroll = false;
- }
- }
-
- this.fHorzScroll = true;
- if ((var1 = ((Applet)this).getParameter("hscroll")) != null) {
- var1 = var1.trim();
- if (var1.equals("NO")) {
- this.fHorzScroll = false;
- }
- }
-
- this.textC = this.method_2("textcolor");
- if (this.textC == null) {
- this.textC = Color.black;
- }
-
- this.reversC = this.method_2("reverstextcolor");
- if (this.reversC == null) {
- this.reversC = Color.white;
- }
-
- this.lineC = this.method_2("linecolor");
- if (this.lineC == null) {
- this.lineC = Color.black;
- }
-
- this.plusC = this.method_2("pluscolor");
- if (this.plusC == null) {
- this.plusC = this.lineC;
- }
-
- this.bgC = this.method_2("backgroundcolor");
- if (this.bgC == null) {
- this.bgC = new Color(192, 192, 192);
- }
-
- if ((var1 = ((Applet)this).getParameter("background")) != null) {
- boolean var2 = true;
-
- try {
- this.bgImage = new URL(var1);
- } catch (MalformedURLException var6) {
- var2 = false;
- }
-
- if (!var2) {
- try {
- this.bgImage = new URL(((Applet)this).getDocumentBase(), var1);
- } catch (MalformedURLException var5) {
- this.bgImage = null;
- }
- }
- }
-
- if ((var1 = ((Applet)this).getParameter("selectimage")) != null) {
- boolean var25 = true;
-
- try {
- this.selImage = new URL(var1);
- } catch (MalformedURLException var4) {
- var25 = false;
- }
-
- if (!var25) {
- try {
- this.selImage = new URL(((Applet)this).getDocumentBase(), var1);
- } catch (MalformedURLException var3) {
- this.selImage = null;
- }
- }
- }
-
- if ((var1 = ((Applet)this).getParameter("aswindow")) != null) {
- var1 = var1.trim();
- if (var1.equals("YES")) {
- this.asWindow = true;
- }
- }
-
- if ((var1 = ((Applet)this).getParameter("windowtitle")) != null) {
- this.field_4 = var1;
- }
-
- this.windowX = this.method_1("windowx", 10);
- this.windowY = this.method_1("windowy", 10);
- this.windowWidth = this.method_1("windowwidth", 200);
- this.windowHeight = this.method_1("windowheight", 400);
- this.infoHeight = this.method_1("infoheight", 0);
- this.bgCInfo = this.method_2("infobackgroundcolor");
- if (this.bgCInfo == null) {
- this.bgCInfo = new Color(192, 192, 192);
- }
-
- this.textCInfo = this.method_2("infotextcolor");
- if (this.textCInfo == null) {
- this.textCInfo = Color.black;
- }
-
- this.genScrollFile = ((Applet)this).getParameter("infoscript");
- this.lReload = (long)this.method_1("inforeload", -1);
- if (this.lReload > 0L) {
- this.lReload *= 100L;
- }
-
- if ((var1 = ((Applet)this).getParameter("compressedscript")) != null) {
- var1 = var1.trim();
- if (var1.equals("YES")) {
- this.fCompTOCScript = true;
- }
- }
-
- return 0;
- }
- }
-
- public void run() {
- while(this.field_0 != null) {
- if (this.field_5) {
- if (this.frame == null) {
- this.method_0();
- }
-
- this.field_5 = false;
- }
-
- if (this.fScriptToLoad) {
- ((Component)this).repaint();
- this.getInfo();
- this.Scroller.checkScrollbars();
- } else {
- if (!this.field_1) {
- boolean var2 = false;
- if (this.imgBackgroundLoad != null) {
- boolean var3 = this.tracker.checkID(0, true);
- if (var3) {
- if (!this.tracker.isErrorID(0)) {
- this.imgBackground = this.imgBackgroundLoad;
- this.fRepaint = true;
- }
-
- this.imgBackgroundLoad = null;
- } else {
- var2 = true;
- }
- }
-
- if (this.imgSelectionLoad != null) {
- boolean var4 = this.tracker.checkID(1, true);
- if (var4) {
- if (!this.tracker.isErrorID(1)) {
- this.imgSelection = this.imgSelectionLoad;
- this.fRepaint = true;
- }
-
- this.imgSelectionLoad = null;
- } else {
- var2 = true;
- }
- }
-
- TOCTreeItem var1 = this.TOCAnchor;
-
- while(var1 != null) {
- if (var1.fct != 0) {
- var1 = var1.nextLine;
- } else {
- if (var1.imageName != null && var1.imageLoad != null) {
- boolean var5 = this.tracker.checkID(var1.id, true);
- if (var5) {
- if (!this.tracker.isErrorID(var1.id)) {
- var1.image = var1.imageLoad;
- var1.imgWidth = var1.image.getWidth(this);
- var1.imgHeight = var1.image.getHeight(this);
- this.fRepaint = true;
- } else {
- var1.imageLoad = null;
- }
- } else {
- var2 = true;
- }
- }
-
- if (var1.imageOpenName != null && var1.imageOpenLoad != null) {
- boolean var6 = this.tracker.checkID(var1.id + 1, true);
- if (var6) {
- if (!this.tracker.isErrorID(var1.id + 1)) {
- var1.imageOpen = var1.imageOpenLoad;
- var1.imgOpenWidth = var1.imageOpen.getWidth(this);
- var1.imgOpenHeight = var1.imageOpen.getHeight(this);
- this.fRepaint = true;
- }
-
- var1.imageOpenLoad = null;
- } else {
- var2 = true;
- }
- }
-
- var1 = var1.nextLine;
- }
- }
-
- if (!var2) {
- this.field_1 = true;
- }
- }
-
- if (this.helpCounter == 3) {
- this.fRepaint = true;
- }
-
- if (this.helpCounter < 4) {
- ++this.helpCounter;
- }
-
- if (this.soundCounter < 4) {
- ++this.soundCounter;
- }
-
- if (this.soundItem != null && !this.fSoundPlayed && this.soundCounter == 3) {
- this.fSoundPlayed = true;
- this.soundItem.soundClip.play();
- }
-
- if (this.Scroller.tAbsEvt != 0L && System.currentTimeMillis() - this.Scroller.tAbsEvt > 100L) {
- this.fRepaint = true;
- this.Scroller.tAbsEvt = 0L;
- }
-
- if (this.fRepaint) {
- this.Scroller.checkScrollbars();
- if (this.infoHeight > 0) {
- this.Info.repaint();
- if (this.field_8) {
- this.frame.add("South", this.Info);
- this.frame.validate();
- this.field_8 = false;
- }
- }
-
- this.fRepaint = false;
- }
-
- this.wait(200);
- ++this.field_6;
- if (this.field_6 > 300) {
- System.gc();
- this.field_6 = 0;
- }
- }
- }
-
- }
-
- public void init() {
- super.init();
- if (!this.fLicense) {
- URL var1 = ((Applet)this).getCodeBase();
- if (!var1.getProtocol().equals("file")) {
- int var2 = TOCLicense.id;
- String var4 = TOCLicense.domain;
- String var5 = new String();
- if (var4.length() < 6) {
- return;
- }
-
- if (!var4.substring(0, 1).equals("1")) {
- return;
- }
-
- String var6 = Integer.toString(var2);
- int var8 = 1;
-
- for(int var3 = 0; var3 < var6.length(); ++var3) {
- var8 += Integer.valueOf(var6.substring(var3, var3 + 1));
- }
-
- String var7 = "000" + Integer.toString(var8);
- var7 = var7.substring(var7.length() - 3);
- if (var4.substring(1, 4).equals(var7)) {
- for(int var13 = 4; var13 < var4.length(); var13 += 2) {
- String var9 = var4.substring(var13, var13 + 2);
- int var10 = Integer.valueOf(var9);
- int var11 = (var2 + var13) / 30;
- int var12 = var10 - (var2 + var13) + var11 * 30;
- var5 = var5 + this.field_7.substring(var12, var12 + 1);
- }
-
- String var16 = var1.getHost().toLowerCase();
- int var17 = 1;
-
- for(int var14 = 0; var14 < var16.length(); ++var14) {
- var17 += this.field_7.indexOf(var16.substring(var14, var14 + 1));
- }
-
- String var18 = var16 + var1.getFile().toLowerCase();
- int var19 = var18.indexOf(var5);
- if (var19 != -1 && var5.length() > 4) {
- if (var19 == 0) {
- if (var17 == var2) {
- this.fLicense = true;
- }
- } else {
- this.fLicense = true;
- }
- }
- }
- } else {
- this.fLicense = true;
- }
- }
-
- if (this.tracker == null) {
- this.tracker = new MediaTracker(this);
- }
-
- if (this.method_3() == -1) {
- this.stop();
- }
-
- if (this.bgImage != null) {
- this.imgBackgroundLoad = ((Applet)this).getImage(this.bgImage);
- this.tracker.addImage(this.imgBackgroundLoad, 0);
- }
-
- if (this.selImage != null) {
- this.imgSelectionLoad = ((Applet)this).getImage(this.selImage);
- this.tracker.addImage(this.imgSelectionLoad, 1);
- }
-
- this.standardF = new Font(this.standardfont, 0, this.standardfontsize);
- this.standardFM = ((Component)this).getFontMetrics(this.standardF);
- this.helpF = new Font(this.helpfont, 0, this.helpfontsize);
- this.helpFM = ((Component)this).getFontMetrics(this.helpF);
- this.field_6 = 0;
- this.yInfoBase = this.infoHeight - this.standardFM.getMaxDescent();
- this.Scroller = new TOCScroller(this);
- if (this.infoHeight > 0) {
- this.Info = new TOCInfo(this);
- this.Info.resize(((Component)this).size().width, this.infoHeight);
- }
-
- if (this.asWindow) {
- this.field_5 = true;
- } else {
- ((Container)this).setLayout(new BorderLayout());
- ((Container)this).add("Center", this.Scroller);
- if (this.infoHeight > 0) {
- ((Container)this).add("South", this.Info);
- }
- }
-
- this.fInitDone = true;
- }
- }
-