|
@@ -16,6 +16,8 @@ import java.util.Arrays;
|
|
|
|
|
|
import javax.imageio.ImageIO;
|
|
|
import javax.swing.JFrame;
|
|
|
+import javax.swing.UIManager;
|
|
|
+import javax.swing.UnsupportedLookAndFeelException;
|
|
|
|
|
|
import com.google.gson.Gson;
|
|
|
import com.google.gson.GsonBuilder;
|
|
@@ -124,7 +126,9 @@ public class GridControl implements Runnable {
|
|
|
}
|
|
|
// Save misc. settings
|
|
|
try (Writer writer = new FileWriter(SETTINGS_PATH)) {
|
|
|
- gson.toJson(new Settings(model.getGrid().getCommunicator().getPortName(), model.getGrid().fanStream().map(f -> f.getProfile().name).toArray(String[]::new), pollingSpeed, model.getMinSpeed()), writer);
|
|
|
+ gson.toJson(new Settings(model.getGrid().getCommunicator().getPortName(),
|
|
|
+ model.getGrid().fanStream().map(f -> f.getProfile().name).toArray(String[]::new), pollingSpeed,
|
|
|
+ model.getMinSpeed()), writer);
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -146,14 +150,26 @@ public class GridControl implements Runnable {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
- * @param args the command line arguments
|
|
|
+ * @param args
|
|
|
+ * the command line arguments
|
|
|
*/
|
|
|
public static void main(String[] args) {
|
|
|
+ try {
|
|
|
+ // Set System L&F
|
|
|
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
|
|
+ } catch (UnsupportedLookAndFeelException e) {
|
|
|
+ // handle exception
|
|
|
+ } catch (ClassNotFoundException e) {
|
|
|
+ // handle exception
|
|
|
+ } catch (InstantiationException e) {
|
|
|
+ // handle exception
|
|
|
+ } catch (IllegalAccessException e) {
|
|
|
+ // handle exception
|
|
|
+ }
|
|
|
new GridControl(!Arrays.asList(args).contains("nogui"));
|
|
|
}
|
|
|
|