home *** CD-ROM | disk | FTP | other *** search
Wrap
import java.awt.Button; import java.awt.Color; import java.awt.Component; import java.awt.Container; import java.awt.Dialog; import java.awt.Dimension; import java.awt.Event; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Frame; import java.awt.Graphics; import java.awt.Image; import java.awt.LayoutManager; import java.awt.Panel; import java.awt.Window; class OCswhere extends Dialog { Font font = new Font("helvetica", 0, 11); // $FF: renamed from: fm java.awt.FontMetrics FontMetrics field_0; private String msg = "Specify folder location for the supporting script files. NOTE: Supporting script files must be uploaded to the same relative directory on the web server."; private OCAgrid xyGrid; // $FF: renamed from: d java.awt.Dimension Dimension field_1; // $FF: renamed from: ld java.awt.Dimension Dimension field_2; // $FF: renamed from: bp java.awt.Panel Panel field_3; Button select; Button cancel; private Image text; private Graphics g_text; private boolean paint_called; String orig_value = ""; int win_width; int win_height; private void initxyGrid() { this.field_1 = ((Component)this).size(); this.xyGrid = new OCAgrid(); ((Dialog)this).setTitle("Specify Script Folder"); String[] var1 = new String[1]; String[] var2 = new String[1]; int[] var3 = new int[1]; boolean[] var4 = new boolean[1]; var1[0] = "Script Folder"; var3[0] = 20; var4[0] = true; var2[0] = ACutila.scriptFolder; this.xyGrid.populateGrid(var1, var2, var3, var4); this.xyGrid.setBackgroundColor(ACutilb.windowColor); } OCswhere(Frame var1, boolean var2) { super(var1, false); ((Dialog)this).setResizable(false); this.initxyGrid(); this.win_width = 300; this.win_height = 154; Dimension var3 = ((Window)this).getToolkit().getScreenSize(); int var4 = (var3.width - this.win_width) / 2; int var5 = (var3.height - this.win_height) / 2; ((Component)this).reshape(var4, var5, this.win_width, this.win_height); ((Container)this).setLayout((LayoutManager)null); this.select = new Button("Set Default"); this.select.reshape(9, 122, 81, 22); this.select.setFont(this.font); this.cancel = new Button("OK"); this.cancel.reshape(94, 122, 81, 22); this.cancel.setFont(this.font); ((Container)this).add(this.select); ((Container)this).add(this.cancel); this.xyGrid.reshape(10, 90, this.win_width - 20, 40); ((Container)this).add(this.xyGrid); ((Dialog)this).show(); } public void paint(Graphics var1) { this.paintIt(var1); } public synchronized void paintIt(Graphics var1) { try { if (!this.paint_called) { this.text = ((Component)this).createImage(this.win_width - 10, 60); this.g_text = this.text.getGraphics(); this.g_text.setColor(ACutilb.windowColor); this.g_text.fillRect(0, 0, this.win_width - 10, 60); this.paint_called = true; this.drawMsg(); } else { var1.drawImage(this.text, 5, 25, this); } } catch (Exception var2) { } } public void drawMsg() { Dimension var1 = new Dimension(this.text.getWidth(this), this.text.getHeight(this)); ACutila.drawTextOverImage(this.g_text, var1, this.msg, this.font, Color.black, 5, 1, 1, ACutilb.windowColor, 0, false); this.paintIt(((Component)this).getGraphics()); } public boolean handleEvent(Event var1) { if (var1.id == 201) { ((Window)this).dispose(); return true; } else if (var1.id == 9103) { OCRunWindow var2 = new OCRunWindow(); var2.folderDialog((OCAgrid)var1.target, new Integer((String)var1.arg)); return true; } else { if (var1.id == 1001) { if (var1.target == this.select) { ACutila.scriptFolder = "<same>"; this.xyGrid.setGridValue(0, "<same>"); return true; } if (var1.target == this.cancel) { ((Window)this).dispose(); return true; } } else if (var1.id == 901) { if (this.xyGrid.getGridValue(0).equals("")) { this.xyGrid.setGridValue(0, "<same>"); } ACutila.scriptFolder = this.xyGrid.getGridValue(0); return true; } return super.handleEvent(var1); } } }