home *** CD-ROM | disk | FTP | other *** search
Wrap
package netscape.security; import java.applet.Applet; import java.awt.Button; import java.awt.Checkbox; import java.awt.Color; import java.awt.Component; import java.awt.Container; import java.awt.Event; import java.awt.Font; import java.awt.Frame; import java.awt.Label; import java.awt.LayoutManager; import java.awt.Rectangle; import java.awt.Scrollbar; import java.net.MalformedURLException; import java.net.URL; class FrmSec extends Frame { FrmDetail frmDetail; FrmCert frmCert; Applet applet = GlobalCtxt.getApplet(); DialogInterface dlgi_g; XYLayout hXYL; ImgPanel imagePanelRoot; Label lbSecHeading; Label lbSecWarn; Label lbSecRem; Checkbox cbSecRem; Button btnSecHelp; Button btnSecDeny; Button btnSecDetail; Label lbSecRiskLabel; Button btnSecView; Button btnSecGrant; Label lbIdentity; ImgPanel imgPnlSecDesc; Label lbSecDesc; Scrollbar sbSecDesc; void btnDetail_Clicked(Event var1) { if (this.frmDetail == null) { this.frmDetail = new FrmDetail((DialogInterface)null); } this.frmDetail.show(); } void btnView_Clicked(Event var1) { if (this.frmCert == null) { this.frmCert = new FrmCert((DialogInterface)null); } this.frmCert.show(); } void btnHelp_Clicked(Event var1) { String var2 = ""; try { if (this.applet.getCodeBase() != null) { var2 = this.applet.getCodeBase().toString(); } URL var3 = new URL(var2); this.applet.getAppletContext().showDocument(var3, new String("_blank")); } catch (MalformedURLException var4) { } } void btnOK_Clicked(Event var1) { ((Component)this).hide(); } public void setLayout(LayoutManager var1) { this.hXYL = new XYLayout((Rectangle)null); super.setLayout(this.hXYL); } FrmSec(DialogInterface var1) { this.dlgi_g = var1; this.setLayout((LayoutManager)null); ((Frame)this).addNotify(); ((Component)this).hide(); ((Component)this).resize(((Container)this).insets().left + ((Container)this).insets().right + 470, ((Container)this).insets().top + ((Container)this).insets().bottom + 311); ((Component)this).setBackground(new Color(12632256)); this.imagePanelRoot = new ImgPanel(); this.imagePanelRoot.setLayout((LayoutManager)null); this.imagePanelRoot.reshape(((Container)this).insets().left + 1, ((Container)this).insets().top + 2, 467, 307); this.imagePanelRoot.setBackground(new Color(12632256)); ((Container)this).add(this.imagePanelRoot); this.lbSecHeading = new Label("A java applet from <b> XYZ, Inc. is requesting unusual access to your computer or </b> network. You should not grant this access unless you trust this vendor or distributor."); this.lbSecHeading.hide(); this.lbSecHeading.reshape(75, 11, 381, 79); this.lbSecHeading.setFont(new Font("TimesRoman", 0, 16)); this.imagePanelRoot.add(this.lbSecHeading); this.lbSecWarn = new Label("<img> warn.gif"); this.lbSecWarn.hide(); this.lbSecWarn.reshape(10, 13, 52, 37); this.imagePanelRoot.add(this.lbSecWarn); this.lbSecRem = new Label("Remember this decision"); this.lbSecRem.hide(); this.lbSecRem.reshape(28, 231, 428, 29); this.lbSecRem.setFont(new Font("TimesRoman", 0, 16)); this.imagePanelRoot.add(this.lbSecRem); this.cbSecRem = new Checkbox(" abcd"); this.cbSecRem.reshape(10, 229, 15, 15); this.imagePanelRoot.add(this.cbSecRem); this.btnSecHelp = new Button("Help Help Help"); this.btnSecHelp.reshape(398, 279, 60, 23); this.btnSecHelp.setFont(new Font("TimesRoman", 0, 12)); this.imagePanelRoot.add(this.btnSecHelp); this.btnSecDeny = new Button("Deny This applet"); this.btnSecDeny.reshape(331, 279, 60, 23); this.btnSecDeny.setFont(new Font("TimesRoman", 0, 12)); this.imagePanelRoot.add(this.btnSecDeny); this.btnSecDetail = new Button("Show Details"); this.btnSecDetail.reshape(392, 203, 64, 23); this.btnSecDetail.setFont(new Font("TimesRoman", 0, 12)); this.imagePanelRoot.add(this.btnSecDetail); this.lbSecRiskLabel = new Label("The Access requested is <b> Medium Risk </b>"); this.lbSecRiskLabel.hide(); this.lbSecRiskLabel.reshape(10, 93, 446, 28); this.lbSecRiskLabel.setFont(new Font("TimesRoman", 0, 14)); this.imagePanelRoot.add(this.lbSecRiskLabel); this.btnSecView = new Button("View Certificate"); this.btnSecView.reshape(10, 279, 70, 23); this.btnSecView.setFont(new Font("TimesRoman", 0, 12)); this.imagePanelRoot.add(this.btnSecView); this.btnSecGrant = new Button("Grant"); this.btnSecGrant.reshape(264, 279, 60, 23); this.btnSecGrant.setFont(new Font("TimesRoman", 0, 12)); this.imagePanelRoot.add(this.btnSecGrant); this.lbIdentity = new Label(" <10> Identity verified by Verisign Inc.. </10>"); this.lbIdentity.hide(); this.lbIdentity.reshape(10, 259, 446, 18); this.lbIdentity.setFont(new Font("TimesRoman", 0, 12)); this.imagePanelRoot.add(this.lbIdentity); this.imgPnlSecDesc = new ImgPanel(); this.imgPnlSecDesc.setLayout((LayoutManager)null); this.imgPnlSecDesc.reshape(10, 122, 446, 79); this.imagePanelRoot.add(this.imgPnlSecDesc); this.lbSecDesc = new Label("<BW> Security description"); this.lbSecDesc.hide(); this.lbSecDesc.reshape(3, 3, 424, 72); this.lbSecDesc.setFont(new Font("TimesRoman", 0, 14)); this.imgPnlSecDesc.add(this.lbSecDesc); this.sbSecDesc = new Scrollbar(1); this.sbSecDesc.reshape(430, 3, 13, 72); this.sbSecDesc.setFont(new Font("TimesRoman", 1, 12)); this.imgPnlSecDesc.add(this.sbSecDesc); ((Frame)this).setTitle("Netscape - [Java Security]"); double var2 = (double)0.0F; double var4 = (double)0.0F; double var6 = (double)0.0F; double var8 = (double)0.0F; this.hXYL.setHints(this.imagePanelRoot, new RszHints((double)0.0F, (double)0.0F, (double)1.0F, (double)1.0F)); this.hXYL = (XYLayout)this.imagePanelRoot.getLayout(); var6 = (double)0.0F; var2 = (double)0.0F; var8 = (double)1.0F; var4 = 0.2; this.hXYL.setHints(this.lbSecHeading, new RszHints((double)0.0F, (double)0.0F, (double)1.0F, 0.2)); this.hXYL.setHints(this.lbSecWarn, new RszHints((double)0.0F, (double)0.0F, (double)0.0F, (double)0.0F)); var6 = (double)0.0F; double var12; double var10005 = var12 = var2 + var4; var8 = (double)1.0F; var4 = 0.2; this.hXYL.setHints(this.lbSecRiskLabel, new RszHints((double)0.0F, var10005, (double)1.0F, 0.2)); var6 = (double)0.0F; var10005 = var2 = var12 + var4; var8 = (double)1.0F; var4 = 0.4; this.hXYL.setHints(this.imgPnlSecDesc, new RszHints((double)0.0F, var10005, (double)1.0F, 0.4)); XYLayout var10 = (XYLayout)this.imgPnlSecDesc.getLayout(); var10.setHints(this.lbSecDesc, new RszHints((double)0.0F, (double)0.0F, (double)1.0F, (double)1.0F)); var10.setHints(this.sbSecDesc, new RszHints((double)1.0F, (double)0.0F, (double)0.0F, (double)1.0F)); double var14; var10005 = var14 = var2 + var4; var4 = (double)0.0F; this.hXYL.setHints(this.btnSecDetail, new RszHints(var8, var10005, (double)0.0F, (double)0.0F, (double)1.0F, (double)0.0F, (double)0.0F, (double)0.0F, (Component)null, (Component)null, (Component)null, (Component)null)); var6 = (double)0.0F; var10005 = var2 = var14 + var4; var8 = (double)0.0F; var4 = (double)0.0F; this.hXYL.setHints(this.cbSecRem, new RszHints((double)0.0F, var10005, (double)0.0F, (double)0.0F)); var4 = 0.2; this.hXYL.setHints(this.lbSecRem, new RszHints(var6, var2, (double)1.0F, 0.2)); var6 = (double)0.0F; double var16; var10005 = var16 = var2 + var4; var8 = (double)0.5F; var4 = (double)0.0F; this.hXYL.setHints(this.lbIdentity, new RszHints((double)0.0F, var10005, (double)0.5F, (double)0.0F)); var6 = (double)0.0F; this.hXYL.setHints(this.btnSecView, new RszHints((double)0.0F, var16, (double)0.0F, (double)0.0F, (double)0.0F, (double)0.0F, (double)1.0F, (double)0.0F, (Component)null, (Component)null, (Component)null, (Component)null)); var6 = (double)1.0F; this.hXYL.setHints(this.btnSecGrant, new RszHints((double)1.0F, var16, (double)0.0F, (double)0.0F, (double)1.0F, (double)0.0F, (double)0.0F, (double)0.0F, (Component)null, (Component)null, (Component)null, (Component)null)); this.hXYL.setHints(this.btnSecDeny, new RszHints(var6, var16, (double)0.0F, (double)0.0F, (double)1.0F, (double)0.0F, (double)0.0F, (double)0.0F, this.btnSecGrant, (Component)null, (Component)null, (Component)null)); this.hXYL.setHints(this.btnSecHelp, new RszHints(var6, var16, (double)0.0F, (double)0.0F, (double)1.0F, (double)0.0F, (double)0.0F, (double)0.0F, this.btnSecDeny, (Component)null, (Component)null, (Component)null)); if (GlobalCtxt.rszFnSz_g) { ((Frame)this).setResizable(true); } else { ((Frame)this).setResizable(false); } ((Container)this).validate(); } public synchronized void show() { ((Component)this).move(50, 50); super.show(); } public boolean handleEvent(Event var1) { if (var1.id == 201) { ((Component)this).hide(); } if (this.dlgi_g != null && this.dlgi_g.handleEvent(this, var1)) { return true; } else if (var1.target == this.btnSecGrant && var1.id == 1001) { this.btnOK_Clicked(var1); return true; } else if (var1.target == this.btnSecHelp && var1.id == 1001) { this.btnHelp_Clicked(var1); return true; } else if (var1.target == this.btnSecView && var1.id == 1001) { this.btnView_Clicked(var1); return true; } else if (var1.target == this.btnSecDetail && var1.id == 1001) { this.btnDetail_Clicked(var1); return true; } else { return super.handleEvent(var1); } } }