home *** CD-ROM | disk | FTP | other *** search
- 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.Frame;
- import java.awt.Graphics;
- import java.awt.Image;
- import java.awt.Rectangle;
- import java.awt.Toolkit;
- import java.awt.Window;
- import java.awt.image.ImageObserver;
-
- public class JDPAboutBox extends Dialog {
- JDPUser user;
- JDPImageLoader imageLoader;
- Image thisImage;
- Image offscreen;
- Rectangle offscreensize;
- // $FF: renamed from: gr java.awt.Graphics
- Graphics field_0;
- JDPButton okButton;
-
- public void paint(Graphics var1) {
- Rectangle var2 = ((Component)this).bounds();
- if (this.offscreen == null || var2.width != this.offscreensize.width || var2.height != this.offscreensize.height) {
- if (var2.width < 10) {
- var2.width = 10;
- }
-
- if (var2.height < 10) {
- var2.height = 10;
- }
-
- this.offscreen = ((Component)this).createImage(var2.width, var2.height);
- this.offscreensize = var2;
- this.field_0 = this.offscreen.getGraphics();
- }
-
- if (this.imageLoader != null && this.imageLoader.getImageReady()) {
- this.thisImage = this.imageLoader.thisImage;
- }
-
- this.field_0.setColor(((Component)this).getBackground());
- this.field_0.fillRect(0, 0, ((Component)this).bounds().width, ((Component)this).bounds().height);
- if (this.thisImage != null) {
- this.field_0.drawImage(this.thisImage, 9, 30, (ImageObserver)null);
- }
-
- this.field_0.setFont(new Font("Helvetica", 0, 11));
- this.field_0.setColor(Color.black);
- this.field_0.drawString("JDesignerPro " + JDesignerPro.actualversion + " Enterprise Edition.", 126, 42);
- this.field_0.drawString("Copyright © 1995-1999 BulletProof Corporation.", 126, 80);
- this.field_0.drawString("All rights reserved.", 125, 94);
- this.field_0.drawString("www: http://www.bulletproof.com.", 126, 140);
- this.field_0.drawString("ph: (800)505-0105 (305)682-8187.", 126, 154);
- this.field_0.drawString("email: sales@bulletproof.com.", 126, 168);
- this.field_0.drawString("This product is licensed under these terms:", 126, 193);
- if (JDesignerPro.JDPLicensed) {
- this.field_0.drawString("Fully Licensed.", 130, 215);
- this.field_0.drawString("Domain: " + this.user.JDesignerPro.JDPDomain, 130, 229);
- } else {
- this.field_0.drawString("90 day free trial.", 130, 215);
- this.field_0.drawString(Integer.toString(this.user.JDesignerPro.daysRemaining) + " trial days remaining.", 130, 229);
- }
-
- this.field_0.setFont(new Font("Helvetica", 0, 10));
- this.field_0.drawString("Warning: This computer program is protected by copyright law and", 10, 280);
- this.field_0.drawString("international treaties. Unauthorized reproduction or distribution of this", 10, 292);
- this.field_0.drawString("program, or any portion of it, may result in severe civil or criminal", 10, 304);
- this.field_0.drawString("penalties, and will be prosecuted to the maximum", 10, 316);
- this.field_0.drawString("extent possible under the law.", 10, 328);
- this.field_0.setColor(JDPUtils.darker(((Component)this).getBackground()));
- this.field_0.drawLine(125, 200, ((Component)this).bounds().width - 13, 200);
- this.field_0.drawLine(125, 200, 125, 256);
- this.field_0.drawLine(9, 265, ((Component)this).bounds().width - 13, 265);
- this.field_0.setColor(JDPUtils.brighter(((Component)this).getBackground()));
- this.field_0.drawLine(125, 256, ((Component)this).bounds().width - 13, 256);
- this.field_0.drawLine(((Component)this).bounds().width - 13, 200, ((Component)this).bounds().width - 13, 256);
- this.field_0.drawLine(9, 266, ((Component)this).bounds().width - 13, 266);
- this.field_0.setColor(Color.black);
- this.field_0.drawLine(126, 201, ((Component)this).bounds().width - 14, 201);
- this.field_0.drawLine(126, 201, 126, 255);
- if (this.thisImage != null) {
- if (JDesignerPro.executable) {
- this.okButton.reshape(((Component)this).bounds().width - 87, ((Component)this).bounds().height - 35, 75, 23);
- } else {
- this.okButton.reshape(((Component)this).bounds().width - 87, ((Component)this).bounds().height - 50, 75, 23);
- }
-
- this.okButton.show();
- var1.drawImage(this.offscreen, 0, 0, (ImageObserver)null);
- }
-
- }
-
- JDPAboutBox(JDPUser var1, String var2) {
- super((Frame)(var1.jdpMainWindow == null ? new Frame() : var1.jdpMainWindow), var2, false);
- this.user = var1;
- ((Component)this).setBackground(JDPUtils.getControlColor());
- ((Dialog)this).setResizable(false);
- this.imageLoader = new JDPImageLoader(var1, this, "Images/About.JPG");
- (new Thread(this.imageLoader)).start();
- this.okButton = new JDPButton("OK");
- short var3 = 380;
- int var4 = 350;
- if (!JDesignerPro.executable) {
- var4 += 30;
- }
-
- if (var1.cust != null) {
- ((Component)this).reshape(var1.cust.winx1 + (var1.cust.winx2 - var3) / 2, var1.cust.winy1 + (var1.cust.winy2 - var4) / 2, var3, var4);
- } else {
- Dimension var5 = Toolkit.getDefaultToolkit().getScreenSize();
- ((Component)this).reshape((var5.width - var3) / 2, (var5.height - var4) / 2, var3, var4);
- }
-
- ((Container)this).add(this.okButton);
- this.okButton.hide();
- ((Dialog)this).show();
- }
-
- public void layout() {
- ((Component)this).repaint();
- }
-
- public boolean handleEvent(Event var1) {
- switch (var1.id) {
- case 201:
- ((Window)this).dispose();
- return true;
- case 1001:
- if (var1.target.equals(this.okButton)) {
- ((Window)this).dispose();
- return true;
- }
-
- return false;
- default:
- return false;
- }
- }
- }
-