Improve Python support, add loading screen, add button to close all windows, fix Graph window resize bug
parent
05b6677096
commit
b5c4c9c205
@ -0,0 +1,76 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
||||||
|
<Properties>
|
||||||
|
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||||
|
<Property name="title" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||||
|
<Connection code="MainGUI.APP_NAME" type="code"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[320, 260]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[320, 260]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="resizable" type="boolean" value="false"/>
|
||||||
|
</Properties>
|
||||||
|
<SyntheticProperties>
|
||||||
|
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||||
|
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||||
|
</SyntheticProperties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="componentShown" listener="java.awt.event.ComponentListener" parameters="java.awt.event.ComponentEvent" handler="formComponentShown"/>
|
||||||
|
</Events>
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||||
|
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||||
|
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||||
|
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||||
|
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||||
|
</AuxValues>
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Component id="jProgressBar1" max="32767" attributes="0"/>
|
||||||
|
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||||
|
<Component id="jProgressBar1" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JProgressBar" name="jProgressBar1">
|
||||||
|
<Properties>
|
||||||
|
<Property name="indeterminate" type="boolean" value="true"/>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[32767, 20]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[10, 20]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[146, 20]"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||||
|
<Properties>
|
||||||
|
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
<Image iconType="3" name="/net/apocalypselabs/symat/splash.png"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Form>
|
@ -0,0 +1,123 @@
|
|||||||
|
/*
|
||||||
|
* Apocalypse Laboratories
|
||||||
|
* Open Source License
|
||||||
|
*
|
||||||
|
* Source code can be used for any purpose, as long as:
|
||||||
|
* - Compiled binaries are rebranded and trademarks are not
|
||||||
|
* visible by the end user at any time, except to give
|
||||||
|
* credit to Apocalypse Laboratories, such as by showing
|
||||||
|
* "Based on <product> by Apocalypse Laboratories" or a
|
||||||
|
* similar notice;
|
||||||
|
* - You do not use the code for evil;
|
||||||
|
* - Rebranded compiled applications have significant
|
||||||
|
* differences in functionality;
|
||||||
|
* - and you provide your modified source code for download,
|
||||||
|
* under the terms of the GNU LGPL v3 or a comparable
|
||||||
|
* license.
|
||||||
|
*
|
||||||
|
* Compiled binaries cannot be redistributed or mirrored,
|
||||||
|
* unless:
|
||||||
|
* - You have written permission from Apocalypse Laboratories;
|
||||||
|
* - Downloads are not available from Apocalypse Laboratories,
|
||||||
|
* not even behind a paywall or other blocking mechanism;
|
||||||
|
* - or you have received a multi-computer license, in which
|
||||||
|
* case you should take measures to prevent unauthorized
|
||||||
|
* downloads, such as preventing download access from the
|
||||||
|
* Internet.
|
||||||
|
*/
|
||||||
|
package net.apocalypselabs.symat;
|
||||||
|
|
||||||
|
import javax.swing.ImageIcon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Skylar
|
||||||
|
*/
|
||||||
|
public class SplashScreen extends javax.swing.JFrame {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates new form SplashScreen
|
||||||
|
*/
|
||||||
|
public SplashScreen() {
|
||||||
|
initComponents();
|
||||||
|
setIconImage((new ImageIcon(getClass().getResource("icon.png"))).getImage());
|
||||||
|
setLocationRelativeTo(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is called from within the constructor to initialize the form.
|
||||||
|
* WARNING: Do NOT modify this code. The content of this method is always
|
||||||
|
* regenerated by the Form Editor.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
|
private void initComponents() {
|
||||||
|
|
||||||
|
jProgressBar1 = new javax.swing.JProgressBar();
|
||||||
|
jLabel5 = new javax.swing.JLabel();
|
||||||
|
|
||||||
|
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||||
|
setTitle(MainGUI.APP_NAME);
|
||||||
|
setMaximumSize(new java.awt.Dimension(320, 260));
|
||||||
|
setMinimumSize(new java.awt.Dimension(320, 260));
|
||||||
|
setResizable(false);
|
||||||
|
addComponentListener(new java.awt.event.ComponentAdapter() {
|
||||||
|
public void componentShown(java.awt.event.ComponentEvent evt) {
|
||||||
|
formComponentShown(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
jProgressBar1.setIndeterminate(true);
|
||||||
|
jProgressBar1.setMaximumSize(new java.awt.Dimension(32767, 20));
|
||||||
|
jProgressBar1.setMinimumSize(new java.awt.Dimension(10, 20));
|
||||||
|
jProgressBar1.setPreferredSize(new java.awt.Dimension(146, 20));
|
||||||
|
|
||||||
|
jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/splash.png"))); // NOI18N
|
||||||
|
|
||||||
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||||
|
getContentPane().setLayout(layout);
|
||||||
|
layout.setHorizontalGroup(
|
||||||
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.addComponent(jLabel5)
|
||||||
|
);
|
||||||
|
layout.setVerticalGroup(
|
||||||
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(layout.createSequentialGroup()
|
||||||
|
.addComponent(jLabel5)
|
||||||
|
.addGap(0, 0, 0)
|
||||||
|
.addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
);
|
||||||
|
|
||||||
|
pack();
|
||||||
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
|
private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown
|
||||||
|
new Loader().start();
|
||||||
|
}//GEN-LAST:event_formComponentShown
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load things that take a while.
|
||||||
|
*/
|
||||||
|
private class Loader extends Thread {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (!MainGUI.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'");
|
||||||
|
try {
|
||||||
|
CodeRunner python = new CodeRunner(true);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
// Ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
new MainGUI().setVisible(true);
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
|
private javax.swing.JLabel jLabel5;
|
||||||
|
private javax.swing.JProgressBar jProgressBar1;
|
||||||
|
// End of variables declaration//GEN-END:variables
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Loading…
Reference in New Issue