Merge branch 'main' into release
This commit is contained in:
commit
7d822a604c
3 changed files with 32 additions and 11 deletions
2
pom.xml
2
pom.xml
|
@ -48,7 +48,7 @@
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<release>17</release> <!-- Hier auf die Java-Version setzen, die Sie verwenden -->
|
<release>17</release>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
|
@ -25,7 +25,6 @@ public class LoadMenu {
|
||||||
load.setBounds(1, 178, 398, 20);
|
load.setBounds(1, 178, 398, 20);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
loadwindow.setSize(400, 200);
|
loadwindow.setSize(400, 200);
|
||||||
loadwindow.setUndecorated(true);
|
loadwindow.setUndecorated(true);
|
||||||
loadwindow.setResizable(false);
|
loadwindow.setResizable(false);
|
||||||
|
|
|
@ -60,16 +60,20 @@ public class MainGUI {
|
||||||
public JCheckBox filtercompleted = new JCheckBox("Nach geschafft filtern");
|
public JCheckBox filtercompleted = new JCheckBox("Nach geschafft filtern");
|
||||||
public Button copyid = new Button("Level ID kopieren");
|
public Button copyid = new Button("Level ID kopieren");
|
||||||
public Button showinfos = new Button("Mehr Infos anzeigen");
|
public Button showinfos = new Button("Mehr Infos anzeigen");
|
||||||
|
public JButton settings = new JButton("⚙");
|
||||||
GridLayout gridLayout = new GridLayout(3, 1);
|
GridLayout gridLayout = new GridLayout(3, 1);
|
||||||
private String[] showing = {"Alle anzeigen", "Top 3", "Top 50", "Top 150", "Top 200"};
|
private String[] showing = {"Alle anzeigen", "Top 3", "Top 50", "Top 150", "Top 200"};
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
public JComboBox show = new JComboBox(showing);
|
public JComboBox show = new JComboBox(showing);
|
||||||
private FetchData fetch = new FetchData();
|
private FetchData fetch = new FetchData();
|
||||||
private Elements elements = new Elements();
|
private Elements elements = new Elements();
|
||||||
|
|
||||||
|
private int completedcount = 0;
|
||||||
|
|
||||||
public void build() throws IOException {
|
public void build() throws IOException {
|
||||||
GuiData data = new GuiData();
|
GuiData data = new GuiData();
|
||||||
data.IndexData();
|
data.IndexData();
|
||||||
|
|
||||||
gridLayout.setRows(data.getLocalLevels().size());
|
gridLayout.setRows(data.getLocalLevels().size());
|
||||||
|
|
||||||
main.setSize(900, 700);
|
main.setSize(900, 700);
|
||||||
|
@ -80,7 +84,7 @@ public class MainGUI {
|
||||||
level.setBounds(10, 10, 200, 30);
|
level.setBounds(10, 10, 200, 30);
|
||||||
level.setFont(level.getFont().deriveFont(15f));
|
level.setFont(level.getFont().deriveFont(15f));
|
||||||
|
|
||||||
filtercompleted.setBounds(720, 15, 200, 30);
|
filtercompleted.setBounds(710, 15, 200, 30);
|
||||||
|
|
||||||
progress.setBounds(200, 300, 500, 30);
|
progress.setBounds(200, 300, 500, 30);
|
||||||
progress.setStringPainted(true);
|
progress.setStringPainted(true);
|
||||||
|
@ -102,6 +106,10 @@ public class MainGUI {
|
||||||
|
|
||||||
qualify.setBounds(10, 170, 164, 30);
|
qualify.setBounds(10, 170, 164, 30);
|
||||||
|
|
||||||
|
settings.setBounds(1, 1, 60, 60);
|
||||||
|
settings.setFont(settings.getFont().deriveFont(30f));
|
||||||
|
settings.setBackground(Color.LIGHT_GRAY);
|
||||||
|
|
||||||
victor.setBounds(1, 276, 164, 30);
|
victor.setBounds(1, 276, 164, 30);
|
||||||
records.getVerticalScrollBar().setUnitIncrement(16);
|
records.getVerticalScrollBar().setUnitIncrement(16);
|
||||||
|
|
||||||
|
@ -124,13 +132,11 @@ public class MainGUI {
|
||||||
|
|
||||||
verifier.setBounds(10, 110, 164, 30);
|
verifier.setBounds(10, 110, 164, 30);
|
||||||
|
|
||||||
search.setBounds(1, 1, 500, 60);
|
search.setBounds(60, 1, 440, 60);
|
||||||
|
|
||||||
show.setBounds(500, 1, 200, 60);
|
show.setBounds(500, 1, 200, 60);
|
||||||
|
|
||||||
recordspanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
|
recordspanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Thread thread = new Thread(new Runnable() {
|
Thread thread = new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -167,6 +173,7 @@ public class MainGUI {
|
||||||
try {
|
try {
|
||||||
file.createNewFile();
|
file.createNewFile();
|
||||||
} catch (IOException e1) {
|
} catch (IOException e1) {
|
||||||
|
|
||||||
e1.printStackTrace();
|
e1.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,6 +193,7 @@ public class MainGUI {
|
||||||
contents.setBackground(Color.decode("#cbffbf"));
|
contents.setBackground(Color.decode("#cbffbf"));
|
||||||
uncompleted.setVisible(true);
|
uncompleted.setVisible(true);
|
||||||
completed.setVisible(false);
|
completed.setVisible(false);
|
||||||
|
completedcount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
contents.addMouseListener(new MouseListener() {
|
contents.addMouseListener(new MouseListener() {
|
||||||
|
@ -207,11 +215,13 @@ public class MainGUI {
|
||||||
qualify.setText("Qualifikation: " + data.getQualification().get(index) + "%");
|
qualify.setText("Qualifikation: " + data.getQualification().get(index) + "%");
|
||||||
level.setVerticalAlignment(SwingConstants.CENTER);
|
level.setVerticalAlignment(SwingConstants.CENTER);
|
||||||
|
|
||||||
|
|
||||||
FetchData fetchData = new FetchData();
|
FetchData fetchData = new FetchData();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
recordspanel.setLayout(new GridLayout(GuiData.allVictors(fetchData.allLevels().get(index)).size(), 1));
|
recordspanel.setLayout(new GridLayout(GuiData.allVictors(fetchData.allLevels().get(index)).size(), 1));
|
||||||
} catch (IOException e1) {
|
} catch (IOException e1) {
|
||||||
|
|
||||||
e1.printStackTrace();
|
e1.printStackTrace();
|
||||||
}
|
}
|
||||||
recordspanel.setBackground(Color.GRAY);
|
recordspanel.setBackground(Color.GRAY);
|
||||||
|
@ -221,15 +231,13 @@ public class MainGUI {
|
||||||
recordspanel.removeAll();
|
recordspanel.removeAll();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Instanz der FetchData-Klasse erstellen
|
ArrayList<String> victors = GuiData.allVictors(fetchData.allLevels().get(index));
|
||||||
ArrayList<String> victors = GuiData.allVictors(fetchData.allLevels().get(index)); // Methode allVictors aufrufen
|
|
||||||
|
|
||||||
victorcount.setText("Anzahl Victors: " + victors.size());
|
victorcount.setText("Anzahl Victors: " + victors.size());
|
||||||
|
|
||||||
recordspanel.setLayout(new GridLayout(victors.size(), 1));
|
recordspanel.setLayout(new GridLayout(victors.size(), 1));
|
||||||
|
|
||||||
for(String victor : victors) {
|
for(String victor : victors) {
|
||||||
System.out.println(victor);
|
|
||||||
JPanel contents = new JPanel();
|
JPanel contents = new JPanel();
|
||||||
contents.setPreferredSize(new Dimension(165, 50));
|
contents.setPreferredSize(new Dimension(165, 50));
|
||||||
contents.setLayout(null);
|
contents.setLayout(null);
|
||||||
|
@ -278,6 +286,8 @@ public class MainGUI {
|
||||||
rank.setBounds(10, 10, 40, 30);
|
rank.setBounds(10, 10, 40, 30);
|
||||||
rank.setName(i + "");
|
rank.setName(i + "");
|
||||||
|
|
||||||
|
filtercompleted.setText("nach Geschafft filtern (" + completedcount + ")");
|
||||||
|
|
||||||
show.addActionListener(new ActionListener() {
|
show.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -363,7 +373,7 @@ public class MainGUI {
|
||||||
scroll.revalidate();
|
scroll.revalidate();
|
||||||
}
|
}
|
||||||
} else if (e.getStateChange() == ItemEvent.DESELECTED) {
|
} else if (e.getStateChange() == ItemEvent.DESELECTED) {
|
||||||
levelpanel.add(contents, 0); // Füge das Element am Anfang hinzu
|
levelpanel.add(contents, 0);
|
||||||
}
|
}
|
||||||
levelpanel.repaint();
|
levelpanel.repaint();
|
||||||
levelpanel.revalidate();
|
levelpanel.revalidate();
|
||||||
|
@ -386,6 +396,17 @@ public class MainGUI {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
thread.start();
|
thread.start();
|
||||||
|
|
||||||
|
settings.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
SettingsGui gui = new SettingsGui();
|
||||||
|
gui.showSettings();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
elements.infopanel().add(copyid);
|
elements.infopanel().add(copyid);
|
||||||
elements.infopanel().add(level, SwingConstants.CENTER);
|
elements.infopanel().add(level, SwingConstants.CENTER);
|
||||||
|
@ -408,6 +429,7 @@ public class MainGUI {
|
||||||
main.add(progress);
|
main.add(progress);
|
||||||
main.add(filtercompleted);
|
main.add(filtercompleted);
|
||||||
main.add(show);
|
main.add(show);
|
||||||
|
main.add(settings);
|
||||||
main.add(elements.infopanel());
|
main.add(elements.infopanel());
|
||||||
main.setVisible(true);
|
main.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue