home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Dimension;
- import java.awt.Event;
- import java.awt.Graphics;
- import java.awt.LayoutManager;
- import java.awt.Panel;
-
- class OCAviewerpan extends Panel {
- private boolean first_run = true;
- private boolean paintCalled = false;
- // $FF: renamed from: d java.awt.Dimension
- Dimension field_0;
- String appClass;
- OCstatus statBar;
- Color bgColor;
- inm app_inm;
- OCVscroll app_ocvscroll;
- slideb app_slideb;
- TDMessage app_tdmessage;
- tsilbg app_tsilbg;
- FadeText app_fadet;
- hscroll app_hscroll;
- slidem app_slidem;
- ime app_ime;
- tscroll app_tscroll;
- mwindow app_mwindow;
- ism app_ism;
- stmenu app_stmenu;
- vtiscroll app_vtiscroll;
- boolean started;
- boolean stopped;
- int appw;
- int apph;
- int appx;
- int appy;
- // $FF: renamed from: sx int
- int field_1;
- // $FF: renamed from: sy int
- int field_2;
- // $FF: renamed from: sw int
- int field_3;
- // $FF: renamed from: sh int
- int field_4;
-
- OCAviewerpan(String var1, int var2, int var3) {
- this.bgColor = Color.gray;
- this.field_1 = 1;
- this.field_4 = 16;
- ((Component)this).setBackground(Color.lightGray);
- ((Container)this).setLayout((LayoutManager)null);
- this.statBar = new OCstatus();
- ((Container)this).add(this.statBar);
- this.appw = var2;
- this.apph = var3;
- this.appClass = var1;
- }
-
- public void paint(Graphics var1) {
- this.paintCalled = true;
- this.paintIt();
- }
-
- public void setBGColor(Color var1) {
- this.bgColor = var1;
- this.paintIt();
- }
-
- public void startApplet() {
- if (!this.started) {
- this.addApplet((String)null, 1);
- this.started = true;
- this.stopped = false;
- }
-
- }
-
- public void stopApplet() {
- if (!this.stopped) {
- this.addApplet((String)null, 2);
- this.stopped = true;
- this.started = false;
- }
-
- }
-
- public void killApplet() {
- this.addApplet((String)null, 3);
- }
-
- private void paintIt() {
- if (this.first_run) {
- this.first_run = false;
- }
-
- if (this.paintCalled) {
- Graphics var1 = ((Component)this).getGraphics();
- byte var2 = 2;
- byte var3 = 2;
- int var4 = this.field_0.width - 4;
- int var5 = this.field_0.height - 4 - (this.field_4 + 4);
- var1.setColor(this.bgColor);
- var1.fillRect(var2, var3, var4, var5);
- var1.setColor(Color.black);
- var1.drawRect(var2 - 1, var3 - 1, var4 + 1, var5 + 1);
- var1.setColor(Color.gray);
- var1.drawRect(var2 - 2, var3 - 2, var4 + 3, var5 + 3);
- var1.drawRect(this.field_1 - 1, this.field_2 - 1, this.field_3 + 1, this.field_4 + 1);
- var1.setColor(Color.lightGray);
- var1.drawLine(var2, var3 + var5, var2 + var4, var3 + var5);
- var1.drawLine(var2 + var4, var3, var2 + var4, var3 + var5);
- var1.setColor(Color.white);
- var1.drawLine(var2 - 1, var3 + var5 + 1, var2 + var4 + 1, var3 + var5 + 1);
- var1.drawLine(var2 + var4 + 1, var3 - 1, var2 + var4 + 1, var3 + var5 + 1);
- var1.drawLine(this.field_1 - 1, this.field_2 + this.field_4, this.field_1 + this.field_3, this.field_2 + this.field_4);
- var1.drawLine(this.field_1 + this.field_3, this.field_2 - 1, this.field_1 + this.field_3, this.field_2 + this.field_4);
- }
- }
-
- public void resize(Dimension var1) {
- this.figureAppPos();
- this.addApplet((String)null, 4);
- super.resize(var1);
- }
-
- public void resize(int var1, int var2) {
- this.field_0 = new Dimension(var1, var2);
- this.figureAppPos();
- this.addApplet((String)null, 4);
- super.resize(var1, var2);
- }
-
- private void figureAppPos() {
- this.appx = (this.field_0.width - this.appw) / 2;
- this.appy = (this.field_0.height - this.apph - (this.field_4 + 4)) / 2;
- this.field_2 = this.field_0.height - this.field_4 - 1;
- this.field_3 = this.field_0.width - 2;
- this.statBar.reshape(this.field_1, this.field_2, this.field_3, this.field_4);
- ACgldat.appBWidth = this.field_0.width - this.appw;
- ACgldat.appBHeight = this.field_0.height - this.apph - this.field_4 - 3;
- }
-
- public void addApplet(String var1) {
- this.addApplet(var1, 0);
- }
-
- private void addApplet(String var1, int var2) {
- if (this.appClass.equalsIgnoreCase("inm")) {
- if (var2 == 0) {
- this.app_inm = new inm();
- this.app_inm.reshape(this.appx, this.appy, this.appw, this.apph);
- ((Container)this).add(this.app_inm);
- this.app_inm.setTag(var1);
- this.app_inm.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_inm.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_inm.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_inm.stop();
- this.app_inm.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_inm.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("ocvscroll")) {
- if (var2 == 0) {
- this.app_ocvscroll = new OCVscroll();
- this.app_ocvscroll.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_ocvscroll);
- this.app_ocvscroll.setTag(var1);
- this.app_ocvscroll.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_ocvscroll.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_ocvscroll.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_ocvscroll.stop();
- this.app_ocvscroll.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_ocvscroll.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("slideb")) {
- if (var2 == 0) {
- this.app_slideb = new slideb();
- this.app_slideb.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_slideb);
- this.app_slideb.setTag(var1);
- this.app_slideb.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_slideb.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_slideb.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_slideb.stop();
- this.app_slideb.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_slideb.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("tdmessage")) {
- if (var2 == 0) {
- this.app_tdmessage = new TDMessage();
- this.app_tdmessage.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_tdmessage);
- this.app_tdmessage.setTag(var1);
- this.app_tdmessage.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_tdmessage.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_tdmessage.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_tdmessage.stop();
- this.app_tdmessage.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_tdmessage.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("tsilbg")) {
- if (var2 == 0) {
- this.app_tsilbg = new tsilbg();
- this.app_tsilbg.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_tsilbg);
- this.app_tsilbg.setTag(var1);
- this.app_tsilbg.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_tsilbg.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_tsilbg.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_tsilbg.stop();
- this.app_tsilbg.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_tsilbg.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("fadetext")) {
- if (var2 == 0) {
- this.app_fadet = new FadeText();
- this.app_fadet.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_fadet);
- this.app_fadet.setTag(var1);
- this.app_fadet.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_fadet.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_fadet.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_fadet.stop();
- this.app_fadet.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_fadet.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("hscroll")) {
- if (var2 == 0) {
- this.app_hscroll = new hscroll();
- this.app_hscroll.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_hscroll);
- this.app_hscroll.setTag(var1);
- this.app_hscroll.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_hscroll.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_hscroll.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_hscroll.stop();
- this.app_hscroll.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_hscroll.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("slidem")) {
- if (var2 == 0) {
- this.app_slidem = new slidem();
- this.app_slidem.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_slidem);
- this.app_slidem.setTag(var1);
- this.app_slidem.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_slidem.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_slidem.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_slidem.stop();
- this.app_slidem.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_slidem.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("ime")) {
- if (var2 == 0) {
- this.app_ime = new ime();
- this.app_ime.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_ime);
- this.app_ime.setTag(var1);
- this.app_ime.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_ime.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_ime.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_ime.stop();
- this.app_ime.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_ime.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("tscroll")) {
- if (var2 == 0) {
- this.app_tscroll = new tscroll();
- this.app_tscroll.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_tscroll);
- this.app_tscroll.setTag(var1);
- this.app_tscroll.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_tscroll.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_tscroll.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_tscroll.stop();
- this.app_tscroll.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_tscroll.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("mwindow")) {
- if (var2 == 0) {
- this.app_mwindow = new mwindow();
- this.app_mwindow.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_mwindow);
- this.app_mwindow.setTag(var1);
- this.app_mwindow.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_mwindow.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_mwindow.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_mwindow.stop();
- this.app_mwindow.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_mwindow.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("ism")) {
- if (var2 == 0) {
- this.app_ism = new ism();
- this.app_ism.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_ism);
- this.app_ism.setTag(var1);
- this.app_ism.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_ism.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_ism.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_ism.stop();
- this.app_ism.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_ism.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("stmenu")) {
- if (var2 == 0) {
- this.app_stmenu = new stmenu();
- this.app_stmenu.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_stmenu);
- this.app_stmenu.setTag(var1);
- this.app_stmenu.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_stmenu.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_stmenu.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_stmenu.stop();
- this.app_stmenu.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_stmenu.reshape(this.appx, this.appy, this.appw, this.apph);
- return;
- }
- } else if (this.appClass.equalsIgnoreCase("vtiscroll")) {
- if (var2 == 0) {
- this.app_vtiscroll = new vtiscroll();
- this.app_vtiscroll.reshape(30, 30, this.appw, this.apph);
- ((Container)this).add(this.app_vtiscroll);
- this.app_vtiscroll.setTag(var1);
- this.app_vtiscroll.init();
- return;
- }
-
- if (var2 == 1) {
- this.app_vtiscroll.start();
- return;
- }
-
- if (var2 == 2) {
- this.app_vtiscroll.stop();
- return;
- }
-
- if (var2 == 3) {
- this.app_vtiscroll.stop();
- this.app_vtiscroll.destroy();
- return;
- }
-
- if (var2 == 4) {
- this.app_vtiscroll.reshape(this.appx, this.appy, this.appw, this.apph);
- }
- }
-
- }
-
- public boolean handleEvent(Event var1) {
- if (var1.id == 9301) {
- this.statBar.setMsg(var1.arg.toString());
- return true;
- } else {
- return super.handleEvent(var1);
- }
- }
-
- public void reshape(int var1, int var2, int var3, int var4) {
- this.field_0 = new Dimension(var3, var4);
- this.figureAppPos();
- this.addApplet((String)null, 4);
- super.reshape(var1, var2, var3, var4);
- }
- }
-