home *** CD-ROM | disk | FTP | other *** search
- package hhapplet;
-
- import java.applet.Applet;
- import java.awt.Image;
- import java.net.MalformedURLException;
- import treeview.ImageSet;
- import treeview.SiblingChildTree;
- import treeview.TreeViewNode;
-
- public class ContentsTree extends TreeViewNode {
- public String local;
- public String url;
- public String frame_name;
- // $FF: renamed from: a java.applet.Applet
- private Applet field_0;
- private Image[] images;
- private boolean use_folder_images;
- private boolean new_topic;
-
- public ContentsTree(Applet var1, Image[] var2, String var3, String var4, String var5, String var6, boolean var7, boolean var8) {
- super(var3, new ImageSet(var2));
- this.field_0 = var1;
- this.images = var2;
- this.local = var4;
- this.url = var5;
- this.frame_name = var6;
- this.use_folder_images = var7;
- this.new_topic = var8;
- ((TreeViewNode)this).setCollapsedState(true);
- }
-
- public Image getCurrentImage() {
- return ((TreeViewNode)this).getImages().getImage(this.imageIndex());
- }
-
- private int imageIndex() {
- if (((SiblingChildTree)this).numberOfChildren() != 0) {
- return (!((TreeViewNode)this).getCollapsedState() ? 1 : 0) + (this.new_topic ? 2 : 0) + (this.use_folder_images ? 4 : 0);
- } else {
- return this.local != null && (this.local.toUpperCase().startsWith("HTTP") || this.local.toUpperCase().startsWith("FTP") || this.local.toUpperCase().startsWith("MAILTO") || this.local.toUpperCase().startsWith("NEWS")) && !this.use_folder_images ? 14 + (this.new_topic ? 1 : 0) : 8 + (this.use_folder_images ? 2 : 0) + (this.new_topic ? 1 : 0);
- }
- }
-
- public void doAction() {
- if (this.local != null || this.url != null) {
- if (this.local.charAt(0) == 'W' && this.local.startsWith("WebHelp:")) {
- String var1 = this.local.substring(8);
- ((WebHelp)this.field_0).Command(var1, "");
- } else {
- try {
- if (this.frame_name != null) {
- this.field_0.getAppletContext().showDocument(URLFileHandler.makeURL(this.field_0.getDocumentBase(), this.local, this.url), this.frame_name);
- } else {
- this.field_0.getAppletContext().showDocument(URLFileHandler.makeURL(this.field_0.getDocumentBase(), this.local, this.url), "_self");
- }
- } catch (MalformedURLException var2) {
- }
- }
- }
- }
- }
-