Created folders model, view, controler, moved files to folders
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/Model/Backend/Runtime/Main.class
Normal file
BIN
bin/Model/Backend/Runtime/Main.class
Normal file
Binary file not shown.
BIN
bin/Model/Backend/Runtime/ProgramStepInformation.class
Normal file
BIN
bin/Model/Backend/Runtime/ProgramStepInformation.class
Normal file
Binary file not shown.
BIN
bin/Model/Backend/Runtime/TODO.class
Normal file
BIN
bin/Model/Backend/Runtime/TODO.class
Normal file
Binary file not shown.
Binary file not shown.
BIN
bin/Model/Backend/Runtime/WATCHDOG.class
Normal file
BIN
bin/Model/Backend/Runtime/WATCHDOG.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/View/PIC_SIMULATOR_GUI_JAVA/GUIMenuBar.class
Normal file
BIN
bin/View/PIC_SIMULATOR_GUI_JAVA/GUIMenuBar.class
Normal file
Binary file not shown.
Binary file not shown.
BIN
bin/View/PIC_SIMULATOR_GUI_JAVA/GUIRegistersDetailed.class
Normal file
BIN
bin/View/PIC_SIMULATOR_GUI_JAVA/GUIRegistersDetailed.class
Normal file
Binary file not shown.
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
package Backend.Runtime;
|
||||
|
||||
import Backend.Microcontroller.PIC;
|
||||
|
||||
public class ProgramStepInformation {
|
||||
private PIC oPIC;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package Backend.Runtime;
|
||||
|
||||
public enum WATCHDOG {
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package Backend.BackendCommandProcessing;
|
||||
package Model.Backend.BackendCommandProcessing;
|
||||
|
||||
import Backend.Microcontroller.PIC;
|
||||
import Model.Backend.Microcontroller.PIC;
|
||||
|
||||
public class InformationConnecter {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.EepromLoader;
|
||||
package Model.Backend.EepromLoader;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@@ -6,7 +6,7 @@ import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import Backend.Microcontroller.PIC;
|
||||
import Model.Backend.Microcontroller.PIC;
|
||||
|
||||
public class ReadEepromFile {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.InterruptHandling;
|
||||
package Model.Backend.InterruptHandling;
|
||||
|
||||
public class InterruptServiceHandler extends Thread {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.InterruptHandling;
|
||||
package Model.Backend.InterruptHandling;
|
||||
|
||||
/**
|
||||
* Class contains methods which calls a method to an overhanded value.
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.Microcontroller;
|
||||
package Model.Backend.Microcontroller;
|
||||
|
||||
public class Bitmask {
|
||||
/**
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.Microcontroller;
|
||||
package Model.Backend.Microcontroller;
|
||||
/**
|
||||
* @author Aaron Moser
|
||||
* @date 23.06.2021
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.Microcontroller;
|
||||
package Model.Backend.Microcontroller;
|
||||
|
||||
/**
|
||||
* @author Aaron Moser
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.Microcontroller;
|
||||
package Model.Backend.Microcontroller;
|
||||
|
||||
/**
|
||||
* @author Aaron Moser
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.Microcontroller;
|
||||
package Model.Backend.Microcontroller;
|
||||
|
||||
import java.util.EmptyStackException;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.Microcontroller;
|
||||
package Model.Backend.Microcontroller;
|
||||
|
||||
/**
|
||||
* @author Aaron Moser
|
||||
@@ -4,13 +4,13 @@
|
||||
* @lastchange 21.02.2022
|
||||
*/
|
||||
|
||||
package Backend.Runtime;
|
||||
package Model.Backend.Runtime;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import Backend.Microcontroller.PIC;
|
||||
import Backend.Microcontroller.WATCHDOG;
|
||||
import Frontend.PIC_SIMULATOR_GUI_JAVA.GUIMainFrame;
|
||||
import Model.Backend.Microcontroller.PIC;
|
||||
import Model.Backend.Microcontroller.WATCHDOG;
|
||||
import View.PIC_SIMULATOR_GUI_JAVA.GUIMainFrame;
|
||||
|
||||
public class Environment {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.Runtime;
|
||||
package Model.Backend.Runtime;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
7
src/Model/Backend/Runtime/ProgramStepInformation.java
Executable file
7
src/Model/Backend/Runtime/ProgramStepInformation.java
Executable file
@@ -0,0 +1,7 @@
|
||||
package Model.Backend.Runtime;
|
||||
|
||||
import Model.Backend.Microcontroller.PIC;
|
||||
|
||||
public class ProgramStepInformation {
|
||||
private PIC oPIC;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.Runtime;
|
||||
package Model.Backend.Runtime;
|
||||
|
||||
public class TODO {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.Runtime;
|
||||
package Model.Backend.Runtime;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
5
src/Model/Backend/Runtime/WATCHDOG.java
Normal file
5
src/Model/Backend/Runtime/WATCHDOG.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package Model.Backend.Runtime;
|
||||
|
||||
public enum WATCHDOG {
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package Backend.Statistics.ErrorHandling;
|
||||
package Model.Backend.Statistics.ErrorHandling;
|
||||
|
||||
public class BackendErrorCounter {
|
||||
private int iErrorCounter = 0;
|
||||
@@ -1,4 +1,4 @@
|
||||
package Frontend.PIC_SIMULATOR_GUI_JAVA;
|
||||
package View.PIC_SIMULATOR_GUI_JAVA;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
@@ -14,8 +14,8 @@ import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import Backend.EepromLoader.ReadEepromFile;
|
||||
import Backend.Runtime.Environment;
|
||||
import Model.Backend.EepromLoader.ReadEepromFile;
|
||||
import Model.Backend.Runtime.Environment;
|
||||
|
||||
public class GUIMainFrame extends JFrame {
|
||||
|
||||
@@ -72,16 +72,16 @@ public class GUIMainFrame extends JFrame {
|
||||
env.getPIC().get_WRegister()};
|
||||
GUIRegisters oGUIRegisters = new GUIRegisters();
|
||||
oGUIRegisters.setRegisters(aiRegisters);
|
||||
GUIRegistersDetailed oGuiRegistersDetailed = new GUIRegistersDetailed();
|
||||
GUIRegistersDetailed oGUIRegistersDetailed = new GUIRegistersDetailed();
|
||||
oConstraintsRegisterInformation.anchor = GridBagConstraints.WEST;
|
||||
oConstraintsRegisterInformation.gridx = 0;
|
||||
oConstraintsRegisterInformation.gridy = 0;
|
||||
oPanelRegisterInformation.add(oGUIRegisters, oConstraintsRegisterInformation);
|
||||
oConstraintsRegisterInformation.gridy = 1;
|
||||
oConstraintsRegisterInformation.anchor = GridBagConstraints.WEST;
|
||||
oPanelRegisterInformation.add(oGuiRegistersDetailed, oConstraintsRegisterInformation);
|
||||
oPanelRegisterInformation.add(oGUIRegistersDetailed, oConstraintsRegisterInformation);
|
||||
|
||||
this.setJMenuBar(new GUIMenuBar(env, this, oGUITestFileTable, oGUIRegisters));
|
||||
this.setJMenuBar(new GUIMenuBar(env, this, oGUITestFileTable, oGUIRegisters, oGUIRegistersDetailed));
|
||||
this.setVisible(true); //make frame visible
|
||||
|
||||
ImageIcon guiLogo = new ImageIcon("./pictures/gui_logo.png"); // create an ImageIcon
|
||||
@@ -1,4 +1,4 @@
|
||||
package Frontend.PIC_SIMULATOR_GUI_JAVA;
|
||||
package View.PIC_SIMULATOR_GUI_JAVA;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
@@ -16,15 +16,16 @@ import javax.swing.JMenuBar;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
|
||||
import Backend.EepromLoader.ReadEepromFile;
|
||||
import Backend.Runtime.Environment;
|
||||
import Model.Backend.EepromLoader.ReadEepromFile;
|
||||
import Model.Backend.Runtime.Environment;
|
||||
|
||||
public class GUIMenuBar extends JMenuBar implements ActionListener {
|
||||
Environment oEnv;
|
||||
GUIMainFrame oGUIMainFrame;
|
||||
GUITestFileTable oGUITestFileTable;
|
||||
GUIRegisters oGUIRegisters;
|
||||
GUIRegistersDetailed oGUIRegistersDetailed;
|
||||
|
||||
ArrayList<JCheckBox> oCheckBoxes;
|
||||
ReadEepromFile oRef;
|
||||
boolean[] bBreakpointSet;
|
||||
@@ -96,7 +97,7 @@ public class GUIMenuBar extends JMenuBar implements ActionListener {
|
||||
* Constructor initializes menubar.
|
||||
* @param frame
|
||||
*/
|
||||
public GUIMenuBar(Environment env, GUIMainFrame mainframe, GUITestFileTable guitft, GUIRegisters guiregs) { //TODO maybe single components, with methods, of frame to set theme
|
||||
public GUIMenuBar(Environment env, GUIMainFrame mainframe, GUITestFileTable guitft, GUIRegisters guiregs, GUIRegistersDetailed guiregsdet) { //TODO maybe single components, with methods, of frame to set theme
|
||||
|
||||
//Custom Separators since default is not able to change background.
|
||||
oSeparator0 = new JMenuItem();
|
||||
@@ -117,6 +118,7 @@ public class GUIMenuBar extends JMenuBar implements ActionListener {
|
||||
oGUIMainFrame = mainframe;
|
||||
oGUITestFileTable = guitft;
|
||||
oGUIRegisters = guiregs;
|
||||
oGUIRegistersDetailed = guiregsdet;
|
||||
|
||||
//File
|
||||
oFileMenu = new JMenu(sGermanLang[0]);
|
||||
@@ -370,6 +372,7 @@ public class GUIMenuBar extends JMenuBar implements ActionListener {
|
||||
oGUITestFileTable.setTheme(1);
|
||||
oGUIRegisters.setTheme(1);
|
||||
oGUIMainFrame.setTheme(1);
|
||||
oGUIRegistersDetailed.setTheme(1);
|
||||
}
|
||||
//Change to light theme
|
||||
if (e.getSource() == oLightTheme) {
|
||||
@@ -378,6 +381,7 @@ public class GUIMenuBar extends JMenuBar implements ActionListener {
|
||||
oGUITestFileTable.setTheme(0);
|
||||
oGUIRegisters.setTheme(0);
|
||||
oGUIMainFrame.setTheme(0);
|
||||
oGUIRegistersDetailed.setTheme(0);
|
||||
}
|
||||
|
||||
//Microcontroller
|
||||
@@ -1,4 +1,4 @@
|
||||
package Frontend.PIC_SIMULATOR_GUI_JAVA;
|
||||
package View.PIC_SIMULATOR_GUI_JAVA;
|
||||
|
||||
import java.awt.GridBagLayout;
|
||||
import java.util.ArrayList;
|
||||
@@ -183,6 +183,10 @@ public class GUIRegisters extends JPanel {
|
||||
this.add(oRightComponentPanel, oConstraints);
|
||||
}
|
||||
|
||||
private void changeWidth() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds panels to panel list and textfields to textfield list
|
||||
*/
|
||||
@@ -1,5 +1,6 @@
|
||||
package Frontend.PIC_SIMULATOR_GUI_JAVA;
|
||||
package View.PIC_SIMULATOR_GUI_JAVA;
|
||||
|
||||
import javax.sound.sampled.AudioSystem;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
@@ -7,10 +8,29 @@ import javax.swing.JTable;
|
||||
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.util.ArrayList;
|
||||
import java.awt.Color;
|
||||
|
||||
public class GUIRegistersDetailed extends JPanel {
|
||||
|
||||
/**
|
||||
* Color oWhite = new Color(255, 253, 250);
|
||||
* Color oDarkGray = new Color(76, 78, 82);
|
||||
* Color oDarkGrayB = new Color(47, 47, 47);
|
||||
* Color oLightBlue = new Color(173, 216, 230);
|
||||
* Color oOrangeDM = new Color(255, 170, 0);
|
||||
* Color oLightBlueDM = new Color(0, 213, 255);
|
||||
* Color oOrangeDMB = new Color(255, 85, 0);
|
||||
* First Color == TextColor
|
||||
* Second Color == BackgroundColor
|
||||
* Third Color == BorderColor
|
||||
* Fourth Color == TextColor Marked
|
||||
* Fifth Color == BackgroundColor Marked
|
||||
* Sixth Color == BorderColor Marked
|
||||
*/
|
||||
Color[] aoDarkTheme = {new Color(255, 253, 250), new Color(76, 78, 82), new Color(47, 47, 47), new Color(0, 213, 255), new Color(255, 170, 0), new Color(255, 85, 0)};
|
||||
Color[] aoLightTheme = {new Color(76, 78, 82), new Color(255, 253, 250), new Color(173, 216, 230), new Color(0, 213, 255), new Color(255, 170, 0), new Color(255, 85, 0)};
|
||||
|
||||
JTable oStatusTable;
|
||||
JTable oOptionTable = new JTable();
|
||||
JTable oIntconTable = new JTable();
|
||||
@@ -23,8 +43,14 @@ public class GUIRegistersDetailed extends JPanel {
|
||||
JLabel oOptionLabel = new JLabel("OPTION");
|
||||
JLabel oIntconLabel = new JLabel("INTCON");
|
||||
|
||||
ArrayList<JLabel> oLabels = new ArrayList<JLabel>();
|
||||
ArrayList<JPanel> oPanels = new ArrayList<JPanel>();
|
||||
ArrayList<JTable> oTables = new ArrayList<JTable>();
|
||||
|
||||
public GUIRegistersDetailed() {
|
||||
buildGUIRegistersDetailed();
|
||||
addComponentsList();
|
||||
setTheme(0);
|
||||
}
|
||||
|
||||
private void buildGUIRegistersDetailed() {
|
||||
@@ -100,4 +126,63 @@ public class GUIRegistersDetailed extends JPanel {
|
||||
|
||||
this.setBorder(BorderFactory.createLineBorder(Color.BLACK));
|
||||
}
|
||||
|
||||
public void addComponentsList() {
|
||||
oLabels.add(oIntconLabel);
|
||||
oLabels.add(oOptionLabel);
|
||||
oLabels.add(oStatusLabel);
|
||||
|
||||
oPanels.add(oIntconPanel);
|
||||
oPanels.add(oOptionPanel);
|
||||
oPanels.add(oStatusPanel);
|
||||
|
||||
oTables.add(oIntconTable);
|
||||
oTables.add(oOptionTable);
|
||||
oTables.add(oStatusTable);
|
||||
}
|
||||
|
||||
public void setTheme(int iThemeNr) {
|
||||
switch (iThemeNr) {
|
||||
case 0: {
|
||||
for (JLabel oLabel : oLabels) {
|
||||
oLabel.setForeground(aoLightTheme[0]);
|
||||
oLabel.setBackground(aoLightTheme[1]);
|
||||
}
|
||||
for (JPanel oPanel : oPanels) {
|
||||
oPanel.setForeground(aoLightTheme[0]);
|
||||
oPanel.setBackground(aoLightTheme[1]);
|
||||
oPanel.setBorder(BorderFactory.createLineBorder(aoLightTheme[2]));
|
||||
}
|
||||
for (JTable oTable : oTables) {
|
||||
oTable.setForeground(aoLightTheme[0]);
|
||||
oTable.setBackground(aoLightTheme[1]);
|
||||
oTable.setBorder(BorderFactory.createLineBorder(aoLightTheme[2]));
|
||||
oTable.setGridColor(aoLightTheme[2]);
|
||||
}
|
||||
this.setForeground(aoLightTheme[0]);
|
||||
this.setBackground(aoLightTheme[1]);
|
||||
this.setBorder(BorderFactory.createLineBorder(aoLightTheme[2]));
|
||||
}break;
|
||||
case 1: {
|
||||
for (JLabel oLabel : oLabels) {
|
||||
oLabel.setForeground(aoDarkTheme[0]);
|
||||
oLabel.setBackground(aoDarkTheme[1]);
|
||||
}
|
||||
for (JPanel oPanel : oPanels) {
|
||||
oPanel.setForeground(aoDarkTheme[0]);
|
||||
oPanel.setBackground(aoDarkTheme[1]);
|
||||
oPanel.setBorder(BorderFactory.createLineBorder(aoDarkTheme[2]));
|
||||
}
|
||||
for (JTable oTable : oTables) {
|
||||
oTable.setForeground(aoDarkTheme[0]);
|
||||
oTable.setBackground(aoDarkTheme[1]);
|
||||
oTable.setBorder(BorderFactory.createLineBorder(aoDarkTheme[2]));
|
||||
oTable.setGridColor(aoDarkTheme[2]);
|
||||
}
|
||||
this.setForeground(aoDarkTheme[0]);
|
||||
this.setBackground(aoDarkTheme[1]);
|
||||
this.setBorder(BorderFactory.createLineBorder(aoDarkTheme[2]));
|
||||
}break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package Frontend.PIC_SIMULATOR_GUI_JAVA;
|
||||
package View.PIC_SIMULATOR_GUI_JAVA;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.GridBagConstraints;
|
||||
Reference in New Issue
Block a user