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.Font;
- import java.awt.FontMetrics;
- import java.awt.Graphics;
- import java.awt.Image;
- import java.awt.LayoutManager;
- import java.awt.Panel;
- import java.awt.Window;
- import java.util.Vector;
-
- public class OCIpan extends Panel {
- // $FF: renamed from: d java.awt.Dimension
- Dimension field_0 = new Dimension(0, 0);
- // $FF: renamed from: fm java.awt.FontMetrics
- FontMetrics field_1;
- Font font = new Font("Helvetica", 0, 10);
- int downy = 0;
- int downx = 0;
- int design_id = 0;
- boolean reSizeDesignGrid = false;
- private boolean ready_resize;
- private boolean paint_called;
- private boolean first_run = true;
- private boolean first_paint = true;
- private Color bgColor;
- Window reslide;
- OCAgrid defgrid;
- OCAgrid specgrid;
- ACRecd specnav;
- OCstatus statArea;
- private Image off;
- private Graphics g_off;
- private OCdgvtis dgrid_id0;
- private OCdgTextOne dgrid_id1;
- private OCdgImg dgrid_id2;
- private OCdgTextmlh dgrid_id3;
- private OCdgTextTP dgrid_id4;
- private OCdgBill dgrid_id5;
- private OCdgImgSub dgrid_id6;
- private OCdgImgNav dgrid_id7;
- private OCdgSlideM dgrid_id8;
- private OCdgst dgrid_id9;
- private OCdgvtis dgrid_id10;
- ACIntf iface;
- private int dgx;
- private int dgy;
- private int dgw;
- private int dgh;
- private int sgx;
- private int sgy;
- private int sgw;
- private int sgh;
- private int snx;
- private int sny;
- private int snw;
- private int snh;
- // $FF: renamed from: sx int
- private int field_2;
- // $FF: renamed from: sy int
- private int field_3;
- // $FF: renamed from: sw int
- private int field_4;
- // $FF: renamed from: sh int
- private int field_5;
- // $FF: renamed from: vx int
- private int field_6;
- // $FF: renamed from: vy int
- private int field_7;
- // $FF: renamed from: vw int
- private int field_8;
- // $FF: renamed from: vh int
- private int field_9;
-
- public boolean mouseEnter(Event var1, int var2, int var3) {
- return true;
- }
-
- public void addStatus() {
- this.statArea = new OCstatus();
- this.figureStatus();
- ((Container)this).add(this.statArea);
- }
-
- public void figureDesign() {
- if (ACutilb.hArranged) {
- this.field_6 = 2;
- this.field_7 = 2;
- this.field_8 = this.field_0.width - 4;
- this.field_9 = this.field_0.height - ACutilb.dsgh - 48;
- } else {
- this.field_6 = 2;
- this.field_7 = 2;
- this.field_8 = this.dgx - 14;
- this.field_9 = this.field_0.height - 26;
- }
-
- if (this.design_id == 0) {
- this.dgrid_id0.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 1) {
- this.dgrid_id1.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 2) {
- this.dgrid_id2.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 3) {
- this.dgrid_id3.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 4) {
- this.dgrid_id4.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 5) {
- this.dgrid_id5.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 6) {
- this.dgrid_id6.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 7) {
- this.dgrid_id7.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 8) {
- this.dgrid_id8.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 9) {
- this.dgrid_id9.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else {
- if (this.design_id == 10) {
- this.dgrid_id10.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- }
-
- }
- }
-
- private void checkForUpDate() {
- if (this.iface.dgrid_id == 10 || this.iface.dgrid_id == 1 || this.iface.dgrid_id == 0 || this.iface.dgrid_id == 2 || this.iface.dgrid_id == 3 || this.iface.dgrid_id == 4 || this.iface.dgrid_id == 5 || this.iface.dgrid_id == 6 || this.iface.dgrid_id == 7) {
- this.updateDesign();
- }
-
- }
-
- public void updateDGScrollBars() {
- int var1 = this.design_id;
- if (var1 == 2) {
- this.dgrid_id2.updateScrollBarsForSubs();
- }
-
- }
-
- public void figureDefGrid() {
- if (ACutilb.hArranged) {
- this.dgx = 2;
- this.dgy = this.field_0.height - ACutilb.dsgh - 24;
- this.dgw = this.field_0.width / 2 - 4;
- this.dgh = ACutilb.dsgh;
- } else if (this.iface.primeclass.equals("dvs")) {
- this.dgx = this.field_0.width - ACutilb.dsgw - 2;
- this.dgy = 16;
- this.dgw = ACutilb.dsgw;
- this.dgh = (this.field_0.height - 58) / 2 + 10;
- } else {
- this.dgx = this.field_0.width - ACutilb.dsgw - 2;
- this.dgy = 16;
- this.dgw = ACutilb.dsgw;
- this.dgh = (int)((double)(this.field_0.height - 58) / 1.333);
- }
-
- this.defgrid.reshape(this.dgx, this.dgy, this.dgw, this.dgh);
- }
-
- public void figureSpecGrid() {
- if (ACutilb.hArranged) {
- this.sgx = this.field_0.width - (this.field_0.width / 2 - 3);
- this.sgy = this.field_0.height - ACutilb.dsgh - 24;
- this.sgw = this.field_0.width / 2 - 5;
- this.sgh = ACutilb.dsgh;
- } else if (this.iface.primeclass.equals("dvs")) {
- this.sgh = (this.field_0.height - 58) / 2 - 10;
- this.sgx = this.field_0.width - ACutilb.dsgw - 2;
- this.sgy = this.field_0.height - this.sgh - 24;
- this.sgw = ACutilb.dsgw;
- } else {
- this.sgh = (this.field_0.height - 58) / 4;
- this.sgx = this.field_0.width - ACutilb.dsgw - 2;
- this.sgy = this.field_0.height - this.sgh - 24;
- this.sgw = ACutilb.dsgw;
- }
-
- this.specgrid.reshape(this.sgx, this.sgy, this.sgw, this.sgh);
- }
-
- public void addSpecNav() {
- this.specnav = new ACRecd();
- this.figureSpecNav();
- ((Container)this).add(this.specnav);
- this.specnav.setRecInfo(this.iface.appinfo.cur_spec_index + 1, this.iface.appinfo.maxindex + 1);
- }
-
- public void figureStatus() {
- if (ACutilb.hArranged) {
- this.field_2 = 1;
- this.field_3 = this.field_0.height - 17;
- this.field_4 = this.field_0.width / 2 - 2;
- this.field_5 = 16;
- } else {
- this.field_2 = 1;
- this.field_3 = this.field_0.height - 17;
- this.field_4 = this.field_0.width - ACutilb.dsgw - 7;
- this.field_5 = 16;
- }
-
- this.statArea.reshape(this.field_2, this.field_3, this.field_4, this.field_5);
- }
-
- public void updateDesignOnly(boolean var1) {
- int var2 = this.design_id;
- if (var2 != 0) {
- if (var2 == 1) {
- this.dgrid_id1.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id1.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues());
- this.dgrid_id1.setAppDimensions(new Integer(this.iface.appinfo.getDefValues()[0]), new Integer(this.iface.appinfo.getDefValues()[1]));
- this.dgrid_id1.updateDisplay(this.iface.appinfo.cur_spec_index);
- return;
- }
-
- if (var2 == 2) {
- this.dgrid_id2.updateDisplay(this.iface.appinfo.cur_spec_index);
- this.dgrid_id2.updateScrollBarsForSubs();
- }
- }
-
- }
-
- public void figureSpecNav() {
- if (ACutilb.hArranged) {
- this.snx = this.field_0.width - (this.field_0.width / 2 - 2) + 2;
- this.sny = this.field_0.height - 19;
- this.snw = this.field_0.width / 2 - 2;
- this.snh = 17;
- } else {
- this.snx = this.field_0.width - ACutilb.dsgw - 2;
- this.sny = this.field_0.height - 19;
- this.snw = ACutilb.dsgw - 2;
- this.snh = 17;
- }
-
- this.specnav.reshape(this.snx, this.sny, this.snw, this.snh);
- }
-
- public void reshape(int var1, int var2, int var3, int var4) {
- if (var3 * var4 > 0) {
- this.field_0 = new Dimension(var3, var4);
- this.addInterfaceComps();
- this.reFigureAll();
- this.iface.windowChanged();
- super.reshape(var1, var2, var3, var4);
- }
- }
-
- public boolean mouseExit(Event var1, int var2, int var3) {
- if (!this.reSizeDesignGrid && this.iface.getCursorType() != 0) {
- this.iface.setCursor(0);
- }
-
- return true;
- }
-
- public void addDefGrid() {
- this.figureDefGrid();
- ((Container)this).add(this.defgrid);
- }
-
- public void addSpecGrid() {
- this.figureSpecGrid();
- ((Container)this).add(this.specgrid);
- }
-
- OCIpan(ACIntf var1, int var2) {
- this.bgColor = Color.lightGray;
- this.iface = var1;
- this.design_id = var2;
- ((Container)this).setLayout((LayoutManager)null);
- this.defgrid = new OCAgrid();
- this.specgrid = new OCAgrid();
- }
-
- public void paint(Graphics var1) {
- this.paint_called = true;
- this.paintIt();
- }
-
- public boolean mouseUp(Event var1, int var2, int var3) {
- if (this.iface.getCursorType() != 0) {
- this.iface.setCursor(0);
- }
-
- if (this.reSizeDesignGrid) {
- int var4 = 0;
- int var5 = 0;
- byte var6 = 40;
- int var7 = 0;
- int var8 = 0;
- byte var9 = 0;
- int var10 = 0;
- if (ACutilb.hArranged) {
- var4 = var3 - this.downy;
- var5 = this.field_0.height - 64;
- var6 = 40;
- var7 = this.field_7 + this.field_9;
- if (var3 > var5) {
- var4 = var5 - var7;
- }
-
- if (var3 < var6) {
- var4 = var6 - var7;
- }
-
- this.field_9 += var4;
- } else {
- var4 = var2 - this.downx;
- var8 = this.field_0.width - 150;
- var9 = 40;
- var10 = this.field_6 + this.field_8;
- if (var2 > var8) {
- var4 = var8 - var10;
- }
-
- if (var2 < var9) {
- var4 = var9 - var10;
- }
-
- this.field_8 += var4;
- }
-
- if (this.design_id == 0) {
- this.dgrid_id0.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 1) {
- this.dgrid_id1.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 2) {
- this.dgrid_id2.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 3) {
- this.dgrid_id3.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 4) {
- this.dgrid_id4.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 5) {
- this.dgrid_id5.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 6) {
- this.dgrid_id6.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 7) {
- this.dgrid_id7.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 8) {
- this.dgrid_id8.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 9) {
- this.dgrid_id9.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- } else if (this.design_id == 10) {
- this.dgrid_id10.reshape(this.field_6, this.field_7, this.field_8, this.field_9);
- }
-
- if (ACutilb.hArranged) {
- this.dgy += var4;
- this.dgh = this.field_0.height - this.dgy - 24;
- this.sgy += var4;
- this.sgh = this.field_0.height - this.sgy - 24;
- ACutilb.dsgh = this.dgh;
- } else {
- this.dgx += var4;
- this.dgw = this.field_0.width - this.dgx - 2;
- this.sgx = this.dgx;
- this.sgw = this.dgw;
- ACutilb.dsgw = this.dgw;
- }
-
- this.defgrid.reshape(this.dgx, this.dgy, this.dgw, this.dgh);
- this.specgrid.reshape(this.sgx, this.sgy, this.sgw, this.sgh);
- this.drawArea();
- this.paintIt();
- this.reSizeDesignGrid = false;
- }
-
- return true;
- }
-
- public void addInterfaceComps() {
- if (this.first_run) {
- this.addSpecNav();
- this.addDefGrid();
- this.addSpecGrid();
- this.addStatus();
- this.addDesign();
- this.updateDesign();
- this.first_run = false;
- }
-
- }
-
- public int getDGLevelIndexInfo() {
- int var1 = 0;
- int var2 = 0;
- if (this.iface.dgrid_id == 2) {
- var1 = this.dgrid_id2.eventsubid;
- var2 = this.dgrid_id2.subs[var1].realHL;
- }
-
- return var2;
- }
-
- private synchronized void paintIt() {
- Graphics var1 = ((Component)this).getGraphics();
- if (this.first_paint) {
- this.drawArea();
- var1.drawImage(this.off, 0, 0, this);
- this.first_paint = false;
- } else {
- var1.drawImage(this.off, 0, 0, this);
- }
- }
-
- public void resize(Dimension var1) {
- if (var1.width * var1.height > 0) {
- this.addInterfaceComps();
- this.reFigureAll();
- this.iface.windowChanged();
- super.resize(var1);
- }
- }
-
- public void resize(int var1, int var2) {
- if (var1 * var2 > 0) {
- this.field_0 = new Dimension(var1, var2);
- this.addInterfaceComps();
- this.reFigureAll();
- this.iface.windowChanged();
- super.resize(var1, var2);
- }
- }
-
- public void addDesign() {
- int var1 = this.design_id;
- if (var1 == 0) {
- this.dgrid_id0 = new OCdgvtis();
- this.figureDesign();
- ((Container)this).add(this.dgrid_id0);
- } else if (var1 == 1) {
- this.dgrid_id1 = new OCdgTextOne();
- this.figureDesign();
- ((Container)this).add(this.dgrid_id1);
- } else if (var1 == 2) {
- this.dgrid_id2 = new OCdgImg(this.iface.appinfo);
- this.figureDesign();
- ((Container)this).add(this.dgrid_id2);
- } else if (var1 == 3) {
- this.dgrid_id3 = new OCdgTextmlh();
- this.figureDesign();
- ((Container)this).add(this.dgrid_id3);
- } else if (var1 == 4) {
- this.dgrid_id4 = new OCdgTextTP();
- this.figureDesign();
- ((Container)this).add(this.dgrid_id4);
- } else if (var1 == 5) {
- this.dgrid_id5 = new OCdgBill();
- this.figureDesign();
- ((Container)this).add(this.dgrid_id5);
- } else if (var1 == 6) {
- this.dgrid_id6 = new OCdgImgSub(this.iface.appinfo);
- this.figureDesign();
- ((Container)this).add(this.dgrid_id6);
- } else if (var1 == 7) {
- this.dgrid_id7 = new OCdgImgNav(this.iface.appinfo);
- this.figureDesign();
- ((Container)this).add(this.dgrid_id7);
- } else if (var1 == 8) {
- this.dgrid_id8 = new OCdgSlideM();
- this.figureDesign();
- ((Container)this).add(this.dgrid_id8);
- } else if (var1 == 9) {
- this.dgrid_id9 = new OCdgst();
- this.figureDesign();
- ((Container)this).add(this.dgrid_id9);
- } else {
- if (var1 == 10) {
- this.dgrid_id10 = new OCdgvtis();
- this.figureDesign();
- ((Container)this).add(this.dgrid_id10);
- }
-
- }
- }
-
- public OCdg getDesignArea() {
- int var1 = this.design_id;
- if (var1 == 0) {
- return this.dgrid_id0;
- } else {
- return var1 == 2 ? this.dgrid_id2 : null;
- }
- }
-
- public void updateDesign() {
- int var1 = this.design_id;
- if (var1 == 0) {
- this.dgrid_id0.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id0.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues());
- Vector var8 = this.iface.appinfo.getIconValues();
- if (var8.size() > 0) {
- String[] var11 = new String[var8.size()];
- String[] var14 = new String[var8.size()];
-
- for(int var15 = 0; var15 < var8.size(); ++var15) {
- var11[var15] = ((String[])var8.elementAt(var15))[0];
- var14[var15] = ((String[])var8.elementAt(var15))[1];
- }
-
- this.dgrid_id0.initIcon(var11, var14);
- }
-
- this.dgrid_id0.setAppDimensions(new Integer(this.iface.appinfo.getDefValues()[0]), new Integer(this.iface.appinfo.getDefValues()[1]));
- this.dgrid_id0.setPointer(this.iface.appinfo.cur_spec_index);
- } else if (var1 == 1) {
- this.dgrid_id1.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id1.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues());
- this.dgrid_id1.setAppDimensions(new Integer(this.iface.appinfo.getDefValues()[0]), new Integer(this.iface.appinfo.getDefValues()[1]));
- this.dgrid_id1.updateDisplay(this.iface.appinfo.cur_spec_index);
- } else if (var1 == 2) {
- this.dgrid_id2.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id2.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues());
- this.dgrid_id2.setAppDimensions(1, 1);
- this.dgrid_id2.updateDisplay(this.iface.appinfo.cur_spec_index);
- } else if (var1 == 3) {
- this.dgrid_id3.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id3.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues());
- this.dgrid_id3.setAppDimensions(new Integer(this.iface.appinfo.getDefValues()[0]), new Integer(this.iface.appinfo.getDefValues()[1]));
- this.dgrid_id3.setPointer(this.iface.appinfo.cur_spec_index);
- } else if (var1 == 4) {
- this.dgrid_id4.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id4.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues());
- this.dgrid_id4.setAppDimensions(new Integer(this.iface.appinfo.getDefValues()[0]), new Integer(this.iface.appinfo.getDefValues()[1]));
- this.dgrid_id4.updateDisplay(this.iface.appinfo.cur_spec_index);
- } else if (var1 == 5) {
- this.dgrid_id5.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id5.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues());
- this.dgrid_id5.setAppDimensions(new Integer(this.iface.appinfo.getDefValues()[0]), new Integer(this.iface.appinfo.getDefValues()[1]));
- this.dgrid_id5.updateDisplay(this.iface.appinfo.cur_spec_index);
- } else if (var1 == 6) {
- this.dgrid_id6.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id6.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues());
- this.dgrid_id6.setAppDimensions(new Integer(this.iface.appinfo.getDefValues()[0]), new Integer(this.iface.appinfo.getDefValues()[1]));
- this.dgrid_id6.updateDisplay(this.iface.appinfo.cur_spec_index);
- } else if (var1 == 7) {
- this.dgrid_id7.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id7.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues());
- this.dgrid_id7.setAppDimensions(new Integer(this.iface.appinfo.getDefValues()[0]), new Integer(this.iface.appinfo.getDefValues()[1]));
- this.dgrid_id7.updateDisplay(this.iface.appinfo.cur_spec_index);
- } else if (var1 == 8) {
- this.dgrid_id8.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id8.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues(), this.iface.appinfo.getSpecParamNames());
- Vector var7 = this.iface.appinfo.getIconValues();
- if (var7.size() > 0) {
- String[] var10 = new String[var7.size()];
-
- for(int var13 = 0; var13 < var7.size(); ++var13) {
- var10[var13] = ((String[])var7.elementAt(var13))[0];
- }
-
- this.dgrid_id8.initIcon(var10);
- }
-
- this.dgrid_id8.setAppDimensions(new Integer(this.iface.appinfo.getDefValues()[0]), new Integer(this.iface.appinfo.getDefValues()[1]));
- } else if (var1 == 9) {
- this.dgrid_id9.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id9.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues(), this.iface.appinfo.getSpecParamNames());
- Vector var6 = this.iface.appinfo.getIconValues();
- if (var6.size() > 0) {
- String[] var9 = new String[var6.size()];
-
- for(int var12 = 0; var12 < var6.size(); ++var12) {
- var9[var12] = ((String[])var6.elementAt(var12))[0];
- }
-
- this.dgrid_id9.initIcon(var9);
- }
-
- this.dgrid_id9.setAppDimensions(new Integer(this.iface.appinfo.getDefValues()[0]), new Integer(this.iface.appinfo.getDefValues()[1]));
- } else {
- if (var1 == 10) {
- this.dgrid_id10.addDefaults(this.iface.appinfo.getDefParamDescs(), this.iface.appinfo.getDefValues());
- this.dgrid_id10.addSpecifics(this.iface.appinfo.getSpecParamDescs(), this.iface.appinfo.getSpecValues());
- Vector var2 = this.iface.appinfo.getIconValues();
- if (var2.size() > 0) {
- String[] var3 = new String[var2.size()];
- String[] var4 = new String[var2.size()];
-
- for(int var5 = 0; var5 < var2.size(); ++var5) {
- var3[var5] = ((String[])var2.elementAt(var5))[0];
- var4[var5] = ((String[])var2.elementAt(var5))[1];
- }
-
- this.dgrid_id10.initIcon(var3, var4);
- }
-
- this.dgrid_id10.setAppDimensions(new Integer(this.iface.appinfo.getDefValues()[0]), new Integer(this.iface.appinfo.getDefValues()[1]));
- this.dgrid_id10.setPointer(this.iface.appinfo.cur_spec_index);
- }
-
- }
- }
-
- public void reFigureAll() {
- if (!this.first_run) {
- this.figureDefGrid();
- this.figureSpecGrid();
- this.figureSpecNav();
- this.figureStatus();
- this.figureDesign();
- }
-
- this.first_run = false;
- if (!this.first_paint) {
- this.first_paint = true;
- }
-
- }
-
- public OCdgvtis getOCdgvtis() {
- return this.dgrid_id0;
- }
-
- public boolean mouseDown(Event var1, int var2, int var3) {
- if (this.iface.getCursorType() == 9 || this.iface.getCursorType() == 10) {
- this.downy = var3;
- this.downx = var2;
- this.reSizeDesignGrid = true;
- }
-
- return true;
- }
-
- public void drawArea() {
- int var1 = 0;
- int var2 = 0;
- this.off = ((Component)this).createImage(this.field_0.width, this.field_0.height);
- this.g_off = this.off.getGraphics();
- this.g_off.setFont(this.font);
- this.field_1 = ((Component)this).getFontMetrics(this.font);
- if (ACutilb.hArranged) {
- this.field_9 += 5;
- } else {
- this.field_8 += 5;
- }
-
- this.g_off.setColor(Color.black);
- this.g_off.drawRect(this.field_6 - 1, this.field_7 - 1, this.field_8 + 1, this.field_9 + 1);
- this.g_off.drawRect(this.dgx - 1, this.dgy - 1, this.dgw + 1, this.dgh + 1);
- this.g_off.drawRect(this.sgx - 1, this.sgy - 1, this.sgw + 1, this.sgh + 1);
- var1 = this.field_1.stringWidth("Specific Properties");
- var2 = this.sgx + 8;
- this.g_off.drawString("Specific Properties", var2 - 1, this.sgy - this.field_1.getDescent() - 2);
- var1 = this.field_1.stringWidth("Global / Default Properties");
- var2 = this.dgx - 1 + 8;
- this.g_off.drawString("Global / Default Properties", var2, this.dgy - this.field_1.getDescent() - 2);
- ACutil var4 = new ACutil();
- Image var3;
- if ((var3 = var4.getImage("acimg/gold_arrow.gif")) != null) {
- this.g_off.drawImage(var3, this.dgx, this.dgy - 12, this);
- this.g_off.drawImage(var3, this.sgx, this.sgy - 12, this);
- } else {
- this.g_off.setColor(new Color(51, 51, 51));
- this.g_off.fillRect(this.dgx, this.dgy - 12, 7, 7);
- this.g_off.fillRect(this.sgx, this.sgy - 12, 7, 7);
- }
-
- this.g_off.setColor(Color.gray);
- this.g_off.drawRect(this.field_6 - 2, this.field_7 - 2, this.field_8 + 3, this.field_9 + 3);
- this.g_off.drawRect(this.dgx - 2, this.dgy - 2, this.dgw + 2, this.dgh + 2);
- this.g_off.drawRect(this.sgx - 2, this.sgy - 2, this.sgw + 2, this.sgh + 2);
- this.g_off.drawRect(this.field_2 - 1, this.field_3 - 1, this.field_4 + 1, this.field_5 + 1);
- this.g_off.setColor(Color.lightGray);
- this.g_off.drawLine(this.field_6, this.field_7 + this.field_9, this.field_6 + this.field_8, this.field_7 + this.field_9);
- this.g_off.drawLine(this.field_6 + this.field_8, this.field_7, this.field_6 + this.field_8, this.field_7 + this.field_9);
- this.g_off.drawLine(this.dgx, this.dgy + this.dgh, this.dgx + this.dgw, this.dgy + this.dgh);
- this.g_off.drawLine(this.dgx + this.dgw, this.dgy, this.dgx + this.dgw, this.dgy + this.dgh);
- this.g_off.drawLine(this.sgx, this.sgy + this.sgh, this.sgx + this.sgw, this.sgy + this.sgh);
- this.g_off.drawLine(this.sgx + this.sgw, this.sgy, this.sgx + this.sgw, this.sgy + this.sgh);
- this.g_off.setColor(Color.white);
- this.g_off.drawLine(this.field_6 - 1, this.field_7 + this.field_9 + 1, this.field_6 + this.field_8 + 1, this.field_7 + this.field_9 + 1);
- this.g_off.drawLine(this.field_6 + this.field_8 + 1, this.field_7 - 1, this.field_6 + this.field_8 + 1, this.field_7 + this.field_9 + 1);
- this.g_off.drawLine(this.dgx - 1, this.dgy + this.dgh + 1, this.dgx + this.dgw + 1, this.dgy + this.dgh + 1);
- this.g_off.drawLine(this.dgx + this.dgw + 1, this.dgy - 1, this.dgx + this.dgw + 1, this.dgy + this.dgh + 1);
- this.g_off.drawLine(this.sgx - 1, this.sgy + this.sgh + 1, this.sgx + this.sgw + 1, this.sgy + this.sgh + 1);
- this.g_off.drawLine(this.sgx + this.sgw + 1, this.sgy - 1, this.sgx + this.sgw + 1, this.sgy + this.sgh + 1);
- this.g_off.drawLine(this.field_2 - 1, this.field_3 + this.field_5, this.field_2 + this.field_4, this.field_3 + this.field_5);
- this.g_off.drawLine(this.field_2 + this.field_4, this.field_3 - 1, this.field_2 + this.field_4, this.field_3 + this.field_5);
- if (ACutilb.hArranged) {
- this.g_off.setColor(Color.lightGray);
- this.g_off.drawLine(this.field_6, this.field_7 + this.field_9 - 5, this.field_6 + this.field_8, this.field_7 + this.field_9 - 5);
- this.g_off.setColor(Color.white);
- this.g_off.drawLine(this.field_6, this.field_7 + this.field_9 - 4, this.field_6 + this.field_8, this.field_7 + this.field_9 - 4);
- this.g_off.setColor(Color.gray);
- this.g_off.drawLine(this.field_6, this.field_7 + this.field_9 - 1, this.field_6 + this.field_8, this.field_7 + this.field_9 - 1);
- this.g_off.setColor(Color.black);
- this.g_off.drawLine(this.field_6, this.field_7 + this.field_9, this.field_6 + this.field_8, this.field_7 + this.field_9);
- this.field_9 -= 5;
- } else {
- this.field_8 -= 5;
- this.g_off.setColor(Color.lightGray);
- this.g_off.drawLine(this.field_6 + this.field_8, this.field_7, this.field_6 + this.field_8, this.field_7 + this.field_9);
- this.g_off.setColor(Color.white);
- this.g_off.drawLine(this.field_6 + this.field_8 + 1, this.field_7, this.field_6 + this.field_8 + 1, this.field_7 + this.field_9);
- this.g_off.setColor(Color.gray);
- this.g_off.drawLine(this.field_6 + this.field_8 + 4, this.field_7, this.field_6 + this.field_8 + 4, this.field_7 + this.field_9);
- this.g_off.setColor(Color.black);
- this.g_off.drawLine(this.field_6 + this.field_8 + 5, this.field_7, this.field_6 + this.field_8 + 5, this.field_7 + this.field_9);
- }
- }
-
- public Dimension getMinimumSize() {
- return new Dimension(50, 50);
- }
-
- public Dimension getPreferredSize() {
- return new Dimension(50, 50);
- }
-
- private void navJobs() {
- this.specnav.setRecInfo(this.iface.appinfo.cur_spec_index + 1, this.iface.appinfo.maxindex + 1);
- if (this.iface.subDialog != null) {
- if (this.iface.subDialog.isAlive) {
- this.iface.subDialog.imlpan.goToNewSpecRecord();
- }
-
- }
- }
-
- public boolean handleEvent(Event var1) {
- if (var1.id == 951) {
- int var11 = Integer.parseInt((String)var1.arg);
- int var13 = 0;
- if (var11 == 0) {
- var13 = this.iface.appinfo.deleteSpecParam();
- this.iface.loadSpecFields(var13);
- this.navJobs();
- this.updateDesign();
- return true;
- } else if (var11 == 1) {
- this.iface.updateSpecFields();
- var13 = this.iface.appinfo.insertSpecParam();
- this.iface.loadSpecFields(var13);
- this.updateDesign();
- this.navJobs();
- return true;
- } else if (var11 == 2) {
- this.iface.updateSpecFields();
- var13 = this.iface.appinfo.goToNewSpecParam();
- this.iface.loadSpecFields(var13);
- this.updateDesign();
- this.navJobs();
- return true;
- } else if (var11 == 3) {
- if (this.iface.appinfo.cur_spec_index == 0) {
- return true;
- } else {
- this.iface.updateSpecFields();
- var13 = this.iface.appinfo.goToFirstSpecParam();
- this.iface.loadSpecFields(var13);
- this.checkForUpDate();
- this.navJobs();
- return true;
- }
- } else if (var11 == 4) {
- if (this.iface.appinfo.cur_spec_index == 0) {
- return true;
- } else {
- this.iface.updateSpecFields();
- var13 = this.iface.appinfo.goToPrevSpecParam();
- this.iface.loadSpecFields(var13);
- this.checkForUpDate();
- this.navJobs();
- return true;
- }
- } else if (var11 == 5) {
- if (this.iface.appinfo.cur_spec_index == this.iface.appinfo.maxindex) {
- return true;
- } else {
- this.iface.updateSpecFields();
- var13 = this.iface.appinfo.goToNextSpecParam();
- this.iface.loadSpecFields(var13);
- this.checkForUpDate();
- this.navJobs();
- return true;
- }
- } else if (var11 == 6) {
- if (this.iface.appinfo.cur_spec_index == this.iface.appinfo.maxindex) {
- return true;
- } else {
- this.iface.updateSpecFields();
- var13 = this.iface.appinfo.goToLastSpecParam();
- this.iface.loadSpecFields(var13);
- this.checkForUpDate();
- this.navJobs();
- return true;
- }
- } else {
- return true;
- }
- } else {
- if (var1.id == 1001) {
- String var2 = (String)var1.arg;
- int var3 = 0;
- if (var2.equals("Add Rollover Image")) {
- if (this.design_id == 2 && this.dgrid_id2.simg_status[this.iface.appinfo.cur_spec_index]) {
- this.iface.updateSpecFields();
- var3 = this.iface.appinfo.goToNewSpecParam();
- this.iface.loadSpecFields(var3);
- this.updateDesign();
- this.navJobs();
- }
-
- this.specgrid.activateButton(0, 0);
- return true;
- }
-
- if (var2.equals("Change Rollover Image")) {
- this.specgrid.activateButton(0, 0);
- return true;
- }
-
- if (var2.equals("Change Map Image")) {
- this.defgrid.activateButton(0, 0);
- return true;
- }
-
- if (var2.equals("Add / Edit Sub Menus")) {
- if (this.iface.subDialog != null && this.iface.subDialog.isAlive) {
- this.iface.subDialog.requestFocus();
- } else {
- this.specgrid.activateButton(4, 4);
- }
-
- return true;
- }
-
- if (var2.equals("Text Color")) {
- this.specgrid.activateButton(4, 4);
- return true;
- }
-
- if (var2.equals("Font")) {
- this.specgrid.activateButton(7, 7);
- return true;
- }
-
- if (var2.equals("Scroll BG Color")) {
- this.defgrid.activateButton(2, 2);
- return true;
- }
-
- if (var2.equals("Page BG Color")) {
- new OCColor(this.iface, this.getDesignArea());
- return true;
- }
-
- if (var2.equals("Edit Text")) {
- if (this.iface.primeclass.equals("dvs")) {
- this.iface.ipan.specgrid.activateButton(0, 0);
- } else if (this.iface.primeclass.equals("dnm") && this.iface.dgrid_id == 2) {
- int var24 = this.dgrid_id2.eventsubid;
- String var26 = this.dgrid_id2.subs[var24].branchid;
- int var28 = this.dgrid_id2.clickedIndex;
- if (this.iface.subDialog == null || !this.iface.subDialog.isAlive) {
- String[] var29 = this.iface.appinfo.getSpecMLValues().valueAt(var26 + "-" + var28);
- OCRunWindow var8 = new OCRunWindow();
- var8.setupOCTZoom1(var29[0], this.iface.appinfo, 2, 0, var26 + "-" + var28);
- var8.launchOCTZoom1();
- return true;
- }
-
- this.iface.subDialog.imlpan.goToNewSpecificFromDesignGrid(var24 + 1, var26, var28);
- this.iface.subDialog.specmlgrid.activateButton(0, 0);
- }
-
- return true;
- }
-
- if (var2.equals("Edit / Add Icon")) {
- if (this.iface.primeclass.equals("dvs")) {
- this.iface.ipan.specgrid.activateButton(1, 1);
- } else if (this.iface.primeclass.equals("dnm") && this.iface.dgrid_id == 2) {
- int var23 = this.dgrid_id2.eventsubid;
- String var25 = this.dgrid_id2.subs[var23].branchid;
- int var27 = this.dgrid_id2.clickedIndex;
- if (this.iface.subDialog == null || !this.iface.subDialog.isAlive) {
- this.iface.appinfo.getSpecMLValues().valueAt(var25 + "-" + var27);
- if (this.iface.icopick != null) {
- this.iface.icopick.dispose();
- }
-
- this.iface.icopick = new OCicop(this.iface.appinfo, -2, false, 151, 1, var25 + "-" + var27);
- this.iface.icopick.show();
- return true;
- }
-
- this.iface.subDialog.imlpan.goToNewSpecificFromDesignGrid(var23 + 1, var25, var27);
- this.iface.subDialog.specmlgrid.activateButton(1, 1);
- }
-
- return true;
- }
-
- if (var2.equals("Edit Sub Menu")) {
- int var4 = this.dgrid_id2.eventsubid;
- String var5 = this.dgrid_id2.subs[var4].branchid;
- Event var6 = new Event(this, 960, this);
- var6.id = 9940;
- String[] var7 = new String[]{(new Integer(var4 + 1)).toString(), var5};
- var6.arg = var7;
- super.postEvent(var6);
- } else if (var2.equals("Background Color")) {
- new OCColor(this.iface, this.getDesignArea());
- } else if (var2.equals("Add Item")) {
- if (this.iface.primeclass.equals("dvs")) {
- Event var21 = new Event(this, 900, this);
- var21.id = 951;
- var21.arg = (new Integer(2)).toString();
- this.handleEvent(var21);
- } else if (this.iface.primeclass.equals("dnm") && this.iface.dgrid_id == 2) {
- this.editMLSFromDesignGrid(0);
- return true;
- }
- } else if (var2.equals("Insert Item")) {
- if (this.iface.primeclass.equals("dvs")) {
- Event var22 = new Event(this, 900, this);
- var22.id = 951;
- var22.arg = (new Integer(1)).toString();
- this.handleEvent(var22);
- } else if (this.iface.primeclass.equals("dnm") && this.iface.dgrid_id == 2) {
- this.editMLSFromDesignGrid(2);
- return true;
- }
- } else if (var2.equals("Add Sub Menu") && this.iface.dgrid_id == 2) {
- this.editMLSFromDesignGrid(1);
- return true;
- }
- }
-
- if (var1.id == 9202) {
- int var9 = 0;
- this.iface.updateSpecFields();
- var9 = this.iface.appinfo.goToSpecParam(new Integer(var1.arg.toString()));
- this.iface.loadSpecFields(var9);
- if (this.iface.dgrid_id == 1) {
- this.updateDesign();
- }
-
- if (this.iface.dgrid_id == 3) {
- this.dgrid_id3.setPointer(var9);
- }
-
- if (this.iface.dgrid_id == 0) {
- this.dgrid_id0.setPointer(var9);
- }
-
- if (this.iface.dgrid_id == 10) {
- this.dgrid_id10.setPointer(var9);
- }
-
- this.navJobs();
- return true;
- } else {
- return super.handleEvent(var1);
- }
- }
- }
-
- private void editMLSFromDesignGrid(int var1) {
- int var2 = 0;
- int var3 = this.dgrid_id2.eventsubid;
- String var4 = this.dgrid_id2.subs[var3].branchid;
- int var5 = this.dgrid_id2.clickedIndex;
- if (this.iface.subDialog != null && this.iface.subDialog.isAlive) {
- this.iface.subDialog.imlpan.goToNewSpecificFromDesignGrid(var3 + 1, var4, var5);
- if (var1 == 0 || var1 == 2) {
- if (var1 == 0) {
- var2 = this.iface.appinfo.goToNewSpecMLParam();
- } else if (var1 == 2) {
- var2 = this.iface.appinfo.insertSpecMLParam();
- }
-
- this.iface.subDialog.loadSpecMLFields();
- this.iface.subDialog.imlpan.updateDesign();
- this.iface.subDialog.imlpan.specmlnav.setRecInfo(var2 + 1, this.iface.appinfo.max_tree_index + 1);
- this.iface.subDialog.imlpan.updateDesignPointer(var2);
- this.iface.subDialog.specmlgrid.activateButton(0, 0);
- ACutila.iface.ipan.updateDesignOnly(true);
- return;
- }
-
- if (var1 == 1) {
- this.iface.appinfo.goToNextSpecMLLevel();
- this.iface.appinfo.goToBranch();
- this.iface.appinfo.checkLevel();
- this.iface.subDialog.loadSpecMLFields();
- this.iface.subDialog.loadBranchFields();
- this.iface.subDialog.imlpan.updateDesign();
- this.iface.subDialog.imlpan.specmlnav.setRecInfo(this.iface.appinfo.cur_tree_index + 1, this.iface.appinfo.max_tree_index + 1);
- this.iface.subDialog.imlpan.levnav.setRecInfo(this.iface.appinfo.cur_tree_level, this.iface.appinfo.max_tree_level);
- this.iface.subDialog.imlpan.updateDesignPointer(this.iface.appinfo.cur_tree_index);
- ACutila.iface.ipan.updateDesignOnly(false);
- if (this.iface.dgrid_id == 2) {
- this.iface.ipan.dgrid_id2.subs[var3].curHL = var5;
- this.iface.ipan.dgrid_id2.checkClicked_SubItem(var3, true);
- }
-
- this.updateDGScrollBars();
- return;
- }
- } else {
- this.iface.appinfo.goToSpecMLLevel(var3 + 1, var4, var5);
- if (var1 == 0 || var1 == 2) {
- if (var1 == 0) {
- var2 = this.iface.appinfo.goToNewSpecMLParam();
- } else if (var1 == 2) {
- var2 = this.iface.appinfo.insertSpecMLParam();
- }
-
- String[] var6 = this.iface.appinfo.getSpecMLValues().valueAt(var4 + "-" + var2);
- ACutila.iface.ipan.updateDesignOnly(true);
- OCRunWindow var7 = new OCRunWindow();
- var7.setupOCTZoom1(var6[0], this.iface.appinfo, 2, 0, var4 + "-" + var2);
- var7.launchOCTZoom1();
- return;
- }
-
- if (var1 == 1) {
- this.iface.appinfo.goToNextSpecMLLevel();
- this.iface.appinfo.goToBranch();
- this.iface.appinfo.checkLevel();
- if (this.iface.dgrid_id == 2) {
- this.updateDesignOnly(false);
- this.dgrid_id2.subs[var3].curHL = var5;
- this.dgrid_id2.checkClicked_SubItem(var3, true);
- this.updateDGScrollBars();
- return;
- }
-
- this.updateDesignOnly(true);
- }
- }
-
- }
-
- public boolean mouseDrag(Event var1, int var2, int var3) {
- return true;
- }
-
- public boolean mouseMove(Event var1, int var2, int var3) {
- if (ACutilb.hArranged) {
- if (var3 > this.field_7 + this.field_9 && var3 < this.field_7 + this.field_9 + 7) {
- this.iface.setCursor(9);
- } else {
- this.iface.setCursor(0);
- }
- } else if (var2 > this.field_6 + this.field_8 && var2 < this.field_6 + this.field_8 + 7) {
- this.iface.setCursor(10);
- } else {
- this.iface.setCursor(0);
- }
-
- return true;
- }
- }
-