home *** CD-ROM | disk | FTP | other *** search
- import java.applet.AudioClip;
- import java.awt.Component;
- import java.awt.Image;
- import java.awt.Rectangle;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.util.StringTokenizer;
-
- class coobut {
- public Rectangle buttonArea = new Rectangle();
- // $FF: renamed from: ID int
- int field_0;
- public String[] label;
- public String name;
- public String szHint = "Content of tooltips for ...";
- public URL uURL;
- public String uURLName;
- public AudioClip[] auSource;
- public String[] auSourceName;
- public int audioMode;
- public String openMode = "_blank";
- public int subOpenMode;
- public int lastChild = -1;
- public int firstChild;
- public Image[] bgImage;
- public String[] bgImageName;
- coobut[] child;
- int bState;
- int fontv = 20;
- int fontSize = 20;
- String barAlign = "Center";
- int[] bevelW;
- int[] bevelH;
- coobar m_applet;
- Component m_cc;
- coobut m_parentBut;
-
- public coobut(coobut other) {
- this.set(other);
- }
-
- public void set(coobut other) {
- this.buttonArea.x = other.buttonArea.x;
- this.buttonArea.y = other.buttonArea.y;
- this.buttonArea.width = other.buttonArea.width;
- this.buttonArea.height = other.buttonArea.height;
- this.field_0 = other.field_0;
- this.label = new String[3];
- this.label[0] = other.label[0];
- this.label[1] = other.label[1];
- this.label[2] = other.label[2];
- this.name = other.name;
- this.szHint = other.szHint;
- this.bevelW = new int[2];
- this.bevelH = new int[2];
- this.bevelW[0] = other.bevelW[0];
- this.bevelH[0] = other.bevelH[0];
- this.bevelW[1] = other.bevelW[1];
- this.bevelH[1] = other.bevelH[1];
- this.barAlign = other.barAlign;
- this.fontv = other.fontv;
- this.fontSize = other.fontSize;
- this.uURL = other.uURL;
- this.uURLName = other.uURLName;
- if (other.auSource != null) {
- this.auSource = new AudioClip[2];
- this.auSource[0] = other.auSource[0];
- this.auSource[1] = other.auSource[1];
- }
-
- if (other.bgImage != null) {
- this.bgImage = new Image[3];
- this.bgImage[0] = other.bgImage[0];
- this.bgImage[1] = other.bgImage[1];
- this.bgImage[2] = other.bgImage[2];
- }
-
- this.auSourceName = new String[2];
- this.auSourceName[0] = other.auSourceName[0];
- this.auSourceName[1] = other.auSourceName[1];
- this.bgImageName = new String[3];
- this.bgImageName[0] = other.bgImageName[0];
- this.bgImageName[1] = other.bgImageName[1];
- this.bgImageName[2] = other.bgImageName[2];
- this.audioMode = other.audioMode;
- this.openMode = other.openMode;
- this.lastChild = other.lastChild;
- this.subOpenMode = other.subOpenMode;
- this.bState = other.bState;
- this.m_applet = other.m_applet;
- this.m_cc = other.m_cc;
- this.m_parentBut = other.m_parentBut;
- if (this.child != null) {
- for(int i = this.firstChild; i < this.lastChild; ++i) {
- this.child[i] = other.child[i];
- }
- }
-
- }
-
- public coobut() {
- }
-
- public coobut(coobar applet, Component cc, coobut parentBut, String in, int totalBut) {
- this.field_0 = parentBut.lastChild;
- this.m_applet = applet;
- this.m_cc = cc;
- this.m_parentBut = parentBut;
- StringTokenizer st = new StringTokenizer(in, "|");
- this.label = new String[3];
-
- try {
- this.label[0] = st.nextToken();
- } catch (Exception var34) {
- this.label[0] = "";
- }
-
- try {
- this.label[1] = st.nextToken();
- } catch (Exception var33) {
- this.label[1] = "";
- }
-
- try {
- this.label[2] = st.nextToken();
- } catch (Exception var32) {
- this.label[2] = "";
- }
-
- try {
- this.uURLName = st.nextToken();
- if (!this.uURLName.trim().equals("")) {
- this.uURL = new URL(this.m_applet.getDocumentBase(), this.uURLName);
- }
- } catch (MalformedURLException var31) {
- this.uURL = null;
- }
-
- this.bgImage = new Image[3];
- this.bgImageName = new String[3];
-
- try {
- this.bgImageName[0] = st.nextToken();
- if (!this.bgImageName[0].trim().equals("")) {
- this.m_applet.getDocumentBase();
- this.bgImage[0] = this.m_applet.getImage(this.m_applet.getDocumentBase(), this.bgImageName[0]);
- this.m_applet.m_common.tracker.addImage(this.bgImage[0], ++this.m_applet.numTrack);
- }
- } catch (Exception var30) {
- this.bgImage[0] = null;
- }
-
- try {
- this.bgImageName[1] = st.nextToken();
- if (!this.bgImageName[1].trim().equals("")) {
- this.bgImage[1] = this.m_applet.getImage(this.m_applet.getDocumentBase(), this.bgImageName[1]);
- this.m_applet.m_common.tracker.addImage(this.bgImage[1], ++this.m_applet.numTrack);
- }
- } catch (Exception var29) {
- this.bgImage[1] = null;
- }
-
- try {
- this.bgImageName[2] = st.nextToken();
- if (!this.bgImageName[2].trim().equals("")) {
- this.bgImage[2] = this.m_applet.getImage(this.m_applet.getDocumentBase(), this.bgImageName[2]);
- this.m_applet.m_common.tracker.addImage(this.bgImage[2], ++this.m_applet.numTrack);
- }
- } catch (Exception var28) {
- this.bgImage[2] = null;
- }
-
- this.auSource = new AudioClip[2];
- this.auSourceName = new String[2];
-
- try {
- this.auSourceName[0] = st.nextToken();
- if (!this.auSourceName[0].trim().equals("")) {
- this.auSource[0] = this.m_applet.getAudioClip(this.m_applet.getDocumentBase(), this.auSourceName[0]);
- }
- } catch (Exception var27) {
- this.auSource[0] = null;
- }
-
- try {
- this.auSourceName[1] = st.nextToken();
- if (!this.auSourceName[1].trim().equals("")) {
- this.auSource[1] = this.m_applet.getAudioClip(this.m_applet.getDocumentBase(), this.auSourceName[1]);
- }
- } catch (Exception var26) {
- this.auSource[1] = null;
- }
-
- try {
- this.szHint = st.nextToken();
- } catch (Exception var25) {
- this.szHint = "";
- }
-
- try {
- this.buttonArea.width = Integer.valueOf(st.nextToken());
- } catch (Exception var24) {
- this.buttonArea.width = 0;
- }
-
- try {
- this.buttonArea.height = Integer.valueOf(st.nextToken());
- } catch (Exception var23) {
- this.buttonArea.height = 0;
- }
-
- try {
- this.audioMode = Integer.valueOf(st.nextToken());
- } catch (Exception var22) {
- this.audioMode = 0;
- }
-
- try {
- this.subOpenMode = Integer.valueOf(st.nextToken());
- } catch (Exception var21) {
- this.subOpenMode = 0;
- }
-
- try {
- this.openMode = st.nextToken();
- } catch (Exception var20) {
- this.openMode = "_blank";
- }
-
- try {
- this.barAlign = st.nextToken();
- } catch (Exception var19) {
- this.barAlign = "Center";
- }
-
- this.barAlign.toUpperCase();
- this.bevelW = new int[2];
- this.bevelH = new int[2];
-
- try {
- this.bevelW[0] = Integer.valueOf(st.nextToken());
- } catch (Exception var18) {
- this.bevelW[0] = 2;
- }
-
- try {
- this.bevelH[0] = Integer.valueOf(st.nextToken());
- } catch (Exception var17) {
- this.bevelH[0] = 2;
- }
-
- try {
- this.bevelW[1] = Integer.valueOf(st.nextToken());
- } catch (Exception var16) {
- this.bevelW[1] = 3;
- }
-
- try {
- this.bevelH[1] = Integer.valueOf(st.nextToken());
- } catch (Exception var15) {
- this.bevelH[1] = 3;
- }
-
- try {
- this.fontSize = Integer.valueOf(st.nextToken());
- } catch (Exception var14) {
- this.fontSize = 20;
- }
-
- try {
- this.fontv = Integer.valueOf(st.nextToken());
- } catch (Exception var13) {
- this.fontv = 20;
- }
-
- if (!this.m_parentBut.name.equals("button")) {
- int numOfRow = totalBut / this.m_applet.maxNumSub + 1;
- int whichRow = this.field_0 / numOfRow;
- int whichCell = this.field_0 - whichRow * numOfRow;
- this.buttonArea.x = whichCell * this.buttonArea.width;
- this.buttonArea.y = whichRow * (this.buttonArea.height + this.m_applet.gap);
- } else {
- if (this.m_applet.m_common.releaseLevel == this.m_applet.m_common.TheAdware) {
- ++this.field_0;
- int numOfRow = totalBut + 1;
- }
-
- int whichRow = this.field_0 / this.m_applet.barNum;
- int whichCell = this.field_0 - whichRow * this.m_applet.barNum;
- int startPos = 0;
- int rr = totalBut / this.m_applet.barNum * this.m_applet.barNum;
- if (rr < totalBut && this.field_0 > rr - 1) {
- int ttt = this.m_applet.barNum - (totalBut - rr);
- if (this.m_applet.barDir == 0) {
- startPos = ttt * this.buttonArea.width / 2;
- } else {
- startPos = ttt * this.buttonArea.height / 2;
- }
- }
-
- if (this.m_applet.barDir == 0) {
- this.buttonArea.x = startPos + whichCell * (this.buttonArea.width + this.m_applet.gap);
- this.buttonArea.y = whichRow * (this.buttonArea.height + this.m_applet.gap);
- } else {
- this.buttonArea.x = whichRow * (this.buttonArea.width + this.m_applet.gap);
- this.buttonArea.y = startPos + whichCell * (this.buttonArea.height + this.m_applet.gap);
- }
- }
- }
- }
-