Skip to content
Snippets Groups Projects
Commit cb4e9119 authored by Leon Dieter's avatar Leon Dieter
Browse files

minor changes

parent db1cbe71
No related branches found
No related tags found
No related merge requests found
......@@ -171,12 +171,16 @@ public class Simulator implements Runnable, ActionListener{
}
}
Point locationWindow = gui.getLocation();
//int WidthWindow = gui.getxscale();
//int HeightWindow = gui.getyscale();
gui.stopThread();
gui.dispose();
createSubClasses();
//gui.updateGUI(WidthWindow, HeightWindow);
gui.setLocation(locationWindow);
for (SimCodeFunction function : functionsCode) {
arduino.addFunction(function);
}
......
......@@ -63,11 +63,11 @@ public class GUI extends JFrame implements Runnable, ActionListener {
private JButton clearButton;
private JCheckBox checkBox;
private JScrollPane scrollPane;
private int xscale = 968;
private int xscale = 800;
private int yscale = 968;
private JPanel modulPanel;
private Container mainPane;
private int WindowHeight = 1000, WindowWidth = 950, topPanelHeight, topPanelWidth;
private int WindowHeight = 968, WindowWidth = 968, topPanelHeight, topPanelWidth;
/**
* Konstruktor der Klasse GUI
......@@ -136,6 +136,9 @@ public class GUI extends JFrame implements Runnable, ActionListener {
@Override
public void componentResized(ComponentEvent e) {
//Das Fenster soll erst dann upgedatet werden wenn eine Grennderung grer 30 stattgefunden hat
//um zu verhindern dass die update Funktion durch ein zu hufiges Aufrufen das Programm aufhngt.
if((Math.abs(WindowHeight - getHeight()) > 5) || (Math.abs(WindowWidth - getWidth()) > 5)) {
......@@ -161,6 +164,7 @@ public class GUI extends JFrame implements Runnable, ActionListener {
}
}
@Override
......@@ -206,12 +210,15 @@ public class GUI extends JFrame implements Runnable, ActionListener {
// modules[3].updateGUI(_xscale, _yscale);
updateSerialLog(getHeight()-topPanel.getHeight());
super.setVisible(true);
panel.setVisible(true);
updateSerialLog(getHeight()-topPanel.getHeight());
}
......@@ -320,7 +327,7 @@ public class GUI extends JFrame implements Runnable, ActionListener {
int numRows = Math.min(Math.max(((int)size/20)-3, 3), 20);
serialLog.setRows(numRows);
System.out.println(numRows);
this.setVisible(true);
}
/**
......@@ -462,5 +469,17 @@ public class GUI extends JFrame implements Runnable, ActionListener {
}
public int getxscale() {
return xscale;
}
public int getyscale() {
return yscale;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment