home *** CD-ROM | disk | FTP | other *** search
- import java.applet.Applet;
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Dimension;
- import java.awt.Event;
- import java.awt.Font;
- import java.awt.Frame;
- import java.awt.Graphics;
- import java.awt.Image;
- import java.awt.LayoutManager;
- import java.awt.MediaTracker;
- import java.awt.Panel;
- import java.io.DataInputStream;
- import java.io.IOException;
- import java.io.InputStream;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.util.NoSuchElementException;
- import java.util.StringTokenizer;
-
- public class JAVATree extends Applet implements Runnable {
- Thread thJAVATree;
- String sDefMO = "1st JAVA Navigator[Tree] (c)1997-1999 AUSCOMP - World Wide (www.auscomp.com)";
- String sCopyright = "AUSCOMP (www.auscomp.com)";
- String[] aHref;
- String[] aFrame;
- String[] aHref2;
- String[] aFrame2;
- String[] aExpand;
- String[] aMO;
- int[] iLevel;
- String sText = "";
- String sHref = "";
- String sFrame = "";
- String sHref2 = "";
- String sFrame2 = "";
- String sExpand = "";
- int[] iColor;
- String sLevel = "";
- String sPic1 = "";
- String sPic2 = "";
- String sMO = "";
- int iItemCnt;
- int iLoading;
- Font fFont = new Font("Dialog", 0, 12);
- boolean bExpand = false;
- boolean bTREE_AUTOEXPAND = false;
- String dblClick = "no";
- Image imgBG;
- private boolean m_fAllLoaded = false;
- private boolean bCopyright = false;
- private boolean allLoaded = false;
- int intWidth = 200;
- int intHeight = 250;
- String sMOUSEOVERSOUND = "none";
- String sMOUSECLICKSOUND = "none";
- Image ImgClosed;
- Image ImgOpen;
- Image ImgdLeaf;
- Image ImgdClosed;
- Image ImgdOpen;
- int iYRec;
- String sLine;
- TreeNode oldNode;
- TreeNode newNode;
- TreeNode oldMouseOverNode;
- // $FF: renamed from: g1 java.awt.Graphics
- Graphics field_0;
- Frame frame;
- int[] iColorBlack = new int[]{0, 0, 0};
- int[] iColorWhite = new int[]{255, 255, 255};
- int[] iColorRed = new int[]{255, 0, 0};
- int[] iColorBlue = new int[]{0, 0, 255};
- int[] iColorYellow = new int[]{255, 255, 231};
- int[] iColorGreen = new int[]{0, 255, 0};
- String[] sColorParam = new String[]{"BACKGROUND", "FOREGROUND", "SELBACKGROUND", "SELFOREGROUND", "MOUSEOVER", "LINECOLOR", "FOLDEROCOLOR", "FOLDERCCOLOR", "LEAFCOLOR", "TOOLTIPBACKCOLOR", "TOOLTIPFORECOLOR", "MOUSEOVERFRAMECOLOR"};
- String[] sNormalParam = new String[]{"STYLE", "MOUSEOVERFRAME", "LINESTEP", "TOOLTIP", "BORDER", "DOUBLECLICK", "AUTOEXPAND"};
- String[] sImageParam = new String[]{"FOLDER_OPEN", "FOLDER_CLOSED", "LEAF", "BACKGROUNDIMAGE"};
- TreeView treeView1;
- // $FF: renamed from: TN TreeNode[]
- public TreeNode[] field_1;
- public TreeNode[] TN1;
-
- void treeView1_MouseEnter(Event event) {
- }
-
- void treeView1_KeyPress(Event event) {
- }
-
- void treeView1_MouseMove(Event event) {
- try {
- if (!this.sMOUSEOVERSOUND.equals("none")) {
- ((Applet)this).play(((Applet)this).getCodeBase(), this.sMOUSEOVERSOUND);
- }
- } catch (Exception var3) {
- }
-
- for(int z = 0; z < this.treeView1.getCount(); ++z) {
- if (this.field_1[z] == this.treeView1.getMouseOverNode()) {
- this.sMO = this.aMO[z];
- this.sHref = this.aHref[z];
- this.newNode = this.field_1[z];
- break;
- }
- }
-
- this.sMO = this.sMO.trim();
- if (this.sMO.toLowerCase().equals("none") || this.sMO.toLowerCase().equals("")) {
- this.sMO = this.sHref.trim();
- }
-
- if (this.newNode != this.oldNode) {
- ((Applet)this).showStatus(this.sMO);
- this.oldNode = this.newNode;
- }
-
- }
-
- void treeView1_MouseDown(Event event) {
- try {
- if (!this.sMOUSECLICKSOUND.equals("none")) {
- ((Applet)this).play(((Applet)this).getCodeBase(), this.sMOUSECLICKSOUND);
- }
- } catch (Exception var5) {
- }
-
- try {
- for(int z = 0; z < this.treeView1.getCount(); ++z) {
- if (this.field_1[z] == this.treeView1.getSelectedNode()) {
- this.sHref = this.aHref[z];
- this.sFrame = this.aFrame[z];
- this.sHref2 = this.aHref2[z];
- this.sFrame2 = this.aFrame2[z];
- this.sExpand = this.aExpand[z];
- this.sMO = this.aMO[z];
- break;
- }
- }
-
- this.sHref = this.sHref.trim();
- this.sFrame = this.sFrame.trim();
- this.sHref2 = this.sHref2.trim();
- this.sFrame2 = this.sFrame2.trim();
- this.sExpand = this.sExpand.trim();
- this.sMO = this.sMO.trim();
- if (!this.sHref.toLowerCase().equals("none")) {
- try {
- ((Applet)this).getAppletContext().showDocument(new URL(((Applet)this).getCodeBase(), this.sHref), this.sFrame);
- } catch (MalformedURLException var4) {
- }
- }
-
- if (!this.sHref2.toLowerCase().equals("none")) {
- try {
- ((Applet)this).getAppletContext().showDocument(new URL(((Applet)this).getCodeBase(), this.sHref2), this.sFrame2);
- return;
- } catch (MalformedURLException var3) {
- return;
- }
- }
- } catch (Exception var6) {
- }
-
- }
-
- public void start() {
- this.field_0 = ((Component)this).getGraphics();
- this.paint(this.field_0);
- this.thJAVATree = new Thread(this);
- this.thJAVATree.start();
- }
-
- public void run() {
- if (!this.allLoaded) {
- this.constructTree();
- this.treeView1.show(true);
- }
-
- }
-
- public void stop() {
- this.thJAVATree.stop();
- this.thJAVATree = null;
- }
-
- public void paint(Graphics g) {
- ++this.iLoading;
- g.drawString("1st JAVA Navigator V5.0", 10, 20);
- g.drawString("Loading resource No." + this.iLoading, 10, 40);
- g.drawString("Please wait ...", 10, 60);
- }
-
- public void init() {
- super.init();
- ((Container)this).setLayout((LayoutManager)null);
-
- try {
- Dimension d = ((Component)this).size();
- ((Panel)this).addNotify();
- this.intWidth = d.width;
- this.intHeight = d.height;
- } catch (Exception var2) {
- }
-
- if (this.intWidth < 20) {
- this.intWidth = 200;
- }
-
- if (this.intHeight < 50) {
- this.intHeight = 250;
- }
-
- this.treeView1 = new TreeView();
- this.treeView1.reshape(0, 0, this.intWidth, this.intHeight);
- this.treeView1.setFont(new Font("Dialog", 0, 12));
- ((Container)this).add(this.treeView1);
- this.treeView1.hide();
- ((Applet)this).showStatus("...1st JAVA Navigator[Tree] loading, please wait");
- }
-
- public void setTreeNode(String sNode, boolean bExecute) {
- try {
- if (sNode == null) {
- return;
- }
-
- this.treeView1.setNode(sNode);
- if (this.treeView1.getSelectedText().equals(sNode) && bExecute) {
- this.treeView1_MouseDown((Event)null);
- return;
- }
- } catch (Exception var3) {
- }
-
- }
-
- public String getTreeNode() {
- return this.treeView1.getSelectedText() == null ? null : this.treeView1.getSelectedText();
- }
-
- public void addTreeNode(String s1ParentNodeText, String s1NodeText, String s1Href1, String s1Target1, String s1Href2, String s1Target2, String s1Statusbar, String s1Expand) {
- try {
- if (s1NodeText == null) {
- return;
- }
-
- this.aHref[this.iItemCnt] = "none";
- if (s1Href1 != null && !s1Href1.trim().equals("")) {
- this.aHref[this.iItemCnt] = s1Href1;
- }
-
- if (s1Target1 != null) {
- this.aFrame[this.iItemCnt] = s1Target1;
- } else {
- this.aFrame[this.iItemCnt] = "none";
- }
-
- this.aHref2[this.iItemCnt] = "none";
- if (s1Href2 != null && !s1Href2.trim().equals("")) {
- this.aHref2[this.iItemCnt] = s1Href2;
- }
-
- if (s1Target2 != null) {
- this.aFrame2[this.iItemCnt] = s1Target2;
- } else {
- this.aFrame2[this.iItemCnt] = "none";
- }
-
- this.aMO[this.iItemCnt] = "";
- if (s1Statusbar != null && !s1Statusbar.trim().equals("")) {
- this.aMO[this.iItemCnt] = s1Statusbar;
- }
-
- this.aExpand[this.iItemCnt] = "NO";
- if (s1Expand != null && s1Expand.trim().toLowerCase().equals("yes")) {
- this.aExpand[this.iItemCnt] = "YES";
- }
-
- this.field_1[this.iItemCnt] = new TreeNode(s1NodeText, this.ImgdLeaf, this.ImgdLeaf);
- this.bExpand = false;
- if (this.aExpand[this.iItemCnt].toLowerCase().equals("yes")) {
- this.bExpand = true;
- }
-
- if (this.bTREE_AUTOEXPAND) {
- this.bExpand = true;
- }
-
- if (s1ParentNodeText.trim().equals("")) {
- this.treeView1.append(this.field_1[this.iItemCnt], this.bExpand);
- } else {
- this.treeView1.setNode(s1ParentNodeText);
- this.TN1[this.iItemCnt] = this.treeView1.getSelectedNode();
- if (this.TN1[this.iItemCnt] != null) {
- this.TN1[this.iItemCnt].setCollapsedImage(this.ImgdClosed);
- this.TN1[this.iItemCnt].setExpandedImage(this.ImgdOpen);
- }
-
- this.treeView1.insert(this.field_1[this.iItemCnt], this.TN1[this.iItemCnt], 0, this.bExpand);
- }
-
- if (!this.bTREE_AUTOEXPAND) {
- if (this.aExpand[this.iItemCnt].trim().toUpperCase().equals("YES")) {
- this.bExpand = true;
- } else {
- this.bExpand = false;
- }
- }
-
- this.treeView1.setNode(s1NodeText);
- } catch (Exception var9) {
- }
-
- ++this.iItemCnt;
- this.treeView1.redraw();
- }
-
- public void delTreeNode(String sNode) {
- try {
- if (!sNode.trim().equals("(c)1997-199 Auscomp") && !sNode.trim().equals("Copyright parameter missing!") && !sNode.trim().equals("1st JAVA Navigator[Tree]") && !sNode.trim().equals("For evaluation only") && !sNode.trim().equals("-------------------------------------")) {
- this.treeView1.remove(sNode);
- this.treeView1.redraw();
- return;
- }
- } catch (Exception var2) {
- }
-
- }
-
- public void constructTree() {
- String strBG = "";
- this.iColor = new int[3];
-
- try {
- strBG = ((Applet)this).getParameter("COPYRIGHT");
- if (strBG.indexOf(this.sCopyright) > 0) {
- this.bCopyright = true;
- } else {
- this.bCopyright = false;
- }
- } catch (Exception var24) {
- }
-
- for(int x = 0; x < 12; ++x) {
- switch (x) {
- case 0:
- this.iColor = this.iColorWhite;
- break;
- case 1:
- this.iColor = this.iColorBlack;
- break;
- case 2:
- this.iColor = this.iColorBlue;
- break;
- case 3:
- this.iColor = this.iColorWhite;
- break;
- case 4:
- this.iColor = this.iColorRed;
- break;
- case 5:
- this.iColor = this.iColorBlack;
- break;
- case 6:
- this.iColor = this.iColorBlack;
- break;
- case 7:
- this.iColor = this.iColorBlack;
- break;
- case 8:
- this.iColor = this.iColorBlack;
- break;
- case 9:
- this.iColor = this.iColorYellow;
- break;
- case 10:
- this.iColor = this.iColorBlack;
- break;
- case 11:
- this.iColor = this.iColorRed;
- }
-
- try {
- strBG = ((Applet)this).getParameter(this.sColorParam[x]);
- if (strBG != null) {
- this.iColor[0] = this.getCOLOR(0, this.sColorParam[x], strBG);
- this.iColor[1] = this.getCOLOR(1, this.sColorParam[x], strBG);
- this.iColor[2] = this.getCOLOR(2, this.sColorParam[x], strBG);
- }
- } catch (Exception var23) {
- }
-
- switch (x) {
- case 0:
- this.treeView1.setBackground(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 1:
- this.treeView1.setForeground(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 2:
- this.treeView1.setBgHilite(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 3:
- this.treeView1.setFgHilite(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 4:
- this.treeView1.setMOHilite(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 5:
- this.treeView1.setLineColor(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 6:
- this.treeView1.setFolderOColor(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 7:
- this.treeView1.setFolderCColor(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 8:
- this.treeView1.setLeafColor(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 9:
- this.treeView1.setToolTipBackColor(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 10:
- this.treeView1.setToolTipForeColor(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 11:
- this.treeView1.setMouseOverFrameColor(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- }
- }
-
- try {
- this.sMOUSEOVERSOUND = "none";
- strBG = ((Applet)this).getParameter("MOUSEOVERSOUND");
- if (strBG != null) {
- this.sMOUSEOVERSOUND = strBG;
- }
- } catch (Exception var22) {
- }
-
- try {
- this.sMOUSECLICKSOUND = "none";
- strBG = ((Applet)this).getParameter("MOUSECLICKSOUND");
- if (strBG != null) {
- this.sMOUSECLICKSOUND = strBG;
- }
- } catch (Exception var21) {
- }
-
- for(int x = 0; x < 7; ++x) {
- try {
- strBG = ((Applet)this).getParameter(this.sNormalParam[x]);
- } catch (Exception var20) {
- }
-
- switch (x) {
- case 0:
- if (strBG == null) {
- strBG = "AXAA";
- }
-
- this.treeView1.setStyle(strBG);
- break;
- case 1:
- if (strBG == null) {
- strBG = "none";
- }
-
- this.treeView1.setMouseOverStyle(strBG);
- break;
- case 2:
- try {
- this.treeView1.setLineStep(Integer.parseInt(strBG));
- } catch (Exception var19) {
- }
- break;
- case 3:
- try {
- if (strBG == null) {
- strBG = "Yes";
- }
-
- if (strBG.trim().toLowerCase().equals("no")) {
- strBG = "No";
- }
- } catch (Exception var18) {
- }
-
- this.treeView1.setToolTip(strBG);
- break;
- case 4:
- if (strBG == null) {
- strBG = "No";
- }
-
- try {
- if (strBG.trim().toLowerCase().equals("yes")) {
- strBG = "Yes";
- }
- } catch (Exception var17) {
- }
-
- this.treeView1.setBorder(strBG);
- break;
- case 5:
- if (strBG == null) {
- strBG = "No";
- }
-
- try {
- if (strBG.trim().toLowerCase().equals("yes")) {
- strBG = "Yes";
- }
- } catch (Exception var16) {
- }
-
- this.treeView1.setDblClick(strBG);
- break;
- case 6:
- this.bTREE_AUTOEXPAND = false;
-
- try {
- if (strBG.trim().toLowerCase().equals("yes")) {
- this.bTREE_AUTOEXPAND = true;
- }
- } catch (Exception var15) {
- }
- }
- }
-
- try {
- strBG = ((Applet)this).getParameter("FONT");
- String fName = "";
- String fStyle = "";
- String fSize = "";
- int iStyle = 0;
- if (strBG != null) {
- StringTokenizer parser = new StringTokenizer(strBG, ";");
-
- try {
- fName = parser.nextToken();
- fStyle = parser.nextToken();
- fSize = parser.nextToken();
- if (fStyle.trim().toLowerCase().equals("bold")) {
- iStyle = 1;
- }
-
- if (fStyle.trim().toLowerCase().equals("italic")) {
- iStyle = 2;
- }
-
- this.fFont = new Font(fName, iStyle, Integer.parseInt(fSize.trim()));
- } catch (NoSuchElementException var12) {
- System.out.println(strBG + " Parameter Error(1)");
- } catch (Exception var13) {
- System.out.println(strBG + " Parameter Error(2)");
- }
- }
-
- this.treeView1.setFont(this.fFont);
- } catch (Exception var14) {
- }
-
- for(int x = 0; x < 4; ++x) {
- try {
- strBG = ((Applet)this).getParameter(this.sImageParam[x]);
- this.imgBG = null;
- if (strBG != null) {
- this.imgBG = ((Applet)this).getImage(((Applet)this).getCodeBase(), strBG);
- MediaTracker m = new MediaTracker(this);
-
- try {
- m.addImage(this.imgBG, 0);
- m.waitForAll();
- } catch (InterruptedException var10) {
- }
- }
-
- switch (x) {
- case 0:
- if (this.imgBG.getHeight(this) > 0) {
- this.ImgdOpen = this.imgBG;
- } else {
- System.out.println("Error - couldn't find FOLDER OPEN IMAGE - please check image URL");
- }
- break;
- case 1:
- if (this.imgBG.getHeight(this) > 0) {
- this.ImgdClosed = this.imgBG;
- } else {
- System.out.println("Error - couldn't find FOLDER CLOSED IMAGE - please check image URL");
- }
- break;
- case 2:
- if (this.imgBG.getHeight(this) > 0) {
- this.ImgdLeaf = this.imgBG;
- } else {
- System.out.println("Error - couldn't find FOLDER CLOSED IMAGE - please check image URL");
- }
- break;
- case 3:
- if (this.imgBG.getHeight(this) > 0) {
- this.treeView1.setBGImage(this.imgBG);
- this.treeView1.repaint();
- } else {
- System.out.println("Error - couldn't find BACKGROUND IMAGE - please check image URL");
- }
- }
- } catch (Exception var11) {
- }
- }
-
- try {
- String var27 = null;
- String var28 = ((Applet)this).getParameter("CONTENT");
- if (var28 == null) {
- this.getParameterContent();
- } else {
- this.getFileContent(var28);
- }
- } catch (Exception var9) {
- }
-
- this.allLoaded = true;
- }
-
- private void getParameterContent() {
- ((Component)this).repaint();
-
- int i;
- for(i = 0; ((Applet)this).getParameter("I" + i) != null; ++i) {
- }
-
- this.aHref = new String[2999];
- this.aFrame = new String[2999];
- this.aHref2 = new String[2999];
- this.aFrame2 = new String[2999];
- this.aExpand = new String[2999];
- this.aMO = new String[2999];
- this.iLevel = new int[2999];
- this.field_1 = new TreeNode[2999];
- this.TN1 = new TreeNode[2999];
- String strBG = null;
-
- for(int x = 0; x < i; ++x) {
- strBG = ((Applet)this).getParameter("I" + x);
- if (strBG == null) {
- System.out.println("I" + x + " Parameter Error");
- }
-
- this.workParam("I" + x, strBG);
- }
-
- this.makeTree(this.iItemCnt);
- }
-
- private void getFileContent(String str1BG) {
- ((Component)this).repaint();
- this.readFile(str1BG);
- this.makeTree(this.iItemCnt);
- }
-
- public boolean handleEvent(Event event) {
- try {
- if (this.treeView1.getMouseOverNode() != null && event.target == this.treeView1 && event.id == 501) {
- this.treeView1_MouseDown(event);
- return true;
- }
- } catch (Exception var3) {
- }
-
- if (event.target == this.treeView1 && event.id == 504) {
- this.treeView1_MouseEnter(event);
- return true;
- } else {
- try {
- if (this.oldMouseOverNode != this.treeView1.getMouseOverNode() && this.treeView1.getMouseOverNode() != null && event.target == this.treeView1 && event.id == 503) {
- this.treeView1_MouseMove(event);
- this.oldMouseOverNode = this.treeView1.getMouseOverNode();
- return true;
- }
- } catch (Exception var2) {
- }
-
- if (event.target == this.treeView1 && event.id == 401) {
- this.treeView1_KeyPress(event);
- return true;
- } else {
- return super.handleEvent(event);
- }
- }
- }
-
- private int getCOLOR(int iColor, String sWhat, String sPBG) {
- int iRed = 255;
- int iBlue = 255;
- int iGreen = 255;
- StringTokenizer parser = new StringTokenizer(sPBG, ",");
-
- try {
- String sRed = parser.nextToken();
- String sGreen = parser.nextToken();
- String sBlue = parser.nextToken();
- iRed = Integer.parseInt(sRed);
- iGreen = Integer.parseInt(sGreen);
- iBlue = Integer.parseInt(sBlue);
- } catch (NoSuchElementException var11) {
- System.out.println(sWhat + " Parameter Error(1)");
- } catch (Exception var12) {
- System.out.println(sWhat + " Parameter Error(2)");
- }
-
- switch (iColor) {
- case 0:
- return iRed;
- case 1:
- return iGreen;
- case 2:
- return iBlue;
- default:
- return 255;
- }
- }
-
- private void makeNode(int iNCnt, String sT, String sP1, String sP2) {
- this.ImgClosed = this.ImgdLeaf;
- this.ImgOpen = this.ImgdLeaf;
- if (!sP1.trim().toLowerCase().equals("none") && !sP1.trim().toLowerCase().equals("") && !sP1.trim().toLowerCase().equals("leaf")) {
- if (sP1.trim().toLowerCase().equals("folder")) {
- this.ImgClosed = this.ImgdClosed;
- this.ImgOpen = this.ImgdOpen;
- } else {
- this.ImgClosed = ((Applet)this).getImage(((Applet)this).getCodeBase(), sP1);
- this.ImgOpen = ((Applet)this).getImage(((Applet)this).getCodeBase(), sP2);
- MediaTracker m = new MediaTracker(this);
-
- try {
- m.addImage(this.ImgClosed, 0);
- m.addImage(this.ImgOpen, 1);
- m.waitForAll();
- this.m_fAllLoaded = !m.isErrorAny();
- } catch (InterruptedException var6) {
- }
-
- if (!this.m_fAllLoaded) {
- this.ImgClosed = this.ImgdLeaf;
- this.ImgOpen = this.ImgdLeaf;
- }
- }
- }
-
- this.field_1[iNCnt] = new TreeNode(sT, this.ImgClosed, this.ImgOpen);
- }
-
- private void makeTree(int iNodeCnt) {
- this.bExpand = false;
-
- for(int y = 0; y < iNodeCnt; ++y) {
- if (this.bTREE_AUTOEXPAND) {
- this.bExpand = true;
- }
-
- if (this.iLevel[y] == 0) {
- this.treeView1.append(this.field_1[y], this.bExpand);
- } else {
- this.treeView1.insert(this.field_1[y], this.TN1[this.iLevel[y] - 1], 0, this.bExpand);
- }
-
- this.TN1[this.iLevel[y]] = this.field_1[y];
- if (!this.bTREE_AUTOEXPAND) {
- if (this.aExpand[y].trim().toUpperCase().equals("YES")) {
- this.bExpand = true;
- } else {
- this.bExpand = false;
- }
- }
- }
-
- this.treeView1.redraw();
- }
-
- private void workParam(String sItem, String sP) {
- if (this.bCopyright) {
- this.sHref2 = "None";
- this.sFrame2 = "None";
- this.sMO = "None";
- this.sExpand = "NO";
- if (sP.substring(0, 3).equals("***")) {
- this.sHref = "None";
- this.sFrame = "None";
- this.sMO = this.sDefMO;
- } else {
- StringTokenizer parser = new StringTokenizer(sP, ";");
- int iCnt = parser.countTokens() - 10;
- if (iCnt != 0) {
- System.out.println("*** Warning in parameter '" + sItem + "' - Item count is ( " + parser.countTokens() + " ) instead of ( 10 ) *** ");
- }
-
- try {
- this.sText = parser.nextToken();
- this.sHref = parser.nextToken();
- this.sFrame = parser.nextToken();
- this.sLevel = parser.nextToken();
- this.sPic1 = parser.nextToken();
- this.sPic2 = parser.nextToken();
- this.sMO = parser.nextToken();
- this.sHref2 = parser.nextToken();
- this.sFrame2 = parser.nextToken();
- this.sExpand = parser.nextToken();
- } catch (NoSuchElementException var6) {
- } catch (Exception var7) {
- System.out.println(sItem + " Parameter Error(3)");
- }
-
- if (this.iItemCnt == 0) {
- this.makeNode(this.iItemCnt, "(c)1997-1999 Auscomp", "SLauscomp.gif", "SLauscomp.gif");
- this.iLevel[this.iItemCnt] = 0;
- this.aHref[this.iItemCnt] = "http://www.auscomp.com";
- this.aFrame[this.iItemCnt] = "_blank";
- this.aHref2[this.iItemCnt] = "none";
- this.aFrame2[this.iItemCnt] = "none";
- this.aExpand[this.iItemCnt] = "NO";
- this.aMO[this.iItemCnt] = "1st JAVA Navigator[Tree] (C)1997-1999 Auscomp - World Wide.";
- ++this.iItemCnt;
- this.makeNode(this.iItemCnt, "1st JAVA Navigator[Tree]", "none", "none");
- this.iLevel[this.iItemCnt] = 0;
- this.aHref[this.iItemCnt] = "http://www.auscomp.com";
- this.aFrame[this.iItemCnt] = "_blank";
- this.aHref2[this.iItemCnt] = "none";
- this.aFrame2[this.iItemCnt] = "none";
- this.aExpand[this.iItemCnt] = "NO";
- this.aMO[this.iItemCnt] = "1st JAVA Navigator[Tree] for evaluation purposes only.";
- ++this.iItemCnt;
- this.makeNode(this.iItemCnt, "For evaluation only", "none", "none");
- this.iLevel[this.iItemCnt] = 0;
- this.aHref[this.iItemCnt] = "http://www.auscomp.com/buy_online.html";
- this.aFrame[this.iItemCnt] = "_blank";
- this.aHref2[this.iItemCnt] = "none";
- this.aFrame2[this.iItemCnt] = "none";
- this.aExpand[this.iItemCnt] = "NO";
- this.aMO[this.iItemCnt] = "Click to buy on-line.";
- ++this.iItemCnt;
- this.makeNode(this.iItemCnt, "-------------------------------------", "none", "none");
- this.iLevel[this.iItemCnt] = 0;
- this.aHref[this.iItemCnt] = "http://www.auscomp.com/buy_online.html";
- this.aFrame[this.iItemCnt] = "_blank";
- this.aHref2[this.iItemCnt] = "none";
- this.aFrame2[this.iItemCnt] = "none";
- this.aExpand[this.iItemCnt] = "NO";
- this.aMO[this.iItemCnt] = "Click to buy on-line.";
- ++this.iItemCnt;
- }
-
- this.sLevel = this.sLevel.trim();
- this.iLevel[this.iItemCnt] = 0;
-
- try {
- this.iLevel[this.iItemCnt] = Integer.parseInt(this.sLevel);
- } catch (Exception var5) {
- }
-
- this.aHref[this.iItemCnt] = this.sHref;
- this.aFrame[this.iItemCnt] = this.sFrame;
- this.aHref2[this.iItemCnt] = this.sHref2;
- this.aFrame2[this.iItemCnt] = this.sFrame2;
- this.aExpand[this.iItemCnt] = this.sExpand;
- this.aMO[this.iItemCnt] = this.sMO;
- this.makeNode(this.iItemCnt, this.sText, this.sPic1, this.sPic2);
- ++this.iItemCnt;
- }
- } else {
- if (this.iItemCnt == 0) {
- this.makeNode(this.iItemCnt, "(c) 1997 Auscomp - World Wide", "SLauscomp.gif", "SLauscomp.gif");
- this.iLevel[this.iItemCnt] = 0;
- this.aHref[this.iItemCnt] = "http://www.auscomp.com";
- this.aFrame[this.iItemCnt] = "_blank";
- this.aHref2[this.iItemCnt] = "none";
- this.aFrame2[this.iItemCnt] = "none";
- this.aExpand[this.iItemCnt] = "NO";
- this.aMO[this.iItemCnt] = "1st Navigator (Tree) Copyright 1998 Auscomp - World Wide.";
- ++this.iItemCnt;
- this.makeNode(this.iItemCnt, "Copyright parameter missing!", "none", "none");
- this.iLevel[this.iItemCnt] = 0;
- this.aHref[this.iItemCnt] = "http://www.auscomp.com";
- this.aFrame[this.iItemCnt] = "main";
- this.aHref2[this.iItemCnt] = "none";
- this.aFrame2[this.iItemCnt] = "none";
- this.aExpand[this.iItemCnt] = "NO";
- this.aMO[this.iItemCnt] = "Copyright parameter missing!";
- ++this.iItemCnt;
- }
-
- }
- }
-
- public String getAppletInfo() {
- return "1st JAVA Navigator[Tree] 5.0 (c)1997-1999 Auscomp - World Wide (www.auscomp.com)";
- }
-
- private void readFile(String tFile) {
- this.aHref = new String[2999];
- this.aFrame = new String[2999];
- this.aHref2 = new String[2999];
- this.aFrame2 = new String[2999];
- this.aExpand = new String[2999];
- this.aMO = new String[2999];
- this.iLevel = new int[2999];
- this.field_1 = new TreeNode[2999];
- this.TN1 = new TreeNode[2999];
- this.sLine = "";
- this.iYRec = 0;
-
- try {
- URL u = new URL(((Applet)this).getCodeBase(), tFile);
- u.openConnection();
- u.getContent();
- InputStream in = u.openStream();
- DataInputStream datainStream = new DataInputStream(in);
-
- while((this.sLine = datainStream.readLine()) != null) {
- if (!this.sLine.trim().equalsIgnoreCase("")) {
- this.workParam("Line: " + this.iYRec, this.sLine);
- ++this.iYRec;
- }
- }
-
- } catch (MalformedURLException var5) {
- System.err.println("URL Error");
- } catch (IOException e) {
- System.out.println("Error - File not found (" + ((Applet)this).getCodeBase() + tFile + ")");
- ((Throwable)e).printStackTrace();
- }
- }
- }
-