Splash screen now animates logo for progress bar
This commit is contained in:
parent
d12dd3d128
commit
30e9286d7b
@ -137,6 +137,21 @@
|
|||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="logoOverlay">
|
||||||
|
<Properties>
|
||||||
|
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
<Image iconType="3" name="/net/apocalypselabs/symat/images/logo-overlay.png"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="JLayeredPane.layer" type="java.lang.Integer" value="300"/>
|
||||||
|
</AuxValues>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||||
|
<AbsoluteConstraints x="184" y="85" width="380" height="140"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
|
@ -69,6 +69,7 @@ public class SplashScreen extends javax.swing.JFrame {
|
|||||||
setBackground(new Color(255, 255, 255, 0));
|
setBackground(new Color(255, 255, 255, 0));
|
||||||
setIconImages(Main.symatlogo);
|
setIconImages(Main.symatlogo);
|
||||||
setLocationRelativeTo(null);
|
setLocationRelativeTo(null);
|
||||||
|
logoOverlay.setSize(0, 140);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,6 +87,7 @@ public class SplashScreen extends javax.swing.JFrame {
|
|||||||
jLabel2 = new javax.swing.JLabel();
|
jLabel2 = new javax.swing.JLabel();
|
||||||
jLabel3 = new javax.swing.JLabel();
|
jLabel3 = new javax.swing.JLabel();
|
||||||
jLabel4 = new javax.swing.JLabel();
|
jLabel4 = new javax.swing.JLabel();
|
||||||
|
logoOverlay = new javax.swing.JLabel();
|
||||||
|
|
||||||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||||||
setTitle("SyMAT Starting");
|
setTitle("SyMAT Starting");
|
||||||
@ -135,6 +137,11 @@ public class SplashScreen extends javax.swing.JFrame {
|
|||||||
jLabel4.setBounds(370, 430, 110, 14);
|
jLabel4.setBounds(370, 430, 110, 14);
|
||||||
jLayeredPane1.setLayer(jLabel4, javax.swing.JLayeredPane.POPUP_LAYER);
|
jLayeredPane1.setLayer(jLabel4, javax.swing.JLayeredPane.POPUP_LAYER);
|
||||||
|
|
||||||
|
logoOverlay.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/images/logo-overlay.png"))); // NOI18N
|
||||||
|
jLayeredPane1.add(logoOverlay);
|
||||||
|
logoOverlay.setBounds(184, 85, 380, 140);
|
||||||
|
jLayeredPane1.setLayer(logoOverlay, javax.swing.JLayeredPane.POPUP_LAYER);
|
||||||
|
|
||||||
getContentPane().add(jLayeredPane1, java.awt.BorderLayout.CENTER);
|
getContentPane().add(jLayeredPane1, java.awt.BorderLayout.CENTER);
|
||||||
|
|
||||||
pack();
|
pack();
|
||||||
@ -152,6 +159,7 @@ public class SplashScreen extends javax.swing.JFrame {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
setProgress("Starting up...");
|
setProgress("Starting up...");
|
||||||
|
logoOverlay.setSize(100, 140);
|
||||||
if (!Main.skipPython) {
|
if (!Main.skipPython) {
|
||||||
// Python laggggsss when used for first time, this fixes the wait later.
|
// 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'");
|
System.out.println("Warming up Python engine, to skip run with argument 'skippython'");
|
||||||
@ -161,18 +169,24 @@ public class SplashScreen extends javax.swing.JFrame {
|
|||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
// Ignore
|
// Ignore
|
||||||
}
|
}
|
||||||
|
logoOverlay.setSize(130, 140);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Main.skipEditor) {
|
if (!Main.skipEditor) {
|
||||||
System.out.println("Preparing editor, to skip run with argument 'skipeditor'");
|
System.out.println("Preparing editor, to skip run with argument 'skipeditor'");
|
||||||
setProgress("Preparing editor...");
|
setProgress("Preparing editor...");
|
||||||
|
logoOverlay.setSize(152, 140);
|
||||||
// Get editor going too
|
// Get editor going too
|
||||||
Editor edit = new Editor();
|
Editor edit = new Editor();
|
||||||
|
logoOverlay.setSize(205, 140);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logoOverlay.setSize(235, 140);
|
||||||
setProgress("Checking for updates...");
|
setProgress("Checking for updates...");
|
||||||
checkUpdates();
|
checkUpdates();
|
||||||
|
logoOverlay.setSize(300, 140);
|
||||||
|
|
||||||
|
logoOverlay.setSize(380, 140);
|
||||||
setProgress("Loading main interface...");
|
setProgress("Loading main interface...");
|
||||||
Main main = new Main();
|
Main main = new Main();
|
||||||
setProgress("Done!");
|
setProgress("Done!");
|
||||||
@ -190,6 +204,7 @@ public class SplashScreen extends javax.swing.JFrame {
|
|||||||
String line = br.readLine();
|
String line = br.readLine();
|
||||||
br.close();
|
br.close();
|
||||||
is.close();
|
is.close();
|
||||||
|
logoOverlay.setSize(280, 140);
|
||||||
double version = Double.parseDouble(line.split("\\|")[0]);
|
double version = Double.parseDouble(line.split("\\|")[0]);
|
||||||
if (version > APP_CODE) {
|
if (version > APP_CODE) {
|
||||||
if (PrefStorage.getSetting("update-ignore")
|
if (PrefStorage.getSetting("update-ignore")
|
||||||
@ -232,5 +247,6 @@ public class SplashScreen extends javax.swing.JFrame {
|
|||||||
private javax.swing.JLabel jLabel3;
|
private javax.swing.JLabel jLabel3;
|
||||||
private javax.swing.JLabel jLabel4;
|
private javax.swing.JLabel jLabel4;
|
||||||
private javax.swing.JLayeredPane jLayeredPane1;
|
private javax.swing.JLayeredPane jLayeredPane1;
|
||||||
|
private javax.swing.JLabel logoOverlay;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
}
|
}
|
||||||
|
BIN
src/net/apocalypselabs/symat/images/logo-overlay.png
Normal file
BIN
src/net/apocalypselabs/symat/images/logo-overlay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 202 KiB |
Loading…
x
Reference in New Issue
Block a user