home *** CD-ROM | disk | FTP | other *** search
- import java.applet.Applet;
- import java.awt.Dimension;
- import java.awt.Font;
- import java.awt.Graphics;
- import java.awt.Toolkit;
- import java.net.InetAddress;
- import java.net.UnknownHostException;
-
- public class PropFontIP extends Applet {
- // $FF: renamed from: i int
- int field_0;
- // $FF: renamed from: j int
- int field_1;
- int plength;
- int flength;
- String[] properties = new String[10];
- Toolkit myToolkit = Toolkit.getDefaultToolkit();
- String[] myFonts;
- int screenResolution;
- // $FF: renamed from: d java.awt.Dimension
- Dimension field_2;
-
- public void init() {
- this.plength = this.properties.length;
- this.flength = this.myFonts.length;
- }
-
- public void paint(Graphics var1) {
- this.properties[0] = "java.version";
- this.properties[1] = "java.vendor";
- this.properties[2] = "java.vendor.url";
- this.properties[3] = "java.class.version";
- this.properties[4] = "os.name";
- this.properties[5] = "os.arch";
- this.properties[6] = "os.version";
- this.properties[7] = "file.separator";
- this.properties[8] = "path.separator";
- this.properties[9] = "line.separator";
-
- for(this.field_0 = 0; this.field_0 < this.plength; ++this.field_0) {
- var1.drawString(this.properties[this.field_0] + " = " + System.getProperty(this.properties[this.field_0]), 20, 20 * (this.field_0 + 1));
- }
-
- var1.drawString("Fonts available:", 20, (this.plength + 1) * 20);
-
- for(this.field_1 = 0; this.field_1 < this.flength - 1; ++this.field_1) {
- var1.setFont(new Font(this.myFonts[this.field_1], 0, 12));
- var1.drawString(this.myFonts[this.field_1], 20, (this.plength + this.field_1 + 2) * 20);
- }
-
- try {
- var1.setFont(new Font(this.myFonts[1], 1, 12));
- InetAddress var2 = InetAddress.getLocalHost();
- var1.drawString("IP: " + var2.getHostAddress(), 20, 20 * (this.plength + this.flength + 3));
- var1.drawString("Hostname: " + var2.getHostName(), 20, 20 * (this.plength + this.flength + 4));
- } catch (UnknownHostException var3) {
- var1.drawString("Error: Unknown host", 20, 20 * (this.plength + this.flength + 3));
- }
-
- var1.drawString("Screen Resolution : " + this.screenResolution, 20, 20 * (this.plength + this.flength + 5));
- var1.drawString("Screen Size : " + this.field_2.width + "X" + this.field_2.height, 20, 20 * (this.plength + this.flength + 6));
- }
-
- public PropFontIP() {
- this.myFonts = this.myToolkit.getFontList();
- this.screenResolution = this.myToolkit.getScreenResolution();
- this.field_2 = this.myToolkit.getScreenSize();
- }
- }
-