Skip to content
Snippets Groups Projects
Commit 534e85ab authored by buehlera's avatar buehlera
Browse files

changes 20200717

parent 10649932
No related branches found
No related tags found
No related merge requests found
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
...@@ -36,7 +36,9 @@ public class Simulator implements Runnable, ActionListener { ...@@ -36,7 +36,9 @@ public class Simulator implements Runnable, ActionListener {
private Vector<SimCodeFunction> functionsCode = new Vector<SimCodeFunction>(); private Vector<SimCodeFunction> functionsCode = new Vector<SimCodeFunction>();
private Simulator() { //changed to public by Anian
//private Simulator() {
public Simulator() {
createSubClasses(); createSubClasses();
} }
......
...@@ -23,6 +23,7 @@ import javax.swing.JScrollPane; ...@@ -23,6 +23,7 @@ import javax.swing.JScrollPane;
import javax.swing.JTextArea; import javax.swing.JTextArea;
import javax.swing.text.DefaultCaret; import javax.swing.text.DefaultCaret;
//import edu.mit.blocks.workspace.Workspace;
import tec.letsgoing.ardublock.simulator.Simulator; import tec.letsgoing.ardublock.simulator.Simulator;
import tec.letsgoing.ardublock.simulator.arduino.Arduino; import tec.letsgoing.ardublock.simulator.arduino.Arduino;
import tec.letsgoing.ardublock.simulator.view.modules.ArduinoUno; import tec.letsgoing.ardublock.simulator.view.modules.ArduinoUno;
...@@ -77,10 +78,20 @@ public class GUI extends JFrame implements Runnable, ActionListener { ...@@ -77,10 +78,20 @@ public class GUI extends JFrame implements Runnable, ActionListener {
JButton reloadButton = new JButton(); JButton reloadButton = new JButton();
JButton measButton = new JButton(); JButton measButton = new JButton();
goButton.setIcon(new ImageIcon("res/Play.png")); //Changes by Anian: added res to build-path (subfolder img) to export images to .jar file
stopButton.setIcon(new ImageIcon("res/Stop.png")); //TODO get Images (Modules and Arduino) in ArduBlock and from .jar-File
reloadButton.setIcon(new ImageIcon("res/Reload.png")); // e.g. by getToolkit().getImage(GUI.class.getResource("PathToImage"))
measButton.setIcon(new ImageIcon("res/Measure.png")); //-> compare OpenBlocks-Workspace.java line 156
// creating Modules with images -> maybe pass img by parameter? -> getToolkit not available in Modules...
goButton.setIcon(new ImageIcon(getToolkit().getImage(GUI.class.getResource("/img/Play.png"))));
stopButton.setIcon(new ImageIcon(getToolkit().getImage(GUI.class.getResource("/img/Stop.png"))));
reloadButton.setIcon(new ImageIcon(getToolkit().getImage(GUI.class.getResource("/img/Reload.png"))));
measButton.setIcon(new ImageIcon(getToolkit().getImage(GUI.class.getResource("/img/Measure.png"))));
//goButton.setIcon(new ImageIcon("res/Play.png"));
//stopButton.setIcon(new ImageIcon("res/Stop.png"));
//reloadButton.setIcon(new ImageIcon("res/Reload.png"));
//measButton.setIcon(new ImageIcon("res/Measure.png"));
goButton.addActionListener(simu); goButton.addActionListener(simu);
stopButton.addActionListener(simu); stopButton.addActionListener(simu);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment