Browse Source

Installer uses system look and feel

Installer now has a constructor, not a badly named method

git-svn-id: http://svn.dmdirc.com/trunk@2040 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5
Gregory Holmes 17 years ago
parent
commit
d919cbb3ad
2 changed files with 20 additions and 8 deletions
  1. 2
    4
      src/com/dmdirc/installer/Installer.java
  2. 18
    4
      src/com/dmdirc/installer/Main.java

+ 2
- 4
src/com/dmdirc/installer/Installer.java View File

@@ -22,8 +22,6 @@
22 22
 
23 23
 package com.dmdirc.installer;
24 24
 
25
-import com.dmdirc.ui.swing.dialogs.wizard.TextStep;
26
-
27 25
 import java.io.FileInputStream;
28 26
 import java.io.FileOutputStream;
29 27
 import java.io.IOException;
@@ -61,8 +59,8 @@ public abstract class Installer extends Thread {
61 59
 	/**
62 60
 	 * Create a new Installer
63 61
 	 */
64
-	public final void Installer() {
65
-		this.setName("Installer-Thread");
62
+	public Installer() {
63
+		super("Installer-Thread");
66 64
 	}
67 65
 	
68 66
 	/**

+ 18
- 4
src/com/dmdirc/installer/Main.java View File

@@ -22,16 +22,18 @@
22 22
 
23 23
 package com.dmdirc.installer;
24 24
 
25
-import java.awt.Dimension;
26
-import java.util.ArrayList;
27
-import java.util.List;
28
-
29 25
 import com.dmdirc.installer.cliparser.CLIParser;
30 26
 import com.dmdirc.installer.cliparser.BooleanParam;
31 27
 import com.dmdirc.installer.cliparser.StringParam;
32 28
 import com.dmdirc.ui.swing.dialogs.wizard.Step;
33 29
 import com.dmdirc.ui.swing.dialogs.wizard.Wizard;
34 30
 import com.dmdirc.ui.swing.dialogs.wizard.WizardDialog;
31
+import java.awt.Dimension;
32
+import java.util.ArrayList;
33
+import java.util.List;
34
+
35
+import javax.swing.UIManager;
36
+import javax.swing.UnsupportedLookAndFeelException;
35 37
 
36 38
 /**
37 39
  * Main installer window
@@ -69,6 +71,18 @@ public final class Main implements Wizard {
69 71
 	 * Creates and Displays the Installer wizard.
70 72
 	 */
71 73
 	private Main() {
74
+		try {
75
+			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
76
+		} catch (InstantiationException ex) {
77
+			//Ignore, revert to default
78
+		} catch (ClassNotFoundException ex) {
79
+			//Ignore, revert to default
80
+		} catch (UnsupportedLookAndFeelException ex) {
81
+			//Ignore, revert to default
82
+		} catch (IllegalAccessException ex) {
83
+			//Ignore, revert to default
84
+		}
85
+		
72 86
 		final List<Step> steps = new ArrayList<Step>();
73 87
 		final String osName = System.getProperty("os.name");
74 88
 		

Loading…
Cancel
Save