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.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 JAVATabTree extends Applet implements Runnable {
- Thread thJAVATabTree;
- String[][] aHref;
- String[][] aFrame;
- String[][] aHref2;
- String[][] aFrame2;
- String[][] aMO;
- String[][] aExpand;
- String[] aTabLabel;
- String[] aTabMO;
- String[] aTabHref;
- String[] aTabFrame;
- String[] aTabHref2;
- String[] aTabFrame2;
- int iLoading;
- int oldx;
- int oldiTabIx;
- String sMsgOld = "";
- int[][] iLevel;
- String sText = "";
- String sHref = "";
- String sFrame = "";
- String sHref2 = "";
- String sFrame2 = "";
- String sExpand = "";
- String sMO = "";
- String sMsg = "";
- boolean flg1 = false;
- String sDefMO = "1st JAVA Navigator[Tab&Tree] (c)1997-1999 AUSCOMP - World Wide (www.auscomp.com)";
- String sLevel = "";
- String sPic1 = "";
- String sPic2 = "";
- int iItemMaxCnt;
- int iItemCnt;
- int[] iIC;
- int iTabCnt;
- String sBorder = "no";
- Font fFont = new Font("Dialog", 0, 12);
- String dblClick = "no";
- TreeNode oldNode;
- TreeNode newNode;
- TreeNode oldMouseOverNode;
- int iYRec;
- String sLine;
- int intWidth = 200;
- int intHeight = 250;
- Image ImgClosed;
- Image ImgOpen;
- Image ImgdLeaf;
- Image ImgdClosed;
- Image ImgdOpen;
- // $FF: renamed from: g1 java.awt.Graphics
- Graphics field_0;
- int oldTabPanel = -1;
- String sCopyright = "AUSCOMP (www.auscomp.com)";
- int iTabDefault = 999;
- private boolean bCopyright = false;
- private boolean allLoaded = false;
- Image imgBG;
- Image imgTreeBG;
- 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};
- int[] iTREE_BG = new int[]{255, 255, 255};
- int[] iTREE_FG = new int[]{0, 0, 0};
- int[] iTREE_SEL_BG = new int[]{0, 0, 255};
- int[] iTREE_SEL_FG = new int[]{255, 255, 255};
- int[] iTREE_MOUSEOVER = new int[]{255, 0, 0};
- int[] iTREE_LINECOLOR = new int[]{0, 0, 0};
- int[] iTREE_FOLDEROCOLOR = new int[]{0, 0, 0};
- int[] iTREE_FOLDERCCOLOR = new int[]{0, 0, 0};
- int[] iTREE_LEAFCOLOR = new int[]{0, 0, 0};
- int[] iTREE_TOOLTIPBACKCOLOR = new int[]{255, 255, 231};
- int[] iTREE_TOOLTIPFORECOLOR = new int[]{0, 0, 0};
- int[] iTREE_MOUSEOVERFRAMECOLOR = new int[]{255, 0, 0};
- int[] iColor;
- boolean bTREE_AUTOEXPAND = false;
- boolean bExpand = false;
- Color cBackground;
- String sTREE_STYLE;
- String sTREE_MOUSEOVERFRAME;
- int iTREE_LINESTEP;
- String sTREE_TOOLTIP;
- String sTREE_BORDER;
- String sTREE_DOUBLECLICK;
- String sMOUSEOVERSOUND;
- String sMOUSECLICKSOUND;
- String sSHOWTABSONLY;
- String[] sTabColorParam;
- String[] sColorParam;
- String[] sNormalParam;
- String[] sImageParam;
- TabPanel tabPanel1;
- TreeView[] treeView;
- // $FF: renamed from: TN TreeNode[][]
- TreeNode[][] field_1;
- TreeNode[][] TN1;
-
- void tabPanel1_MouseUp(Event event) {
- try {
- if (!this.sMOUSECLICKSOUND.equals("none")) {
- ((Applet)this).play(((Applet)this).getCodeBase(), this.sMOUSECLICKSOUND);
- }
- } catch (Exception var6) {
- }
-
- try {
- int iTabIx = this.tabPanel1.getCurrentPanelNdx();
- if (this.oldiTabIx == iTabIx) {
- return;
- }
-
- this.oldiTabIx = iTabIx;
- this.sHref = this.aTabHref[iTabIx];
- this.sFrame = this.aTabFrame[iTabIx];
- this.sHref2 = this.aTabHref2[iTabIx];
- this.sFrame2 = this.aTabFrame2[iTabIx];
- this.sHref = this.sHref.trim();
- this.sFrame = this.sFrame.trim();
- this.sHref2 = this.sHref2.trim();
- this.sFrame2 = this.sFrame2.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 (ArrayIndexOutOfBoundsException var5) {
- }
-
- }
-
- void tabPanel1_MouseMove(Event event) {
- int x = 0;
-
- try {
- if (!this.sMOUSEOVERSOUND.equals("none")) {
- ((Applet)this).play(((Applet)this).getCodeBase(), this.sMOUSEOVERSOUND);
- }
- } catch (Exception var3) {
- }
-
- x = this.tabPanel1.setTabLabelColor(event);
- if (x == 999 && this.oldx != 999) {
- this.tabPanel1.setMOLabelColor(this.tabPanel1.getMOColor(), x);
- this.sMsg = this.sDefMO;
- } else if (x != 999) {
- this.sMsg = this.aTabMO[x];
- this.sHref = this.aTabHref[x];
- }
-
- this.oldx = x;
- this.sMsg = this.sMsg.trim();
- if (this.sMsg != this.sMsgOld) {
- if (!this.sMsg.toLowerCase().equals("none") && !this.sMsg.toLowerCase().equals("")) {
- ((Applet)this).showStatus(this.sMsg);
- } else {
- ((Applet)this).showStatus(this.sHref);
- }
-
- this.sMsgOld = this.sMsg;
- }
-
- }
-
- void tabPanel1_MouseEnter(Event event) {
- ((Applet)this).showStatus(this.sDefMO);
- }
-
- void treeView_MouseEnter(Event event) {
- ((Applet)this).showStatus(this.sDefMO);
- }
-
- void treeView_MouseMove(Event event) {
- try {
- if (!this.sMOUSEOVERSOUND.equals("none")) {
- ((Applet)this).play(((Applet)this).getCodeBase(), this.sMOUSEOVERSOUND);
- }
- } catch (Exception var4) {
- }
-
- try {
- int iTabIx = this.tabPanel1.getCurrentPanelNdx();
-
- for(int z = 0; z < this.iIC[iTabIx]; ++z) {
- if (this.field_1[iTabIx][z] == this.treeView[iTabIx].getMouseOverNode()) {
- this.sMO = this.aMO[iTabIx][z];
- this.sHref = this.aHref[iTabIx][z];
- this.newNode = this.field_1[iTabIx][z];
- break;
- }
- }
-
- this.sMO = this.sMO.trim();
- if (this.sMO.toLowerCase().equals("") || this.sMO.toLowerCase().equals("none")) {
- this.sMO = this.sHref;
- }
-
- if (this.newNode != this.oldNode) {
- ((Applet)this).showStatus(this.sMO);
- this.oldNode = this.newNode;
- return;
- }
- } catch (ArrayIndexOutOfBoundsException var5) {
- }
-
- }
-
- void treeView_MouseDown(Event event) {
- int iTabIx = this.tabPanel1.getCurrentPanelNdx();
- this.sHref = "none";
- this.sHref2 = "none";
-
- try {
- if (!this.sMOUSECLICKSOUND.equals("none")) {
- ((Applet)this).play(((Applet)this).getCodeBase(), this.sMOUSECLICKSOUND);
- }
- } catch (Exception var6) {
- }
-
- for(int z = 0; z < this.iIC[iTabIx]; ++z) {
- if (this.field_1[iTabIx][z] == this.treeView[iTabIx].getSelectedNode()) {
- this.sHref = this.aHref[iTabIx][z];
- this.sFrame = this.aFrame[iTabIx][z];
- this.sHref2 = this.aHref2[iTabIx][z];
- this.sFrame2 = this.aFrame2[iTabIx][z];
- break;
- }
- }
-
- this.sHref = this.sHref.trim();
- this.sFrame = this.sFrame.trim();
- this.sHref2 = this.sHref2.trim();
- this.sFrame2 = this.sFrame2.trim();
- if (!this.sHref.toLowerCase().equals("none")) {
- try {
- ((Applet)this).getAppletContext().showDocument(new URL(((Applet)this).getCodeBase(), this.sHref), this.sFrame);
- } catch (MalformedURLException var5) {
- }
- }
-
- if (!this.sHref2.toLowerCase().equals("none")) {
- try {
- ((Applet)this).getAppletContext().showDocument(new URL(((Applet)this).getCodeBase(), this.sHref2), this.sFrame2);
- } catch (MalformedURLException var4) {
- }
- }
- }
-
- public void start() {
- this.field_0 = ((Component)this).getGraphics();
- this.paint(this.field_0);
- this.thJAVATabTree = new Thread(this);
- this.thJAVATabTree.start();
- }
-
- public void run() {
- if (!this.allLoaded) {
- this.constructTabTree();
- this.tabPanel1.show(true);
- if (this.iTabDefault < 999) {
- this.tabPanel1.setCurrentPanelNdx(this.iTabDefault);
- this.tabPanel1_MouseUp((Event)null);
- return;
- }
-
- this.tabPanel1.setCurrentPanelNdx(0);
- }
-
- }
-
- public void stop() {
- this.thJAVATabTree.stop();
- this.thJAVATabTree = null;
- }
-
- public void paint(Graphics g) {
- ++this.iLoading;
- ((Component)this).setBackground(this.cBackground);
- 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);
- ((Panel)this).addNotify();
-
- try {
- Dimension d = ((Component)this).size();
- 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.tabPanel1 = new TabPanel();
- this.tabPanel1.setLayout((LayoutManager)null);
- ((Component)this).size();
- this.tabPanel1.reshape(0, 0, this.intWidth, this.intHeight);
- }
-
- private void constructTabTree() {
- String strBG = "";
-
- try {
- strBG = ((Applet)this).getParameter("COPYRIGHT");
- if (strBG.indexOf(this.sCopyright) > 0) {
- this.bCopyright = true;
- } else {
- this.bCopyright = false;
- }
- } catch (Exception var35) {
- }
-
- for(int x = 0; x < 4; ++x) {
- switch (x) {
- case 0:
- this.iColor = this.iColorWhite;
- break;
- case 1:
- this.iColor = this.iColorBlack;
- break;
- case 2:
- this.iColor = this.iColorBlue;
- }
-
- try {
- strBG = ((Applet)this).getParameter(this.sTabColorParam[x]);
- if (strBG != null) {
- this.iColor[0] = this.getCOLOR(0, this.sTabColorParam[x], strBG);
- this.iColor[1] = this.getCOLOR(1, this.sTabColorParam[x], strBG);
- this.iColor[2] = this.getCOLOR(2, this.sTabColorParam[x], strBG);
- }
- } catch (Exception var34) {
- }
-
- switch (x) {
- case 0:
- this.cBackground = new Color(this.iColor[0], this.iColor[1], this.iColor[2]);
- this.tabPanel1.setBackground(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 1:
- this.tabPanel1.setLabelColor(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- break;
- case 2:
- this.tabPanel1.setMOColor(new Color(this.iColor[0], this.iColor[1], this.iColor[2]));
- }
- }
-
- try {
- this.sSHOWTABSONLY = "NO";
- strBG = ((Applet)this).getParameter("SHOWTABSONLY");
- if (strBG != null && strBG.toLowerCase().equals("yes")) {
- this.tabPanel1.showTabsOnly(true);
- }
- } catch (Exception var33) {
- }
-
- try {
- this.sMOUSEOVERSOUND = "none";
- strBG = ((Applet)this).getParameter("MOUSEOVERSOUND");
- if (strBG != null) {
- this.sMOUSEOVERSOUND = strBG;
- }
- } catch (Exception var32) {
- }
-
- try {
- this.sMOUSECLICKSOUND = "none";
- strBG = ((Applet)this).getParameter("MOUSECLICKSOUND");
- if (strBG != null) {
- this.sMOUSECLICKSOUND = strBG;
- }
- } catch (Exception var31) {
- }
-
- try {
- strBG = ((Applet)this).getParameter("TABONBOTTOM");
- if (strBG != null && strBG.toLowerCase().equals("yes")) {
- this.tabPanel1.setTabsOnBottom(true);
- }
- } catch (Exception var30) {
- }
-
- try {
- strBG = ((Applet)this).getParameter("TAB_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 var27) {
- System.out.println(strBG + " Parameter Error(1)");
- } catch (Exception var28) {
- System.out.println(strBG + " Parameter Error(2)");
- }
- }
- } catch (Exception var29) {
- }
-
- this.tabPanel1.setFont(this.fFont);
-
- try {
- strBG = ((Applet)this).getParameter("TAB_DEFAULT");
- if (strBG == null) {
- this.iTabDefault = 999;
- } else {
- this.iTabDefault = Integer.parseInt(strBG);
- }
- } catch (Exception var26) {
- }
-
- try {
- this.imgBG = null;
- strBG = ((Applet)this).getParameter("TAB_BG_IMAGE");
- 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 var24) {
- return;
- }
-
- if (this.imgBG.getHeight(this) > 0) {
- this.tabPanel1.setBGImage(this.imgBG);
- }
- }
- } catch (Exception var25) {
- }
-
- ((Container)this).add(this.tabPanel1);
- this.tabPanel1.show(false);
-
- for(int x = 0; x < 12; ++x) {
- switch (x) {
- case 0:
- this.iColor = this.iTREE_BG;
- break;
- case 1:
- this.iColor = this.iTREE_FG;
- break;
- case 2:
- this.iColor = this.iTREE_SEL_BG;
- break;
- case 3:
- this.iColor = this.iTREE_SEL_FG;
- break;
- case 4:
- this.iColor = this.iTREE_MOUSEOVER;
- break;
- case 5:
- this.iColor = this.iTREE_LINECOLOR;
- break;
- case 6:
- this.iColor = this.iTREE_FOLDEROCOLOR;
- break;
- case 7:
- this.iColor = this.iTREE_FOLDERCCOLOR;
- break;
- case 8:
- this.iColor = this.iTREE_LEAFCOLOR;
- break;
- case 9:
- this.iColor = this.iTREE_TOOLTIPBACKCOLOR;
- break;
- case 10:
- this.iColor = this.iTREE_TOOLTIPFORECOLOR;
- break;
- case 11:
- this.iColor = this.iTREE_MOUSEOVERFRAMECOLOR;
- }
-
- try {
- String var36 = null;
- 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) {
- }
-
- for(int y = 0; y < 3; ++y) {
- switch (x) {
- case 0:
- this.iTREE_BG[y] = this.iColor[y];
- break;
- case 1:
- this.iTREE_FG[y] = this.iColor[y];
- break;
- case 2:
- this.iTREE_SEL_BG[y] = this.iColor[y];
- break;
- case 3:
- this.iTREE_SEL_FG[y] = this.iColor[y];
- break;
- case 4:
- this.iTREE_MOUSEOVER[y] = this.iColor[y];
- break;
- case 5:
- this.iTREE_LINECOLOR[y] = this.iColor[y];
- break;
- case 6:
- this.iTREE_FOLDEROCOLOR[y] = this.iColor[y];
- break;
- case 7:
- this.iTREE_FOLDERCCOLOR[y] = this.iColor[y];
- break;
- case 8:
- this.iTREE_LEAFCOLOR[y] = this.iColor[y];
- break;
- case 9:
- this.iTREE_TOOLTIPBACKCOLOR[y] = this.iColor[y];
- break;
- case 10:
- this.iTREE_TOOLTIPFORECOLOR[y] = this.iColor[y];
- break;
- case 11:
- this.iTREE_MOUSEOVERFRAMECOLOR[y] = this.iColor[y];
- }
- }
- }
-
- for(int x = 0; x < 7; ++x) {
- switch (x) {
- case 0:
- this.sTREE_STYLE = "AXAA";
- break;
- case 1:
- this.sTREE_MOUSEOVERFRAME = "none";
- break;
- case 2:
- this.iTREE_LINESTEP = 2;
- break;
- case 3:
- this.sTREE_TOOLTIP = "yes";
- break;
- case 4:
- this.sTREE_BORDER = "No";
- break;
- case 5:
- this.sTREE_DOUBLECLICK = "No";
- break;
- case 6:
- this.bTREE_AUTOEXPAND = false;
- }
-
- try {
- String var37 = null;
- strBG = ((Applet)this).getParameter(this.sNormalParam[x]);
- } catch (Exception var22) {
- }
-
- switch (x) {
- case 0:
- if (strBG == null) {
- strBG = "AXAA";
- }
-
- this.sTREE_STYLE = strBG;
- break;
- case 1:
- if (strBG == null) {
- strBG = "none";
- }
-
- this.sTREE_MOUSEOVERFRAME = strBG;
- break;
- case 2:
- try {
- this.iTREE_LINESTEP = Integer.parseInt(strBG);
- } catch (Exception var21) {
- }
- break;
- case 3:
- if (strBG == null) {
- strBG = "Yes";
- }
-
- try {
- if (!strBG.trim().toLowerCase().equals("yes")) {
- strBG = "No";
- }
- } catch (Exception var20) {
- }
-
- this.sTREE_TOOLTIP = strBG;
- break;
- case 4:
- if (strBG == null) {
- strBG = "No";
- }
-
- try {
- if (strBG.trim().toLowerCase().equals("yes")) {
- strBG = "Yes";
- }
- } catch (Exception var19) {
- }
-
- this.sTREE_BORDER = strBG;
- break;
- case 5:
- if (strBG == null) {
- strBG = "No";
- }
-
- try {
- if (strBG.trim().toLowerCase().equals("yes")) {
- strBG = "Yes";
- }
- } catch (Exception var18) {
- }
-
- this.sTREE_DOUBLECLICK = strBG;
- break;
- case 6:
- this.bTREE_AUTOEXPAND = false;
-
- try {
- if (strBG.trim().toLowerCase().equals("yes")) {
- this.bTREE_AUTOEXPAND = true;
- }
- } catch (Exception var17) {
- }
- }
- }
-
- 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 var15) {
- }
- }
-
- 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.imgTreeBG = this.imgBG;
- } else {
- System.out.println("Error - couldn't find FOLDER TREE BACKGROUND IMAGE - please check image URL");
- }
- }
- } catch (Exception var16) {
- }
- }
-
- try {
- strBG = ((Applet)this).getParameter("TREE_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)");
- }
- }
- } catch (Exception var14) {
- }
-
- int i;
- for(i = 0; ((Applet)this).getParameter("TAB" + i) != null; ++i) {
- }
-
- this.iTabCnt = i;
- this.treeView = new TreeView[i];
- String tempString = "";
- this.iIC = new int[i];
- this.aTabLabel = new String[i];
- this.aTabMO = new String[i];
- this.aTabHref = new String[i];
- this.aTabHref2 = new String[i];
- this.aTabFrame = new String[i];
- this.aTabFrame2 = new String[i];
- this.aHref = new String[i][999];
- this.aFrame = new String[i][999];
- this.aHref2 = new String[i][999];
- this.aFrame2 = new String[i][999];
- this.aExpand = new String[i][999];
- this.aMO = new String[i][999];
- this.iLevel = new int[i][999];
- this.field_1 = new TreeNode[i][999];
- this.TN1 = new TreeNode[i][999];
-
- for(int var54 = 0; ((Applet)this).getParameter("TAB" + var54) != null; ++var54) {
- tempString = new String(((Applet)this).getParameter("TAB" + var54));
- this.aTabLabel[var54] = "";
- this.aTabMO[var54] = "";
- this.aTabHref[var54] = "none";
- this.aTabHref2[var54] = "none";
- this.aTabFrame[var54] = "none";
- this.aTabFrame2[var54] = "none";
- if (this.bCopyright) {
- StringTokenizer parser = new StringTokenizer(tempString, ";");
-
- try {
- this.aTabLabel[var54] = parser.nextToken();
- this.aTabHref[var54] = parser.nextToken();
- this.aTabFrame[var54] = parser.nextToken();
- this.aTabMO[var54] = parser.nextToken();
- this.aTabHref2[var54] = parser.nextToken();
- this.aTabFrame2[var54] = parser.nextToken();
- } catch (NoSuchElementException var11) {
- }
- } else {
- this.aTabLabel[var54] = "Error";
- this.aTabMO[var54] = "Copyright parameter missing";
- }
-
- this.treeView[var54] = new TreeView();
- this.treeView[var54].setBackground(new Color(this.iTREE_BG[0], this.iTREE_BG[1], this.iTREE_BG[2]));
- this.treeView[var54].setForeground(new Color(this.iTREE_FG[0], this.iTREE_FG[1], this.iTREE_FG[2]));
- this.treeView[var54].setBgHilite(new Color(this.iTREE_SEL_BG[0], this.iTREE_SEL_BG[1], this.iTREE_SEL_BG[2]));
- this.treeView[var54].setFgHilite(new Color(this.iTREE_SEL_FG[0], this.iTREE_SEL_FG[1], this.iTREE_SEL_FG[2]));
- this.treeView[var54].setMOHilite(new Color(this.iTREE_MOUSEOVER[0], this.iTREE_MOUSEOVER[1], this.iTREE_MOUSEOVER[2]));
- this.treeView[var54].setLineColor(new Color(this.iTREE_LINECOLOR[0], this.iTREE_LINECOLOR[1], this.iTREE_LINECOLOR[2]));
- this.treeView[var54].setFolderOColor(new Color(this.iTREE_FOLDEROCOLOR[0], this.iTREE_FOLDEROCOLOR[1], this.iTREE_FOLDEROCOLOR[2]));
- this.treeView[var54].setFolderCColor(new Color(this.iTREE_FOLDERCCOLOR[0], this.iTREE_FOLDERCCOLOR[1], this.iTREE_FOLDERCCOLOR[2]));
- this.treeView[var54].setLeafColor(new Color(this.iTREE_LEAFCOLOR[0], this.iTREE_LEAFCOLOR[1], this.iTREE_LEAFCOLOR[2]));
- this.treeView[var54].setToolTipBackColor(new Color(this.iTREE_TOOLTIPBACKCOLOR[0], this.iTREE_TOOLTIPBACKCOLOR[1], this.iTREE_TOOLTIPBACKCOLOR[2]));
- this.treeView[var54].setToolTipForeColor(new Color(this.iTREE_TOOLTIPFORECOLOR[0], this.iTREE_TOOLTIPFORECOLOR[1], this.iTREE_TOOLTIPFORECOLOR[2]));
- this.treeView[var54].setMouseOverFrameColor(new Color(this.iTREE_MOUSEOVERFRAMECOLOR[0], this.iTREE_MOUSEOVERFRAMECOLOR[1], this.iTREE_MOUSEOVERFRAMECOLOR[2]));
- this.treeView[var54].setStyle(this.sTREE_STYLE);
- this.treeView[var54].setMouseOverStyle(this.sTREE_MOUSEOVERFRAME);
- this.treeView[var54].setLineStep(this.iTREE_LINESTEP);
- this.treeView[var54].setToolTip(this.sTREE_TOOLTIP);
- this.treeView[var54].setFont(this.fFont);
- this.treeView[var54].setBorder(this.sTREE_BORDER);
- this.treeView[var54].setDblClick(this.sTREE_DOUBLECLICK);
- this.treeView[var54].reshape(0, 0, this.intWidth, this.intHeight);
- this.tabPanel1.add(this.treeView[var54]);
- if (this.imgTreeBG != null) {
- this.treeView[var54].setBGImage(this.imgTreeBG);
- }
- }
-
- this.tabPanel1.setPanelLabels(this.aTabLabel);
-
- for(int z = 0; z < this.iTabCnt; ++z) {
- int ii = 0;
- strBG = ((Applet)this).getParameter("TAB" + z + "_Content");
- if (strBG != null) {
- ii = this.readFile(strBG, z);
- } else {
- for(; ((Applet)this).getParameter("T" + z + "I" + ii) != null; ++ii) {
- strBG = ((Applet)this).getParameter("T" + z + "I" + ii);
- if (strBG != null) {
- this.workParam("T" + z + "I" + ii, strBG, z);
- }
- }
- }
-
- if (ii > 0) {
- this.makeTree(z, this.iIC[z]);
- }
- }
-
- this.allLoaded = true;
- }
-
- public void setTabTreeNode(String sNode, int iTab, boolean bExecute) {
- try {
- if (sNode == null) {
- return;
- }
-
- this.tabPanel1.setCurrentPanelNdx(iTab);
- this.treeView[iTab].setNode(sNode);
- if (this.treeView[iTab].getSelectedText().equals(sNode) && bExecute) {
- this.treeView_MouseDown((Event)null);
- return;
- }
- } catch (Exception var4) {
- }
-
- }
-
- public String getTabTreeNode(int iTab) {
- this.tabPanel1.setCurrentPanelNdx(iTab);
- return this.treeView[iTab].getSelectedText() == null ? null : this.treeView[iTab].getSelectedText();
- }
-
- public void addTabTreeNode(int iTab, String s1ParentNodeText, String s1NodeText, String s1Href1, String s1Target1, String s1Href2, String s1Target2, String s1Statusbar, String s1Expand) {
- try {
- if (s1NodeText == null) {
- return;
- }
-
- this.tabPanel1.setCurrentPanelNdx(iTab);
- this.aHref[iTab][this.iIC[iTab]] = "none";
- if (s1Href1 != null && !s1Href1.trim().equals("")) {
- this.aHref[iTab][this.iIC[iTab]] = s1Href1;
- }
-
- if (s1Target1 != null) {
- this.aFrame[iTab][this.iIC[iTab]] = s1Target1;
- } else {
- this.aFrame[iTab][this.iIC[iTab]] = "none";
- }
-
- this.aHref2[iTab][this.iIC[iTab]] = "none";
- if (s1Href2 != null && !s1Href2.trim().equals("")) {
- this.aHref2[iTab][this.iIC[iTab]] = s1Href2;
- }
-
- if (s1Target2 != null) {
- this.aFrame2[iTab][this.iIC[iTab]] = s1Target2;
- } else {
- this.aFrame2[iTab][this.iIC[iTab]] = "none";
- }
-
- this.aMO[iTab][this.iIC[iTab]] = "";
- if (s1Statusbar != null && !s1Statusbar.trim().equals("")) {
- this.aMO[iTab][this.iIC[iTab]] = s1Statusbar;
- }
-
- this.aExpand[iTab][this.iIC[iTab]] = "NO";
- if (s1Expand != null && s1Expand.trim().toLowerCase().equals("yes")) {
- this.aExpand[iTab][this.iIC[iTab]] = "YES";
- }
-
- this.field_1[iTab][this.iIC[iTab]] = new TreeNode(s1NodeText, this.ImgdLeaf, this.ImgdLeaf);
- this.bExpand = false;
- if (this.aExpand[iTab][this.iIC[iTab]].toLowerCase().equals("yes")) {
- this.bExpand = true;
- }
-
- if (this.bTREE_AUTOEXPAND) {
- this.bExpand = true;
- }
-
- if (s1ParentNodeText.trim().equals("")) {
- this.treeView[iTab].append(this.field_1[iTab][this.iIC[iTab]], this.bExpand);
- } else {
- this.treeView[iTab].setNode(s1ParentNodeText);
- this.TN1[iTab][this.iIC[iTab]] = this.treeView[iTab].getSelectedNode();
- if (this.TN1[iTab][this.iIC[iTab]] != null) {
- this.TN1[iTab][this.iIC[iTab]].setCollapsedImage(this.ImgdClosed);
- this.TN1[iTab][this.iIC[iTab]].setExpandedImage(this.ImgdOpen);
- }
-
- this.treeView[iTab].insert(this.field_1[iTab][this.iIC[iTab]], this.TN1[iTab][this.iIC[iTab]], 0, this.bExpand);
- }
-
- if (!this.bTREE_AUTOEXPAND) {
- if (this.aExpand[iTab][this.iIC[iTab]].trim().toUpperCase().equals("YES")) {
- this.bExpand = true;
- } else {
- this.bExpand = false;
- }
- }
-
- this.treeView[iTab].setNode(s1NodeText);
- } catch (Exception var10) {
- }
-
- int var10002 = this.iIC[iTab]++;
- this.treeView[iTab].redraw();
- }
-
- public void delTabTreeNode(String sNode, int iTab) {
- try {
- if (!sNode.trim().equals("(c)1997-199 Auscomp") && !sNode.trim().equals("Copyright parameter missing!") && !sNode.trim().equals("Auscom - America (West Coast)") && !sNode.trim().equals("Auscom - America (East Coast)") && !sNode.trim().equals("Auscom - Australia")) {
- this.tabPanel1.setCurrentPanelNdx(iTab);
- this.treeView[iTab].remove(sNode);
- this.treeView[iTab].redraw();
- return;
- }
- } catch (Exception var3) {
- }
-
- }
-
- public boolean handleEvent(Event event) {
- try {
- if (this.treeView[this.tabPanel1.getCurrentPanelNdx()].getMouseOverNode() != null && event.target == this.treeView[this.tabPanel1.getCurrentPanelNdx()] && event.id == 501) {
- this.treeView_MouseDown(event);
- return true;
- }
- } catch (Exception var3) {
- }
-
- try {
- if (this.oldMouseOverNode != this.treeView[this.tabPanel1.getCurrentPanelNdx()].getMouseOverNode() && this.treeView[this.tabPanel1.getCurrentPanelNdx()].getMouseOverNode() != null && event.target == this.treeView[this.tabPanel1.getCurrentPanelNdx()] && event.id == 503) {
- this.treeView_MouseMove(event);
- this.oldMouseOverNode = this.treeView[this.tabPanel1.getCurrentPanelNdx()].getMouseOverNode();
- return true;
- }
- } catch (Exception var2) {
- }
-
- if (event.target == this.tabPanel1 && event.id == 504) {
- this.tabPanel1_MouseEnter(event);
- return true;
- } else if (this.oldTabPanel != this.tabPanel1.getCurrentPanelNdx() && event.target == this.tabPanel1 && event.id == 503) {
- this.tabPanel1_MouseMove(event);
- this.oldTabPanel = this.tabPanel1.getCurrentPanelNdx();
- return true;
- } else if (event.target == this.tabPanel1 && event.id == 502) {
- this.tabPanel1_MouseUp(event);
- return true;
- } else {
- return super.handleEvent(event);
- }
- }
-
- private int readFile(String tFile, int iTabCnt1) {
- 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("Tab" + iTabCnt1 + " File - Line: " + this.iYRec, this.sLine, iTabCnt1);
- ++this.iYRec;
- }
- }
- } catch (MalformedURLException var6) {
- System.err.println("URL Error");
- } catch (IOException e) {
- System.out.println("Error - File not found (" + ((Applet)this).getCodeBase() + tFile + ")");
- ((Throwable)e).printStackTrace();
- }
-
- return this.iYRec;
- }
-
- 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 iTCnt, int iNCnt, String sT, String sP1, String sP2) {
- if (sP1.trim().toLowerCase().equals("")) {
- this.field_1[iTCnt][iNCnt] = new TreeNode(sT);
- } else if (sP1.trim().toLowerCase().equals("none")) {
- this.field_1[iTCnt][iNCnt] = new TreeNode(sT);
- } else if (sP1.trim().toLowerCase().equals("leaf")) {
- if (this.ImgdLeaf == null) {
- this.field_1[iTCnt][iNCnt] = new TreeNode(sT);
- } else {
- this.field_1[iTCnt][iNCnt] = new TreeNode(sT, this.ImgdLeaf, this.ImgdLeaf);
- }
- } else if (sP1.trim().toLowerCase().equals("folder")) {
- if (this.ImgdLeaf == null) {
- this.field_1[iTCnt][iNCnt] = new TreeNode(sT);
- } else {
- this.field_1[iTCnt][iNCnt] = new TreeNode(sT, this.ImgdClosed, 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();
- } catch (InterruptedException var7) {
- return;
- }
-
- this.field_1[iTCnt][iNCnt] = new TreeNode(sT, this.ImgClosed, this.ImgOpen);
- }
- }
-
- private void makeTree(int iNodeTCnt, int iNodeICnt) {
- this.bExpand = false;
-
- for(int y = 0; y < iNodeICnt; ++y) {
- if (this.bTREE_AUTOEXPAND) {
- this.bExpand = true;
- }
-
- if (this.iLevel[iNodeTCnt][y] == 0) {
- this.treeView[iNodeTCnt].append(this.field_1[iNodeTCnt][y], this.bExpand);
- } else {
- this.treeView[iNodeTCnt].insert(this.field_1[iNodeTCnt][y], this.TN1[iNodeTCnt][this.iLevel[iNodeTCnt][y] - 1], 0, this.bExpand);
- }
-
- this.TN1[iNodeTCnt][this.iLevel[iNodeTCnt][y]] = this.field_1[iNodeTCnt][y];
- if (!this.bTREE_AUTOEXPAND) {
- if (this.aExpand[iNodeTCnt][y].trim().toUpperCase().equals("YES")) {
- this.bExpand = true;
- } else {
- this.bExpand = false;
- }
- }
- }
-
- this.treeView[iNodeTCnt].redraw();
- }
-
- private void workParam(String sItem, String sP, int iTCnt) {
- if (this.bCopyright) {
- this.sHref2 = "None";
- this.sFrame2 = "None";
- this.sExpand = "NO";
- if (sP.substring(0, 3).equals("***")) {
- this.sHref = "None";
- this.sFrame = "None";
- } 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 var7) {
- } catch (Exception var8) {
- System.out.println(sItem + " Parameter Error(3)");
- }
-
- if (this.iIC[iTCnt] == 0 && iTCnt == 0) {
- this.makeNode(iTCnt, this.iIC[iTCnt], "(c)1997-1999 Auscomp", "SLauscomp.gif", "SLauscomp.gif");
- this.iLevel[iTCnt][this.iIC[iTCnt]] = 0;
- this.aHref[iTCnt][this.iIC[iTCnt]] = "http://www.auscomp.com";
- this.aFrame[iTCnt][this.iIC[iTCnt]] = "_blank";
- this.aHref2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aFrame2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aExpand[iTCnt][this.iIC[iTCnt]] = "NO";
- this.aMO[iTCnt][this.iIC[iTCnt]] = "1st JAVA Navigator[Tab&Tree] (C)1997-1999 Auscomp - World Wide.";
- int var10 = this.iIC[iTCnt]++;
- this.makeNode(iTCnt, this.iIC[iTCnt], "1st JAVA Navigator[Tab&Tree]", "none", "none");
- this.iLevel[iTCnt][this.iIC[iTCnt]] = 0;
- this.aHref[iTCnt][this.iIC[iTCnt]] = "http://www.auscomp.com";
- this.aFrame[iTCnt][this.iIC[iTCnt]] = "_blank";
- this.aHref2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aFrame2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aExpand[iTCnt][this.iIC[iTCnt]] = "NO";
- this.aMO[iTCnt][this.iIC[iTCnt]] = "1st JAVA Navigator[Tab&Tree] for evaluation purposes only.";
- var10 = this.iIC[iTCnt]++;
- this.makeNode(iTCnt, this.iIC[iTCnt], "For evaluation only", "none", "none");
- this.iLevel[iTCnt][this.iIC[iTCnt]] = 0;
- this.aHref[iTCnt][this.iIC[iTCnt]] = "http://www.auscomp.com/buy_online.html";
- this.aFrame[iTCnt][this.iIC[iTCnt]] = "_blank";
- this.aHref2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aFrame2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aExpand[iTCnt][this.iIC[iTCnt]] = "NO";
- this.aMO[iTCnt][this.iIC[iTCnt]] = "Click to buy on-line";
- var10 = this.iIC[iTCnt]++;
- this.makeNode(iTCnt, this.iIC[iTCnt], "_______________________________", "none", "none");
- this.iLevel[iTCnt][this.iIC[iTCnt]] = 0;
- this.aHref[iTCnt][this.iIC[iTCnt]] = "none";
- this.aFrame[iTCnt][this.iIC[iTCnt]] = "_blank";
- this.aHref2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aFrame2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aExpand[iTCnt][this.iIC[iTCnt]] = "NO";
- this.aMO[iTCnt][this.iIC[iTCnt]] = "Click to buy on-line";
- var10 = this.iIC[iTCnt]++;
- }
-
- if (this.iIC[iTCnt] == 0 && iTCnt == 0) {
- this.iIC[iTCnt] += 2;
- }
-
- this.sLevel = this.sLevel.trim();
- this.iLevel[iTCnt][this.iIC[iTCnt]] = 0;
-
- try {
- this.iLevel[iTCnt][this.iIC[iTCnt]] = Integer.parseInt(this.sLevel);
- } catch (Exception var6) {
- }
-
- this.aHref[iTCnt][this.iIC[iTCnt]] = this.sHref;
- this.aFrame[iTCnt][this.iIC[iTCnt]] = this.sFrame;
- this.aHref2[iTCnt][this.iIC[iTCnt]] = this.sHref2;
- this.aFrame2[iTCnt][this.iIC[iTCnt]] = this.sFrame2;
- this.aMO[iTCnt][this.iIC[iTCnt]] = this.sMO;
- this.aExpand[iTCnt][this.iIC[iTCnt]] = this.sExpand;
- this.makeNode(iTCnt, this.iIC[iTCnt], this.sText, this.sPic1, this.sPic2);
- int var14 = this.iIC[iTCnt]++;
- }
- } else {
- if (this.iIC[iTCnt] == 0) {
- this.makeNode(iTCnt, this.iIC[iTCnt], "(c)1997-199 Auscomp", "SLauscomp.gif", "SLauscomp.gif");
- this.iLevel[iTCnt][this.iIC[iTCnt]] = 0;
- this.aHref[iTCnt][this.iIC[iTCnt]] = "http://www.auscomp.com";
- this.aFrame[iTCnt][this.iIC[iTCnt]] = "_blank";
- this.aHref2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aFrame2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aExpand[iTCnt][this.iIC[iTCnt]] = "no";
- this.aMO[iTCnt][this.iIC[iTCnt]] = "1st JAVA Navigator is a product from Auscomp - World Wide.";
- int var10002 = this.iIC[iTCnt]++;
- this.makeNode(iTCnt, this.iIC[iTCnt], "Copyright parameter missing!", "none", "none");
- this.iLevel[iTCnt][this.iIC[iTCnt]] = 0;
- this.aHref[iTCnt][this.iIC[iTCnt]] = "http://www.auscomp.com";
- this.aFrame[iTCnt][this.iIC[iTCnt]] = "_blank";
- this.aHref2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aFrame2[iTCnt][this.iIC[iTCnt]] = "none";
- this.aExpand[iTCnt][this.iIC[iTCnt]] = "no";
- this.aMO[iTCnt][this.iIC[iTCnt]] = "Copyright parameter missing!";
- var10002 = this.iIC[iTCnt]++;
- }
-
- }
- }
-
- public JAVATabTree() {
- this.cBackground = Color.white;
- this.sTREE_STYLE = "AXAA";
- this.sTREE_MOUSEOVERFRAME = "none";
- this.iTREE_LINESTEP = 2;
- this.sTREE_TOOLTIP = "yes";
- this.sTREE_BORDER = "no";
- this.sTREE_DOUBLECLICK = "no";
- this.sMOUSEOVERSOUND = "none";
- this.sMOUSECLICKSOUND = "none";
- this.sSHOWTABSONLY = "NO";
- this.sTabColorParam = new String[]{"TAB_BG", "TAB_FG", "TAB_MOUSEOVER"};
- this.sColorParam = new String[]{"TREE_BG", "TREE_FG", "TREE_SEL_BG", "TREE_SEL_FG", "TREE_MOUSEOVER", "TREE_LINECOLOR", "TREE_FOLDEROCOLOR", "TREE_FOLDERCCOLOR", "TREE_LEAFCOLOR", "TREE_TOOLTIPBACKCOLOR", "TREE_TOOLTIPFORECOLOR", "TREE_MOUSEOVERFRAMECOLOR"};
- this.sNormalParam = new String[]{"TREE_STYLE", "TREE_MOUSEOVERFRAME", "TREE_LINESTEP", "TREE_TOOLTIP", "TREE_BORDER", "TREE_DOUBLECLICK", "TREE_AUTOEXPAND"};
- this.sImageParam = new String[]{"FOLDER_OPEN", "FOLDER_CLOSED", "LEAF", "TREE_BG_IMAGE"};
- }
- }
-