Refactor MainGUI to Main

master
skylarmt 9 years ago
parent 6a19b0efe6
commit b57c1927e2

@ -517,9 +517,9 @@ public class CodeEditor extends javax.swing.JInternalFrame {
openString(FileUtils.readFile(f.getAbsolutePath()),
f.getAbsolutePath(), true);
} catch (IOException ex) {
JOptionPane.showInternalMessageDialog(MainGUI.mainPane,
JOptionPane.showInternalMessageDialog(Main.mainPane,
"Error: Cannot load file: " + ex.getMessage());
MainGUI.loadRecentFiles();
Main.loadRecentFiles();
}
}
@ -674,8 +674,8 @@ public class CodeEditor extends javax.swing.JInternalFrame {
try {
int minNum = Integer.parseInt(min);
int maxNum = Integer.parseInt(max);
if (!(minNum <= MainGUI.APP_CODE
&& maxNum >= MainGUI.APP_CODE)) {
if (!(minNum <= Main.APP_CODE
&& maxNum >= Main.APP_CODE)) {
JOptionPane.showInternalMessageDialog(this, "This script "
+ "cannot be run on this version of SyMAT.");
return false;
@ -730,7 +730,7 @@ public class CodeEditor extends javax.swing.JInternalFrame {
if (pythonOption.isSelected()) {
lang = "python";
}
MainGUI.loadFrame(new CodeExport(codeBox.getText(), lang));
Main.loadFrame(new CodeExport(codeBox.getText(), lang));
}//GEN-LAST:event_exportMenuActionPerformed
private void javascriptOptionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_javascriptOptionActionPerformed

@ -187,7 +187,7 @@ public class Display extends javax.swing.JInternalFrame {
PrefStorage.saveSetting("showrecent", "no");
}
PrefStorage.save();
MainGUI.updateDisplay();
Main.updateDisplay();
dispose();
}//GEN-LAST:event_saveBtnActionPerformed

@ -106,7 +106,7 @@ public class FileUtils {
out.print(content);
}
if (addToRecent) {
MainGUI.addRecentFile((new File(path)).getAbsolutePath());
Main.addRecentFile((new File(path)).getAbsolutePath());
}
}

@ -58,7 +58,7 @@ import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import static net.apocalypselabs.symat.MainGUI.API_URL;
import static net.apocalypselabs.symat.Main.API_URL;
import org.matheclipse.core.eval.EvalUtilities;
import org.matheclipse.core.interfaces.IExpr;
import org.matheclipse.parser.client.math.MathException;
@ -81,11 +81,11 @@ public class Functions {
Useful interactions
*/
public void notify(Object message) {
JOptionPane.showInternalMessageDialog(MainGUI.mainPane, message.toString());
JOptionPane.showInternalMessageDialog(Main.mainPane, message.toString());
}
public String ask(String question) {
return JOptionPane.showInternalInputDialog(MainGUI.mainPane, question);
return JOptionPane.showInternalInputDialog(Main.mainPane, question);
}
/*
@ -370,6 +370,6 @@ public class Functions {
*/
public Functions() {
MainGUI.loadFrame(graphwin, false);
Main.loadFrame(graphwin, false);
}
}

@ -402,7 +402,7 @@ public class Graph extends javax.swing.JInternalFrame {
}//GEN-LAST:event_clrGraphBtnActionPerformed
private void exportBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exportBtnActionPerformed
int result = fc.showSaveDialog(MainGUI.mainPane);
int result = fc.showSaveDialog(Main.mainPane);
if (result == JFileChooser.APPROVE_OPTION) {
File file = new File(addSaveExt(fc.getSelectedFile().toString()));
try {

@ -237,7 +237,7 @@ public class Help extends javax.swing.JInternalFrame {
+ "Scripts and commands can be written in "
+ "JavaScript or Python.</p>"
+ "<p>This is SyMAT version "
+ MainGUI.VERSION_NAME + " (" + (int) MainGUI.APP_CODE + ")."
+ Main.VERSION_NAME + " (" + (int) Main.APP_CODE + ")."
+ "</p>"
+ "<p>SyMAT is copyright &copy; "
+ Calendar.getInstance().get(Calendar.YEAR)
@ -266,7 +266,7 @@ public class Help extends javax.swing.JInternalFrame {
}
setText(text, "Manual (" + topicList.getSelectedValue().toString() + ")");
} catch (Exception e) {
//JOptionPane.showInternalMessageDialog(MainGUI.mainPane,
//JOptionPane.showInternalMessageDialog(Main.mainPane,
//"Error: Cannot load help topic "+name+".\n\n"+e.getMessage());
setText("<html><head></head><body><p><b>Error:</b><br>Cannot get help topic \""
+ name + "\".<br>(" + e.getMessage() + ")</p></body></html>", "Manual");

@ -362,14 +362,14 @@ public class Interpreter extends javax.swing.JInternalFrame {
private void javascriptMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_javascriptMenuActionPerformed
if (!lang.equals("javascript")) {
MainGUI.loadFrame(new Interpreter("javascript"));
Main.loadFrame(new Interpreter("javascript"));
dispose();
}
}//GEN-LAST:event_javascriptMenuActionPerformed
private void pythonMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pythonMenuActionPerformed
if (!lang.equals("python")) {
MainGUI.loadFrame(new Interpreter("python"));
Main.loadFrame(new Interpreter("python"));
dispose();
}
}//GEN-LAST:event_pythonMenuActionPerformed

@ -56,7 +56,7 @@ import java.net.URL;
import java.util.Calendar;
import java.util.Date;
import javax.swing.JOptionPane;
import static net.apocalypselabs.symat.MainGUI.API_URL;
import static net.apocalypselabs.symat.Main.API_URL;
/**
*
@ -223,7 +223,7 @@ public class License extends javax.swing.JInternalFrame {
private void openShop() {
if (Desktop.isDesktopSupported()) {
try {
Desktop.getDesktop().browse(new URI(MainGUI.API_URL + "shoplink.php"));
Desktop.getDesktop().browse(new URI(Main.API_URL + "shoplink.php"));
} catch (IOException | URISyntaxException ex) {
JOptionPane.showInternalMessageDialog(this, "Please go to symatapp.com to purchase a license.");
}
@ -306,7 +306,7 @@ public class License extends javax.swing.JInternalFrame {
}
public void exit() {
MainGUI.updateNamemark(); // Make sure it displays trial or not
Main.updateNamemark(); // Make sure it displays trial or not
dispose();
}
@ -356,16 +356,16 @@ public class License extends javax.swing.JInternalFrame {
private void success(String type) {
PrefStorage.saveSetting("license", email);
PrefStorage.saveSetting("licensetype", type);
JOptionPane.showInternalMessageDialog(MainGUI.mainPane,
JOptionPane.showInternalMessageDialog(Main.mainPane,
"Thank you for activating SyMAT!",
"Success",
JOptionPane.INFORMATION_MESSAGE);
MainGUI.licenseRestrict(false);
Main.licenseRestrict(false);
exit();
}
private void fail() {
JOptionPane.showInternalMessageDialog(MainGUI.mainPane,
JOptionPane.showInternalMessageDialog(Main.mainPane,
"There is not a valid license for that email address.",
"Activation failure",
JOptionPane.ERROR_MESSAGE);
@ -373,7 +373,7 @@ public class License extends javax.swing.JInternalFrame {
private void email() {
try {
String code = JOptionPane.showInternalInputDialog(MainGUI.mainPane,
String code = JOptionPane.showInternalInputDialog(Main.mainPane,
"A code has been emailed to you. "
+ "Enter it below to verify.",
"Almost done!",
@ -390,7 +390,7 @@ public class License extends javax.swing.JInternalFrame {
if (code.equals(line)) {
success("domain");
} else {
JOptionPane.showInternalMessageDialog(MainGUI.mainPane,
JOptionPane.showInternalMessageDialog(Main.mainPane,
"Code invalid.",
"Error",
JOptionPane.ERROR_MESSAGE);
@ -401,7 +401,7 @@ public class License extends javax.swing.JInternalFrame {
}
private void ioerror() {
JOptionPane.showMessageDialog(MainGUI.mainPane,
JOptionPane.showMessageDialog(Main.mainPane,
"An error occured while verifying your license. "
+ "Ensure you have an Internet connection and "
+ "try again later.",

@ -162,7 +162,7 @@
<Component class="javax.swing.JLabel" name="namemark1">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="MainGUI.ubuntuRegular.deriveFont(11.0F)" type="code"/>
<Connection code="Main.ubuntuRegular.deriveFont(11.0F)" type="code"/>
</Property>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
@ -221,7 +221,7 @@
<Component class="javax.swing.JLabel" name="namemark2">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="MainGUI.ubuntuRegular.deriveFont(11.0F)" type="code"/>
<Connection code="Main.ubuntuRegular.deriveFont(11.0F)" type="code"/>
</Property>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
@ -378,7 +378,7 @@
<Component class="javax.swing.JLabel" name="namemark3">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="MainGUI.ubuntuRegular.deriveFont(11.0F)" type="code"/>
<Connection code="Main.ubuntuRegular.deriveFont(11.0F)" type="code"/>
</Property>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
@ -483,7 +483,7 @@
<Component class="javax.swing.JLabel" name="jLabel2">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="MainGUI.ubuntuRegular.deriveFont(48.0F)" type="code"/>
<Connection code="Main.ubuntuRegular.deriveFont(48.0F)" type="code"/>
</Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="99" green="99" red="99" type="rgb"/>

@ -73,21 +73,21 @@ import javax.swing.UIManager;
/**
* This class is like the Force: A light theme, a dark theme, and it binds the
* app together. Also like duct tape, but that's not as cool.
*
* Contains a bunch of important variables and constants that are used all over.
*
* There should be only one MainGUI per app instance, the important things are
* static.
Contains a bunch of important variables and constants that are used all over.
There should be only one Main per app instance, the important things are
static.
*
* @author Skylar Ittner
*/
public class MainGUI extends javax.swing.JFrame {
public class Main extends javax.swing.JFrame {
// TODO: Add more code comments and stuff in case anybody else reads this
/**
* Version name, as it should be displayed.
*/
public static final String VERSION_NAME = "1.4";
public static final String VERSION_NAME = "1.5";
/**
* Program name, with version name
*/
@ -95,7 +95,7 @@ public class MainGUI extends javax.swing.JFrame {
/**
* Version number, for updates and //needs in scripts
*/
public static final double APP_CODE = 16;
public static final double APP_CODE = 17;
/**
* Base URL for building API calls
*/
@ -123,7 +123,7 @@ public class MainGUI extends javax.swing.JFrame {
* Creates the main app window and does some quick things that aren't
* threaded in SplashScreen.
*/
public MainGUI() {
public Main() {
initComponents();
// Set icon
@ -136,7 +136,7 @@ public class MainGUI extends javax.swing.JFrame {
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent we) {
int p = JOptionPane.showConfirmDialog(MainGUI.mainPane,
int p = JOptionPane.showConfirmDialog(Main.mainPane,
"Are you sure you want to exit SyMAT?",
"Exit SyMAT",
JOptionPane.YES_NO_OPTION,
@ -454,7 +454,7 @@ public class MainGUI extends javax.swing.JFrame {
}
});
namemark1.setFont(MainGUI.ubuntuRegular.deriveFont(11.0F));
namemark1.setFont(Main.ubuntuRegular.deriveFont(11.0F));
namemark1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
namemark1.setText(namemark());
namemark1.setFocusable(false);
@ -488,7 +488,7 @@ public class MainGUI extends javax.swing.JFrame {
jPanel2.setOpaque(false);
namemark2.setFont(MainGUI.ubuntuRegular.deriveFont(11.0F));
namemark2.setFont(Main.ubuntuRegular.deriveFont(11.0F));
namemark2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
namemark2.setText(namemark());
namemark2.setFocusable(false);
@ -591,7 +591,7 @@ public class MainGUI extends javax.swing.JFrame {
}
});
namemark3.setFont(MainGUI.ubuntuRegular.deriveFont(11.0F));
namemark3.setFont(Main.ubuntuRegular.deriveFont(11.0F));
namemark3.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
namemark3.setText(namemark());
namemark3.setFocusable(false);
@ -654,7 +654,7 @@ public class MainGUI extends javax.swing.JFrame {
mainPane.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
mainPane.setOpaque(false);
jLabel2.setFont(MainGUI.ubuntuRegular.deriveFont(48.0F));
jLabel2.setFont(Main.ubuntuRegular.deriveFont(48.0F));
jLabel2.setForeground(new java.awt.Color(153, 153, 153));
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel2.setText("SyMAT");
@ -959,14 +959,16 @@ public class MainGUI extends javax.swing.JFrame {
}
}
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException e) {
java.util.logging.Logger.getLogger(MainGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, e);
java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, e);
}
//</editor-fold>
//</editor-fold>
//</editor-fold>
//</editor-fold>
try {
// Ubuntu font for prettifying
ubuntuRegular = Font.createFont(Font.TRUETYPE_FONT, MainGUI.class.
ubuntuRegular = Font.createFont(Font.TRUETYPE_FONT, Main.class.
getResourceAsStream("/Ubuntu-R.ttf"));
} catch (FontFormatException | IOException ex) {
ubuntuRegular = Font.getFont(Font.SANS_SERIF);
@ -980,7 +982,7 @@ public class MainGUI extends javax.swing.JFrame {
String[] sizes = {"16", "32", "48", "64", "128", "256"};
for (String s : sizes) {
symatlogo.add(new ImageIcon(
MainGUI.class.getResource("logo-filled" + s + ".png")).getImage());
Main.class.getResource("logo-filled" + s + ".png")).getImage());
}
// Command line args

@ -237,7 +237,7 @@ public class Pads extends javax.swing.JInternalFrame {
} catch (Exception ex) {
Debug.stacktrace(ex);
JOptionPane.showInternalMessageDialog(
MainGUI.mainPane,
Main.mainPane,
"Could not sync pad contents: " + ex.getMessage(),
"Error",
JOptionPane.ERROR_MESSAGE);
@ -273,7 +273,7 @@ public class Pads extends javax.swing.JInternalFrame {
} else {
theme += "default";
}
MainGUI.loadFrame(new WebBrowser("Pad " + pad,
Main.loadFrame(new WebBrowser("Pad " + pad,
PADS_URL + "/p/" + pad + theme,
WebBrowser.PAD_LOGO));
}
@ -484,7 +484,7 @@ public class Pads extends javax.swing.JInternalFrame {
}//GEN-LAST:event_purgeBtnActionPerformed
private void saveBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveBtnActionPerformed
MainGUI.loadFrame(new CodeEditor(getPad(getSelectedPad()), true));
Main.loadFrame(new CodeEditor(getPad(getSelectedPad()), true));
updateList();
}//GEN-LAST:event_saveBtnActionPerformed

@ -57,7 +57,7 @@
<Component class="javax.swing.JLabel" name="dispLabel">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="MainGUI.ubuntuRegular.deriveFont(22.0F)" type="code"/>
<Connection code="net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(22.0F)" type="code"/>
</Property>
<Property name="horizontalAlignment" type="int" value="2"/>
<Property name="text" type="java.lang.String" value="Loading..."/>
@ -75,11 +75,11 @@
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="MainGUI.ubuntuRegular.deriveFont(20.0F)" type="code"/>
<Connection code="net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(20.0F)" type="code"/>
</Property>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="&quot;v. &quot;+MainGUI.VERSION_NAME" type="code"/>
<Connection code="&quot;v. &quot;+net.apocalypselabs.symat.Main.VERSION_NAME" type="code"/>
</Property>
</Properties>
<AuxValues>
@ -106,7 +106,7 @@
<Component class="javax.swing.JLabel" name="jLabel3">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="MainGUI.ubuntuRegular.deriveFont(12.0F)" type="code"/>
<Connection code="net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(12.0F)" type="code"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value="&lt;html&gt;&lt;div style=&quot;text-align: center;&quot;&gt;Apocalypse&lt;br&gt;Laboratories&lt;/div&gt;"/>
@ -123,7 +123,7 @@
<Component class="javax.swing.JLabel" name="jLabel4">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="MainGUI.ubuntuRegular.deriveFont(12.0F)" type="code"/>
<Connection code="net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(12.0F)" type="code"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value="symatapp.com"/>
@ -140,4 +140,4 @@
</SubComponents>
</Container>
</SubComponents>
</Form>
</Form>

@ -52,9 +52,9 @@ import java.io.InputStreamReader;
import java.net.URL;
import javax.swing.ImageIcon;
import javax.swing.SwingUtilities;
import static net.apocalypselabs.symat.MainGUI.API_URL;
import static net.apocalypselabs.symat.MainGUI.APP_CODE;
import static net.apocalypselabs.symat.MainGUI.VERSION_NAME;
import static net.apocalypselabs.symat.Main.API_URL;
import static net.apocalypselabs.symat.Main.APP_CODE;
import static net.apocalypselabs.symat.Main.VERSION_NAME;
/**
*
@ -68,7 +68,7 @@ public class SplashScreen extends javax.swing.JFrame {
public SplashScreen() {
initComponents();
setBackground(new Color(0, 0, 0, 0));
setIconImages(MainGUI.symatlogo);
setIconImages(Main.symatlogo);
setLocationRelativeTo(null);
}
@ -103,7 +103,7 @@ public class SplashScreen extends javax.swing.JFrame {
jLayeredPane1.setBackground(new java.awt.Color(255, 255, 255));
dispLabel.setFont(MainGUI.ubuntuRegular.deriveFont(22.0F));
dispLabel.setFont(Main.ubuntuRegular.deriveFont(22.0F));
dispLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
dispLabel.setText("Loading...");
dispLabel.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
@ -111,9 +111,9 @@ public class SplashScreen extends javax.swing.JFrame {
jLayeredPane1.add(dispLabel);
dispLabel.setBounds(250, 250, 350, 80);
jLabel1.setFont(MainGUI.ubuntuRegular.deriveFont(20.0F));
jLabel1.setFont(Main.ubuntuRegular.deriveFont(20.0F));
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel1.setText("v. "+MainGUI.VERSION_NAME);
jLabel1.setText("v. "+Main.VERSION_NAME);
jLayeredPane1.add(jLabel1);
jLabel1.setBounds(520, 70, 80, 30);
jLayeredPane1.setLayer(jLabel1, javax.swing.JLayeredPane.POPUP_LAYER);
@ -122,14 +122,14 @@ public class SplashScreen extends javax.swing.JFrame {
jLayeredPane1.add(jLabel2);
jLabel2.setBounds(0, 0, 700, 470);
jLabel3.setFont(MainGUI.ubuntuRegular.deriveFont(12.0F));
jLabel3.setFont(Main.ubuntuRegular.deriveFont(12.0F));
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel3.setText("<html><div style=\"text-align: center;\">Apocalypse<br>Laboratories</div>");
jLayeredPane1.add(jLabel3);
jLabel3.setBounds(50, 420, 120, 40);
jLayeredPane1.setLayer(jLabel3, javax.swing.JLayeredPane.POPUP_LAYER);
jLabel4.setFont(MainGUI.ubuntuRegular.deriveFont(12.0F));
jLabel4.setFont(Main.ubuntuRegular.deriveFont(12.0F));
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel4.setText("symatapp.com");
jLayeredPane1.add(jLabel4);
@ -153,7 +153,7 @@ public class SplashScreen extends javax.swing.JFrame {
@Override
public void run() {
setProgress("Starting up...");
if (!MainGUI.skipPython) {
if (!Main.skipPython) {
// Python laggggsss when used for first time, this fixes the wait later.
System.out.println("Warming up Python engine, to skip run with argument 'skippython'");
setProgress("Initializing code engine...");
@ -164,7 +164,7 @@ public class SplashScreen extends javax.swing.JFrame {
}
}
if (!MainGUI.skipEditor) {
if (!Main.skipEditor) {
System.out.println("Preparing editor, to skip run with argument 'skipeditor'");
setProgress("Preparing editor...");
// Get editor going too
@ -175,7 +175,7 @@ public class SplashScreen extends javax.swing.JFrame {
checkUpdates();
setProgress("Loading main interface...");
MainGUI main = new MainGUI();
Main main = new Main();
setProgress("Done!");
dispose();
}
@ -199,8 +199,8 @@ public class SplashScreen extends javax.swing.JFrame {
+ "but has been ignored by the user.");
} else {
Debug.println("Update available.");
MainGUI.updateString = line.split("\\|")[1];
MainGUI.updateAvailable = true;
Main.updateString = line.split("\\|")[1];
Main.updateAvailable = true;
}
} else {
Debug.println("No updates found.");

@ -106,7 +106,7 @@
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="&quot;Your version: &quot;+MainGUI.VERSION_NAME" type="code"/>
<Connection code="&quot;Your version: &quot;+net.apocalypselabs.symat.Main.VERSION_NAME" type="code"/>
</Property>
</Properties>
</Component>
@ -133,4 +133,4 @@
</Events>
</Component>
</SubComponents>
</Form>
</Form>

@ -104,7 +104,7 @@ public class Update extends javax.swing.JInternalFrame {
jLabel4.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel4.setText("Your version: "+MainGUI.VERSION_NAME);
jLabel4.setText("Your version: "+Main.VERSION_NAME);
jButton1.setBackground(new java.awt.Color(51, 153, 255));
jButton1.setFont(new java.awt.Font("Tahoma", 3, 18)); // NOI18N
@ -174,7 +174,7 @@ public class Update extends javax.swing.JInternalFrame {
}//GEN-LAST:event_jButton1ActionPerformed
private void jLabel5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel5MouseClicked
PrefStorage.saveSetting("update-ignore", MainGUI.VERSION_NAME + "|" + latestVersion);
PrefStorage.saveSetting("update-ignore", Main.VERSION_NAME + "|" + latestVersion);
dispose();
}//GEN-LAST:event_jLabel5MouseClicked

@ -90,7 +90,7 @@ public class WebBrowser extends javax.swing.JInternalFrame {
children.add(browser);
jfxPanel.setScene(scene);
webEngine = browser.getEngine();
webEngine.setUserAgent("SyMAT " + MainGUI.VERSION_NAME);
webEngine.setUserAgent("SyMAT " + Main.VERSION_NAME);
webEngine.loadContent("<html><head><title></title></head><body><h3 style=\"font-family: sans-serif; text-align: center;\">Loading...</h3></body></html>");
}
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 KiB

After

Width:  |  Height:  |  Size: 190 KiB

Loading…
Cancel
Save