home *** CD-ROM | disk | FTP | other *** search
- import java.applet.Applet;
- import java.applet.AppletContext;
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Dimension;
- import java.awt.Font;
- import java.awt.Graphics;
- import java.awt.Image;
- import java.awt.LayoutManager;
- import java.awt.MediaTracker;
- import java.awt.image.ImageObserver;
- import java.io.IOException;
- import java.net.MalformedURLException;
- import java.net.URL;
-
- public class SpinDemo1 extends Applet {
- // $FF: renamed from: n java.awt.Font
- Font field_0;
- // $FF: renamed from: bn java.awt.Image
- Image field_1;
- private final String bnn = "BackImage";
- private String bnnn = "_self";
- private URL my_page;
- private String STmy_page;
- boolean allowedon;
- private String WhICHAppID;
- private String proto_my_page;
- private final String Fametoopen = "Frame";
- SpinDemo2 nnnn;
- SpinDemo3 gotoURL;
- SpinDemo3 disptext;
- // $FF: renamed from: md boolean
- boolean field_2;
- int mdx;
- int mdy;
- private String[] hyhy;
- private String[] bnnnn;
- private int m_Number;
- private int increase = 1;
- private Image ghy;
- private Dimension ghjb;
- private Graphics ghyb;
- int bobt;
- boolean xzxzHex;
-
- public void activatebrother() {
- this.nnnn.repaint();
- }
-
- public void stop() {
- this.gotoURL.stop();
- }
-
- public void gotourl() {
- AppletContext ac = ((Applet)this).getAppletContext();
-
- try {
- new URL(this.bnnnn[this.increase]);
- } catch (MalformedURLException var4) {
- } catch (IOException var5) {
- }
-
- }
-
- boolean ftxx() {
- return true;
- }
-
- public void paint(Graphics g) {
- this.method_0(g);
- this.method_1(g);
- }
-
- Color gogoxx(String col) {
- String parameterValue = col;
- if (col.startsWith("#")) {
- parameterValue = col.substring(1);
- }
-
- Color result;
- try {
- int intValue = Integer.parseInt(parameterValue, 16);
- result = new Color(intValue);
- } catch (Exception var7) {
- result = Color.red;
- }
-
- return result;
- }
-
- // $FF: renamed from: xx (java.awt.Graphics) void
- public void method_0(Graphics g) {
- Dimension d = ((Component)this).size();
- g.setColor(Color.lightGray);
- g.fillRect(0, 0, ((Component)this).size().width, ((Component)this).size().height);
- if (this.field_1 != null) {
- int wid = this.field_1.getWidth(this);
- int hei = this.field_1.getHeight(this);
- int widAp = ((Component)this).size().width;
- int heiAp = ((Component)this).size().height;
- int dede = widAp / wid + 1;
- int dedhex = heiAp / hei + 1;
-
- for(int x = 0; x <= dedhex; ++x) {
- for(int i = 0; i <= dede; ++i) {
- g.drawImage(this.field_1, i * wid, x * hei, this);
- }
- }
- }
-
- g.draw3DRect(1, 1, d.width - 2, d.height - 2, true);
- g.draw3DRect(8, 8, d.width - 14, d.height - 14, false);
- int xx = 15;
- int yy = 15;
- g.draw3DRect(xx - 4, yy - 4, d.width - 20, 59, true);
- g.draw3DRect(xx, yy, this.bobt - 93, 51, true);
- g.draw3DRect(xx + 10, yy + 10, this.bobt - 128, 30, true);
- g.draw3DRect(xx + 13, yy + 13, this.bobt - 185 + 10, 24, false);
- g.setColor(Color.black);
- g.fillRect(xx + 14, yy + 14, this.bobt - 185 + 9, 22);
- g.drawRect(9, 9, d.width - 16, d.height - 16);
- g.drawRect(10, 10, d.width - 18, d.height - 18);
- }
-
- public final synchronized void update(Graphics g) {
- Dimension d = ((Component)this).size();
- if (this.ghy == null || d.width != this.ghjb.width || d.height != this.ghjb.height) {
- this.ghy = ((Component)this).createImage(d.width, d.height);
- this.ghjb = d;
- this.ghyb = this.ghy.getGraphics();
- }
-
- this.paint(this.ghyb);
- g.drawImage(this.ghy, 0, 0, (ImageObserver)null);
- }
-
- // $FF: renamed from: XX (java.awt.Graphics) void
- public void method_1(Graphics g) {
- int xx = 15;
- int yy = 15;
- this.disptext.hyhyxx(this.hyhy[this.increase]);
- ((Applet)this).showStatus("Demonstration Version from Silk Webware http://silk.webware.co.nz " + this.bnnnn[this.increase]);
- }
-
- public void start() {
- if (this.ftxx()) {
- this.allowedon = true;
- }
-
- this.gotoURL.start();
- }
-
- public String getAppletInfo() {
- return "Name: SpinDemo1\r\n" + "Author: Nick Harrow\r\n" + "Company: Silk WebWare";
- }
-
- // $FF: renamed from: Xx () void
- public void method_2() {
- this.gotourl();
- }
-
- public void init() {
- String PARAM_Number = "NumberofItems";
- String param1 = ((Applet)this).getParameter(PARAM_Number);
- if (param1 != null) {
- this.m_Number = Integer.parseInt(param1);
- }
-
- this.bnnn = "_blank";
- String LC = "ff0000";
- Color lcc = this.gogoxx(LC);
- boolean M_ShowNumber = true;
- boolean xzxzHex = true;
- boolean M_Button = true;
- int newpos = 0;
- if (!M_Button) {
- newpos = 60;
- }
-
- boolean M_Bold = true;
- int inbold = 0;
- if (M_Bold) {
- inbold = 1;
- }
-
- this.field_0 = new Font("TimesRoman", inbold, 14);
- this.bnnnn = new String[this.m_Number + 1];
- this.hyhy = new String[this.m_Number + 1];
-
- for(int i = 0; i <= this.m_Number; ++i) {
- String isregID = "Title" + i;
- String isregIDhex = "Address" + i;
- String param = ((Applet)this).getParameter(isregID);
- String paramurl = ((Applet)this).getParameter(isregIDhex);
- if (param != null) {
- if (M_ShowNumber) {
- this.hyhy[i] = "" + i + " " + param;
- } else {
- this.hyhy[i] = param;
- }
- } else {
- this.hyhy[i] = "Not defined";
- }
-
- if (paramurl != null) {
- this.bnnnn[i] = paramurl;
- }
-
- if (i == 4) {
- this.hyhy[4] = "4 Full Version Spinalink at Silk Webware ";
- this.bnnnn[4] = "http://silk.webware.co.nz";
- }
- }
-
- this.nnnn = new SpinDemo2(this, this.m_Number, xzxzHex);
- ((Container)this).setLayout((LayoutManager)null);
- ((Container)this).add(this.nnnn);
- ((Container)this).validate();
- this.gotoURL = new SpinDemo3(this, false, this.field_0, lcc);
- this.disptext = new SpinDemo3(this, true, this.field_0, lcc);
- ((Container)this).add(this.disptext);
- this.disptext.move(30, 30);
- this.bobt = ((Component)this).size().width + newpos;
- this.disptext.resize(this.bobt - 185, 20);
- ((Container)this).add(this.gotoURL);
- ((Container)this).validate();
- this.nnnn.move(this.bobt - 139, 16);
- this.gotoURL.move(this.bobt - 66, 13);
- if (!M_Button) {
- this.gotoURL.move(this.bobt, 13);
- }
-
- String Backgroundgraph = ((Applet)this).getParameter("BackImage");
- if (Backgroundgraph != null) {
- MediaTracker mt = new MediaTracker(this);
- URL db = ((Applet)this).getDocumentBase();
- this.field_1 = ((Applet)this).getImage(db, Backgroundgraph);
- mt.addImage(this.field_1, 0);
-
- try {
- mt.waitForID(0);
- } catch (Exception var18) {
- this.field_1 = null;
- }
- }
-
- }
-
- public void testButtonbuttonClicked(int val) {
- this.increase = val;
- ((Component)this).repaint();
- }
- }
-