loadwindow
This commit is contained in:
parent
e20681b9fc
commit
362d91d6c9
3 changed files with 81 additions and 3 deletions
67
src/gui/LoadMenu.java
Normal file
67
src/gui/LoadMenu.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
package gui;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Toolkit;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JProgressBar;
|
||||
import javax.swing.WindowConstants;
|
||||
|
||||
public class LoadMenu {
|
||||
|
||||
public JProgressBar load = new JProgressBar();
|
||||
JFrame loadwindow = new JFrame("Datenbank wird gelesen...");
|
||||
JLabel loading = new JLabel("Liste wird geladen...");
|
||||
|
||||
public void onLoad() {
|
||||
|
||||
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
|
||||
load.setMinimum(0);
|
||||
load.setMaximum(4);
|
||||
|
||||
|
||||
load.setBounds(1, 178, 398, 20);
|
||||
|
||||
|
||||
loadwindow.setSize(400, 200);
|
||||
loadwindow.setUndecorated(true);
|
||||
loadwindow.setResizable(false);
|
||||
loadwindow.setLocation(dim.width/2-loadwindow.getSize().width/2, dim.height/2-loadwindow.getSize().height/2);
|
||||
loadwindow.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
|
||||
loadwindow.setLayout(null);
|
||||
loadwindow.setVisible(true);
|
||||
|
||||
JLabel label1 = new JLabel("by potzplitz");
|
||||
label1.setBounds(168, 80, 200, 30);
|
||||
label1.setVisible(true);
|
||||
loadwindow.add(label1);
|
||||
|
||||
|
||||
loading.setBounds(1, 155, 200, 30);
|
||||
loadwindow.add(loading);
|
||||
|
||||
JLabel label = new JLabel("Extreme Demon List");
|
||||
label.setBounds(125, 20, 300, 100);
|
||||
label.setFont(label.getFont().deriveFont(20f));
|
||||
label.setVisible(true);
|
||||
loadwindow.add(label);
|
||||
|
||||
loadwindow.add(load);
|
||||
|
||||
}
|
||||
|
||||
static int index = 0;
|
||||
|
||||
public void updateBar(String state) {
|
||||
index++;
|
||||
load.setValue(index);
|
||||
loading.setText(state);
|
||||
}
|
||||
|
||||
public void close() {
|
||||
loadwindow.dispose();
|
||||
}
|
||||
|
||||
}
|
|
@ -6,21 +6,32 @@ import data.DownloadLevels;
|
|||
import data.FetchData;
|
||||
import data.ManageFiles;
|
||||
import filestructure.CreateFileStructure;
|
||||
import gui.LoadMenu;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
|
||||
LoadMenu load = new LoadMenu();
|
||||
load.onLoad();
|
||||
|
||||
load.updateBar("Dateistruktur wird gebaut...");
|
||||
|
||||
CreateFileStructure struct = new CreateFileStructure();
|
||||
struct.create();
|
||||
|
||||
load.updateBar("Updatedaten werden heruntergeladen...");
|
||||
|
||||
FetchData fetch = new FetchData();
|
||||
fetch.getGithubString();
|
||||
|
||||
load.updateBar("Liste wird auf Updates geprüft...");
|
||||
|
||||
ManageFiles manager = new ManageFiles();
|
||||
manager.compareArrays();
|
||||
|
||||
|
||||
load.updateBar("Ladevorgang abgeschlossen");
|
||||
load.close();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
1.4
|
||||
https://github.com/potzplitz/ExtremeDemonList/releases/download/List1.4/List.jar
|
||||
1.5
|
||||
https://github.com/potzplitz/ExtremeDemonList/releases/download/List1.5/List.jar
|
Loading…
Reference in a new issue